mirror of
https://github.com/mgcaret/of816.git
synced 2024-12-29 17:31:57 +00:00
SXB: replace uncredited borrowed code and save a byte, too
This commit is contained in:
parent
09018682cc
commit
2a2a826f40
@ -300,17 +300,13 @@ romldr: PLATFORM_INCBIN "fcode/romloader.fc"
|
|||||||
.a8
|
.a8
|
||||||
lda VIA2+VIA::PCR ; save existing PCR
|
lda VIA2+VIA::PCR ; save existing PCR
|
||||||
pha
|
pha
|
||||||
lda WR+3 ; get bank #
|
|
||||||
ror
|
|
||||||
php
|
|
||||||
ror
|
|
||||||
lda #$00
|
lda #$00
|
||||||
bcs :+
|
xba
|
||||||
ora #%11000000
|
lda WR+3
|
||||||
: plp
|
and #%00000011
|
||||||
bcs :+
|
tay
|
||||||
ora #%00001100
|
lda banktab,y
|
||||||
: sta VIA2+VIA::PCR
|
sta VIA2+VIA::PCR
|
||||||
ldy XR
|
ldy XR
|
||||||
lp: dey
|
lp: dey
|
||||||
bmi done
|
bmi done
|
||||||
@ -322,4 +318,8 @@ done: pla
|
|||||||
plp ; restore register size & interrupt state
|
plp ; restore register size & interrupt state
|
||||||
.a16
|
.a16
|
||||||
rtl ; note long return
|
rtl ; note long return
|
||||||
|
banktab: .byte %11001100
|
||||||
|
.byte %11000000
|
||||||
|
.byte %00001100
|
||||||
|
.byte %00000000
|
||||||
.endproc
|
.endproc
|
||||||
|
Loading…
Reference in New Issue
Block a user