mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-14 05:19:36 +00:00
22 lines
425 B
Python
22 lines
425 B
Python
|
import struct
|
||
|
|
||
|
ROM_ADDR = 0xB94CC0
|
||
|
COUNT = 23
|
||
|
|
||
|
rom = open("../../baserom.z64", "rb")
|
||
|
rom.seek(ROM_ADDR)
|
||
|
data = bytearray(rom.read(0x20 * COUNT))
|
||
|
rom.close()
|
||
|
|
||
|
valFormat = "0x{:02X}"
|
||
|
sfmt = ""
|
||
|
for i in range(4):
|
||
|
sfmt += valFormat + ", "
|
||
|
|
||
|
for i in range(3):
|
||
|
sfmt += sfmt
|
||
|
|
||
|
sfmt = "{{ {{ " + sfmt + "}} }},"
|
||
|
for i in range(COUNT):
|
||
|
line = struct.unpack_from(">32B", data, i * 0x20)
|
||
|
print(sfmt.format(*line))
|