Introduce the KEEPEMU environment variable into run-in-vice.sh that facilitated debugging.

This commit is contained in:
Philip Zembrod 2022-08-07 22:43:31 +02:00
parent 3a4eff97c4
commit 992fcfe751
6 changed files with 24 additions and 18 deletions

View File

@ -97,44 +97,44 @@ test-v4thblk-c64.log: emulator/v4thblk-c64.T64 disks/empty.d64
rm -f cbmfiles/test.log disks/scratch.d64 rm -f cbmfiles/test.log disks/scratch.d64
cp disks/empty.d64 disks/scratch.d64 cp disks/empty.d64 disks/scratch.d64
DISK9=scratch emulator/run-in-vice.sh v4thblk-c64 \ DISK9=scratch emulator/run-in-vice.sh v4thblk-c64 \
"include run-blk-tests.fth\n1234567890\n" "include run-blk-tests.fth\n1234567890"
petscii2ascii cbmfiles/test.log $@ petscii2ascii cbmfiles/test.log $@
test-v4th-c64.log: emulator/v4th-c64.T64 test-v4th-c64.log: emulator/v4th-c64.T64
rm -f cbmfiles/test.log rm -f cbmfiles/test.log
emulator/run-in-vice.sh v4th-c64 \ emulator/run-in-vice.sh v4th-c64 \
"include run-std-tests.fth\n1234567890\n" "include run-std-tests.fth\n1234567890"
petscii2ascii cbmfiles/test.log $@ petscii2ascii cbmfiles/test.log $@
test-v4thblk-c16+.log: emulator/v4thblk-c16+.T64 disks/empty.d64 test-v4thblk-c16+.log: emulator/v4thblk-c16+.T64 disks/empty.d64
rm -f cbmfiles/test.log disks/scratch.d64 rm -f cbmfiles/test.log disks/scratch.d64
cp disks/empty.d64 disks/scratch.d64 cp disks/empty.d64 disks/scratch.d64
VICE=xplus4 DISK9=scratch emulator/run-in-vice.sh v4thblk-c16+ \ VICE=xplus4 DISK9=scratch emulator/run-in-vice.sh v4thblk-c16+ \
"include run-blk-tests.fth\n1234567890\n" "include run-blk-tests.fth\n1234567890"
petscii2ascii cbmfiles/test.log $@ petscii2ascii cbmfiles/test.log $@
test-v4th-c16+.log: emulator/v4th-c16+.T64 test-v4th-c16+.log: emulator/v4th-c16+.T64
rm -f cbmfiles/test.log rm -f cbmfiles/test.log
VICE=xplus4 emulator/run-in-vice.sh v4th-c16+ \ VICE=xplus4 emulator/run-in-vice.sh v4th-c16+ \
"include run-std-tests.fth\n1234567890\n" "include run-std-tests.fth\n1234567890"
petscii2ascii cbmfiles/test.log $@ petscii2ascii cbmfiles/test.log $@
test-v4thblk-c16-.log: emulator/v4thblk-c16-.T64 test-v4thblk-c16-.log: emulator/v4thblk-c16-.T64
rm -f cbmfiles/test.log rm -f cbmfiles/test.log
VICE=xplus4 emulator/run-in-vice.sh v4thblk-c16- \ VICE=xplus4 emulator/run-in-vice.sh v4thblk-c16- \
"include run-min-tests.fth\n1234567890\n" "include run-min-tests.fth\n1234567890"
petscii2ascii cbmfiles/test.log $@ petscii2ascii cbmfiles/test.log $@
test-v4th-c16-.log: emulator/v4th-c16-.T64 test-v4th-c16-.log: emulator/v4th-c16-.T64
rm -f cbmfiles/test.log rm -f cbmfiles/test.log
VICE=xplus4 emulator/run-in-vice.sh v4th-c16- \ VICE=xplus4 emulator/run-in-vice.sh v4th-c16- \
"include run-std-tests.fth\n1234567890\n" "include run-std-tests.fth\n1234567890"
petscii2ascii cbmfiles/test.log $@ petscii2ascii cbmfiles/test.log $@
test-v4th-x16.log: cbmfiles/v4th-x16 emulator/sdcard.img test-v4th-x16.log: cbmfiles/v4th-x16 emulator/sdcard.img
rm -f cbmfiles/test.log rm -f cbmfiles/test.log
emulator/run-in-x16emu.sh v4th-x16 \ emulator/run-in-x16emu.sh v4th-x16 \
"include run-std-tests.fth\n1234567890\n" "include run-std-tests.fth\n1234567890"
mcopy -i emulator/sdcard.img ::TEST.LOG cbmfiles/test.log mcopy -i emulator/sdcard.img ::TEST.LOG cbmfiles/test.log
petscii2ascii cbmfiles/test.log $@ petscii2ascii cbmfiles/test.log $@
@ -143,7 +143,7 @@ test-v4th-x16-39.log: $(test_files_petscii) emulator/run-in-vice.sh
test-v4th-x16-39.log: cbmfiles/v4th-x16 emulator/sdcard.img test-v4th-x16-39.log: cbmfiles/v4th-x16 emulator/sdcard.img
rm -f cbmfiles/test.log rm -f cbmfiles/test.log
emulator/run-in-x16-39.sh v4th-x16 \ emulator/run-in-x16-39.sh v4th-x16 \
"include run-std-tests.fth\n1234567890\n" "include run-std-tests.fth\n1234567890"
mcopy -i emulator/sdcard.img ::TEST.LOG cbmfiles/test.log mcopy -i emulator/sdcard.img ::TEST.LOG cbmfiles/test.log
petscii2ascii cbmfiles/test.log $@ petscii2ascii cbmfiles/test.log $@
@ -155,7 +155,7 @@ test-v4th-x16-41.log: $(test_files_petscii) emulator/run-in-vice.sh
test-v4th-x16-41.log: cbmfiles/v4th-x16 emulator/sdcard.img test-v4th-x16-41.log: cbmfiles/v4th-x16 emulator/sdcard.img
rm -f cbmfiles/test.log rm -f cbmfiles/test.log
emulator/run-in-x16-41.sh v4th-x16 \ emulator/run-in-x16-41.sh v4th-x16 \
"include run-std-tests.fth\n1234567890\n" "include run-std-tests.fth\n1234567890"
mcopy -i emulator/sdcard.img ::TEST.LOG cbmfiles/test.log mcopy -i emulator/sdcard.img ::TEST.LOG cbmfiles/test.log
petscii2ascii cbmfiles/test.log $@ petscii2ascii cbmfiles/test.log $@

