Create vf-lite-x16 binary target for Commander X16, based on C64 version.

vf-sys-x16.fth still is identical to vf-sys-c64.fth.
This commit is contained in:
Philip Zembrod 2020-08-29 22:25:55 +02:00
parent af57b22a7a
commit 71c40dbe2f
9 changed files with 192 additions and 1 deletions

View File

@ -7,7 +7,9 @@ vf_blk_d64_files = $(wildcard disks/*.d64)
vf_blk_fth_files = $(patsubst %.d64, %.fth, $(vf_blk_d64_files))
vf_fth_files = $(wildcard src/vf-*.fth)
vf_fth_files_petscii = $(patsubst src/%, cbmfiles/%, $(vf_fth_files))
vf_flavours = full-c64 full-c16+ full-c16- lite-c64 lite-c16+ lite-c16-
vf_flavours = \
full-c64 full-c16+ full-c16- \
lite-c64 lite-c16+ lite-c16- lite-x16
vf_binaries = $(patsubst %, cbmfiles/vf-%, $(vf_flavours))
test_files = $(wildcard tests/*.f*)
@ -81,6 +83,9 @@ cbmfiles/vf-lite-c16+:
cbmfiles/vf-lite-c16-:
emulator/build-vf.sh vf-lite-c16-.fth vf-lite-c16-
cbmfiles/vf-lite-x16:
emulator/build-vf.sh vf-lite-x16.fth vf-lite-x16
# Core test targets

View File

@ -0,0 +1,30 @@
\ The head of Commander X16 VolkForth
\ Initial part of load file
Onlyforth
$801 dup displace !
Target definitions here!
10 fthpage
\ FORTH Preamble and ID
$D c, $8 c, $A c, 00 c, 9E c, 28 c, 32 c, 30 c,
36 c, 34 c, 29 c, 00 c, 00 c, 00 c, 00 c, \ SYS(2064)
Assembler
nop 0 jmp here 2- >label >cold
nop 0 jmp here 2- >label >restart
here dup origin!
\ Here are coldstart- and Uservariables
\
0 jmp 0 jsr here 2- >label >wake
end-code
$100 allot
Create logo
," volksFORTH-83 3.90-X16 "

View File

@ -0,0 +1,17 @@
include vf-tc-prep.fth
include vf-trg-x16.fth
\ The actual volksForth sources
include vf-head-x16.fth
include vf-cbm-core.fth
include vf-sys-x16.fth
include vf-cbm-file.fth
include vf-finalize.fth
9f00 ' limit >body ! 9b00 s0 ! 9f00 r0 !
include vf-memsetup.fth
include vf-pr-target.fth
quit

View File

@ -8,6 +8,7 @@ cr .( Target is: ) \ clv14.4.87)
(C16 .( C16 with )
(C16+ .( 64kb )
(C16- .( 32kb )
(X16 .( Cmdr X16 )
cr .( Target is not: )
@ -16,3 +17,4 @@ cr .( Target is not: )
(C16 \ ) .( C16, )
(C16+ \ ) .( C16+64kb, )
(C16- \ ) .( C16-32kb, )
(X16 \ ) .( Cmdr X16, )

123
6502/C64/src/vf-sys-x16.fth Normal file
View File

@ -0,0 +1,123 @@
include vf-lbls-cbm.fth
\ *** Block No. 127, Hexblock 7f
7f fthpage
\ C64-Labels clv13.4.87)
0E716 >label ConOut
09d >label MsgFlg
09a >label OutDev
099 >label InDev
0d020 >label BrdCol
0d021 >label BkgCol
0286 >label PenCol
0ae >label PrgEnd
0c1 >label IOBeg
0d4 >label CurFlg
0d8 >label InsCnt
028a >label KeyRep
\ *** Block No. 129, Hexblock 81
81 fthpage
\ C64 c64key? getkey
Code c64key? ( -- flag)
0C6 lda
0<> ?[ 0FF # lda ]? pha
Push jmp end-code
Code getkey ( -- 8b)
0C6 lda 0<>
?[ sei 0277 ldy
[[ 0277 1+ ,X lda 0277 ,X sta inx
0C6 cpx 0= ?]
0C6 dec tya cli 0A0 # cmp
0= ?[ bl # lda ]?
]?
Push0A jmp end-code
\ *** Block No. 130, Hexblock 82
82 fthpage
\ C64 curon curoff
Code curon ( --)
0D3 ldy 0D1 )Y lda 0CE sta 0CC stx
xyNext jmp end-code
Code curoff ( --)
iny 0CC sty 0CD sty 0CF stx
0CE lda 0D3 ldy 0D1 )Y sta
1 # ldy Next jmp end-code
include vf-sys-cbm.fth
\ *** Block No. 143, Hexblock 8f
\ ... continued
8f fthpage
Create ink-pot
\ border bkgnd pen 0
6 c, 6 c, 3 c, 0 c, \ Forth
0E c, 6 c, 3 c, 0 c, \ Edi
6 c, 6 c, 3 c, 0 c, \ User
\ *** Block No. 144, Hexblock 90
90 fthpage
\ C64 restore
Label asave 0 c, Label 1save 0 c,
Label continue
pha 1save lda 1 sta pla rti
Label restore sei asave sta
continue $100 /mod
# lda pha # lda pha php \ for RTI
asave lda pha txa pha tya pha
1 lda 1save sta
$36 # lda 1 sta \ Basic off ROM on
$7F # lda $DD0D sta
$DD0D ldy 0< ?[
Label 6526-NMI $FE72 jmp ]?
UDTIM jsr STOP jsr \ RUN/STOP ?
6526-NMI bne \ not >>-->
' restart @ jmp end-code
\ *** Block No. 145, Hexblock 91
91 fthpage
\ C64:Init 06nov87re
: init-system $FF40 dup $C0 cmove
[ restore ] Literal dup
$FFFA ! $318 ! ; \ NMI-Vector to RAM
Label first-init
sei cld
IOINIT jsr CINT jsr RESTOR jsr
\ init. and set I/O-Vectors
$36 # lda 01 sta \ Basic off
ink-pot lda BrdCol sta \ border
ink-pot 1+ lda BkgCol sta \ backgrnd
ink-pot 2+ lda PenCol sta \ pen
$80 # lda KeyRep sta \ repeat all keys
$17 # lda $D018 sta \ low/upp +
0 # lda $D01A sta \ VIC-IRQ off
$1B # lda $D011 sta \ Textmode on
4 # lda $288 sta \ low screen
cli rts end-code
first-init dup bootsystem 1+ !
warmboot 1+ !
Code c64init first-init jsr
xyNext jmp end-code

View File

@ -6,6 +6,7 @@
: (C16+ ; immediate
: (C64 [compile] ( ; immediate
: (C16- [compile] ( ; immediate
: (X16 [compile] ( ; immediate
include vf-pr-target.fth

View File

@ -6,6 +6,7 @@
: (C16- ; immediate
: (C64 [compile] ( ; immediate
: (C16+ [compile] ( ; immediate
: (X16 [compile] ( ; immediate
include vf-pr-target.fth

View File

@ -6,5 +6,6 @@
: (C16 [compile] ( ; immediate
: (C16+ [compile] ( ; immediate
: (C16- [compile] ( ; immediate
: (X16 [compile] ( ; immediate
include vf-pr-target.fth

View File

@ -0,0 +1,11 @@
: ) ; immediate
: (C ; immediate
: (X16 ; immediate
: (C64 [compile] ( ; immediate
: (C16 [compile] ( ; immediate
: (C16+ [compile] ( ; immediate
: (C16- [compile] ( ; immediate
include vf-pr-target.fth