a2audit/audit/build

67 lines
2.1 KiB
Plaintext
Raw Normal View History

2016-12-07 03:18:33 +00:00
#!/usr/bin/env bash
set -euo pipefail
export ACME="$HOME/gh/acme/ACME_Lib"
acme audit.asm
2017-03-09 14:07:45 +00:00
# Build audit.dsk with diskii (bit.ly/a2diskii), on a "Standard Delivery" disk
# ============================================================================
2016-12-07 03:18:33 +00:00
2017-03-09 14:07:45 +00:00
# Old NakedOS version:
# cp ../dsk/supermon20.dsk audit.dsk
# # FHELLO: load file DF02 at 0x6000.
# diskii nakedos mkhello audit.dsk DF02
# diskii put -f audit.dsk DF02:FWORLD audit.o
diskii mksd audit.dsk audit.o
2016-12-07 03:18:33 +00:00
# Extract extended error strings and rebuild ../v0/index.md
echo -e '# V0 Errors' > ../v0/index.md
2016-12-17 03:32:35 +00:00
grep -h '+prerra\? .*;;' *.asm | awk -F' ;; ' '{print $2}' | sort | sed 's|\(E....\): |\
## \1\
\
|' >> ../v0/index.md
2016-12-07 03:18:33 +00:00
# Also run mame? (set ROMPATH to your local variant)
[[ -z "${ROMPATH-}" ]] && ROMPATH=~/mame/roms/
# Write audit.o into an OpenEmulator config?
[[ -z "${TMPLS-}" ]] && TMPLS=~/gh/OpenEmulator-OSX/modules/libemulation/res/templates
2017-01-24 18:06:20 +00:00
case "${1-none}" in
"2ee")
mame -rompath $ROMPATH apple2ee -flop1 ./audit.dsk -skip_gameinfo
;;
"2e")
mame -rompath $ROMPATH apple2e -flop1 ./audit.dsk -skip_gameinfo
;;
"2p")
mame -rompath $ROMPATH apple2p -flop1 ./audit.dsk -skip_gameinfo
;;
"2")
mame -rompath $ROMPATH apple2 -flop1 ./audit.dsk -skip_gameinfo
;;
"2ee-d")
mame -rompath $ROMPATH apple2ee -flop1 ./audit.dsk -skip_gameinfo -debug
;;
"2e-d")
mame -rompath $ROMPATH apple2e -flop1 ./audit.dsk -skip_gameinfo -debug
;;
"2p-d")
mame -rompath $ROMPATH apple2p -flop1 ./audit.dsk -skip_gameinfo -debug
;;
"2-d")
mame -rompath $ROMPATH apple2 -flop1 ./audit.dsk -skip_gameinfo -debug
;;
"oe")
(head -c 24576 /dev/zero; cat audit.o; head -c 65536 /dev/zero) | head -c 65536 > $TMPLS/Apple\ II/Apple\ IIe-test.emulation/appleIIe.mainRam.bin
sed -e 's|<property name="pc" value="0x...."/>|<property name="pc" value="0x6000"/>|' $TMPLS/Apple\ II/Apple\ IIe.xml > $TMPLS/Apple\ II/Apple\ IIe-test.emulation/info.xml
;;
2017-01-24 18:06:20 +00:00
"none")
;;
*)
echo Options: 2ee, 2e, 2p, 2, 2ee-d, 2e-d, 2p-d, 2-d
esac
2017-01-24 18:06:20 +00:00
true # Signal success (since we had a bunch of conditionals that can return false status).