Certain games (such as Pooyan) expect RNDL and RNDH to be non-zero. Initialize to non-zero value.

This commit is contained in:
michaelangel007 2014-07-13 21:00:45 -07:00
parent 8637dfa7af
commit 81ce9c54d1

View File

@ -1392,6 +1392,12 @@ void MemReset ()
}
}
// https://github.com/AppleWin/AppleWin/issues/206
// On a real Apple the RNDL and RNDH are initialized to random values from a cold boot.
DWORD clock = timeGetTime(); // We can't use g_nCumulativeCycles as it will be zero on a fresh execution.
memmain[ 0x4E ] = (clock >> 0) & 0xFF;
memmain[ 0x4F ] = (clock >> 8) & 0xFF;
// SET UP THE MEMORY IMAGE
mem = memimage;
//image = 0;