Mercurial > repos > blastem
comparison ztestrun.c @ 1773:0a26f3657295 mame_interp
Remove MAME Z80 core in favor of my new Z80 core
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 12 Mar 2019 21:59:52 -0700 |
parents | 48a43dff4dc0 |
children | 374a5ae694e8 |
comparison
equal
deleted
inserted
replaced
1772:75172d440900 | 1773:0a26f3657295 |
---|---|
2 Copyright 2013 Michael Pavone | 2 Copyright 2013 Michael Pavone |
3 This file is part of BlastEm. | 3 This file is part of BlastEm. |
4 BlastEm is free software distributed under the terms of the GNU General Public License version 3 or greater. See COPYING for full license text. | 4 BlastEm is free software distributed under the terms of the GNU General Public License version 3 or greater. See COPYING for full license text. |
5 */ | 5 */ |
6 #include "z80inst.h" | 6 #include "z80inst.h" |
7 #ifdef NEW_CORE | 7 #ifndef USE_NATIVE |
8 #include "z80.h" | 8 #include "z80.h" |
9 #include <string.h> | 9 #include <string.h> |
10 #else | 10 #else |
11 #include "z80_to_x86.h" | 11 #include "z80_to_x86.h" |
12 #endif | 12 #endif |
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, 0, 0, 0, NULL, NULL, NULL, z80_unmapped_read, z80_unmapped_write} |
48 }; | 48 }; |
49 | 49 |
50 #ifndef NEW_CORE | 50 #ifdef USE_NATIVE |
51 void z80_next_int_pulse(z80_context * context) | 51 void z80_next_int_pulse(z80_context * context) |
52 { | 52 { |
53 context->int_pulse_start = context->int_pulse_end = CYCLE_NEVER; | 53 context->int_pulse_start = context->int_pulse_end = CYCLE_NEVER; |
54 } | 54 } |
55 #endif | 55 #endif |
96 exit(1); | 96 exit(1); |
97 } | 97 } |
98 fclose(f); | 98 fclose(f); |
99 init_z80_opts(&opts, z80_map, 2, port_map, 1, 1, 0xFF); | 99 init_z80_opts(&opts, z80_map, 2, port_map, 1, 1, 0xFF); |
100 context = init_z80_context(&opts); | 100 context = init_z80_context(&opts); |
101 #ifdef NEW_CORE | 101 #ifndef USE_NATIVE |
102 z80_execute(context, 1000); | 102 z80_execute(context, 1000); |
103 printf("A: %X\nB: %X\nC: %X\nD: %X\nE: %X\nHL: %X\nIX: %X\nIY: %X\nSP: %X\n\nIM: %d, IFF1: %d, IFF2: %d\n", | 103 printf("A: %X\nB: %X\nC: %X\nD: %X\nE: %X\nHL: %X\nIX: %X\nIY: %X\nSP: %X\n\nIM: %d, IFF1: %d, IFF2: %d\n", |
104 context->main[7], context->main[0], context->main[1], | 104 context->main[7], context->main[0], context->main[1], |
105 context->main[2], context->main[3], | 105 context->main[2], context->main[3], |
106 (context->main[4] << 8) | context->main[5], | 106 (context->main[4] << 8) | context->main[5], |