diff --git a/AppleWin/source/Memory.cpp b/AppleWin/source/Memory.cpp index 5afe3306..db76ffb0 100644 --- a/AppleWin/source/Memory.cpp +++ b/AppleWin/source/Memory.cpp @@ -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; diff --git a/AppleWin/source/Memory.h b/AppleWin/source/Memory.h index 382ab0da..62ca6352 100644 --- a/AppleWin/source/Memory.h +++ b/AppleWin/source/Memory.h @@ -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];