From 5f4ebcbb766b735e0274279f0963bd3d0473609e Mon Sep 17 00:00:00 2001 From: Philip Zembrod Date: Wed, 10 Jun 2020 10:28:16 +0200 Subject: [PATCH] Add emulator closing to script for building dev environment. Properly embed that build in Makefile targets. --- 6502/C64/Makefile | 20 +++++++++++++++++++- 6502/C64/emulator/build-devenv.sh | 15 +++++++-------- 2 files changed, 26 insertions(+), 9 deletions(-) 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