mirror of
https://github.com/forth-ev/VolksForth.git
synced 2025-01-12 19:29:50 +00:00
Make X16 work with both R38 and R39 type bank switching
This commit is contained in:
parent
663b1e16e1
commit
fb100de9ed
@ -18,8 +18,11 @@ include vf-lbls-cbm.fth
|
||||
0381 >label CurFlg \ aka qtsw
|
||||
0385 >label InsCnt \ aka insrt
|
||||
|
||||
09f60 >label RomBank
|
||||
09f61 >label RamBank
|
||||
\ TODO(issues/33): Remove the R?mBank38 labels.
|
||||
09f60 >label RomBank38
|
||||
09f61 >label RamBank38
|
||||
1 >label RomBank
|
||||
0 >label RamBank
|
||||
|
||||
0a000 >label KeyD \ keyboard buffer
|
||||
0a00a >label Ndx \ #keys in keyboard buffer
|
||||
@ -44,21 +47,29 @@ include vf-lbls-cbm.fth
|
||||
|
||||
Code c64key? ( -- flag)
|
||||
RamBank ldx
|
||||
\ TODO(issues/33): Remove the lines accessing RamBank38.
|
||||
RamBank38 ldy
|
||||
0 # lda RamBank sta
|
||||
RamBank38 sta
|
||||
Ndx lda
|
||||
0<> ?[ 0FF # lda ]? pha
|
||||
RamBank stx
|
||||
RamBank38 sty
|
||||
Push jmp end-code
|
||||
|
||||
Code getkey ( -- 8b)
|
||||
RamBank lda N sta
|
||||
\ TODO(issues/33): Remove the lines accessing RamBank38.
|
||||
RamBank38 lda N 1+ sta
|
||||
0 # lda RamBank sta
|
||||
RamBank38 sta
|
||||
Ndx lda 0<>
|
||||
?[ sei KeyD ldy
|
||||
[[ KeyD 1+ ,X lda KeyD ,X sta inx
|
||||
Ndx cpx 0= ?]
|
||||
Ndx dec
|
||||
N lda RamBank sta
|
||||
N 1+ lda RamBank38 sta
|
||||
tya cli 0A0 # cmp
|
||||
0= ?[ bl # lda ]?
|
||||
]?
|
||||
@ -113,6 +124,8 @@ Label restore pha txa pha tya pha cld
|
||||
Label first-init
|
||||
sei cld
|
||||
RomBank lda $f8 # and RomBank sta \ map in KERNAL ROM
|
||||
\ TODO(issues/33): Remove this line accessing RomBank38.
|
||||
RomBank38 lda $f8 # and RomBank38 sta \ map in KERNAL ROM for R38
|
||||
IOINIT jsr CINT jsr RESTOR jsr \ init. and set I/O-Vectors
|
||||
ink-pot lda BrdCol sta \ border
|
||||
ink-pot 1+ lda BkgCol sta \ backgrnd
|
||||
|
Loading…
x
Reference in New Issue
Block a user