Add 8080 emulation, only alternate version so far, based on https://github.com/the...
authorNick Downing <nick@ndcode.org>
Mon, 1 Dec 2025 13:11:15 +0000 (00:11 +1100)
committerNick Downing <nick@ndcode.org>
Wed, 3 Dec 2025 09:04:30 +0000 (20:04 +1100)
.gitmodules
Makefile
intel-8080 [new submodule]

index 7ad9f5d..c4d83a0 100644 (file)
@@ -46,3 +46,6 @@
 [submodule "cpm_compilers"]
        path = cpm_compilers
        url = https://github.com/davidly/cpm_compilers.git
+[submodule "intel-8080"]
+       path = intel-8080
+       url = https://github.com/nickd4/intel-8080.git
index 4a0527b..498b535 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -11,6 +11,7 @@ ALT_8086_CFLAGS=-DALT_BACKEND=1 -Ivirtualxt/lib/vxt -Ivirtualxt/lib/vxt/include
 ALT_MIPS_CFLAGS=-DALT_BACKEND=1 -DHAVE_CONFIG_H -Iyams -Iyams/src -Wno-enum-compare
 ALT_PDP11_CFLAGS=-DALT_BACKEND=1 -Isimh -Isimh/PDP11
 ALT_Z80_CFLAGS=-DALT_BACKEND=1
+ALT_8080_CFLAGS=-DALT_BACKEND=1
 
 .PHONY: all
 all: \
@@ -33,7 +34,9 @@ emu_z80 \
 emu_z80_alt \
 zexall.ihx \
 zexdoc.ihx \
-mbasic.ihx
+mbasic.ihx \
+emu_8080_alt
+#emu_8080
 #emu_mips
 #emu_pdp11
 #emu_68000
@@ -296,6 +299,23 @@ zexdoc.ihx: ZEXALL/zexdoc.com
        ./entry_point.py 0x100 __temp__.ihx $@
        rm __temp__.ihx
 
+# 8080
+#emu_8080: emu_8080.o cpu_8080.o
+#      ${CC} ${CFLAGS} -o $@ $^
+
+#emu_8080.o: cpu_8080.h
+
+#cpu_8080.o: cpu_8080.h
+
+emu_8080_alt: emu_8080_alt.o 8080_cpu.o
+       ${CC} ${CFLAGS} -o $@ $^
+
+emu_8080_alt.o: emu_8080.c intel-8080/cpu.h
+       ${CC} ${CFLAGS} ${ALT_8080_CFLAGS} -o $@ -c $<
+
+8080_cpu.o: intel-8080/cpu.c intel-8080/cpu.h
+       ${CC} ${CFLAGS} ${ALT_8080_CFLAGS} -o $@ -c $<
+
 mbasic.ihx: cpm_compilers/Microsoft\ BASIC-80\ v521/MBASIC.COM
        ${BIN2HEX} --offset=0x100 "$<" __temp__.ihx
        ./entry_point.py 0x100 __temp__.ihx $@
diff --git a/intel-8080 b/intel-8080
new file mode 160000 (submodule)
index 0000000..475d656
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 475d65635730d8fb10292f27d5da8223a2084ea0