comparison debug.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 d6d4c006a7b3
children 374a5ae694e8
comparison
equal deleted inserted replaced
1772:75172d440900 1773:0a26f3657295
9 #include "render.h" 9 #include "render.h"
10 #include "util.h" 10 #include "util.h"
11 #include "terminal.h" 11 #include "terminal.h"
12 #include "z80inst.h" 12 #include "z80inst.h"
13 13
14 #ifdef NEW_CORE 14 #ifndef USE_NATIVE
15 #define Z80_OPTS opts 15 #define Z80_OPTS opts
16 #else 16 #else
17 #define Z80_OPTS options 17 #define Z80_OPTS options
18 #endif 18 #endif
19 19
195 default: 195 default:
196 fprintf(stderr, "Unrecognized format character: %c\n", format_char); 196 fprintf(stderr, "Unrecognized format character: %c\n", format_char);
197 } 197 }
198 switch (param[0]) 198 switch (param[0])
199 { 199 {
200 #ifndef NEW_CORE 200 #ifdef USE_NATIVE
201 case 'a': 201 case 'a':
202 if (param[1] == 'f') { 202 if (param[1] == 'f') {
203 if(param[2] == '\'') { 203 if(param[2] == '\'') {
204 value = context->alt_regs[Z80_A] << 8; 204 value = context->alt_regs[Z80_A] << 8;
205 value |= context->alt_flags[ZF_S] << 7; 205 value |= context->alt_flags[ZF_S] << 7;
494 //TODO: Handle conditional branch instructions 494 //TODO: Handle conditional branch instructions
495 if (inst.op == Z80_JP) { 495 if (inst.op == Z80_JP) {
496 if (inst.addr_mode == Z80_IMMED) { 496 if (inst.addr_mode == Z80_IMMED) {
497 after = inst.immed; 497 after = inst.immed;
498 } else if (inst.ea_reg == Z80_HL) { 498 } else if (inst.ea_reg == Z80_HL) {
499 #ifndef NEW_CORE 499 #ifdef USE_NATIVE
500 after = context->regs[Z80_H] << 8 | context->regs[Z80_L]; 500 after = context->regs[Z80_H] << 8 | context->regs[Z80_L];
501 } else if (inst.ea_reg == Z80_IX) { 501 } else if (inst.ea_reg == Z80_IX) {
502 after = context->regs[Z80_IXH] << 8 | context->regs[Z80_IXL]; 502 after = context->regs[Z80_IXH] << 8 | context->regs[Z80_IXL];
503 } else if (inst.ea_reg == Z80_IY) { 503 } else if (inst.ea_reg == Z80_IY) {
504 after = context->regs[Z80_IYH] << 8 | context->regs[Z80_IYL]; 504 after = context->regs[Z80_IYH] << 8 | context->regs[Z80_IYL];