summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2004-01-23 20:02:27 +0000
committerIan C <ianc@noddybox.co.uk>2004-01-23 20:02:27 +0000
commit72e65aafe6141399b461fa060917dc908fd3d379 (patch)
tree72d3dcd12f62cc7bfa69c344223ad0041a252988
parent0a6f1fcdf13e5d4518b8605dd7a55f49db6b1a70 (diff)
Changes from work
-rw-r--r--src/gui.c2
-rw-r--r--src/spec.c76
2 files changed, 40 insertions, 38 deletions
diff --git a/src/gui.c b/src/gui.c
index 05ebc49..3340de1 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -431,7 +431,7 @@ int GUIFileSelect(const char *prompt, int load,
else
strcpy(path,"/files/emu/spectrum/testespec.tap");
- strcpy(path,"/files/emu/spectrum/testespec.tap");
+ /* strcpy(path,"/files/emu/spectrum/testespec.tap"); */
return TRUE;
}
diff --git a/src/spec.c b/src/spec.c
index b094126..1a69894 100644
--- a/src/spec.c
+++ b/src/spec.c
@@ -431,9 +431,6 @@ static int CheckTimers(Z80 *z80, Z80Val val)
void SPECInit(Z80 *z80)
{
FILE *fp;
- int f;
- int c;
- int r;
if (!(fp=fopen(SConfig(CONF_ROMFILE),"rb")))
{
@@ -460,40 +457,7 @@ void SPECInit(Z80 *z80)
Z80LodgeCallback(z80,eZ80_EDHook,EDCallback);
Z80LodgeCallback(z80,eZ80_Instruction,CheckTimers);
- /* Set up the keyboard
- */
- for(f=0;f<8;f++)
- matrix[f]=0x1f;
-
- /* Set up the colours
- */
- for(f=0;f<16;f++)
- coltable[f].col=GFXRGB(coltable[f].r,coltable[f].g,coltable[f].b);
-
- scanline=0;
- flash=0;
- flashctr=0;
-
- /* Set up screen
- */
- c=0;
- r=0;
- for(f=0;f<SCRL;f++)
- {
- line[f]=mem+SCRDATA+(c*8*TXT_W)+(r*TXT_W);
-
- c++;
-
- if ((c%8)==0)
- {
- if (++r==8)
- r=0;
- else
- c-=8;
- }
- }
-
- GFXStartFrame();
+ SPECReset(z80);
}
@@ -851,6 +815,44 @@ void SPECShowScreen(void)
void SPECReset(Z80 *z80)
{
+ int f;
+ int c;
+ int r;
+
+ /* Set up the keyboard
+ */
+ for(f=0;f<8;f++)
+ matrix[f]=0x1f;
+
+ /* Set up the colours
+ */
+ for(f=0;f<16;f++)
+ coltable[f].col=GFXRGB(coltable[f].r,coltable[f].g,coltable[f].b);
+
+ scanline=0;
+ flash=0;
+ flashctr=0;
+
+ /* Set up screen
+ */
+ c=0;
+ r=0;
+ for(f=0;f<SCRL;f++)
+ {
+ line[f]=mem+SCRDATA+(c*8*TXT_W)+(r*TXT_W);
+
+ c++;
+
+ if ((c%8)==0)
+ {
+ if (++r==8)
+ r=0;
+ else
+ c-=8;
+ }
+ }
+
+ GFXStartFrame();
}