From c4dd32380781996b50604df6aeecf0dc21c7166f Mon Sep 17 00:00:00 2001 From: Thomas Jentzsch Date: Tue, 21 Sep 2021 18:43:55 +0200 Subject: [PATCH] tweaked TIA randomization a bit --- src/emucore/tia/TIA.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/emucore/tia/TIA.cxx b/src/emucore/tia/TIA.cxx index 9d9f0ebf7..323beab05 100644 --- a/src/emucore/tia/TIA.cxx +++ b/src/emucore/tia/TIA.cxx @@ -201,18 +201,17 @@ void TIA::reset() if(myRandomize && !mySystem->autodetectMode()) { - for(uInt32 i = 0; i < 0x10000; ++i) + for(uInt32 i = 0; i < 0x4000; ++i) { uInt16 address = mySystem->randGenerator().next() & 0x3F; + if(address <= 0x2F) { - uInt8 value = mySystem->randGenerator().next(); - - poke(address, value); - cycle(2); // process delay queue + poke(address, mySystem->randGenerator().next()); + cycle(1 + (mySystem->randGenerator().next() & 7)); // process delay queue } } - cycle(100); // just to be sure :) + cycle(76); // just to be sure :) } }