It is currently Thu Oct 19, 2017 11:57 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: MMC1 and cc65
PostPosted: Mon Feb 27, 2017 2:22 am 
Offline

Joined: Mon May 27, 2013 9:40 am
Posts: 351
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 ...

_________________
http://www.mojontwins.com


Top
 Profile  
 
 Post subject: Re: MMC1 and cc65
PostPosted: Mon Feb 27, 2017 6:28 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19104
Location: NE Indiana, USA (NTSC)
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


Top
 Profile  
 
 Post subject: Re: MMC1 and cc65
PostPosted: Mon Feb 27, 2017 9:30 am 
Offline

Joined: Mon May 27, 2013 9:40 am
Posts: 351
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 :)

_________________
http://www.mojontwins.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group