import struct, sys with open('F:/Projects/psxrecomp-v4/bios/SCPH1001.BIN', 'rb') as f: data = f.read() # Read inputs as pc, length start_pc = int(sys.argv[1], 16) if len(sys.argv) > 1 else 0xBFC16060 length = int(sys.argv[2], 0) if len(sys.argv) > 2 else 0x40 off0 = start_pc - 0xBFC00000 for i in range(0, length, 4): w = struct.unpack_from('