changeset 2602:10c7f1e44c47

Fix some older targets that are maybe still useful
author Michael Pavone <pavone@retrodev.com>
date Thu, 13 Feb 2025 21:03:04 -0800
parents 6a84a38b3cf9
children acb8f0f70a68
files jagcpu.h ztestgen.c ztestrun.c
diffstat 3 files changed, 11 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/jagcpu.h	Thu Feb 13 21:02:47 2025 -0800
+++ b/jagcpu.h	Thu Feb 13 21:03:04 2025 -0800
@@ -1,6 +1,8 @@
 #ifndef JAGCPU_H_
 #define JAGCPU_H_
 
+#include "backend.h"
+
 enum {
 	JAG_ADD,
 	JAG_ADDC,
--- a/ztestgen.c	Thu Feb 13 21:02:47 2025 -0800
+++ b/ztestgen.c	Thu Feb 13 21:03:04 2025 -0800
@@ -21,7 +21,6 @@
 extern z80inst z80_tbl_ix_bit[256];
 extern z80inst z80_tbl_iy_bit[256];
 extern char *z80_mnemonics[Z80_OTDR+1];
-extern char * z80_regs[Z80_USE_IMMED];
 #define PRE_IX  0xDD
 #define PRE_IY  0xFD
 #define LD_IR16 0x01
--- a/ztestrun.c	Thu Feb 13 21:02:47 2025 -0800
+++ b/ztestrun.c	Thu Feb 13 21:03:04 2025 -0800
@@ -17,13 +17,13 @@
 #include <stddef.h>
 #include <stdarg.h>
 
-void fatal_error(char *format, ...)
+int headless = 1;
+void render_errorbox(char * title, char * buf)
 {
-	va_list args;
-	va_start(args, format);
-	vfprintf(stderr, format, args);
-	va_end(args);
-	exit(1);
+}
+
+void render_infobox(char * title, char * buf)
+{
 }
 
 uint8_t z80_ram[0x2000];
@@ -39,12 +39,12 @@
 }
 
 const memmap_chunk z80_map[] = {
-	{ 0x0000, 0x4000,  0x1FFF, 0, 0, MMAP_READ | MMAP_WRITE | MMAP_CODE, z80_ram, NULL, NULL, NULL,              NULL },
-	{ 0x4000, 0x10000, 0xFFFF, 0, 0, 0,                                  NULL,    NULL, NULL, z80_unmapped_read, z80_unmapped_write}
+	{ 0x0000, 0x4000,  0x1FFF, .flags = MMAP_READ | MMAP_WRITE | MMAP_CODE, .buffer = z80_ram},
+	{ 0x4000, 0x10000, 0xFFFF, .read_8 = z80_unmapped_read, .write_8 = z80_unmapped_write}
 };
 
 const memmap_chunk port_map[] = {
-	{ 0x0000, 0x100, 0xFF, 0, 0, 0,                                  NULL,    NULL, NULL, z80_unmapped_read, z80_unmapped_write}
+	{ 0x0000, 0x100, 0xFF, .read_8 = z80_unmapped_read, .write_8 = z80_unmapped_write}
 };
 
 #ifndef NEW_CORE