From 770f3c305ab547351a47b814777c053d8f2c7a3e Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Thu, 16 Apr 2020 09:55:55 +0200 Subject: [PATCH] write 1024 bytes in one go instead of one by one --- Rom.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Rom.py b/Rom.py index 1b77af9e..fd57b782 100644 --- a/Rom.py +++ b/Rom.py @@ -727,8 +727,7 @@ def patch_rom(world, rom, player, team, enemized): rom.write_byte(0x180182, 0x00) # Don't auto equip silvers on pickup # set up game internal RNG seed - for i in range(1024): - rom.write_byte(0x178000 + i, random.randint(0, 255)) + rom.write_bytes(0x178000, random.getrandbits(8 * 1024).to_bytes(1024, 'big')) # shuffle prize packs prizes = [0xD8, 0xD8, 0xD8, 0xD8, 0xD9, 0xD8, 0xD8, 0xD9, 0xDA, 0xD9, 0xDA, 0xDB, 0xDA, 0xD9, 0xDA, 0xDA, 0xE0, 0xDF, 0xDF, 0xDA, 0xE0, 0xDF, 0xD8, 0xDF,