I have produced a working MMC1 (SNROM) implementation of Shiru's neslib which works great in any configuration, but there's something which it lacks: Some MMC1 revisions won't guarantee a definite state on powerup so it is advised to add vectors and initialization code to all banks.
Well, I could do this manually by copypasting, but is there a better way to instruct cc65 to copy the same bit to all banks, via some kind of macro or whatever? Otherwise I will end up with a big, cumbersome .cfg file and an even bigger cr0.s ...
MMC1 and cc65
Moderator: Moderators
Re: MMC1 and cc65
Here are the linker configuration file, the init code, and the MMC1 support code in the same directory from my SNROM project template for assembly language programs. The latter makes a macro containing a jump to the last bank and puts it in sixteen different segments, the same method used by Barbie. I guess I could use .repeat and .sprintf to form the segment name to push not repeating myself even further.
EDIT: I missed a link
EDIT: I missed a link
Re: MMC1 and cc65
Thanks. But I don't quite get it. I notice that you have created a STUBxx segment for each copy of the reset handler, which I guess will include the vectors... But I can't see where or how you use that afterwards, at least in the two files you have provided.
EDIT: Ok, I see, it was elsewhere. Thanks, that's a start. Let me figure out how to repeat the vectors as well and I'm done.
EDIT EDIT: Now I see. It's everything in there. You counted the bytes.
Thank you
EDIT: Ok, I see, it was elsewhere. Thanks, that's a start. Let me figure out how to repeat the vectors as well and I'm done.
EDIT EDIT: Now I see. It's everything in there. You counted the bytes.
Thank you