diff --git a/6502/C64/Makefile b/6502/C64/Makefile index dc390fe..565c1cf 100644 --- a/6502/C64/Makefile +++ b/6502/C64/Makefile @@ -6,14 +6,32 @@ vf_blk_d64_files = $(wildcard disks/*.d64) vf_blk_fth_files = $(patsubst %.d64, %.fth, $(vf_blk_d64_files)) + +# Target to convert all .d64 images into .fth files for easier reading. vf_blk_fth: $(vf_blk_fth_files) + +# Convenience targets + +run-devenv: emulator/devenv.T64 + emulator/run-in-vice.sh devenv + + +# Rules for building Forth binaries on top of the plain vanilla +# c64-volksforth83. + +cbmfiles/devenv: emulator/run-in-vice.sh emulator/build-devenv.sh \ + emulator/c64-volksforth83.T64 + emulator/build-devenv.sh + + # Generic T64 tape image rule emulator/%.T64: cbmfiles/% bin2t64 $< $@ -# Generic rule for visualizing .d64 blk sources + +# Generic rule for converting .d64 blk sources into .fth files. disks/%.fth: disks/%.d64 ufscr2file $< $@ diff --git a/6502/C64/emulator/build-devenv.sh b/6502/C64/emulator/build-devenv.sh index 2c237f9..9e56129 100755 --- a/6502/C64/emulator/build-devenv.sh +++ b/6502/C64/emulator/build-devenv.sh @@ -4,14 +4,13 @@ set -e emulatordir="$(dirname "${BASH_SOURCE[0]}")" basedir="$(realpath --relative-to="$PWD" "${emulatordir}/..")" -cd "${basedir}" +rm -f "${basedir}/cbmfiles/devenv" -make emulator/c64-volksforth83.T64 - -rm -f cbmfiles/devenv - -keybuf="2 drive 19 load\n1 drive 26 load\nsavesystem devenv\n" +# load editor from vforth4_3.d64 block 19 in drive 10. +# load savesystem from vforth4_1.d64 block 26 in drive 9. +# load include and dos from file-words.d64 block 10 in drive 11. +# savesystem and then scratch file notdone to exit emulator. +keybuf="2 drive 19 load\n1 drive 26 load\n3 drive 10 load\n\ +savesystem devenv\ndos s0:notdone\n" "${emulatordir}/run-in-vice.sh" "c64-volksforth83" "${keybuf}" - -make emulator/devenv.T64