Mercurial > repos > blastem
comparison ztestrun.c @ 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 | 48a43dff4dc0 |
children |
comparison
equal
deleted
inserted
replaced
2601:6a84a38b3cf9 | 2602:10c7f1e44c47 |
---|---|
15 #include <stdio.h> | 15 #include <stdio.h> |
16 #include <stdlib.h> | 16 #include <stdlib.h> |
17 #include <stddef.h> | 17 #include <stddef.h> |
18 #include <stdarg.h> | 18 #include <stdarg.h> |
19 | 19 |
20 void fatal_error(char *format, ...) | 20 int headless = 1; |
21 void render_errorbox(char * title, char * buf) | |
21 { | 22 { |
22 va_list args; | 23 } |
23 va_start(args, format); | 24 |
24 vfprintf(stderr, format, args); | 25 void render_infobox(char * title, char * buf) |
25 va_end(args); | 26 { |
26 exit(1); | |
27 } | 27 } |
28 | 28 |
29 uint8_t z80_ram[0x2000]; | 29 uint8_t z80_ram[0x2000]; |
30 | 30 |
31 uint8_t z80_unmapped_read(uint32_t location, void * context) | 31 uint8_t z80_unmapped_read(uint32_t location, void * context) |
37 { | 37 { |
38 return context; | 38 return context; |
39 } | 39 } |
40 | 40 |
41 const memmap_chunk z80_map[] = { | 41 const memmap_chunk z80_map[] = { |
42 { 0x0000, 0x4000, 0x1FFF, 0, 0, MMAP_READ | MMAP_WRITE | MMAP_CODE, z80_ram, NULL, NULL, NULL, NULL }, | 42 { 0x0000, 0x4000, 0x1FFF, .flags = MMAP_READ | MMAP_WRITE | MMAP_CODE, .buffer = z80_ram}, |
43 { 0x4000, 0x10000, 0xFFFF, 0, 0, 0, NULL, NULL, NULL, z80_unmapped_read, z80_unmapped_write} | 43 { 0x4000, 0x10000, 0xFFFF, .read_8 = z80_unmapped_read, .write_8 = z80_unmapped_write} |
44 }; | 44 }; |
45 | 45 |
46 const memmap_chunk port_map[] = { | 46 const memmap_chunk port_map[] = { |
47 { 0x0000, 0x100, 0xFF, 0, 0, 0, NULL, NULL, NULL, z80_unmapped_read, z80_unmapped_write} | 47 { 0x0000, 0x100, 0xFF, .read_8 = z80_unmapped_read, .write_8 = z80_unmapped_write} |
48 }; | 48 }; |
49 | 49 |
50 #ifndef NEW_CORE | 50 #ifndef NEW_CORE |
51 void z80_next_int_pulse(z80_context * context) | 51 void z80_next_int_pulse(z80_context * context) |
52 { | 52 { |