This commit is contained in:
Brooke Vibber 2026-08-22 16:30:41 -07:00
commit 23fa002f33

View file

@ -599,12 +599,14 @@ bank_switch_table:
output = dest
; 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
lda bank_switch_table,x ; 4 cyc
sta PORTB ; 4 cyc
; bottom 14 bits except the LSB are the per-bank table index
; 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
and #$3f ; 2 cyc
ora #$40 ; 2 cyc