improved TIA randomization

This commit is contained in:
Thomas Jentzsch 2021-09-19 17:39:17 +02:00
parent 07d772dbd1
commit 051d21bebb
1 changed files with 10 additions and 3 deletions

View File

@ -200,13 +200,20 @@ void TIA::reset()
initialize();
if(myRandomize)
{
for(uInt32 i = 0; i < 0x10000; ++i)
{
uInt16 address = mySystem->randGenerator().next() & 0x3F;
uInt8 value = mySystem->randGenerator().next();
poke(address, value);
cycle(2); // process delay queue
if(address <= 0x2F)
{
uInt8 value = mySystem->randGenerator().next();
poke(address, value);
cycle(2); // process delay queue
}
}
cycle(100); // just to be sure :)
}
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -