summaryrefslogtreecommitdiff
path: root/src/spec.c
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2004-08-27 23:55:16 +0000
committerIan C <ianc@noddybox.co.uk>2004-08-27 23:55:16 +0000
commit0922b7993ce1d18de8fe975b17fd33cd3841ae9c (patch)
tree429f1e7314a10bebd0634f87c3d25d58647e9c4f /src/spec.c
parentb219c3580da55f3396a2d8df8301a777b783d833 (diff)
Updates
Diffstat (limited to 'src/spec.c')
-rw-r--r--src/spec.c20
1 files changed, 14 insertions, 6 deletions
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("");
}