This commit is contained in:
Brooke Vibber 2024-12-26 21:41:03 -08:00
parent 0cde31905e
commit e84a990789

View file

@ -435,9 +435,15 @@ fill_masks:
;.align 256 ; warning - if not aligned this will cost an extra cycle sometimes ;.align 256 ; warning - if not aligned this will cost an extra cycle sometimes
bank_switch_table: bank_switch_table:
.repeat 256, i .repeat 256, i
.byte ((i & $c0) >> 5) | $c1 .byte ((i & $c0) >> 4) | $d1
.endrepeat .endrepeat
.macro bank_switch bank
lda #((bank << 2) | $d1)
sta PORTB
.endmacro
; 58-77 cycles ; 58-77 cycles
; clobbers x, y, dest to dest + 3 ; clobbers x, y, dest to dest + 3
.macro imul8xe dest, arg1, arg2 .macro imul8xe dest, arg1, arg2
@ -497,11 +503,6 @@ bank_switch_table:
done: done:
.endmacro .endmacro
.macro bank_switch bank
lda #((bank << 1) | $c1)
sta PORTB
.endmacro
.proc imul8xe_init .proc imul8xe_init
; go through the input set, in four 16KB chunks ; go through the input set, in four 16KB chunks
@ -576,13 +577,14 @@ inner_loop:
sta result sta result
lda #0 lda #0
adc result + 1 adc result + 1
sta result sta result + 1
clc
lda arg2 lda arg2
adc result adc result
sta result sta result
lda #0 lda #0
adc result + 1 adc result + 1
sta result sta result + 1
; inner loop check ; inner loop check
inc arg1 inc arg1