diff options
author | Ian C <ianc@noddybox.co.uk> | 2004-08-27 23:55:16 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2004-08-27 23:55:16 +0000 |
commit | 0922b7993ce1d18de8fe975b17fd33cd3841ae9c (patch) | |
tree | 429f1e7314a10bebd0634f87c3d25d58647e9c4f /src/spec.c | |
parent | b219c3580da55f3396a2d8df8301a777b783d833 (diff) |
Updates
Diffstat (limited to 'src/spec.c')
-rw-r--r-- | src/spec.c | 20 |
1 files changed, 14 insertions, 6 deletions
@@ -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(""); } |