Going into PkHex to change changing the trainer name, going into HxD and editing what's said to edit, then going back into PkHex to change the trainer name again. I didn't change anything except explicitly what's said to change in the directions. I didn't move or play at all, as I wasn't directed to in the instructions given. I didn't save anywhere- my player character is sitting in the exact spot it is when I load in the save file. While I didn't try this on newer version of PKHeX, the edits worked fine for me previously, What part of the game did you save in? Did you remove the main.bak generated by HxD?ĭid you try editing the save with other version of PKHeX? If your save folder has other files besides main inside, the game will not load the save properly.
![citra ultra sun name crash citra ultra sun name crash](https://community.citra-emu.org/uploads/default/original/2X/9/9177d9df6b33b24925bde8d05e568bcb38b1a2c4.jpg)
If HxD created a main.bak file in the save's folder, remove it.
![citra ultra sun name crash citra ultra sun name crash](https://trueefil720.weebly.com/uploads/1/1/9/5/119595818/452917731.jpg)
As far as I'm aware they should work fine with Y too but correct me if I'm wrong. Apparently I can spend 3 hours making those save files, but I'm too lazy to dump&decrypt X/Y to test them in Citra. I've not tested them, but they should hopefully work fine for their intended purpose. Save the file (this will also correct the save file checksum two birds one stone!) Save the file, then open it in PKHeX and change your Trainer Name to what you actually want as your OT. Then move the cursor over to 0x14062 and hit Ctrl+B to Paste+Write the bytes you copied from your OT. Highlight the bytes from 0x14048 to 0x1405F and Copy (Ctrl+C) them. This brings you over to where your Trainer Name is located in the save file. Type in 14048 (and select hex in the radio buttons, if it isn't already set to that by default) and press OK. Open the save file in a hex editor (I personally like and recommend HxD) and press Ctrl+G to bring up the Goto menu. Open the save file in PKHeX, go to the Trainer Info menu, set your Trainer Name to your desired nickname and save the file. The most straightforward way to do so is to: You will have to manually hex edit that yourself. Important: PKHeX does not support editing your nickname for X/Y as of now. You just have to rename the file to main, open the save file in PKHeX to change OT, ID numbers and any other kind of info you'd want to change, and/or if you want a certain nature/certain IVs on your starter.
![citra ultra sun name crash citra ultra sun name crash](https://community.citra-emu.org/uploads/default/original/2X/3/3eebee637493ab453ce8d6e821a7d1345b6a2395.jpg)
Long term a new shader JIT based on control flow analysis should also fix this in a more proper way.Since Citra has problems with X/Y where the game crashes during the intro, and in some cases, when choosing your starter, I went ahead and made save files for every gender + appearance + starter combinations.Įach save file is saved right after receiving the starter, and the files are named appropriately (left/center/right refers to the character appearance, in the same order as they appear during the intro.) Short term, the solution is as identified, but I also want to try a change where the shader buffer is cleared when a new upload begins, to see if that confirms my theory. Since the current JIT does no control flow analysis or compiles based on the entry point, these garbage instructions are still compiled and affect the valid code.
Citra ultra sun name crash code#
Near as I can tell, this game does not fill unused portions of the shader memory with 0, and this code is actually a left over from a previously loaded shader. In fact, there is a fair amount of unused code at the end of the shader. Looking at the code, there is one call instruction with a return matching the crashing position, but that call instruction can't be reached in any possible execution of the code. I wanted to investigate why this situation was even happening in the first place: why is execution reaching a potential return point without a call? It's possible the shader code was devious and re-using bits of regular code as a subroutine but I found that unlikely.
![citra ultra sun name crash citra ultra sun name crash](https://community.citra-emu.org/uploads/default/optimized/3X/f/7/f74ba8321dacb0229c0f4394ff004719c4c7c0d9_2_1024x549.png)
The solution is to push a dummy value (such as 0xFFFFFFFF) on the stack at the start of the execution of the JIT. In this case, a value left on the stack by the caller of the JIT happens to match the IP, causing the code to execute a return from subroutine even though there had been no corresponding call in the shader. This check peeks the value on the stack and compares it to the current IP, and if it matches, does a return.
Citra ultra sun name crash how to#
Current situation: already found what's causing the crash and how to work around it:Įxecution reaches a potential subroutine return point, where the JIT inserts a check for a return.