Cybernoid Test 2

. Write AY regs from $D to $0 (like real Cybernoid)
. Write AY regs in pairs (eg. $1,$0) as optimally as possible
This commit is contained in:
tomcw 2020-09-20 12:03:05 +01:00
parent 57b5ea265a
commit 94b58b49d5

View File

@ -68,6 +68,13 @@ GotMBSlot:
stx MB4x+2 stx MB4x+2
stx MB5x+2 stx MB5x+2
stx MB6x+2 stx MB6x+2
stx MB7x+2
stx MB8x+2
stx MB9x+2
stx MBAx+2
stx MBBx+2
stx MBCx+2
} }
stx MB7+2 stx MB7+2
@ -221,21 +228,38 @@ Interrupt
;; lda AYDataDoneFlag ;; lda AYDataDoneFlag
;; bne .done ;; bne .done
lda pAYData+0
sta MBsmc1+1
sta MBsmc2+1
lda pAYData+1
sta MBsmc1+2
sta MBsmc2+2
ldx #AY_INACTIVE ldx #AY_INACTIVE
ldy #0 ldy #13 ; write AY regs from $D to $0 (like Cybernoid)
.sf_loop0 -
MB1x sty CARD_BASE+SY6522_ORA MB1x sty CARD_BASE+SY6522_ORA
lda #AY_LATCH lda #AY_LATCH
MB2x sta CARD_BASE+SY6522_ORB MB2x sta CARD_BASE+SY6522_ORB
MB3x stx CARD_BASE+SY6522_ORB ; Set INACTIVE MB3x stx CARD_BASE+SY6522_ORB ; Set INACTIVE
lda (pAYData),y MBsmc1 lda AYData,y
MB4x sta CARD_BASE+SY6522_ORA MB4x sta CARD_BASE+SY6522_ORA
lda #AY_WRITE lda #AY_WRITE
MB5x sta CARD_BASE+SY6522_ORB MB5x sta CARD_BASE+SY6522_ORB
MB6x stx CARD_BASE+SY6522_ORB ; Set INACTIVE MB6x stx CARD_BASE+SY6522_ORB ; Set INACTIVE
iny dey
cpy #$0E ;
bne .sf_loop0 MB7x sty CARD_BASE+SY6522_ORA
lda #AY_LATCH
MB8x sta CARD_BASE+SY6522_ORB
MB9x stx CARD_BASE+SY6522_ORB ; Set INACTIVE
MBsmc2 lda AYData,y
MBAx sta CARD_BASE+SY6522_ORA
lda #AY_WRITE
MBBx sta CARD_BASE+SY6522_ORB
MBCx stx CARD_BASE+SY6522_ORB ; Set INACTIVE
dey
bpl -
clc clc
lda pAYData+0 lda pAYData+0