View File

@ -11,7 +11,7 @@ rm -f "${basedir}/cbmfiles/devenv"
# load include and dos from file-words.d64 block 10 in drive 11. # load include and dos from file-words.d64 block 10 in drive 11.
# savesystem and then scratch file notdone to exit emulator. # savesystem and then scratch file notdone to exit emulator.
keybuf="2 drive 19 load\n47 load\n1 drive 26 load\n3 drive 10 load\n\ keybuf="2 drive 19 load\n47 load\n1 drive 26 load\n3 drive 10 load\n\
savesystem devenv\ndos s0:notdone\n" savesystem devenv\ndos s0:notdone"
DISK9=vforth4_1 DISK10=vforth4_3 DISK11=file-words \ DISK9=vforth4_1 DISK10=vforth4_3 DISK11=file-words \
"${emulatordir}/run-in-vice.sh" "c64-volksforth83" "${keybuf}" "${emulatordir}/run-in-vice.sh" "c64-volksforth83" "${keybuf}"

View File

@ -11,7 +11,7 @@ rm -f "${basedir}/cbmfiles/tcbase"
keybuf="3 drive 20 load\n3 drive 10 load\nsave\n\ keybuf="3 drive 20 load\n3 drive 10 load\nsave\n\
2 drive 4 load\ninclude tc-base.fth\n\ 2 drive 4 load\ninclude tc-base.fth\n\
savesystem tcbase\ndos s0:notdone\n" savesystem tcbase\ndos s0:notdone"
DISK10=tc38q DISK11=file-words "${emulatordir}/run-in-vice.sh" \ DISK10=tc38q DISK11=file-words "${emulatordir}/run-in-vice.sh" \
"v4th-c64-4tc" "${keybuf}" "v4th-c64-4tc" "${keybuf}"

View File

@ -15,7 +15,7 @@ rm -f "${basedir}/cbmfiles/${target}"
# load include and dos from file-words.d64 block 10. # load include and dos from file-words.d64 block 10.
# savesystem and then scratch file notdone to exit emulator. # savesystem and then scratch file notdone to exit emulator.
keybuf="3 drive 20 load\n3 drive 10 load\n\ keybuf="3 drive 20 load\n3 drive 10 load\n\
savesystem ${target}\ndos s0:notdone\n" savesystem ${target}\ndos s0:notdone"
DISK11=file-words "${emulatordir}/run-in-vice.sh" \ DISK11=file-words "${emulatordir}/run-in-vice.sh" \
"${source}" "${keybuf}" "${source}" "${keybuf}"

View File

@ -18,7 +18,7 @@ nosave="${2}"
test -z "${nosave}" && rm -f "${basedir}/cbmfiles/${target}" test -z "${nosave}" && rm -f "${basedir}/cbmfiles/${target}"
rm -f "${basedir}/cbmfiles/${logfile}" rm -f "${basedir}/cbmfiles/${logfile}"
keybuf="include ${source}\nsave-target ${target}\ndos s0:notdone\n" keybuf="include ${source}\nsave-target ${target}\ndos s0:notdone"
test -n "${nosave}" && keybuf="include ${source}\n" test -n "${nosave}" && keybuf="include ${source}\n"
DISK10=tc38q "${emulatordir}/run-in-vice.sh" \ DISK10=tc38q "${emulatordir}/run-in-vice.sh" \

View File

@ -8,20 +8,26 @@ test -n "$DISK11" || DISK11=empty
emulatordir="$(realpath --relative-to="$PWD" "$(dirname "${BASH_SOURCE[0]}")")" emulatordir="$(realpath --relative-to="$PWD" "$(dirname "${BASH_SOURCE[0]}")")"
basedir="$(realpath --relative-to="$PWD" "${emulatordir}/..")" basedir="$(realpath --relative-to="$PWD" "${emulatordir}/..")"
executable="${1}"
keybuf="${2}"
autostart="" autostart=""
if [ -n "$1" ] if [ -n "${executable}" ]
then then
autostart="-autostart ${emulatordir}/${1}.T64" autostart="-autostart ${emulatordir}/${executable}.T64"
fi fi
keybuf=""
warp="" warp=""
if [ -n "$2" ] if [ -n "${keybuf}" ]
then then
keybuf="${2}" # keybuf="${2}"
# The following could also just be a cp. # The following could also just be a cp.
ascii2petscii "${emulatordir}/notdone" "${basedir}/cbmfiles/notdone" ascii2petscii "${emulatordir}/notdone" "${basedir}/cbmfiles/notdone"
warp="-warp" warp="-warp"
# Magic env variable KEEPEMU: Only if not set, send in the final CR.
if [ -z "${KEEPEMU}" ]; then
keybuf="${keybuf}\n"
fi
fi fi
"$VICE" \ "$VICE" \