summaryrefslogtreecommitdiff
path: root/source/spec.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/spec.c')
-rw-r--r--source/spec.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/spec.c b/source/spec.c
index 10a5d0a..0e569b5 100644
--- a/source/spec.c
+++ b/source/spec.c
@@ -62,9 +62,9 @@ static const int ROM_LOAD=0x562;
#define SCRDATA 0x4000
#define ATTR 0x5800
-#define ATTR_AT(x,y) mem[ATTR+(x)+((y)/8)*32]
+#define ATTR_AT(x,y) Z80_MEMORY[ATTR+(x)+((y)/8)*32]
-static Z80Byte mem[0x10000];
+Z80Byte Z80_MEMORY[0x10000];
/* Number of cycles per frame
*/
@@ -169,7 +169,7 @@ static void DrawScreen(void)
vr=vram;
- swiWaitForVBlank();
+ /* swiWaitForVBlank(); */
for(y=0;y<SCR_H;y++)
{
@@ -257,36 +257,36 @@ static void RomPatch(void)
int f;
for(f=0;save[f]!=0xff;f++)
- mem[ROM_SAVE+f]=save[f];
+ Z80_MEMORY[ROM_SAVE+f]=save[f];
for(f=0;load[f]!=0xff;f++)
- mem[ROM_LOAD+f]=load[f];
+ Z80_MEMORY[ROM_LOAD+f]=load[f];
}
Z80Byte SPECPeek(Z80 *cpu, Z80Word addr)
{
- return mem[addr];
+ return Z80_MEMORY[addr];
}
Z80Byte SnapPeek(Z80Word addr)
{
- return mem[addr];
+ return Z80_MEMORY[addr];
}
void SPECPoke(Z80 *cpu, Z80Word addr, Z80Byte val)
{
if (addr>=ROMLEN)
- mem[addr]=val;
+ Z80_MEMORY[addr]=val;
}
void SnapPoke(Z80Word addr, Z80Byte val)
{
if (addr>=ROMLEN)
- mem[addr]=val;
+ Z80_MEMORY[addr]=val;
}
@@ -365,7 +365,7 @@ void SPECInit(uint16 *v, Z80 *z80)
{
vram=v;
- memcpy(mem,spec48_bin,ROMLEN);
+ memcpy(Z80_MEMORY,spec48_bin,ROMLEN);
/* Patch the ROM
*/
@@ -491,7 +491,7 @@ void SPECReset(Z80 *z80)
r=0;
for(f=0;f<SCR_H;f++)
{
- line[f]=mem+SCRDATA+(c*8*TXT_W)+(r*TXT_W);
+ line[f]=Z80_MEMORY+SCRDATA+(c*8*TXT_W)+(r*TXT_W);
c++;