Hello,
As you can see on my signature, I'm a very experienced Assembly developer, but as every beginner on a Assembly language, we can do some mistakes, then I've written this to test if the compiler works(nesasm):
What Dwedit means is that some assemblers require a space at the start of the line before every instruction, so as not to confuse labels with instructions.
You can't store immediate ('stx #'); that operation makes no sense.
You probably need to tell the assembler to set up the iNES header (first 16 bytes of the ROM file) properly when generating the .ROM file, or you get to make one yourself.
Also, why are you using nesterJ? Good grief. Use Nestopia or Nintendulator.
Technically you could have a cart with no mapper (mapper 0) and CHR-RAM, but since Nintendo never manufactured one of those, some emulators will refuse to run ROMs with that configuration, which is wrong IMO. If you want to keep it simple and use CHR-RAM maybe you should try UNROM (mapper 2). Some emulators will complain if you have less than 8 banks (128KB), but some will accept 2 or 4.
tokumaru wrote:Technically you could have a cart with no mapper (mapper 0) and CHR-RAM, but since Nintendo never manufactured one of those, some emulators will refuse to run ROMs with that configuration
Nintendo never manufactured a game with the Color Dreams or Camerica mapper, instead preferring GNROM or UNROM, yet emulators take them just fine
(By "Nintendo" you meant "makers of commercial games".)
If you want to keep it simple and use CHR-RAM maybe you should try UNROM (mapper 2).
That would work for 16 KiB PRG. But once you go up to 32 KiB PRG, executing from $8000-$BFFF before setting up the mapper results in undefined behavior. There are two solutions: either make sure your entry point is in $C000-$FFFF and initializes the mapper, or switch to BNROM (mapper 34) or CPROM (mapper 13).
tepples wrote:That would work for 16 KiB PRG. But once you go up to 32 KiB PRG, executing from $8000-$BFFF before setting up the mapper results in undefined behavior.
I didn't mean he could simply change the mapper number, of course he'd have to put the reset code above $C000 and properly map the first bank to $8000-$BFFF if using 32KB of PRG-ROM, something that would take 2 lines of code.