Nukey Shay Posted July 24, 2004 Share Posted July 24, 2004 OK...I'm admittantly slow to this bankswitching thing From what I gather, RORG (when used) defines the actual address origin that is used to calculate the addresses as the assembler compiles...while ORG remains to define the layout (or size) of the cart. I had previously been compiling the 2 halves of an 8k game seperately (transferring tag info between them)...but this appears to be a real time-saver So in a simple example of gibberish code (just to see if I've got the concept right)...and 8k game whose segments begin at $D000 for the first half and $F000 for the second - which is completely blank (just for this example) - save for 1 byte existing at $DF00 and the start/interrupt vectors at the end...would look like this: ORG $1000 RORG $D000 ;blah...just pretend that more data is here ORG $1F00 .byte $FF ;blah... ORG $2000 RORG $F000 START: ;blah... ORG $2FFC .word START, START Is this correct as far as those tags are concerned? Or is there something else that I am missing? Do all of the ORG statements need to be followed by RORG...or are they OK the way that they are above? Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted July 24, 2004 Share Posted July 24, 2004 Once you start using RORG, you have to use it with every ORG. So RORG $DF00 and RORG $FFFC are missing. Quote Link to comment Share on other sites More sharing options...
Paul Slocum Posted July 24, 2004 Share Posted July 24, 2004 the advanced programming guide has a section on bankswitching... http://www.qotile.net/minidig/docs/2600_ad..._prog_guide.txt -paul Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted July 24, 2004 Author Share Posted July 24, 2004 Thanks! Much easier compared to what I was doing. Quote Link to comment Share on other sites More sharing options...
Bruce Tomlin Posted July 25, 2004 Share Posted July 25, 2004 Once you start using RORG, you have to use it with every ORG. So RORG $DF00 and RORG $FFFC are missing. Only if you're using this to make a bank switched ROM using RORG. And there's no need for one at $FFFC because there's no labels there. Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted July 25, 2004 Share Posted July 25, 2004 Only if you're using this to make a bank switched ROM using RORG. And there's no need for one at $FFFC because there's no labels there. Yup, but IMO using it that way, is easier to handle. Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted July 26, 2004 Author Share Posted July 26, 2004 (edited) Yeah...I use multiple ORG assignments in assemblies so that it's easier for Dasm to report when I exceed areas (and by how much). Since those vectors must exist precisely at that location, fixing them there doesn't hurt I just wanted to be clear on how RORG worked...so that I can eliminate the tedium of having to paste equates into the seperate banks' assembly files (no longer necessary to keep the 4k assembly files seperate). I knew that there had to be an easier way than what I came up with on my own It would be insanity trying to use my old method with a 16k game Edited May 9, 2005 by Nukey Shay Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.