diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100644 index 0000000..f319346 --- /dev/null +++ b/bootstrap.sh @@ -0,0 +1,15 @@ +#!/bin/sh +set -e + +echo "======> Building seed Drifloon using uxnmin" +make -sC utils clean +make -sC utils drifloon.rom +echo "======> Building Drifloon using utils/drifloon.rom (seed)" +dune exec -- ./exe/uxnemu.exe utils/drifloon.rom < utils/drifloon.tal > drifloon-ocaml.rom +echo "======> Comparing ROMs (should be identical)" +cmp drifloon-ocaml.rom utils/drifloon.rom +echo "======> Building Drifloon using drifloon-ocaml.rom" +dune exec -- ./exe/uxnemu.exe drifloon-ocaml.rom < utils/drifloon.tal > drifloon-boot.rom +echo "======> Comparing ROMs (should be identical)" +cmp drifloon-ocaml.rom drifloon-boot.rom +echo "======> Done!" diff --git a/exe/uxnemu.ml b/exe/uxnemu.ml index 7008131..2ea6bbd 100644 --- a/exe/uxnemu.ml +++ b/exe/uxnemu.ml @@ -18,7 +18,7 @@ let rec run m pc = in try Machine.dispatch ~trace:debug m pc with | effect Machine.Trace (pc, instr, args), k when debug -> - Fmt.epr "PC = %04x | %6s : %a@." pc (Instr.to_string instr) + Fmt.epr "PC = %04x | %6s %a@." pc (Instr.to_string instr) (Fmt.list ~sep:(Fmt.any " ") (Fmt.fmt "%02x")) args; Out_channel.flush stderr;