This commit is contained in:
Brooke Vibber 2024-12-30 13:44:31 -08:00
commit 63e74d5152
2 changed files with 5 additions and 2 deletions

View file

@ -434,13 +434,16 @@ viewport_oy:
sta dest + 1
.endmacro
.segment "TABLES"
; lookup table for top byte -> PORTB value for bank-switch
;.align 256 ; warning - if not aligned this will cost an extra cycle sometimes
.align 256
bank_switch_table:
.repeat 256, i
.byte ((i & $c0) >> 4) | $e3
.endrepeat
.code
.macro bank_switch bank
lda #((bank << 2) | $e3)
sta PORTB