Reorganize /orig into subdirectories, add Spy Hunter build (no emulation yet)
authorNick Downing <nick@ndcode.org>
Thu, 14 Jul 2022 08:51:32 +0000 (18:51 +1000)
committerNick Downing <nick@ndcode.org>
Sun, 24 Jul 2022 10:01:24 +0000 (20:01 +1000)
.gitignore
galaxian/Makefile
invaders/Makefile
orig/Makefile
orig/galaxian/Makefile [new file with mode: 0644]
orig/invaders/Makefile [new file with mode: 0644]
orig/pacman/Makefile [new file with mode: 0644]
orig/spyhunt/Makefile [new file with mode: 0644]
spyhunt/Makefile [new file with mode: 0644]
spyhunt/io_page.asm [new file with mode: 0644]

index 7af5d13..aa754ae 100644 (file)
 /emu_z80/cg_default/*.png
 /emu_z80/cg_default/*.ppm
 /emu_z80/emu_z80
-/galaxian/1h
-/galaxian/1k
-/galaxian/7l
-/galaxian/galaxian.clr
-/galaxian/galmidw.u
-/galaxian/galmidw.v
-/galaxian/galmidw.w
-/galaxian/galmidw.y
-/invaders/invaders.e
-/invaders/invaders.f
-/invaders/invaders.g
-/invaders/invaders.h
 /pacman/82s123.7f
 /pacman/82s126.1m
 /pacman/82s126.3m
 /orig/dkong/c-2j.bpr
 /orig/dkong/c-2k.bpr
 /orig/galaxian.zip
+/orig/galaxian/1h
+/orig/galaxian/1k
+/orig/galaxian/7l
+/orig/galaxian/galaxian.clr
+/orig/galaxian/galmidw.u
+/orig/galaxian/galmidw.v
+/orig/galaxian/galmidw.w
+/orig/galaxian/galmidw.y
 /orig/invaders.zip
+/orig/invaders/invaders.e
+/orig/invaders/invaders.f
+/orig/invaders/invaders.g
+/orig/invaders/invaders.h
 /orig/mspacman.zip
 /orig/pacman.zip
+/orig/pacman/82s123.7f
+/orig/pacman/82s126.1m
+/orig/pacman/82s126.3m
+/orig/pacman/82s126.4a
+/orig/pacman/pacman.5e
+/orig/pacman/pacman.5f
+/orig/pacman/pacman.6e
+/orig/pacman/pacman.6f
+/orig/pacman/pacman.6h
+/orig/pacman/pacman.6j
+/orig/spyhunt.zip
+/orig/spyhunt/0304-00803-0052.u15
+/orig/spyhunt/82s123.12d
+/orig/spyhunt/spy-hunter_cpu_alpha-n_11-18-83
+/orig/spyhunt/spy-hunter_cpu_bg0_11-18-83.3a
+/orig/spyhunt/spy-hunter_cpu_bg1_11-18-83.4a
+/orig/spyhunt/spy-hunter_cpu_bg2_11-18-83.5a
+/orig/spyhunt/spy-hunter_cpu_bg3_11-18-83.6a
+/orig/spyhunt/spy-hunter_cpu_pg0_2-9-84.6d
+/orig/spyhunt/spy-hunter_cpu_pg1_2-9-84.7d
+/orig/spyhunt/spy-hunter_cpu_pg2_2-9-84.8d
+/orig/spyhunt/spy-hunter_cpu_pg3_2-9-84.9d
+/orig/spyhunt/spy-hunter_cpu_pg4_2-9-84.10d
+/orig/spyhunt/spy-hunter_cpu_pg5_2-9-84.11d
+/orig/spyhunt/spy-hunter_cs_deluxe_u17_b_11-18-83.u17
+/orig/spyhunt/spy-hunter_cs_deluxe_u18_d_11-18-83.u18
+/orig/spyhunt/spy-hunter_cs_deluxe_u7_a_11-18-83.u7
+/orig/spyhunt/spy-hunter_cs_deluxe_u8_c_11-18-83.u8
+/orig/spyhunt/spy-hunter_snd_0_sd_11-18-83.a7
+/orig/spyhunt/spy-hunter_snd_1_sd_11-18-83.a8
+/orig/spyhunt/spy-hunter_video_0fg_11-18-83.a8
+/orig/spyhunt/spy-hunter_video_1fg_11-18-83.a7
+/orig/spyhunt/spy-hunter_video_2fg_11-18-83.a6
+/orig/spyhunt/spy-hunter_video_3fg_11-18-83.a5
+/orig/spyhunt/spy-hunter_video_4fg_11-18-83.a4
+/orig/spyhunt/spy-hunter_video_5fg_11-18-83.a3
+/orig/spyhunt/spy-hunter_video_6fg_11-18-83.a2
+/orig/spyhunt/spy-hunter_video_7fg_11-18-83.a1
index 6578989..4d73e9b 100644 (file)
@@ -19,50 +19,44 @@ ROM_GALAXIAN_CLR_ADDR=0x6f00
 ROM_1H_ADDR=0x7000
 ROM_1K_ADDR=0x7800
 
-ROMS= \
-galmidw.u \
-galmidw.v \
-galmidw.w \
-galmidw.y \
-7l \
-galaxian.clr \
-1h \
-1k
-
 all: galaxian0.ihx
 
-galaxian0.ihx: ${ROMS:%=%.ihx} io_page.ihx
+galaxian0.ihx: \
+galmidw.u.ihx \
+galmidw.v.ihx \
+galmidw.w.ihx \
+galmidw.y.ihx \
+7l.ihx \
+galaxian.clr.ihx \
+1h.ihx \
+1k.ihx \
+io_page.ihx
        hexmerge.py -o $@ $^
 
-galmidw.u.ihx: galmidw.u
+galmidw.u.ihx: ../orig/galaxian/galmidw.u
        ${BIN2HEX} --offset=${ROM_GALMIDW_U_ADDR} $< $@
 
-galmidw.v.ihx: galmidw.v
+galmidw.v.ihx: ../orig/galaxian/galmidw.v
        ${BIN2HEX} --offset=${ROM_GALMIDW_V_ADDR} $< $@
 
-galmidw.w.ihx: galmidw.w
+galmidw.w.ihx: ../orig/galaxian/galmidw.w
        ${BIN2HEX} --offset=${ROM_GALMIDW_W_ADDR} $< $@
 
-galmidw.y.ihx: galmidw.y
+galmidw.y.ihx: ../orig/galaxian/galmidw.y
        ${BIN2HEX} --offset=${ROM_GALMIDW_Y_ADDR} $< $@
 
-7l.ihx: 7l
+7l.ihx: ../orig/galaxian/7l
        ${BIN2HEX} --offset=${ROM_7L_ADDR} $< $@
 
-galaxian.clr.ihx: galaxian.clr
+galaxian.clr.ihx: ../orig/galaxian/galaxian.clr
        ${BIN2HEX} --offset=${ROM_GALAXIAN_CLR_ADDR} $< $@
 
-1h.ihx: 1h
+1h.ihx: ../orig/galaxian/1h
        ${BIN2HEX} --offset=${ROM_1H_ADDR} $< $@
 
-1k.ihx: 1k
+1k.ihx: ../orig/galaxian/1k
        ${BIN2HEX} --offset=${ROM_1K_ADDR} $< $@
 
-${ROMS}: ../orig/galaxian.zip
-       rm -f ${ROMS}
-       unzip $<
-       touch ${ROMS}
-
 io_page.ihx: io_page.rel
        ${ASLINK} -n -m -u -i -b io_page=${IO_PAGE} $@ $^
 
@@ -70,4 +64,4 @@ io_page.rel: io_page.asm
        ${ASZ80} -l -o $<
 
 clean:
-       rm -f *.hlr *.ihx *.lst *.map *.o *.rel *.rst ${ROMS}
+       rm -f *.hlr *.ihx *.lst *.map *.o *.rel *.rst
index ec63935..af64834 100644 (file)
@@ -8,32 +8,26 @@ ROM_INVADERS_F_ADDR=0x1000
 ROM_INVADERS_E_ADDR=0x1800
 
 ROMS= \
-invaders.h \
-invaders.g \
-invaders.f \
-invaders.e
-
 all: invaders0.ihx
 
-invaders0.ihx: ${ROMS:%=%.ihx}
+invaders0.ihx: \
+invaders.h.ihx \
+invaders.g.ihx \
+invaders.f.ihx \
+invaders.e.ihx
        hexmerge.py -o $@ $^
 
-invaders.h.ihx: invaders.h
+invaders.h.ihx: ../orig/invaders/invaders.h
        ${BIN2HEX} --offset=${ROM_INVADERS_H_ADDR} $< $@
 
-invaders.g.ihx: invaders.g
+invaders.g.ihx: ../orig/invaders/invaders.g
        ${BIN2HEX} --offset=${ROM_INVADERS_G_ADDR} $< $@
 
-invaders.f.ihx: invaders.f
+invaders.f.ihx: ../orig/invaders/invaders.f
        ${BIN2HEX} --offset=${ROM_INVADERS_F_ADDR} $< $@
 
-invaders.e.ihx: invaders.e
+invaders.e.ihx: ../orig/invaders/invaders.e
        ${BIN2HEX} --offset=${ROM_INVADERS_E_ADDR} $< $@
 
-${ROMS}: ../orig/invaders.zip
-       rm -f ${ROMS}
-       unzip -j $< ${ROMS}
-       touch ${ROMS}
-
 clean:
-       rm -f *.ihx ${ROMS}
+       rm -f *.ihx
index 007c91f..ec15d22 100644 (file)
@@ -1,19 +1,32 @@
 .PHONY: all
 all: \
 dkong \
+galaxian \
 galaxian.zip \
+invaders \
 invaders.zip \
 mspacman.zip \
-pacman.zip
+pacman \
+pacman.zip \
+spyhunt \
+spyhunt.zip
 
 .PHONY: dkong
 dkong:
        ${MAKE} ${MAKEFLAGS} -C $@
 
+.PHONY: galaxian
+galaxian: galaxian.zip
+       ${MAKE} ${MAKEFLAGS} -C $@
+
 galaxian.zip:
        rm -f $@
        wget https://archive.org/download/Namco-Classics-MAME-Roms/$@
 
+.PHONY: invaders
+invaders: invaders.zip
+       ${MAKE} ${MAKEFLAGS} -C $@
+
 # actually Space Invaders M (Midway licensed; usual US version)
 invaders.zip:
        rm -f $@
@@ -23,14 +36,32 @@ mspacman.zip:
        rm -f $@
        wget https://archive.org/download/Namco-Classics-MAME-Roms/$@
 
+.PHONY: pacman
+pacman: pacman.zip
+       ${MAKE} ${MAKEFLAGS} -C $@
+
 pacman.zip:
        rm -f $@
        wget https://archive.org/download/Namco-Classics-MAME-Roms/$@
 
+.PHONY: spyhunt
+spyhunt: spyhunt.zip
+       ${MAKE} ${MAKEFLAGS} -C $@
+
+spyhunt.zip:
+       @echo
+       @echo please manually download spyhunt.zip from here:
+       @echo https://wowroms.com/en/roms/mame/download-spy-hunter/107750.html
+       @echo
+
 # avoid hitting archive.org every time, use "make realclean" to really delete
 .PHONY: clean
 clean:
        ${MAKE} ${MAKEFLAGS} -C dkong $@
+       ${MAKE} ${MAKEFLAGS} -C galaxian $@
+       ${MAKE} ${MAKEFLAGS} -C invaders $@
+       ${MAKE} ${MAKEFLAGS} -C pacman $@
+       ${MAKE} ${MAKEFLAGS} -C spyhunt $@
 
 .PHONY: realclean
 realclean:
@@ -39,4 +70,5 @@ realclean:
 galaxian.zip \
 invaders.zip \
 mspacman.zip \
-pacman.zip
+pacman.zip \
+spyhunt.zip
diff --git a/orig/galaxian/Makefile b/orig/galaxian/Makefile
new file mode 100644 (file)
index 0000000..5214748
--- /dev/null
@@ -0,0 +1,20 @@
+FILES= \
+1h \
+1k \
+7l \
+galaxian.clr \
+galmidw.u \
+galmidw.v \
+galmidw.w \
+galmidw.y
+
+.PHONY: all
+all: ${FILES}
+
+${FILES}: ../galaxian.zip
+       unzip -o $<
+       touch ${FILES}
+
+.PHONY: clean
+clean:
+       rm -f ${FILES}
diff --git a/orig/invaders/Makefile b/orig/invaders/Makefile
new file mode 100644 (file)
index 0000000..1c8126a
--- /dev/null
@@ -0,0 +1,16 @@
+FILES= \
+invaders.e \
+invaders.f \
+invaders.g \
+invaders.h
+
+.PHONY: all
+all: ${FILES}
+
+${FILES}: ../invaders.zip
+       unzip -o $< ${FILES}
+       touch ${FILES}
+
+.PHONY: clean
+clean:
+       rm -f ${FILES}
diff --git a/orig/pacman/Makefile b/orig/pacman/Makefile
new file mode 100644 (file)
index 0000000..54b4b05
--- /dev/null
@@ -0,0 +1,22 @@
+FILES= \
+82s123.7f \
+82s126.1m \
+82s126.3m \
+82s126.4a \
+pacman.5e \
+pacman.5f \
+pacman.6e \
+pacman.6f \
+pacman.6h \
+pacman.6j
+
+.PHONY: all
+all: ${FILES}
+
+${FILES}: ../pacman.zip
+       unzip -o $<
+       touch ${FILES}
+
+.PHONY: clean
+clean:
+       rm -f ${FILES}
diff --git a/orig/spyhunt/Makefile b/orig/spyhunt/Makefile
new file mode 100644 (file)
index 0000000..2955bfc
--- /dev/null
@@ -0,0 +1,39 @@
+FILES= \
+0304-00803-0052.u15 \
+82s123.12d \
+spy-hunter_cpu_alpha-n_11-18-83 \
+spy-hunter_cpu_bg0_11-18-83.3a \
+spy-hunter_cpu_bg1_11-18-83.4a \
+spy-hunter_cpu_bg2_11-18-83.5a \
+spy-hunter_cpu_bg3_11-18-83.6a \
+spy-hunter_cpu_pg0_2-9-84.6d \
+spy-hunter_cpu_pg1_2-9-84.7d \
+spy-hunter_cpu_pg2_2-9-84.8d \
+spy-hunter_cpu_pg3_2-9-84.9d \
+spy-hunter_cpu_pg4_2-9-84.10d \
+spy-hunter_cpu_pg5_2-9-84.11d \
+spy-hunter_cs_deluxe_u17_b_11-18-83.u17 \
+spy-hunter_cs_deluxe_u18_d_11-18-83.u18 \
+spy-hunter_cs_deluxe_u7_a_11-18-83.u7 \
+spy-hunter_cs_deluxe_u8_c_11-18-83.u8 \
+spy-hunter_snd_0_sd_11-18-83.a7 \
+spy-hunter_snd_1_sd_11-18-83.a8 \
+spy-hunter_video_0fg_11-18-83.a8 \
+spy-hunter_video_1fg_11-18-83.a7 \
+spy-hunter_video_2fg_11-18-83.a6 \
+spy-hunter_video_3fg_11-18-83.a5 \
+spy-hunter_video_4fg_11-18-83.a4 \
+spy-hunter_video_5fg_11-18-83.a3 \
+spy-hunter_video_6fg_11-18-83.a2 \
+spy-hunter_video_7fg_11-18-83.a1
+
+.PHONY: all
+all: ${FILES}
+
+${FILES}: ../spyhunt.zip
+       unzip -o $<
+       touch ${FILES}
+
+.PHONY: clean
+clean:
+       rm -f ${FILES}
diff --git a/spyhunt/Makefile b/spyhunt/Makefile
new file mode 100644 (file)
index 0000000..02bbc33
--- /dev/null
@@ -0,0 +1,142 @@
+ASZ80=../asxv5pxx/asxmak/linux/exe/asz80
+ASLINK=../asxv5pxx/asxmak/linux/exe/aslink
+
+# need to install intelhex package in Python first:
+#   pip3 install --user intelhex
+BIN2HEX=bin2hex.py
+HEX2BIN=hex2bin.py
+
+IO_PAGE=0xe000
+
+# some ROMs are loaded into emulator addresses not accessible by software,
+# this is for convenience so we can build entire game from one source file
+ROM_SPY_HUNTER_CPU_PG0_2_9_84_6D_ADDR=0
+ROM_SPY_HUNTER_CPU_PG1_2_9_84_7D_ADDR=0x2000
+ROM_SPY_HUNTER_CPU_PG2_2_9_84_8D_ADDR=0x4000
+ROM_SPY_HUNTER_CPU_PG3_2_9_84_9D_ADDR=0x6000
+ROM_SPY_HUNTER_CPU_PG4_2_9_84_10D_ADDR=0x8000
+ROM_SPY_HUNTER_CPU_PG5_2_9_84_11D_ADDR=0xc000
+ROM_SPY_HUNTER_CPU_BG0_11_18_83_3A_ADDR=0x10000
+ROM_SPY_HUNTER_CPU_BG1_11_18_83_4A_ADDR=0x12000
+ROM_SPY_HUNTER_CPU_BG2_11_18_83_5A_ADDR=0x14000
+ROM_SPY_HUNTER_CPU_BG3_11_18_83_6A_ADDR=0x16000
+ROM_SPY_HUNTER_VIDEO_1FG_11_18_83_A7_ADDR=0x18000
+ROM_SPY_HUNTER_VIDEO_0FG_11_18_83_A8_ADDR=0x1c000
+ROM_SPY_HUNTER_VIDEO_3FG_11_18_83_A5_ADDR=0x20000
+ROM_SPY_HUNTER_VIDEO_2FG_11_18_83_A6_ADDR=0x24000
+ROM_SPY_HUNTER_VIDEO_5FG_11_18_83_A3_ADDR=0x28000
+ROM_SPY_HUNTER_VIDEO_4FG_11_18_83_A4_ADDR=0x2c000
+ROM_SPY_HUNTER_VIDEO_7FG_11_18_83_A1_ADDR=0x30000
+ROM_SPY_HUNTER_VIDEO_6FG_11_18_83_A2_ADDR=0x34000
+ROM_SPY_HUNTER_CPU_ALPHA_N_11_18_83_ADDR=0x38000
+
+ROMS= \
+spy-hunter_cpu_pg0_2-9-84.6d \
+spy-hunter_cpu_pg1_2-9-84.7d \
+spy-hunter_cpu_pg2_2-9-84.8d \
+spy-hunter_cpu_pg3_2-9-84.9d \
+spy-hunter_cpu_pg4_2-9-84.10d \
+spy-hunter_cpu_pg5_2-9-84.11d \
+spy-hunter_cpu_bg0_11-18-83.3a \
+spy-hunter_cpu_bg1_11-18-83.4a \
+spy-hunter_cpu_bg2_11-18-83.5a \
+spy-hunter_cpu_bg3_11-18-83.6a \
+spy-hunter_video_1fg_11-18-83.a7 \
+spy-hunter_video_0fg_11-18-83.a8 \
+spy-hunter_video_3fg_11-18-83.a5 \
+spy-hunter_video_2fg_11-18-83.a6 \
+spy-hunter_video_5fg_11-18-83.a3 \
+spy-hunter_video_4fg_11-18-83.a4 \
+spy-hunter_video_7fg_11-18-83.a1 \
+spy-hunter_video_6fg_11-18-83.a2 \
+spy-hunter_cpu_alpha-n_11-18-83
+
+all: spyhunt0.ihx
+
+spyhunt0.ihx: ${ROMS:%=%.ihx} io_page.ihx
+       hexmerge.py -o $@ $^
+
+spy-hunter_cpu_pg0_2-9-84.6d.ihx: \
+../orig/spyhunt/spy-hunter_cpu_pg0_2-9-84.6d
+       ${BIN2HEX} --offset=${ROM_SPY_HUNTER_CPU_PG0_2_9_84_6D_ADDR} $< $@
+
+spy-hunter_cpu_pg1_2-9-84.7d.ihx: \
+../orig/spyhunt/spy-hunter_cpu_pg1_2-9-84.7d
+       ${BIN2HEX} --offset=${ROM_SPY_HUNTER_CPU_PG1_2_9_84_7D_ADDR} $< $@
+
+spy-hunter_cpu_pg2_2-9-84.8d.ihx: \
+../orig/spyhunt/spy-hunter_cpu_pg2_2-9-84.8d
+       ${BIN2HEX} --offset=${ROM_SPY_HUNTER_CPU_PG2_2_9_84_8D_ADDR} $< $@
+
+spy-hunter_cpu_pg3_2-9-84.9d.ihx: \
+../orig/spyhunt/spy-hunter_cpu_pg3_2-9-84.9d
+       ${BIN2HEX} --offset=${ROM_SPY_HUNTER_CPU_PG3_2_9_84_9D_ADDR} $< $@
+
+spy-hunter_cpu_pg4_2-9-84.10d.ihx: \
+../orig/spyhunt/spy-hunter_cpu_pg4_2-9-84.10d
+       ${BIN2HEX} --offset=${ROM_SPY_HUNTER_CPU_PG4_2_9_84_10D_ADDR} $< $@
+
+spy-hunter_cpu_pg5_2-9-84.11d.ihx: \
+../orig/spyhunt/spy-hunter_cpu_pg5_2-9-84.11d
+       ${BIN2HEX} --offset=${ROM_SPY_HUNTER_CPU_PG5_2_9_84_11D_ADDR} $< $@
+
+spy-hunter_cpu_bg0_11-18-83.3a.ihx: \
+../orig/spyhunt/spy-hunter_cpu_bg0_11-18-83.3a
+       ${BIN2HEX} --offset=${ROM_SPY_HUNTER_CPU_BG0_11_18_83_3A_ADDR} $< $@
+
+spy-hunter_cpu_bg1_11-18-83.4a.ihx: \
+../orig/spyhunt/spy-hunter_cpu_bg1_11-18-83.4a
+       ${BIN2HEX} --offset=${ROM_SPY_HUNTER_CPU_BG1_11_18_83_4A_ADDR} $< $@
+
+spy-hunter_cpu_bg2_11-18-83.5a.ihx: \
+../orig/spyhunt/spy-hunter_cpu_bg2_11-18-83.5a
+       ${BIN2HEX} --offset=${ROM_SPY_HUNTER_CPU_BG2_11_18_83_5A_ADDR} $< $@
+
+spy-hunter_cpu_bg3_11-18-83.6a.ihx: \
+../orig/spyhunt/spy-hunter_cpu_bg3_11-18-83.6a
+       ${BIN2HEX} --offset=${ROM_SPY_HUNTER_CPU_BG3_11_18_83_6A_ADDR} $< $@
+
+spy-hunter_video_1fg_11-18-83.a7.ihx: \
+../orig/spyhunt/spy-hunter_video_1fg_11-18-83.a7
+       ${BIN2HEX} --offset=${ROM_SPY_HUNTER_VIDEO_1FG_11_18_83_A7_ADDR} $< $@
+
+spy-hunter_video_0fg_11-18-83.a8.ihx: \
+../orig/spyhunt/spy-hunter_video_0fg_11-18-83.a8
+       ${BIN2HEX} --offset=${ROM_SPY_HUNTER_VIDEO_0FG_11_18_83_A8_ADDR} $< $@
+
+spy-hunter_video_3fg_11-18-83.a5.ihx: \
+../orig/spyhunt/spy-hunter_video_3fg_11-18-83.a5
+       ${BIN2HEX} --offset=${ROM_SPY_HUNTER_VIDEO_3FG_11_18_83_A5_ADDR} $< $@
+
+spy-hunter_video_2fg_11-18-83.a6.ihx: \
+../orig/spyhunt/spy-hunter_video_2fg_11-18-83.a6
+       ${BIN2HEX} --offset=${ROM_SPY_HUNTER_VIDEO_2FG_11_18_83_A6_ADDR} $< $@
+
+spy-hunter_video_5fg_11-18-83.a3.ihx: \
+../orig/spyhunt/spy-hunter_video_5fg_11-18-83.a3
+       ${BIN2HEX} --offset=${ROM_SPY_HUNTER_VIDEO_5FG_11_18_83_A3_ADDR} $< $@
+
+spy-hunter_video_4fg_11-18-83.a4.ihx: \
+../orig/spyhunt/spy-hunter_video_4fg_11-18-83.a4
+       ${BIN2HEX} --offset=${ROM_SPY_HUNTER_VIDEO_4FG_11_18_83_A4_ADDR} $< $@
+
+spy-hunter_video_7fg_11-18-83.a1.ihx: \
+../orig/spyhunt/spy-hunter_video_7fg_11-18-83.a1
+       ${BIN2HEX} --offset=${ROM_SPY_HUNTER_VIDEO_7FG_11_18_83_A1_ADDR} $< $@
+
+spy-hunter_video_6fg_11-18-83.a2.ihx: \
+../orig/spyhunt/spy-hunter_video_6fg_11-18-83.a2
+       ${BIN2HEX} --offset=${ROM_SPY_HUNTER_VIDEO_6FG_11_18_83_A2_ADDR} $< $@
+
+spy-hunter_cpu_alpha-n_11-18-83.ihx: \
+../orig/spyhunt/spy-hunter_cpu_alpha-n_11-18-83
+       ${BIN2HEX} --offset=${ROM_SPY_HUNTER_CPU_ALPHA_N_11_18_83_ADDR} $< $@
+
+io_page.ihx: io_page.rel
+       ${ASLINK} -n -m -u -i -b io_page=${IO_PAGE} $@ $^
+
+io_page.rel: io_page.asm
+       ${ASZ80} -l -o $<
+
+clean:
+       rm -f *.hlr *.ihx *.lst *.map *.o *.rel *.rst
diff --git a/spyhunt/io_page.asm b/spyhunt/io_page.asm
new file mode 100644 (file)
index 0000000..92e21a5
--- /dev/null
@@ -0,0 +1,51 @@
+; we implement the I/O page as RAM, basically used as communication
+; area between the program and the emulator -- for example, if the
+; joystick moves, the emulator saves the new state in the I/O page,
+; then the program picks it up later using an ordinary memory read
+; this file contains the initial contents, e.g. to set DIP switches
+
+       .area   io_page
+
+       ; read
+       .db     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ; 7800
+       .db     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ; 7808
+       .ds     0x30
+
+       ; write 
+       .db     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ; 7840 (z80 7800)
+       .db     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ; 7848 (z80 7808)
+       .ds     0x30
+
+       .ds     0x380
+
+       ; read
+       .db     0x00                                    ; 7c00
+       .ds     0x3f
+
+       ; write
+       .db     0x00                                    ; 7c40 (z80 7c00)
+       .ds     0x3f
+
+       ; read
+       .db     0x00                                    ; 7c80
+       .ds     0x3f
+
+       ; write
+       .db     0x00                                    ; 7cc0 (z80 7c80)
+       .ds     0x3f
+
+       ; read
+       .db     0x00                                    ; 7d00
+       .ds     0x3f
+
+       ; write
+       .db     0x00                                    ; 7d40 (z80 7d00)
+       .ds     0x3f
+
+       ; read
+       .db     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ; 7d80
+       .ds     0x38
+
+       ; write
+       .db     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ; 7dc0 (z80 7d80)
+       .ds     0x38