1
0
Fork 0

Fixed typo, added new logo

This commit is contained in:
JoshuaMK 2020-04-20 05:49:17 -05:00 committed by GitHub
parent bbbcc0abf7
commit 4751b6523e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -70,7 +70,7 @@ def geckoParser(geckoText, parseAll):
return [bytes.fromhex(geckoCodes), geckoSize] return [bytes.fromhex(geckoCodes), geckoSize]
def build(gctFile, dolFile, size, isText): def build(gctFile, dolFile, size, isText):
with open(resource_path('sme-code.bin'), 'rb') as code, open(r'{}'.format(dolFile), 'rb') as dol, open(r'{}'.format(gctFile), 'rb') as gecko, open(resource_path('codehandler.bin'), 'rb') as handler, open('tmp.bin', 'wb+') as tmp, open(os.path.join('BUILD', os.path.basename(dolFile)), 'wb+') as final: with open(resource_path('geckoloader.bin'), 'rb') as code, open(r'{}'.format(dolFile), 'rb') as dol, open(r'{}'.format(gctFile), 'rb') as gecko, open(resource_path('codehandler.bin'), 'rb') as handler, open('tmp.bin', 'wb+') as tmp, open(os.path.join('BUILD', os.path.basename(dolFile)), 'wb+') as final:
if int(get_size(dol).hex(), 16) < int('0x100', 16): if int(get_size(dol).hex(), 16) < int('0x100', 16):
os.remove('tmp.bin') os.remove('tmp.bin')
@ -186,6 +186,7 @@ def build(gctFile, dolFile, size, isText):
tmp.write(_init[1]) tmp.write(_init[1])
sample = tmp.read(2) sample = tmp.read(2)
final.seek(0, 2)
tmp.seek(0) tmp.seek(0)
gecko.seek(0) gecko.seek(0)
@ -276,7 +277,7 @@ def build(gctFile, dolFile, size, isText):
info = [TGREENLIT + ' :: GeckoLoader set at address 0x{}, start of game modified to address 0x{}'.format(dump_address.upper(), _START.hex().upper()), info = [TGREENLIT + ' :: GeckoLoader set at address 0x{}, start of game modified to address 0x{}'.format(dump_address.upper(), _START.hex().upper()),
' :: Game function "_init_registers" located at address 0x{}{}'.format(_init[0].hex(), _init[1].hex().upper()), ' :: Game function "_init_registers" located at address 0x{}{}'.format(_init[0].hex(), _init[1].hex().upper()),
' :: Code allocation is 0x{}; codelist size is 0x{}'.format(size.upper().lstrip('0'), codelistSize), ' :: Code allocation is 0x{}; codelist size is 0x{}'.format(size.upper().lstrip('0'), codelistSize),
' :: Of the 6 text sections in this DOL file, {} were already used'.format(i) + TRESET] ' :: Of the 7 text sections in this DOL file, {} were already used'.format(i) + TRESET]
for bit in info: for bit in info:
print(bit) print(bit)
@ -351,6 +352,7 @@ if __name__ == "__main__":
GL = bytes.fromhex('474C') GL = bytes.fromhex('474C')
IH = bytes.fromhex('4948') IH = bytes.fromhex('4948')
IL = bytes.fromhex('494C') IL = bytes.fromhex('494C')
MODFIELD = [bytes.fromhex('BBBBBBBB'), bytes.fromhex('CCCCCCCC'), bytes.fromhex('DDDDDDDD'), bytes.fromhex('EEEEEEEE')]
try: try:
if not os.path.isdir('BUILD'): if not os.path.isdir('BUILD'):