diff --git a/6502/C64/Makefile b/6502/C64/Makefile index bcc5558..a9f485e 100644 --- a/6502/C64/Makefile +++ b/6502/C64/Makefile @@ -13,8 +13,7 @@ vf_binaries = $(patsubst %, cbmfiles/vf-%, $(vf_flavours)) test_files = $(wildcard tests/*.f*) test_files_petscii = $(patsubst tests/%, cbmfiles/%, $(test_files)) test_logs = $(patsubst %, test-%.log, $(vf_flavours)) -working_vf_flavours = full-c64 full-c16+ lite-c64 lite-c16+ -test_resuls = $(patsubst %, test-%.result, $(working_vf_flavours)) +test_resuls = $(patsubst %, test-%.result, $(vf_flavours)) # Target to convert all .d64 images into .fth files for easier reading, # and to update all PETSCII files in cbmfiles to the latest state of @@ -33,7 +32,9 @@ clean: test: $(test_resuls) -test64: test-full-c64.result +test64: full64 lite64 + +full64: test-full-c64.result lite64: test-lite-c64.result @@ -103,6 +104,16 @@ test-lite-c16+.log: emulator/vf-lite-c16+.T64 "include run-min-tests.fth\n1234567890\n" petscii2ascii cbmfiles/test.log $@ +test-full-c16-.log: emulator/vf-full-c16-.T64 + VICE=xplus4 emulator/run-in-vice.sh vf-full-c16- \ + "include run-min-tests.fth\n1234567890\n" + petscii2ascii cbmfiles/test.log $@ + +test-lite-c16-.log: emulator/vf-lite-c16-.T64 + VICE=xplus4 emulator/run-in-vice.sh vf-lite-c16- \ + "include run-min-tests.fth\n1234567890\n" + petscii2ascii cbmfiles/test.log $@ + test-%.result: test-%.log test-%.golden tests/evaluate-test.sh rm -f $@ tests/evaluate-test.sh $(basename $@) @@ -128,6 +139,12 @@ test-full-c16+.golden: $(c16_golden_parts) test-lite-c16+.golden: $(c16_golden_parts) cat $? > $@ +test-full-c16-.golden: $(c16_golden_parts) + cat $? > $@ + +test-lite-c16-.golden: $(c16_golden_parts) + cat $? > $@ + # Rules for building Forth binaries on top of the plain vanilla # c64-volksforth83. diff --git a/6502/C64/cbmfiles/vf-full-c16+ b/6502/C64/cbmfiles/vf-full-c16+ index 17787f4..d76c4c4 100644 Binary files a/6502/C64/cbmfiles/vf-full-c16+ and b/6502/C64/cbmfiles/vf-full-c16+ differ diff --git a/6502/C64/cbmfiles/vf-full-c16- b/6502/C64/cbmfiles/vf-full-c16- new file mode 100644 index 0000000..076a2ef Binary files /dev/null and b/6502/C64/cbmfiles/vf-full-c16- differ diff --git a/6502/C64/cbmfiles/vf-lite-c16+ b/6502/C64/cbmfiles/vf-lite-c16+ index e0b55ba..52bb3b2 100644 Binary files a/6502/C64/cbmfiles/vf-lite-c16+ and b/6502/C64/cbmfiles/vf-lite-c16+ differ diff --git a/6502/C64/cbmfiles/vf-lite-c16- b/6502/C64/cbmfiles/vf-lite-c16- new file mode 100644 index 0000000..8ab991b Binary files /dev/null and b/6502/C64/cbmfiles/vf-lite-c16- differ diff --git a/6502/C64/src/vf-c16+irq.fth b/6502/C64/src/vf-c16+irq.fth new file mode 100644 index 0000000..7c3e4d0 --- /dev/null +++ b/6502/C64/src/vf-c16+irq.fth @@ -0,0 +1,14 @@ + + +$fcb3 >label IRQ \ normal IRQ +$fffe >label >IRQ \ 6502-Ptr to IRQ + +\ selfmodifying code: +Label RAMIRQ \ the new IRQ + rom RAMIRQ $15 + sta RAMIRQ $17 + stx +( +9) RAMIRQ $1b + $100 u/mod # lda pha + # lda pha +( +f) tsx $103 ,x lda pha \ flags +( +14) 0 # lda 0 # ldx IRQ jmp +( +1b) ram rti end-code + diff --git a/6502/C64/src/vf-sys-c16.fth b/6502/C64/src/vf-sys-c16.fth index 4cac6cb..72caeaf 100644 --- a/6502/C64/src/vf-sys-c16.fth +++ b/6502/C64/src/vf-sys-c16.fth @@ -75,18 +75,7 @@ Create ink-pot Code init-system $F7 # ldx txs xyNext jmp end-code -$fcb3 >label IRQ \ normal IRQ -$fffe >label >IRQ \ 6502-Ptr to IRQ - -\ selfmodifying code: -Label RAMIRQ \ the new IRQ - rom RAMIRQ $15 + sta RAMIRQ $17 + stx -( +9) RAMIRQ $1b + $100 u/mod # lda pha - # lda pha -( +f) tsx $103 ,x lda pha \ flags -( +14) 0 # lda 0 # ldx IRQ jmp -( +1b) ram rti end-code - +(C16+ include vf-c16+irq.fth ) \ *** Block No. 147, Hexblock 93 93 fthpage @@ -96,10 +85,9 @@ Label RAMIRQ \ the new IRQ Label first-init \ will be called in ROM first time \ later called from RAM - sei rom - RAMIRQ $100 u/mod \ new IRQ - # lda >IRQ 1+ sta \ .. install - # lda >IRQ sta + sei (C16+ rom ( ) + \ new IRQ install + (C16+ RAMIRQ $100 u/mod # lda >IRQ 1+ sta # lda >IRQ sta ( ) $FF84 normJsr $FF8A normJsr \ CIAs init. and set I/O-Vectors ink-pot lda BrdCol sta \ border @@ -107,7 +95,7 @@ Label first-init ink-pot 2+ lda PenCol sta \ pen $80 # lda KeyRep sta \ repeat all keys $FF13 lda 04 # ora $FF13 sta \ low/upp - ram cli rts end-code + (C16+ ram ( ) cli rts end-code first-init dup bootsystem 1+ ! warmboot 1+ ! diff --git a/6502/C64/src/vf-sys-cbm.fth b/6502/C64/src/vf-sys-cbm.fth index 97b41d2..d5babd4 100644 --- a/6502/C64/src/vf-sys-cbm.fth +++ b/6502/C64/src/vf-sys-cbm.fth @@ -97,9 +97,9 @@ Output: display [ here output ! ] (C64 | Create (bye $FCE2 here 2- ! ) -(C16- | Create (bye $FF52 here 2- ! ) +(C16- | Create (bye $FFF6 here 2- ! ) -(C16+ | CODE (bye rom $FF52 jmp end-code ) +(C16+ | CODE (bye rom $FFF6 jmp end-code ) \ *** Block No. 135, Hexblock 87 diff --git a/6502/C64/src/vf-trg-c16-.fth b/6502/C64/src/vf-trg-c16-.fth index 309658e..6127f23 100644 --- a/6502/C64/src/vf-trg-c16-.fth +++ b/6502/C64/src/vf-trg-c16-.fth @@ -8,3 +8,6 @@ : (C16+ [compile] ( ; immediate include vf-pr-target.fth + +Assembler also definitions +' Jsr Alias NormJsr