mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-02 12:29:26 +00:00
rbs: working on cycle-invariance
This commit is contained in:
parent
7017d0b2a8
commit
00479ac953
@ -239,11 +239,21 @@ mb4_not_in_this_slot:
|
|||||||
beq done_mb4_detect
|
beq done_mb4_detect
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;====================================
|
;====================================
|
||||||
; mb_write_frame
|
; mb_write_frame
|
||||||
;====================================
|
;====================================
|
||||||
; cycle counted
|
; cycle counted
|
||||||
|
|
||||||
|
; 2 + 13*(28+28+7) + 5
|
||||||
|
|
||||||
mb_write_frame:
|
mb_write_frame:
|
||||||
|
|
||||||
ldx #0 ; set up reg count ; 2
|
ldx #0 ; set up reg count ; 2
|
||||||
@ -256,17 +266,25 @@ mb_write_frame:
|
|||||||
;==================================
|
;==================================
|
||||||
|
|
||||||
mb_write_loop:
|
mb_write_loop:
|
||||||
|
;=============================
|
||||||
|
; not r13 -- 4+5+[ ]+28+28+7
|
||||||
|
; r13, not ff -- 4+5+ 3 +28+28+7
|
||||||
|
; r13 is ff -- 4+5+ 4
|
||||||
|
|
||||||
|
|
||||||
lda AY_REGISTERS,X ; load register value ; 4
|
lda AY_REGISTERS,X ; load register value ; 4
|
||||||
|
|
||||||
; special case R13. If it is 0xff, then don't update
|
; special case R13. If it is 0xff, then don't update
|
||||||
; otherwise might spuriously reset the envelope settings
|
; otherwise might spuriously reset the envelope settings
|
||||||
|
|
||||||
cpx #13 ; 2
|
cpx #13 ; 2
|
||||||
bne mb_not_13 ; 3/2nt
|
bne mb_not_13 ; 3
|
||||||
|
|
||||||
|
; -1
|
||||||
cmp #$ff ; 2
|
cmp #$ff ; 2
|
||||||
beq mb_skip_13 ; 3/2nt
|
beq mb_skip_13 ; 3
|
||||||
;============
|
; -1
|
||||||
; typ 5
|
|
||||||
mb_not_13:
|
mb_not_13:
|
||||||
|
|
||||||
|
|
||||||
@ -279,7 +297,8 @@ mb_not_13:
|
|||||||
ldy #MOCK_AY_INACTIVE ; go inactive ; 2
|
ldy #MOCK_AY_INACTIVE ; go inactive ; 2
|
||||||
sty MOCK_6522_ORB1 ; 4
|
sty MOCK_6522_ORB1 ; 4
|
||||||
sty MOCK_6522_ORB2 ; 4
|
sty MOCK_6522_ORB2 ; 4
|
||||||
|
;==========
|
||||||
|
; 28
|
||||||
; value
|
; value
|
||||||
sta MOCK_6522_ORA1 ; put value on PA1 ; 4
|
sta MOCK_6522_ORA1 ; put value on PA1 ; 4
|
||||||
sta MOCK_6522_ORA2 ; put value on PA2 ; 4
|
sta MOCK_6522_ORA2 ; put value on PA2 ; 4
|
||||||
@ -289,15 +308,15 @@ mb_not_13:
|
|||||||
sty MOCK_6522_ORB1 ; 4
|
sty MOCK_6522_ORB1 ; 4
|
||||||
sty MOCK_6522_ORB2 ; 4
|
sty MOCK_6522_ORB2 ; 4
|
||||||
;===========
|
;===========
|
||||||
; 56
|
; 28
|
||||||
mb_no_write:
|
mb_no_write:
|
||||||
inx ; point to next register ; 2
|
inx ; point to next register ; 2
|
||||||
cpx #14 ; if 14 we're done ; 2
|
cpx #14 ; if 14 we're done ; 2
|
||||||
bmi mb_write_loop ; otherwise, loop ; 3/2nt
|
bmi mb_write_loop ; otherwise, loop ; 3
|
||||||
;============
|
;============
|
||||||
; 7
|
; 7
|
||||||
mb_skip_13:
|
mb_skip_13:
|
||||||
|
; -1
|
||||||
rts ; 6
|
rts ; 6
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user