SeaGtGruff, on Mon Jul 16, 2007 2:24 AM, said:
Program each bank as if you're doing normal Atari 8K, 16K, or 32K bankswitching (F8, F6, or F4), but reserve the first 256 bytes of each bank for the Superchip-- that is, don't put any executable code or data there. If you fill those 256 bytes with $FF, then Stella and Z26 should be able to autodetect the format. Then, to access the Superchip, you write to the 128 bytes at $F000 through $F07F, and read from the 128 bytes at $F080 through $F0FF. For example:
Now done.
Quote
; 8K Superchip, or F8SC bankswitching
; bank 1
ORG $E000
RORG $D000
Now, given that I have my banks in separate .asm files and link them in dos after compiling them, is it necessary to be ORG/RORGing to these ranges instead of just using $F000 for each file?
Quote
Obviously, this is just the most bare-bones skeleton. As with any bankswitching method, the first thing your "start" code should do is switch to the desired bank where your program begins.
That part I have done properly at least.
Quote
Keep in mind that although you're reserving 256 from each bank for the Superchip, the RAM bytes will always be present regardless of which bank you switch to. That is, the ROM will switch banks but the RAM will stay the same, if you see what I mean.
nodnod. Which enables me to easily define the variables in my constants.asm file once, or so it should. I know I have an oversight somewhere still in the code. It's displaying again, but it seems to be reading data from the zero page for some of the sprite data as I can see the joystick registers of the TIA being displayed on the screen - it changes as I try to move around. Likely a missing # somewhere. Plus various other data is being initialized randomly by Stella. Essentially when I start the emulator, load the game I'll see a particular result on the sprites and player. (Sometimes the player size will be tiny, other times there will be multiple copies, color etc would all be randomly set.) And if I shut off the game, but not close the emulator, then restart it the visual effects will be the same. But if I shut down Stella, turn it back on, reload the game, I'll get a different set of colors, copies, sprite data, etc. Which will remain constant until I shut Stella down again.
I'll check over the code during the day, it's likely just a wrong declaration somewhere. I get those often enough.
At any rate, thanks for the help!