pokecarde/scripts/stripgbc.py
pokegold-spaceworld 1f99a55607 Localization Changes / Additional Card Support
- Improvements to build, which should help find nevpk and rgbds a little easier.
- Support for berry cards K007-K012 has been added (original Japanese) and they have received unofficial localizations.
- Unofficial Localizations for cards B001 - B048 have now been included.
- Cards P001-P004 have now been added (Official English and Japanese)
- Cards P005-P008 have now been added (official Japanese) and have also received unofficial localizations.
- Cards N001-N008 have now been added (official Japanese) and have also received unofficial localizations.
- Unofficial localization for card O001 has been improved to be more in-line with official localizations of the time.

tl;dr All Ruby/Sapphire e-Reader cards are now included and exist in their original English/Japanese, and have unofficial localizations if no official translation is available.
2023-07-09 20:43:08 -04:00

30 lines
677 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# -*- coding: utf-8 -*-
#!/usr/bin/env python2.7
import sys
out = open(sys.argv[2], 'w')
buffering = False
buf = ""
with open(sys.argv[1], 'rb') as f:
f.read(256) # skip to $0100
while True:
byte = f.read(1)
if not byte:
break
# the program shall end with $FF followed only by $00 bytes
# for every $FF we hit, buffer until something that isnt $00
if (not buffering and ord(byte) == 0xFF) or (buffering and ord(byte) == 0x00):
buf += byte
buffering = True
elif buffering and ord(byte) == 0xFF:
out.write(buf)
buf = byte
elif buffering:
out.write(buf)
out.write(byte)
buf = ""
buffering = False
else:
out.write(byte)
f.closed