Fixed the jitter
Before the fix, when three AI players were alive, INTIM would have 1 +/- remaining at the end of VB when one fireball was in the air. When the second fireball was released there would often be insufficient time and the screen would jitter.
After the fix, with three AI players alive, INTIM has 7 +/- remaining when one fireball is in the air, 5 +/- when two are in the air and 3 +/- when three are in the air.
What's amazing is this was accomplished by commenting out a single line of source code!
Back in March, vdub_bobby suggested I use this routine to solve my object positioning problems:
PosObject sec sta WSYNC DivideLoop sbc #15 bcs DivideLoop;+4 4 eor #7 asl asl asl asl ;+10 14 sta.wx HMP0,X;+5 19 sta RESP0,X ;+4 23 sta WSYNC ; sta HMOVE rts
I commented out the HMOVE because I positioned all 5 objects in a row like this:
ldx #0 lda Player1X,x jsr PosObject; position P0 inx lda Player1X,x jsr PosObject; position P1 inx ldy Player1X,x iny tya jsr PosObject; position M0 inx ldy Player1X,x iny tya jsr PosObject; position M1 inx ldy Player1X,x iny tya jsr PosObject; position BL sta WSYNC sta HMOVE
I commented out the 2nd WSYNC, like this
PosObject sec sta WSYNC DivideLoop sbc #15 bcs DivideLoop;+4 4 eor #7 asl asl asl asl ;+10 14 sta.wx HMP0,X;+5 19 sta RESP0,X ;+4 23 ; sta WSYNC ; sta HMOVE rts
which bought me back about 5 scan lines worth of CPU time.
12 Comments
Recommended Comments