x-station / xstation-issues

Issues and support for the xstation optical drive emulator
24 stars 5 forks source link

Soul Reaver strange intermittent hang #93

Open AndreasV81 opened 3 years ago

AndreasV81 commented 3 years ago

Soul Reaver NTSC at Xstation Firmware 1.1.0 hangs intermittently. Looks like a game or frame freeze. Strange thing though, that the music continues playing and that the issue is always resolved by opening the lid. The game continues instantly when the lid is opened, NOT closed. This happens sometimes before cutscenes but now in the drowned abbey all the time. This renders the game unplayable.

Easily reproducible: Teleport to the drowned abbey, switch to physical realm, run down the corridor, open the door and right before the door closes behind you the game freezes. Opening the ps1 lid then continues the game.

This might look like some trivial loading error but actually if you play the game in an already loaded room with the lid opened the game does not halt, it simply does not load new objects.

Tested 3 different sdcards, all formatted with the format tool recommended, all the same. Game hangs at the very same position. When i revisit other areas like "necropolis" or "nupraptors retreat" this issue does not happen at all.

Tested Xenogears and FF8, both NTSC, the intro FMVs play flawlessly, so i dont have any sdcard access problems when it gets critical, like during FMVs.

PU18 board in a 5552 pal console with ps1digital also installed. The software lid switch trigger implemented in ps1digital is not installed. Neither is psnee or any other modchip installed. I also desoldered, opened and deoxidized the lid switch internally as an intermittent contact was my first guess. Things did not change.

Can anyone test this please :)

ramapcsx2 commented 3 years ago

Yeah, sure I'll test it. I've no idea what teleporting to abbeys or realm switching means. I need help reproducing :)

AndreasV81 commented 3 years ago

Update: this also happens on a different ps1 with modchip, playing the game from CD, so it is not specifically an xstation issue ... but maybe it can still be resolved by it. By the way, the rip is good, md5sum matches the one at redump.

ramapcsx2 commented 3 years ago

Uhum, thanks for testing that! Is there anything on the net about it maybe?

AndreasV81 commented 3 years ago

Thanks, still, maybe you can solve this issue by software. Start Soul Reaver NTSC on a pal ps1, you can use gameshark codes to open up all teleport locations, exit the first room you start in, step on the teleporter in front of the gate, press square, choose the symbol which matches the drowned abbey ( web, cannot post it here) and step through the gate. in the back of the room you see a blue fountain like thing, step on it, press select, press square, now you switched to the physical realm, because you always start in the greenish spectral realm. now exit the gate room, run down the corridor and open the door by stepping in front of it and pressing square. a short cutscene shows raziel opening the door and stepping through. the moment the door would shut automatically behind him the game freezes.

ramapcsx2 commented 3 years ago

I tried my best with cheats like "all glyphs" and whatnot, but the game has too many items and lore i have no clue about. I need a save game :p

AndreasV81 commented 3 years ago

I will copy my save game via ps2 to usb and send it to you. How do i do that? Where should i send it? Or can i attach it here somehow?

ramapcsx2 commented 3 years ago

Will these work? https://gamefaqs.gamespot.com/ps/197763-legacy-of-kain-soul-reaver/saves

I'll load one of them up, move to that gate with the 2 platforms to stand on and select the symbol that I found on Google: https://i.imgur.com/orfRdxd.png

Then walk through the gate and do the rest. Is that right?

AndreasV81 commented 3 years ago

Exactly. Thanks. Sorry for the late response.

ramapcsx2 commented 3 years ago

Alright, I've got it to hang. I found some mentions of this in old forums, but so far no good clue. I'm on it! :)

AndreasV81 commented 3 years ago

Much appreciated 😊. The strange thing is that you can resume the game by opening the lid.

ramapcsx2 commented 3 years ago

It's a very interesting title for sure. The last prototype version with enabled debug menu of this (Jun_28,_1999) doesn't hang. I'm having trouble to get to that area in even earlier versions, which also have a "CD Debug" option. Maybe I can find out more. It would be great if you could check your CD on other variations of the PSX!

AndreasV81 commented 3 years ago

I checked it with a PU18 board at a 5552 model with xstation and with a PU22 board at a 7502 model from cd. i could also check from cd at a PU22 in a 5502 model. and also the latter two with PSIO.

AndreasV81 commented 3 years ago

Its an absolute masterpiece, and i will do my best to coop. to solve this ...

ramapcsx2 commented 3 years ago

Did you get those same hangs on the other consoles?

ramapcsx2 commented 3 years ago

I've tested on a PU-8 NTSC-J with xStation in the mean time, and it doesn't hang. It might be a problem with the PAL Mechacon.

