Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GBA files likely not working #18

Open
ihaveamac opened this issue Aug 31, 2021 · 2 comments
Open

GBA files likely not working #18

ihaveamac opened this issue Aug 31, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@ihaveamac
Copy link
Owner

Most likely an issue with pyctr, but someone reported that ninfs would not mount the content properly.

@ihaveamac ihaveamac transferred this issue from ihaveamac/ninfs Aug 31, 2021
@ihaveamac ihaveamac added the bug Something isn't working label Aug 31, 2021
@ihaveamac
Copy link
Owner Author

This is because ExeFSReader.decompress_code fails with a GBA rom. With a valid 3DS codebin (compressed or decompressed) it exits just fine.

>>> from pyctr.type import exefs as e
>>> a = e.ExeFSReader('exefs.bin')
>>> a.decompress_code()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyctr/type/exefs.py", line 308, in decompress_code
    code_dec = decompress_code(code)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyctr/type/exefs.py", line 126, in decompress_code
    byte = dec[ptr_out + seg_off]
IndexError: bytearray index out of range

@ihaveamac
Copy link
Owner Author

Best way to detect a GBA game seems to be to read the core version from the extheader (https://www.3dbrew.org/wiki/NCCH/Extended_Header#ARM11_Local_System_Capabilities). This would be best after an extheader reader is added. #2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant