Rpcs3: Castlevania Harmony of Despair - Cannot switch characters

Created on 1 Jan 2018  ·  21Comments  ·  Source: RPCS3/rpcs3

As requested, new thread:
Log here: https://pastebin.com/8WVDQaAJ
Version #3984 Rpcs3

Bug: cannot switch character. The visual freeze (though the music keep playing, the menu sounds aren't)
Not "game breaking" in that we can play fully with the starting character, so nothing urgent, but reporting all the same.
(I quit after it froze, if that help reading the log)

Most helpful comment

I have never disassembled... I've tried to understand how to do it by searching info on the RPCS3 developer Wiki, activating different utilities while running the game, and using the debugger. I've seen on the debugger the calls to each sys function, but when I pause the debugger, it doesn't pause the game, so I couldn't see the details while it's loading.

Anyway, you are totally right about the game scanning the folders, so I've tried changing the folder structure to test what happens. I've learnt more things about the error and I've found a workaround:

  • The character menu seems to be a single hexadecimal value. If there are more than 16 characters, it crashes (up to 16 works, 17 or more doesn't).
  • The game loads default characters dynamically from "USRDIR/dynamic/player" folder. Normally there is one folder with the character name with a .ppu.sprx file inside per character, but the game doesn't care about the name of the folders. You can put all .ppu.sprx files on the root of the "USRDIR/dynamic/player" folder, or rename any folder, and it will keep working. You can delete a .ppu.sprx file of a character and it will be missing from the roster, but the game will keep working.
  • The game loads dlc characters from "USRDIR/dlc", but here every character must meet many requirements to work. The first folder, usually named "dlcxx_player_yy", where xx is the number of the dlc and yy is the name of the character, keeps working with any name, but everything inside must keep the same structure to work.
  • The number of folders the game has to enter to reach the .ppu.sprx files directly impact in the number of times the character gets added. For example, if Shanoa is on "USRDIR/dynamic/player" folder, it gets added once. If it's on "USRDIR/dynamic/player/folder" folder, it gets added x2 (twice). On "USRDIR/dynamic/player/folder/folder" folder it gets added x2 (4 times). And one more folder and it gets added x2 (8 times).
  • All dlc characters except Fuma get added 8 times because they are inside three folders. Normal characters except Soma get added 2 times because thery are inside a single folder.
  • There is one special character: Axe armor. He's a non selectable character, so it doesn't get added to the list.
  • Everytime the game ends reading a folder, if the last .ppu.sprx file is a character, it gets added x2 times for each consecutive folder used to read it. For example, if all .ppu.sprx files of normal characters are in "USRDIR/dynamic/player" folder, every character gets added once except Soma, which is the last, so it gets added twice. If I copy the Axe Armor file and I rename the copy so it's the last file (for example: dllzzz.ppu.sprx), every character show just once.

So I've added a copy of dllzzz.ppu.sprx file inside each folder searched for characters, and all normal and dlc characters get added once, the game doesn't crash and everything is playable.

It seems something isn't getting correctly cleared/defaulted after reading the .ppu.sprx file of a character of the list, so each time it goes back to a parent directory, the character is added x2 per folder used to reach the character. So yeah, it may be a problem in the directory pointer/handle. Directories directly impact the number of times a character is added.

All 21 comments

Missing log file, that's copypasta from the emulator

Ah, sorry, I thought this was it
Is it this file then?
RPCS3.log

Redacted comment containing link to cracked EBOOT

It does indeed allow to select different characters, though obviously not the removed ones
So temporary fix, thanks for that, but I would consider the issue still open :)

DLC characters still crashing the game in latest build, anyone knows what could be the problem?

I think this issue needs more info: When all the DLC characters are included in the USRDIR/dlc folder, and you try to enter the character menu to switch characters, the game freezes. In order to be able to switch characters, users are deleting dlc characters from the folder, and then you can enter the menu correctly.

I don't think the dlc characters are the issue though. When you enter without any dlc character in the folder, each character shows up multiple times:

  • Soma: 4 times
  • Alucard: 2 times
  • Shanoa: 2 times
  • Jonathan: 2 times
  • Charlotte: 2 times

You can add a single dlc character that won't crash the game: Fuma (dlc16). If he's added, it appears 4 times in the menu.

My theory is that what crashes RPCS3 is not entering the character menu. What crashes is that the character menu gets more character entries than the max number. The game was built to feature even more dlc, so probably it has 16-20 slots available, and when RPCS3 tries to add more, it crashes. It seems the other dlc characters get added 5 or more times, reaching the limit.

It happens exactly the same with the music menu (Sound Settings / Music Settings). If you add the music dlc (dlc28 and dlc29), both lists get added twice in the menu. It doesn't crash though.

I've tried many different configurations but I haven't been able to fix the problem with any of them, but I think it's a PPU problem. The game loads everything when you press start on the start screen, and here's the log for each character:
·W 0:00:31.714983 {PPU[0x1000003] Thread [0x00e02000]} sys_fs: sys_fs_opendir(path=“/dev_hdd0/game/NPEB00563/USRDIR/dynamic/player/dllalucard”, fd=*0xd0056000) ·U 0:00:31.715430 {PPU[0x1000000] Thread (main_thread) [0x00d15d40]} sceNp TODO: sceNpManagerGetNpId(npId=*0xd00205c8) ·W 0:00:31.716008 {RSX [0x002304c]} RSX: Cache miss at address 0xC33C9800. This is gonna hurt... ·W 0:00:31.721573 {PPU[0x1000003] Thread [0x00e0133c]} sys_fs: sys_fs_readdir(fd=4, dir=*0xd0055ce8, nread=*0xd0055ca8) ·W 0:00:31.721578 {PPU[0x1000003] Thread [0x00e0133c]} sys_fs: sys_fs_readdir(fd=4, dir=*0xd0055ce8, nread=*0xd0055ca8) ·W 0:00:31.721579 {PPU[0x1000003] Thread [0x00e0133c]} sys_fs: sys_fs_readdir(fd=4, dir=*0xd0055ce8, nread=*0xd0055ca8) ·W 0:00:31.721597 {PPU[0x1000003] Thread [0x00e0133c]} sys_fs: sys_fs_readdir(fd=4, dir=*0xd0055ce8, nread=*0xd0055ca8) ·W 0:00:31.721601 {PPU[0x1000003] Thread [0x00e01360]} sys_fs: sys_fs_closedir(fd=4)

PPU[0x1000003] Thread [0x00e0133c]} sys_fs: sys_fs_readdir(fd=4, dir=0xd0055ce8, nread=0xd0055ca8 is executed four times. I think each time RPCS3 reads the file, the character gets added to some array, and it's getting added two to four times incorrectly.

I've tried searching in RPCS3 code the sys_fs_readdir function in case it's used in some kind of loop or something, but I'm not an experienced coder and I don't quite understand where is being used or how to debug the problem. I've thought it may be related to having a CPU with 4 cores: Maybe the function is being called one time per core and it triggers the problem, but I haven't seen any setting to reduce the number of cores RPCS3 uses (I've tried to switch all threads settings to 1 without fixing it).

Any ideas on where could I look/search next?

Rpcs3 doesn't trigger those calls, the game itself does, which means you need to disassemble the game logic that loads the DLC characters to figure out why rpcs3 is not loading correctly. My guess would be that the game is doing some kind of directory scan and not advancing/updating the directory pointer/handle, or is doing so in a way unique to BSD?

I have never disassembled... I've tried to understand how to do it by searching info on the RPCS3 developer Wiki, activating different utilities while running the game, and using the debugger. I've seen on the debugger the calls to each sys function, but when I pause the debugger, it doesn't pause the game, so I couldn't see the details while it's loading.

Anyway, you are totally right about the game scanning the folders, so I've tried changing the folder structure to test what happens. I've learnt more things about the error and I've found a workaround:

  • The character menu seems to be a single hexadecimal value. If there are more than 16 characters, it crashes (up to 16 works, 17 or more doesn't).
  • The game loads default characters dynamically from "USRDIR/dynamic/player" folder. Normally there is one folder with the character name with a .ppu.sprx file inside per character, but the game doesn't care about the name of the folders. You can put all .ppu.sprx files on the root of the "USRDIR/dynamic/player" folder, or rename any folder, and it will keep working. You can delete a .ppu.sprx file of a character and it will be missing from the roster, but the game will keep working.
  • The game loads dlc characters from "USRDIR/dlc", but here every character must meet many requirements to work. The first folder, usually named "dlcxx_player_yy", where xx is the number of the dlc and yy is the name of the character, keeps working with any name, but everything inside must keep the same structure to work.
  • The number of folders the game has to enter to reach the .ppu.sprx files directly impact in the number of times the character gets added. For example, if Shanoa is on "USRDIR/dynamic/player" folder, it gets added once. If it's on "USRDIR/dynamic/player/folder" folder, it gets added x2 (twice). On "USRDIR/dynamic/player/folder/folder" folder it gets added x2 (4 times). And one more folder and it gets added x2 (8 times).
  • All dlc characters except Fuma get added 8 times because they are inside three folders. Normal characters except Soma get added 2 times because thery are inside a single folder.
  • There is one special character: Axe armor. He's a non selectable character, so it doesn't get added to the list.
  • Everytime the game ends reading a folder, if the last .ppu.sprx file is a character, it gets added x2 times for each consecutive folder used to read it. For example, if all .ppu.sprx files of normal characters are in "USRDIR/dynamic/player" folder, every character gets added once except Soma, which is the last, so it gets added twice. If I copy the Axe Armor file and I rename the copy so it's the last file (for example: dllzzz.ppu.sprx), every character show just once.

So I've added a copy of dllzzz.ppu.sprx file inside each folder searched for characters, and all normal and dlc characters get added once, the game doesn't crash and everything is playable.

It seems something isn't getting correctly cleared/defaulted after reading the .ppu.sprx file of a character of the list, so each time it goes back to a parent directory, the character is added x2 per folder used to reach the character. So yeah, it may be a problem in the directory pointer/handle. Directories directly impact the number of times a character is added.

So I've added a copy of dllzzz.ppu.sprx file inside each folder searched for characters, and all normal and dlc characters get added once, the game doesn't crash and everything is playable.

Reading this (after all this time) I decided to give the dlc characters a try, using the same methods as you, making a copy of axe armor (from the dynamic character folder)
Renaming it so it would scrap the bottom of the list
And putting it into every folder

It didn't work for me, I still froze when trying to get into the character selection menu
Was there maybe some folders where I should NOT have put that trick-copy?

edit: I can confirm however, the whole double by folder, as moving the main characters up a folder removed all but one duplicated, Soma, as stated above.

Update: I tried again with the trick-copy and found that for it to work, the dynamic characters MUST be placed in the dynamic/player folder, and the trick-copy added. If you add a trick-copy to each singular character folder, it crashes
Adding back the dlc, I had to put the trick file into each folder leading to the ppu character file for the duplicate to be gone
so each folder from dlc_character down to the one with the ppu have the trick file
Now it all work great!
Hope my fiddling also help guess the issue! good luck you guys, and thanks a lot KMetalmind!

Adding back the dlc, I had to put the trick file into each folder leading to the ppu character file for the duplicate to be gone

Yeah, that's what I was trying to say. The explanation wasn't very good.

I'll try to debug the error when I get some time, as it seems the files are being readed more than once, and it may impact other games? This game crashes because the menu has a limit that is broken after reading multiple times some sprx files, but there are many other sprx files in the game that doesn't crash the game. It doesn't seem to impact the game at all, or at least its performance is really good even with this. I suppose there aren't many games that scans folders AND use these files. So far is the only game I've tried with sprx files.

@KMetalmind @Felina-Lain
Thank you so much for your help!

So I've added a copy of dllzzz.ppu.sprx file inside each folder searched for characters, and all normal and dlc characters get added once, the game doesn't crash and everything is playable.

Reading this (after all this time) I decided to give the dlc characters a try, using the same methods as you, making a copy of axe armor (from the dynamic character folder)
Renaming it so it would scrap the bottom of the list
And putting it into every folder

It didn't work for me, I still froze when trying to get into the character selection menu
Was there maybe some folders where I should NOT have put that trick-copy?

edit: I can confirm however, the whole double by folder, as moving the main characters up a folder removed all but one duplicated, Soma, as stated above.

Update: I tried again with the trick-copy and found that for it to work, the dynamic characters MUST be placed in the dynamic/player folder, and the trick-copy added. If you add a trick-copy to each singular character folder, it crashes
Adding back the dlc, I had to put the trick file into each folder leading to the ppu character file for the duplicate to be gone
so each folder from dlc_character down to the one with the ppu have the trick file
Now it all work great!
Hope my fiddling also help guess the issue! good luck you guys, and thanks a lot KMetalmind!

can you help me I can't seem to get the folders right, Could you do a step by step on how to get the dlc characters working please

can you help me I can't seem to get the folders right, Could you do a step by step on how to get the dlc characters working please

Sure thing, with screenshots (if those aren't allowed, I'll remove them)
So step 1, find the folders, and in them, find the Axe armor character
https://imgur.com/hqwftyB
Create a copy of it and rename it so it will always go at the very bottom of the list (dllzzzzz.ppu.sprx works fine). This is your trick-file.
Step 2: for the normal characters, copy that trick-file you just made and move the characters files from their individual folders into the "player" folder so you get the same result as this picture:
https://imgur.com/1Lmf17G
Step 3: For each dlc character, you need to add a copy of the trick-file into EACH folder of the dlc character. From the dlc(num)(name) folder, right down to the folder containing the ppu.sprx of the character. The picture below show you an exemple with julius, but you have to do it for EACH
https://i.imgur.com/oOasldD.png

You do that and it should work fine :)

can you help me I can't seem to get the folders right, Could you do a step by step on how to get the dlc characters working please

Sure thing, with screenshots (if those aren't allowed, I'll remove them)
So step 1, find the folders, and in them, find the Axe armor character
https://imgur.com/hqwftyB
Create a copy of it and rename it so it will always go at the very bottom of the list (dllzzzzz.ppu.sprx works fine). This is your trick-file.
Step 2: for the normal characters, copy that trick-file you just made and move the characters files from their individual folders into the "player" folder so you get the same result as this picture:
https://imgur.com/1Lmf17G
Step 3: For each dlc character, you need to add a copy of the trick-file into EACH folder of the dlc character. From the dlc(num)(name) folder, right down to the folder containing the ppu.sprx of the character. The picture below show you an exemple with julius, but you have to do it for EACH
https://i.imgur.com/oOasldD.png

You do that and it should work fine :)

Dude I can't thank you enough IT REALLY WORKED THANKS SO MUCH 😝

can you help me I can't seem to get the folders right, Could you do a step by step on how to get the dlc characters working please

Sure thing, with screenshots (if those aren't allowed, I'll remove them)
So step 1, find the folders, and in them, find the Axe armor character
https://imgur.com/hqwftyB
Create a copy of it and rename it so it will always go at the very bottom of the list (dllzzzzz.ppu.sprx works fine). This is your trick-file.
Step 2: for the normal characters, copy that trick-file you just made and move the characters files from their individual folders into the "player" folder so you get the same result as this picture:
https://imgur.com/1Lmf17G
Step 3: For each dlc character, you need to add a copy of the trick-file into EACH folder of the dlc character. From the dlc(num)(name) folder, right down to the folder containing the ppu.sprx of the character. The picture below show you an exemple with julius, but you have to do it for EACH
https://i.imgur.com/oOasldD.png

You do that and it should work fine :)