AndreasV81 commented 3 years ago

I get this hang on all 3 ps1 i have from cd. But from the psio it works. It doesnt hang with the psio. If it was the mechacon it should hang there too i guess. I guess it works from psio because they handle lid open or close events by ejecting and inserting the sd card. With psio it works with a pu18 and pu22 board. It should be solvable then i guess?

ramapcsx2 commented 3 years ago

PSIO doesn't use the original Mechacon, it behaves differently than the real machines.

I just wonder how such a big name game can hang on many different consoles, yet it's rarely talked about.. ( I can only find one forum entry for it, which advises the CD lid trick to bypass it. )

AndreasV81 commented 3 years ago

If the localization of a game was done properly, maybe there were not too many pal users wanting the ntsc version. Like in resident evil jill running in slow motion in the pal version compared to ntsc

AndreasV81 commented 3 years ago

Still ... do you think you can create a non mechanical workaround for this? Like looking into the data stream, capturing the hang situation and trigger a lid switch if the user wants? At least the ps1digital menu still pops up if triggered during the hang, so maybe i should install the ps1digital lid switch ?

ramapcsx2 commented 3 years ago

Playing into this is that no one was meant to run out of region games on their console. It is only possible with modchips or swap tricks, etc. This may be how it wasn't discovered (as well as occurring late in the game).

I've asked users on Discord to try this on NTSC consoles. We should hopefully know more soon.

AndreasV81 commented 3 years ago

Thinking about the emulation of the data stream ... when you open the lid, the laser goes back to its starting position. So the stream is interrupted as long as the lid is open. Is this event maybe triggering a track seek reset or something? Or some other type of mechacon reset? So would it be possible to capture the hang situation, when no data arrives but should and reset seeking? Just like a read retry in case of scratched discs? I just think that even if this issue is coupled with the mechacon, in all cases i heard of, the game freezes entirely as well as the console itself. In this case however its just an intermittent hang.

ramapcsx2 commented 3 years ago

No no, it's all much simpler: The game spinwaits on a variable, triggered normally by the CD system, that never happens. The game also aborts the spinwait when a CD error occurs. Opening the tray is "error enough" so that it breaks the spinwait. That's all :p

I've got to figure out what the incompatibility is first, then I can think about fixes :)

carmax91 commented 3 years ago

Maybe a sorta of GPU timing error due to different PAL vs Ntsc timings? I'm waiting for an NTSC oscillator to mod my PAL PU-18 console to have correct timings on NTSC titles, when it arrives i can do some testings if you need help...

AndreasV81 commented 3 years ago

That woul be great 😊. Can you also test the issue on an unmodded one wether you can reproduce it too?

carmax91 commented 3 years ago

When i receive the crystal I will do some test

ramapcsx2 commented 3 years ago

We've already checked and ruled out GPU timings :)

ramapcsx2 commented 3 years ago

Okay, I could confirm that Soul Reaver is working on an NTSC-J PU-18. It is an unintended Mechacon incompatibility for the -U version of the game on PAL machine. I don't know how to deal with this yet, but maybe a patch for the game exists that fixes it.

carmax91 commented 3 years ago

We've already checked and ruled out GPU timings :)

Perfect, what a strange bug...

birdybro commented 3 years ago

Maybe, but not likely, the PAL/NTSC selection patch for the game might work?

from: https://consolecopyworld.com/psx/psx_patches_s_2.shtml (they sometimes have NSFW ads so if you want to avoid it I attached the zip of the patcher for NTSC Soul Reaver: Legacy of Kain)

kal-sr2t.zip

@AndreasV81 Test it and see if it works for now. Read the .NFO file that comes with it for instructions.

ramapcsx2 commented 3 years ago

I've attempted that patch, but it completely destroys my image of the game. EDC/ECC is broken, and fixing it doesn't help: The image won't start.

birdybro commented 3 years ago

Good to know for sure.

Seems like it's super old, probably won't run on anything but Windows XP :P

Just tried it too, and same result, must have been made for a bad dump of the game.

ramapcsx2 commented 3 years ago

So to summarize: The game has an (intentional or not) region dependency. Only an NTSC console can play the NTSC game. For cross region compatibility, the game requires a patch to be developed.

mathieulh commented 3 years ago

Legacy of Kain - Soul Reaver (Europe) PAL to NTSC.zip

I made an xdelta patch to convert the PAL version of Legacy of Kain Soul Reaver into an NTSC 60 version that would run on PAL consoles.

mathieulh commented 3 years ago

So, some more news for you, I have a PAL console with PAL mechacon and a NTSC US BIOS (I did a BIOS Swap) and I attempted to reproduce the issue, unsuccessfully, the game doesn't crash at all! So I very much assume this is a BIOS issue rather than mechacon related.

