dougeff wrote:To answer your original question.
If you are using asm6, you need to fill banks (if there isn't code yet) with zeros using
pad and base statements.
And to initialize the MMC3, you should explicitly set every PRG and CHR bank and set the PPU mirroring.
Your init code should be in the last $2000 bytes of your PRG ROM, which will map as the fixed bank at $e000-ffff. Your vectors will also be in this bank.
Thanks! Although I don't really understand how to use those .base or .pad statements. When I did this:
Code: Select all
.base $6000
.base $8000
.base $A000
.base $C000
.base $E000
The rom was $4000 in size with the reset vectors at $200A-$200F. When loaded in an emulator, it doesn't function. When I did this:
Code: Select all
.base $6000
.pad $2000
.base $8000
.pad $2000
.base $A000
.pad $2000
.base $C000
.pad $2000
.base $E000
The compiler said "Value out of range" at all the lines corresponding to the .pad statements. It wouldn't produce a rom at all.
Through trial and error, the only thing I could get to produce a functioning rom was this:
Which is fine until the time comes when I'll need more memory.