Nice job man that worked perfectly to have all DLC charaters, BTW guys if you still get crashing in step 2 where it says "move the characters files from their individual folders into the "player" folder" you have to use cut if you just copy them it will still crash.

Hello there hope this thread is not yet dead. It seem I can not pass on the save data stuck on compiling PPU modules and keeps repeating https://imgur.com/a/6dNequK
https://imgur.com/xiVxFvX

you just have to wait and it will eventually finish

can you help me I can't seem to get the folders right, Could you do a step by step on how to get the dlc characters working please

Sure thing, with screenshots (if those aren't allowed, I'll remove them)
So step 1, find the folders, and in them, find the Axe armor character
https://imgur.com/hqwftyB
Create a copy of it and rename it so it will always go at the very bottom of the list (dllzzzzz.ppu.sprx works fine). This is your trick-file.
Step 2: for the normal characters, copy that trick-file you just made and move the characters files from their individual folders into the "player" folder so you get the same result as this picture:
https://imgur.com/1Lmf17G
Step 3: For each dlc character, you need to add a copy of the trick-file into EACH folder of the dlc character. From the dlc(num)(name) folder, right down to the folder containing the ppu.sprx of the character. The picture below show you an exemple with julius, but you have to do it for EACH
https://i.imgur.com/oOasldD.png
You do that and it should work fine :)

Nice job man that worked perfectly to have all DLC charaters, BTW guys if you still get crashing in step 2 where it says "move the characters files from their individual folders into the "player" folder" you have to use cut if you just copy them it will still crash.

I believe I did everything that the images showed but still can't manage to get all the dlc characters. All I have is Yoko Belnades and Julius Belmont. None of the characters duplicate either. So we have that much good. What else am I missing here?

I believe I did everything that the images showed but still can't manage to get all the dlc characters. All I have is Yoko Belnades and Julius Belmont. None of the characters duplicate either. So we have that much good. What else am I missing here?

Well did you make sure you had the dlc files first? You have to install the dlcs files before you can mess with them. I know it might sound like a stupid question, but the fact that you have no characters maker me think that could be it?

I believe I did everything that the images showed but still can't manage to get all the dlc characters. All I have is Yoko Belnades and Julius Belmont. None of the characters duplicate either. So we have that much good. What else am I missing here?

Well did you make sure you had the dlc files first? You have to install the dlcs files before you can mess with them. I know it might sound like a stupid question, but the fact that you have no characters maker me think that could be it?

Here's an image on how my folder looks under the DLC tab.
https://gyazo.com/13ca02bce56fb048369faf5eff7dc1bc

And I've done the dllzzzzz.ppu.sprx trick from a few posts I saw above which got Julius and Yoko to work. Same thing with placing the ppu on the dll and dllplayer folders. But I don't really understand what you mean by installing the dlc files. Sorry I am pretty new to this.

Edit: I figured out what you meant. And that got it all working! Thank you very much!

i'm not sure how to "install the dlc files" as i can only get julius and yoko working as well. i feel like im missing something obvious but im not quite sure what it is. i already did the trick on all dlc files too

i'm not sure how to "install the dlc files" as i can only get julius and yoko working as well. i feel like im missing something obvious but im not quite sure what it is. i already did the trick on all dlc files too

You need to dump the dlc files from the game, to install them. Officially.
Since we can't share illegal files here, obviously, so sorry, no links

Once you do that, they'll appear in the folders

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LokiGrants picture LokiGrants  ·  3Comments

AniLeo picture AniLeo  ·  3Comments

Emulator-Team-2 picture Emulator-Team-2  ·  3Comments

JohnGodgames picture JohnGodgames  ·  3Comments

elad335 picture elad335  ·  3Comments