comments
This commit is contained in:
parent
f6489670b1
commit
23fa002f33
1 changed files with 2 additions and 0 deletions
|
|
@ -599,12 +599,14 @@ bank_switch_table:
|
||||||
output = dest
|
output = dest
|
||||||
|
|
||||||
; top 2 bits are the table bank selector
|
; top 2 bits are the table bank selector
|
||||||
|
; note we keep arg2 in X after this lookup as we need it later!
|
||||||
ldx arg2 ; 3 cyc
|
ldx arg2 ; 3 cyc
|
||||||
lda bank_switch_table,x ; 4 cyc
|
lda bank_switch_table,x ; 4 cyc
|
||||||
sta PORTB ; 4 cyc
|
sta PORTB ; 4 cyc
|
||||||
|
|
||||||
; bottom 14 bits except the LSB are the per-bank table index
|
; bottom 14 bits except the LSB are the per-bank table index
|
||||||
; add $4000 for the bank pointer
|
; add $4000 for the bank pointer
|
||||||
|
; note the low byte of ptr is assumed to remain at 0! do not clobber it!
|
||||||
txa ; 2 cyc
|
txa ; 2 cyc
|
||||||
and #$3f ; 2 cyc
|
and #$3f ; 2 cyc
|
||||||
ora #$40 ; 2 cyc
|
ora #$40 ; 2 cyc
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue