Subject: RE: [stella] Supercharger internals... From: Robert "A." Colbert <colbertb@xxxxxxxxxxxx> Date: Fri, 16 May 1997 10:33:59 -0500 |
>Reply to your message of 5/16/97 9:56 AM >> I have just written a little test program that does SC writing with code >> executed in the VCS RAM and it works. So that does not semm to be the >> explanation. That wasn't necessary, Cheetah does just that, as a matter of fact, Cheetah also switches banks using code in the RAM area too, take a look at the source code, it is on my webpage. >> What is strange is, that in all my programs I have to use a NOP in the >> SC writing routine like >> >> LDX #$1d >> CMP $F000,X >> NOP >> CMP $FFF8 >> >> But Bob's Etch program, for example, runs perfectly on my system, although >> it doesn't have the NOPs. Well, here is what is happening, if you use an indexed address mode as in the example above, you don't need a NOP, even though my 6502 opcode chart says this takes the same number of cycles as an unindexed address mode as such: lda $F01D nop sta $FFF8 the above example NEEDS the nop to work correctly. >Could you post his code (or just the part that does the write) O.K. here it is, pretty ugly... plot lda INPT4 bmi plot4 lda xpos bmi plot4 cmp #$60 bpl plot4 tay plot1 ror ror ror ror and #$f clc adc #$fa sta tmpadrhi tya and #$0f tax and #$08 beq plot2 lda #$80 plot2 sta tmpadrlo lda pixel,x ldy ypos bmi plot4 cpy #$78 bpl plot4 ldx mode cpx #$1 beq plot2a cpx #$5 beq clear ora (tmpadrlo),y jmp plot2b clear lda #$0 beq plot2b plot2a eor (tmpadrlo),y plot2b tax ldy enable lda $f000,y sta $fff8 ldy ypos lda $f000,x lda (tmpadrlo),y ldy $80 lda $f000,y sta $fff8 plot3 rts plot4 sta WSYNC rts >Can the read that sets the bank configuration be anywhere in the cart's >memory or does it have to be within the 1000 to 10ff range? Yes, it can be anywhere, but if you switch out the bank your code is in, then I don't know exactly what happens. I used the RAM to store my BS routine for Cheetah, which saved me a lot of headaches. Later, Bob Wanna write a game for the Atari 2600? Check out http://www.novia.net/~rcolbert -- Archives available at http://www.biglist.com/lists/stella/archives/ E-mail UNSUBSCRIBE in the body to stella-request@xxxxxxxxxxx to be removed.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [stella] Supercharger internals, bwmott | Thread | Re: [stella] Supercharger internals, bwmott |
Re: [stella] Supercharger internals, bwmott | Date | Re: [stella] Supercharger internals, bwmott |
Month |