mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
optimize bytearray creation time and ram use
This commit is contained in:
2
Utils.py
2
Utils.py
@@ -109,7 +109,7 @@ def make_new_base2current(old_rom='Zelda no Densetsu - Kamigami no Triforce (Jap
|
||||
with open(new_rom, 'rb') as stream:
|
||||
new_rom_data = bytearray(stream.read())
|
||||
# extend to 2 mb
|
||||
old_rom_data.extend(bytearray([0x00] * (2097152 - len(old_rom_data))))
|
||||
old_rom_data.extend(bytearray([0x00]) * (2097152 - len(old_rom_data)))
|
||||
|
||||
out_data = OrderedDict()
|
||||
for idx, old in enumerate(old_rom_data):
|
||||
|
Reference in New Issue
Block a user