Created
February 9, 2017 04:44
-
-
Save alexras/96e0b196c382f76cae4d7f235c1e28c0 to your computer and use it in GitHub Desktop.
Strip everything but the kits from an LSDJ ROM; written so I can use it in tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
with open(sys.argv[1], 'rb') as in_fp: | |
in_fp.seek(0x20000) | |
with open('lsdj.gb.patched', 'wb') as out_fp: | |
out_fp.write(bytearray([0xff] * 0x20000)) | |
out_fp.write(in_fp.read(21 * (0x4000))) | |
out_fp.write(bytearray([0xff] * (0x100000 - 0x20000 - 21 * 0x4000))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment