Added Memory Init Pattern

This commit is contained in:
mpohoreski 2006-03-09 21:10:40 +00:00
parent 0e396f9697
commit 7935b18c15
2 changed files with 20 additions and 7 deletions

View File

@ -594,6 +594,8 @@ static LPBYTE memrom = NULL;
static BOOL modechanging = 0;
DWORD pages = 0;
MemoryInitPattern_e g_eMemoryInitPattern = MIP_FF_FF_00_00;
#ifdef RAMWORKS
UINT g_uMaxExPages = 1; // user requested ram pages
static LPBYTE RWpages[128]; // pointers to RW memory banks
@ -968,18 +970,20 @@ void MemReset ()
ZeroMemory(memmain,0x10000);
// TODO: Verify the RAM pattern is still valid for an Apple //e
int iByte;
for( iByte = 0x0000; iByte < 0xC000; )
if (g_eMemoryInitPattern == MIP_FF_FF_00_00)
{
iByte++;
iByte++;
for( iByte = 0x0000; iByte < 0xC000; )
{
memmain[ iByte++ ] = 0xFF;
memmain[ iByte++ ] = 0xFF;
memmain[ iByte++ ] = 0xFF;
memmain[ iByte++ ] = 0xFF;
iByte++;
iByte++;
}
}
// SET UP THE MEMORY IMAGE
mem = memimage;
image = 0;

View File

@ -1,5 +1,14 @@
#pragma once
enum MemoryInitPattern_e
{
MIP_ZERO
, MIP_FF_FF_00_00
, NUM_MIP
};
extern MemoryInitPattern_e g_eMemoryInitPattern;
extern iofunction ioread[0x100];
extern iofunction iowrite[0x100];
extern LPBYTE memshadow[MAXIMAGES][0x100];