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

Repackaged .cia failing to run on Citra & Real Hardware #114

Closed
vulcandth opened this issue Mar 30, 2022 · 3 comments
Closed

Repackaged .cia failing to run on Citra & Real Hardware #114

vulcandth opened this issue Mar 30, 2022 · 3 comments

Comments

@vulcandth
Copy link

vulcandth commented Mar 30, 2022

Background: As you may or may not be aware; I am creating an extension for the Pokemon Generation I / II disassemblies. Many people making rom hacks for the game utilize these diassemblies to make their own romhacks. Recently I helped them implement a method to generate .patch files that are used by the Nintendo 3DS Virtual Console to know what addresses it needs to look for to enable wireless link capabilities, as well as what addresses it needs to patch. My extension is designed to extract an original dumped .cia of the Pokemon Virtual Console versions (Red, Blue, Yellow, Gold, Silver, Crystal)... Replace the rom and .patch file in the extracted contents... and then repackage the .cia all in one command.

The Problem: .cia files extracted using ctrtool greater than 0.7 appears to repackage successfully... but crashes both Citra and the Actual 3DS. Changing the version of makerom has no effect.

Log output was generated using the following versions:
CTRTool v1.0.2 (C) jakcron
CTR MAKEROM v0.18 (C) 3DSGuy 2021
Windows Subsystem for Linux: Ubuntu 20.04 LTS

Pull Request used during this test: vulcandth/poke-cia#1

Command only console output during Build: supressedlog.txt

Standard console output Build: standardoutput.txt

ctrtool -v (Verbose) output Build: verboseoutput.txt

Citra Log: citra_log.txt.old.txt

If you could point me in the right direction of what I might be doing wrong; or see if there is a bug that needs to be addressed. If you require any further information from me, i'd be happy to provide it. I greatly appreciate your assistance in this matter.

@jakcron
Copy link
Collaborator

jakcron commented Mar 30, 2022

Looking at the pull-request, the issue was introduced by updating CTRTool. So I did a test extracting pokemon yellow with CTRTool v0.7 and v1.0.2.

And the only thing that was different after being extracted was the exefs/code.bin.

This turned out to be a bug preventing it from being decompressed.

I'm working on a fix...

@jakcron
Copy link
Collaborator

jakcron commented Mar 30, 2022

I've released CTRTool v1.0.3, which fixed the exefs:/.code decompress bug. You can get it here https://github.com/3DSGuy/Project_CTR/releases/tag/ctrtool-v1.0.3

Please let me know if this fixes the issue.

@vulcandth
Copy link
Author

Perfect; after testing with CTRTool v1.0.3 it fixed my issue. Thank you so much for taking your time to go to extra mile and even download not only one, but two other repositories, just to troubleshoot my issue! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants