#222 Kludge for Copy ][ v5 on MIP_PAGE_ADDRESS_LOW

This commit is contained in:
michaelangel007 2014-08-23 23:07:02 -07:00
parent 0ef2f4ddf9
commit 92e0f14907

View File

@ -1411,8 +1411,16 @@ void MemReset ()
if (g_nMemoryClearType >= 0)
g_eMemoryInitPattern = static_cast<MemoryInitPattern_e>(g_nMemoryClearType);
else // random
{
g_eMemoryInitPattern = static_cast<MemoryInitPattern_e>( clock % NUM_MIP );
// Don't use unless manually specified as a
// few badly written programs will not work correctly
// due to buffer overflows or not initializig memory before using.
if( g_eMemoryInitPattern == MIP_PAGE_ADDRESS_LOW )
g_eMemoryInitPattern = MIP_FF_FF_00_00;
}
switch( g_eMemoryInitPattern )
{
case MIP_FF_FF_00_00:
@ -1491,10 +1499,20 @@ void MemReset ()
memmain[ 0x4F ] = 0x20 | (clock >> 8) & 0xFF;
// https://github.com/AppleWin/AppleWin/issues/222
// MIP_PAGE_ADDRESS_LOW breaks a few badly written programs!
// "Beautiful Boot by Mini Appler" reads past $61FF into $6200
// - "BeachParty-PoacherWars-DaytonDinger-BombsAway.dsk"
// - "Dung Beetles, Ms. PacMan, Pooyan, Star Cruiser, Star Thief, Invas. Force.dsk"
memmain[ 0x620B ] = 0x0;
// https://github.com/AppleWin/AppleWin/issues/222
// MIP_PAGE_ADDRESS_LOW
// "Copy II+ v5.0.dsk"
// There is a strange memory checker from $1B03 .. $1C25
// Stuck in loop at $1BC2: JSR $F88E INSDS2 before crashing to $0: 00 BRK
memmain[ 0xBFFD ] = 0;
memmain[ 0xBFFE ] = 0;
memmain[ 0xBFFF ] = 0;
// SET UP THE MEMORY IMAGE
mem = memimage;