mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-06-27 07:29:30 +00:00
Documented #206 existing and new -memclear options with "In Development" in History.txt
-memclear 0 Initialize memory to zero -memclear 1 Initialize memory to random values -memclear 2 Initialize memory to 4 byte pattern: FF FF 00 00 -memclear 3 Initialize memory to even pages FF, odd pages 00 -memclear 4 Initialize memory to first half page 00, last half page FF -memclear 5 Initialize memory to first half page FF, last half page 00 -memclear 6 Initialize memory to byte offset of page (current memory address low byte) -memclear 7 Initialize memory to page address (current memory address high byte)
This commit is contained in:
parent
f4b09e1f8f
commit
a4bae75d2a
|
@ -13,6 +13,28 @@ Restrictions/bugs:
|
||||||
- SSI263 emulation is very basic: there is no attempt to emulate rate, inflection or filters.
|
- SSI263 emulation is very basic: there is no attempt to emulate rate, inflection or filters.
|
||||||
- During Mockingboard playback, Speaker emulation isn't precise
|
- During Mockingboard playback, Speaker emulation isn't precise
|
||||||
|
|
||||||
|
|
||||||
|
In Development:
|
||||||
|
---------------
|
||||||
|
Changes:
|
||||||
|
. Added command line switch to specify the type of memory initialization pattern.
|
||||||
|
-memclear #
|
||||||
|
Where # ranges from 0 to 7.
|
||||||
|
i.e.
|
||||||
|
-memclear 0 Initialize memory to zero
|
||||||
|
-memclear 1 Initialize memory to random values
|
||||||
|
-memclear 2 Initialize memory to 4 byte pattern: FF FF 00 00
|
||||||
|
-memclear 3 Initialize memory to even pages FF, odd pages 00
|
||||||
|
-memclear 4 Initialize memory to first half page 00, last half page FF
|
||||||
|
-memclear 5 Initialize memory to first half page FF, last half page 00
|
||||||
|
-memclear 6 Initialize memory to byte offset of page
|
||||||
|
(current memory address low byte)
|
||||||
|
-memclear 7 Initialize memory to page address
|
||||||
|
(current memory address high byte)
|
||||||
|
Fixed:
|
||||||
|
. [Bug #206] Pooyan freezes due to RNDL/RNDH not initialized to non-zero values
|
||||||
|
|
||||||
|
|
||||||
Latest:
|
Latest:
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
|
|
@ -1392,14 +1392,10 @@ void MemReset ()
|
||||||
// F2, Ctrl-F2, F7, HGR
|
// F2, Ctrl-F2, F7, HGR
|
||||||
DWORD clock = getRandomTime();
|
DWORD clock = getRandomTime();
|
||||||
|
|
||||||
if ((g_nMemoryClearType >= 0) && (g_nMemoryClearType != MIP_RANDOM))
|
if (g_nMemoryClearType >= 0)
|
||||||
g_eMemoryInitPattern = static_cast<MemoryInitPattern_e>(g_nMemoryClearType);
|
g_eMemoryInitPattern = static_cast<MemoryInitPattern_e>(g_nMemoryClearType);
|
||||||
else // random
|
else // random
|
||||||
{
|
|
||||||
g_eMemoryInitPattern = static_cast<MemoryInitPattern_e>( clock % NUM_MIP );
|
g_eMemoryInitPattern = static_cast<MemoryInitPattern_e>( clock % NUM_MIP );
|
||||||
if (g_eMemoryInitPattern == MIP_RANDOM) // Twice Lucky! Force a choice.
|
|
||||||
g_eMemoryInitPattern = MIP_FF_FF_00_00;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch( g_eMemoryInitPattern )
|
switch( g_eMemoryInitPattern )
|
||||||
{
|
{
|
||||||
|
@ -1442,6 +1438,34 @@ void MemReset ()
|
||||||
for( iByte = 0x0000; iByte < 0xC000; iByte += 256 )
|
for( iByte = 0x0000; iByte < 0xC000; iByte += 256 )
|
||||||
memset( &memmain[ iByte ], 0xFF, 128 );
|
memset( &memmain[ iByte ], 0xFF, 128 );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case MIP_RANDOM:
|
||||||
|
unsigned char random[ 256 + 4 ];
|
||||||
|
for( iByte = 0x0000; iByte < 0xC000; iByte += 256 )
|
||||||
|
{
|
||||||
|
for( int i = 0; i < 256; i++ )
|
||||||
|
{
|
||||||
|
clock = getRandomTime();
|
||||||
|
random[ i+0 ] ^= (clock >> 0) & 0xFF;
|
||||||
|
random[ i+1 ] ^= (clock >> 11) & 0xFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
memcpy( &memmain[ iByte ], random, 256 );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MIP_PAGE_ADDRESS_LOW:
|
||||||
|
for( iByte = 0x0000; iByte < 0xC000; iByte++ )
|
||||||
|
memmain[ iByte ] = iByte & 0xFF;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MIP_PAGE_ADDRESS_HIGH:
|
||||||
|
for( iByte = 0x0000; iByte < 0xC000; iByte += 256 )
|
||||||
|
memset( &memmain[ iByte ], (iByte >> 8), 256 );
|
||||||
|
break;
|
||||||
|
|
||||||
|
default: // MIP_ZERO -- nothing to do
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://github.com/AppleWin/AppleWin/issues/206
|
// https://github.com/AppleWin/AppleWin/issues/206
|
||||||
|
|
|
@ -20,6 +20,8 @@ enum MemoryInitPattern_e
|
||||||
, MIP_FF_00_FULL_PAGE
|
, MIP_FF_00_FULL_PAGE
|
||||||
, MIP_00_FF_HALF_PAGE
|
, MIP_00_FF_HALF_PAGE
|
||||||
, MIP_FF_00_HALF_PAGE
|
, MIP_FF_00_HALF_PAGE
|
||||||
|
, MIP_PAGE_ADDRESS_LOW
|
||||||
|
, MIP_PAGE_ADDRESS_HIGH
|
||||||
, NUM_MIP
|
, NUM_MIP
|
||||||
};
|
};
|
||||||
extern MemoryInitPattern_e g_eMemoryInitPattern;
|
extern MemoryInitPattern_e g_eMemoryInitPattern;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user