Skip to content

Instantly share code, notes, and snippets.

@parasyte parasyte/ Secret
Last active Aug 14, 2017

What would you like to do?
Python tools for working with N64 GameShark Pro firmware files.


$ python <>
$ python <> <> <filename.out>
import sys
buf = bytearray(open(sys.argv[1], "rb").read())
open(sys.argv[1] + ".hi", "wb").write(buf[0::2])
open(sys.argv[1] + ".lo", "wb").write(buf[1::2])
import itertools
import sys
bufa = bytearray(open(sys.argv[1], "rb").read())
bufb = bytearray(open(sys.argv[2], "rb").read())
open(sys.argv[3], "wb").write(bytearray(itertools.chain(*zip(bufa, bufb))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.