+johnnywc Posted September 16, 2002 Share Posted September 16, 2002 Hello all, I am a *newbie* Atari 2600 programmer and I have a question regarding bankswitched games; in particular the F8 bankswitch mode used by Atari for 8K games. I have surfed the net and I understand basically how it works (correct me if I'm wrong): Accessing $1FF9 in bank 1 will switch to bank 2, and in that second bank accessing $1FF8 will switch back to bank 1. My question is this: How do you write an 8K game in DASM that will use bankswitch mode F8? I realize that you must have two 4K blocks of code and that only one bank can be used at one time. Is there a quick "shell" that demonstrates how this is done? Can DASM compile and generate an 8K BIN? Any help is greatly appreciated. Thanks, Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted September 16, 2002 Share Posted September 16, 2002 There is no problem for DASM, only for the programmer. First, you must provide some valid code in the new bank exactly after the address of the $1ffx access instructions. Second, you need valid code in both banks for each start-vector (the addresses can be different if you want) Third, you have to use ORG and RORG. ORG is then used by the assembler to physically put the code in order, while RORG tells it, at which adresses the banks really are. That's all. Some example code: ORG $1000 RORG $d000 SwitchToBank1: bit $1ff9 nop ; <- this is the instruction that is executed after bit $1ff8 ... ORG $2000 RORG $f000 SwitchToBank0: bit $1ff8 nop ; <- this is the instruction that is executed after bit $1ff9 ... 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.