From 0922b7993ce1d18de8fe975b17fd33cd3841ae9c Mon Sep 17 00:00:00 2001 From: Ian C Date: Fri, 27 Aug 2004 23:55:16 +0000 Subject: Updates --- src/spec.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'src/spec.c') diff --git a/src/spec.c b/src/spec.c index 1fba973..dc9a20d 100644 --- a/src/spec.c +++ b/src/spec.c @@ -209,6 +209,7 @@ static const MatrixMap keymap[]= /* ---------------------------------------- DEBUG FUNCTIONS +*/ static const char *FlagString(Z80Byte flag) { static char s[]="76543210"; @@ -239,7 +240,6 @@ static void DumpZ80(Z80 *z80) printf("IFF1=%2.2x IFF2=%2.2x\n",s.IFF1,s.IFF2); printf("%s\n",Z80Disassemble(z80,&s.PC)); } -*/ /* ---------------------------------------- PRIVATE FUNCTIONS @@ -341,11 +341,11 @@ static int EDCallback(Z80 *z80, Z80Val data) { Z80State state; - Z80GetState(z80,&state); - switch((Z80Byte)data) { case SAVE_PATCH: + Z80GetState(z80,&state); + if (!tape_out) { state.AF|=eZ80_Carry; @@ -361,9 +361,15 @@ static int EDCallback(Z80 *z80, Z80Val data) state.AF&=~eZ80_Carry; } } + + DumpZ80(z80); + Z80SetState(z80,&state); + break; case LOAD_PATCH: + Z80GetState(z80,&state); + if (!tape_in) { state.AF|=eZ80_Carry; @@ -379,14 +385,16 @@ static int EDCallback(Z80 *z80, Z80Val data) state.AF&=~eZ80_Carry; } } + + DumpZ80(z80); + Z80SetState(z80,&state); + break; default: break; } - Z80SetState(z80,&state); - return TRUE; } @@ -458,7 +466,7 @@ void SPECInit(Z80 *z80) fclose(fp); GUIMessage(eMessageBox, "ERROR", - "ROM file must be %d bytes long\n", + "ROM file must be %d bytes long", ROMLEN); Exit(""); } -- cgit v1.2.3