mariogamemaster wrote:1. Write $00 to all RAM at $0000-$07FF and $6000-$7FFF.
7. Call the music INIT routine.
The code that clears RAM is at the location clrmem:
in your code. This has to be done before
you call INIT. If you clear RAM after
INIT, you're erasing all the work the INIT routine just did and it's like you didn't call it at all.
Also note that the "clrmem" section is filling the region at $0200 with $FE instead of $00. This was for the OAM region at $200 which you have moved to $700, so you've got to swap what you're doing to these two locations. (i.e.: change the line that says STA $0700, x
to STA $0200,x
and vice versa.)
Memblers wrote:...when you overflow a bank, NESASM will build the ROM without giving any error or warning about it.
This specifically is why I called it the "worst assembler I have ever used
" in another thread.
For mariogamemaster, though, this problem means that when you .incbin
your NSF, it's likely that NESASM will silently cut off part of the file, ruining it.
Another piece of advice, instead of trying to remove 128 bytes from the beginning by hand, you might just put -128
on the end of your .org
statement at the LOAD address, and include the original NSF file. (You don't need to save that 128 bytes of space.) By shifting the starting address back 128 bytes, you'll put the start of the data where it needs to be.