Subject: [stella] Timing correction From: Glenn Saunders <cybpunks2@xxxxxxxxxxxxx> Date: Sat, 10 Nov 2001 15:34:35 -0800 |
; you might be able ; to avoid this ; sec ; +2 4
; sbc M0_Y ; +3 7 ; beq .enable ; +2³ 9/10
; adc #PedHeight ; +2 11 ; bcc .disable ; +2³ 13/14 ; /MISSILE LOGIC (13 CYCLES NO BRANCHING)
; bytes stored ; as: mmmmww00 (m = motion, w = width)
; lda (MissileCurrentFramePtr),y; +5 18 ; sta HMM0 ; +3 21 ; asl ; +2 23 ; asl ; +2 25 ; sta NUSIZ0 ; +3 28
; NEEDED FOR CONSTANT TIMING ; NOP ' +2 30 ; /STORE THE MISSILE (17 CYCLES)
;TAKES CONSTANT 30 CYCLES REGARDLESS OF BRANCHES TAKEN ;.continue: ;
;.enable: ; 14 ;bytes stored ; as: mmmmss00 ; lda (ptr),y ; +5 19 ; sta HMMx ; +3 22 ; lda #2 ; +2 24 ; sta ENAMx ; +3 27 ; bne .continue ; +3 30 ; /STORE THE MISSILE2 ;16 CYCLES TOTAL (30 for entire routine)
;.disable: ; 18 ; lda #0 ; +2 20 ; sta ENAMx ; +3 23 ;keep carry state ;constant ; sec ; +2 25 ;waste 2 cycles for ;constant timing ; nop ; +2 27 ; bcs .continue ; +3 30 ; /CLEAR THE MISSILE ;12 CYCLES TOTAL (30 for entire routine)
---------------------------------------------------------------------------------------------- Archives (includes files) at http://www.biglist.com/lists/stella/archives/ Unsub & more at http://www.biglist.com/lists/stella/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [stella] DD Dead end?, Thomas Jentzsch | Thread | Re: [stella] Timing correction, Thomas Jentzsch |
Re: [stella] DD Dead end?, Thomas Jentzsch | Date | [stella] perfect timing, Glenn Saunders |
Month |