I reproduced the modus operandi from this post: https://github.com/x-station/xstation-issues/issues/93#issuecomment-797641279

I used an action replay to open all gates and give me infinite of whatever I needed to warp to the physical realm, (on the NTSC-U version of the game) went through the door, the door closed fine and no crash occurred, I could continue playing just fine.

I am guessing the game uses some specific BIOS routine that isn't present in the PAL BIOS, or gets an unexpected reply from the PAL BIOS.

AndreasV81 commented 3 years ago

Well, this sounds interesting. Where did you get your ntsc bios from? can you simply change the Chips or is there more to it?

AndreasV81 commented 3 years ago

On the other hand, if it runs on the psio ... how can it be bios related? The Psio uses the original bios as far as i know... But anyway, maybe we can track this down someday.

AndreasV81 commented 3 years ago

Which bios version did you swap to anyway?

mathieulh commented 3 years ago

I used the US PU-18 BIOS from here:

https://willsconsolemodifications.co.uk/ps1_replacement_bios.php

Yes, all I did was swap the rom version. Keep in mind that you also need a dual oscillator mod if you aren't using RGB. I am personally using a ps1digital which has one built in.

By the way, this doesn't fix the toy story 2 and wipeout 3 checks which do seem to be based on mechacon and not on the rom version.

As to how it runs on PSIO, it can't unless PSIO patches the check in the executable's memory.

AndreasV81 commented 3 years ago

Why did you swap the bios after all? Were there any issues you had with other titles? Or just for modding and personalizing the ps1?

mathieulh commented 3 years ago

Why did you swap the bios after all? Were there any issues you had with other titles? Or just for modding and personalizing the ps1?

I just wanted to have the BIOS menu and the boot screen at 60hz and where I live (France), sourcing a PAL PS1 is easier and cheaper.

AndreasV81 commented 3 years ago

Ok, i dont think i will do that for just one game. Still thanks for the hint, what you discovered is that it should be indeed possible to patch the game as cybdyn did something that worked and it is not a mechacon issue. Which ps1 model and mobo did you mod with the bios?

mathieulh commented 3 years ago

Ok, i dont think i will do that for just one game. Still thanks for the hint, what you discovered is that it should be indeed possible to patch the game as cybdyn did something that worked and it is not a mechacon issue. Which ps1 model and mobo did you mod with the bios?

I am using a PAL PU-18 board with a US PU-18 BIOS.

AndreasV81 commented 3 years ago

I will try next to emulate the game with no$cash disassembler. Maybe dumping the ram when emulated with different bioses could give a hint what is done differently. But i dont think it will be easy 😅😅😅

danilodequeiroz commented 3 years ago

Is the xstation compatible with NTSC-J PS1 no matter what BIOS they are using or been modded? I have one 5500 modded with a NTSC-U BIOS and a 5501 with a possibly faulty IC 704 (CD Driver IC) and also been looking for Japanese consoles since they are easier to import here and they are usually in good shape internally and externally.

ramapcsx2 commented 3 years ago

As you add more modifications, it becomes harder to tell. It should work, but specific games that use region lockout code may require the "correct" BIOS or mechacon chips to work.

danilodequeiroz commented 3 years ago

As you add more modifications, it becomes harder to tell. It should work, but specific games that use region lockout code may require the "correct" BIOS or mechacon chips to work.

Do you mean these games https://consolecopyworld.com/psx/psx_protected_games_jap.shtml

ramapcsx2 commented 3 years ago

No, not necessarily those. Anti-mod is not an issue for xStation. Which games are using additional region checks is still relatively unknown today. We just find them as incompatibilities over time. WipeOut 3 NTSC-U played on a PAL mechacon is one such game, Toy Story 2 NTSC-U is another. Soul Reaver NTSC-U is linked to the BIOS region in comparison.

mathieulh commented 3 years ago

Is the xstation compatible with NTSC-J PS1 no matter what BIOS they are using or been modded? I have one 5500 modded with a NTSC-U BIOS and a 5501 with a possibly faulty IC 704 (CD Driver IC) and also been looking for Japanese consoles since they are easier to import here and they are usually in good shape internally and externally.

Since it's specifically checking the BIOS region, the 5500 running a NTSC-U BIOS should work, I am not sure if the Japanese BIOS actually passes the check though, the PAL does not, obviously.

AndreasV81 commented 3 years ago

As far as i know the game works on japanese ps1s.

mathieulh commented 3 years ago

As far as i know the game works on japanese ps1s.

Yes, it does, the check appears to specifically verify that the BIOS address does not have the 'E' string.