MMC1 and cc65
Page 1 of 1

Author:  na_th_an [ Mon Feb 27, 2017 2:22 am ]
Post subject:  MMC1 and cc65

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 ...

Author:  tepples [ Mon Feb 27, 2017 6:28 am ]
Post subject:  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

Author:  na_th_an [ Mon Feb 27, 2017 9:30 am ]
Post subject:  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 :)

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group