Jump to content
IGNORED

SpiceWare's Blog - Fixed the jitter


RSS Bot

Recommended Posts

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:

CODEPosObject

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:

CODE 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

CODEPosObject

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.

 

http://www.atariage.com/forums/index.php?a...;showentry=1835

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...