mirror of https://github.com/stella-emu/stella.git
improved TIA randomization
This commit is contained in:
parent
07d772dbd1
commit
051d21bebb
|
@ -200,13 +200,20 @@ void TIA::reset()
|
||||||
initialize();
|
initialize();
|
||||||
|
|
||||||
if(myRandomize)
|
if(myRandomize)
|
||||||
|
{
|
||||||
for(uInt32 i = 0; i < 0x10000; ++i)
|
for(uInt32 i = 0; i < 0x10000; ++i)
|
||||||
{
|
{
|
||||||
uInt16 address = mySystem->randGenerator().next() & 0x3F;
|
uInt16 address = mySystem->randGenerator().next() & 0x3F;
|
||||||
uInt8 value = mySystem->randGenerator().next();
|
if(address <= 0x2F)
|
||||||
poke(address, value);
|
{
|
||||||
cycle(2); // process delay queue
|
uInt8 value = mySystem->randGenerator().next();
|
||||||
|
|
||||||
|
poke(address, value);
|
||||||
|
cycle(2); // process delay queue
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
cycle(100); // just to be sure :)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
Loading…
Reference in New Issue