diff --git a/.gitignore b/.gitignore index 1acae15..0857e13 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ *.o roms/*.bin floatbus/cfg +audit/cfg + +# Temporarily... +roms/* \ No newline at end of file diff --git a/audit/audit.asm b/audit/audit.asm new file mode 100644 index 0000000..ef7a1c8 --- /dev/null +++ b/audit/audit.asm @@ -0,0 +1,38 @@ +;;; Apple II audit routines +;;; Copyright © 2016 Zellyn Hunter + + !convtab + !to "audit.o", plain + * = $6000 + + HOME = $FC58 + COUT = $FDED + +main: + jsr HOME + jsr print + !text "Apple II audit",$8D,0 + jsr print + !text "Detecting machine version...",$8D,0 +end: jmp * + +;;; print prints a null-terminated string from the address after the +;;; JSR that called it, returning to the address following the null. +print: + tsx + lda $101,X + sta getch+1 + lda $102,X + sta getch+2 +- inc getch+1 + bne getch + inc getch+2 +getch lda $FEED ; $FEED gets modified + beq + + jsr COUT + jmp - ++ lda getch+1 + sta $101,X + lda getch+2 + sta $102,x + rts diff --git a/audit/audit.dsk b/audit/audit.dsk new file mode 100644 index 0000000..d0676a8 Binary files /dev/null and b/audit/audit.dsk differ diff --git a/audit/build b/audit/build new file mode 100755 index 0000000..8dbd8cb --- /dev/null +++ b/audit/build @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +set -euo pipefail +export ACME="$HOME/gh/acme/ACME_Lib" + +acme audit.asm + +# Build audit.dsk with diskii (bit.ly/a2diskii), on a Super-Mon disk +# ===================================================================== + +cp ../dsk/supermon20.dsk audit.dsk +# FHELLO: load file DF02 at 0x6000. +echo -n -e '\x20\x40\x03\x6D\x01\xDC\x2C\x02\xDF\x2C\x00\x60\xF8\x4C\x00\x60' | diskii put -f audit.dsk DF01:FHELLO - +diskii put -f audit.dsk DF02:FWORLD audit.o + + +# On my computer, run mame like this: +# mame -rompath ~/mame/roms/ apple2ee -flop1 ./audit.dsk