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

Shadow Man 2 - Broken textures #64

Closed
LasagnaPie opened this issue Jun 11, 2014 · 45 comments · Fixed by #3877
Closed

Shadow Man 2 - Broken textures #64

LasagnaPie opened this issue Jun 11, 2014 · 45 comments · Fixed by #3877

Comments

@LasagnaPie
Copy link

The textures in Shadowman 2 are not rendering correctly at all, this happens in all backends.. DX11/GL in both Hardware and Software.

shadowman2

@bositman
Copy link
Member

bositman commented Jul 4, 2014

Please follow this template for a proper bug report: https://github.com/PCSX2/pcsx2/wiki/How-to-create-useful-and-valid-issues

@ramapcsx2
Copy link
Member

Yep, this is on my list to check. The textures never worked and various attempts at hacking GSdx didn't help at all. It might come out wrong from PCSX2 or the GS plugin is using bad texture pointers or similar.

@refractionpcsx2
Copy link
Member

I suspect it's a core problem as it looks the same in both hardware and software and in ZeroGS it is the same I believe.

@gregory38
Copy link
Contributor

Could you test the SW renderer on latest git ? A couple of bug were fixed so maybe yours.

@ramapcsx2
Copy link
Member

It's unchanged.
I also believe this is a core bug. Either that or a very fundamental misunderstanding of a GS function.

@bositman
Copy link
Member

As a bonus the first cutscene has SPS too now. Textures are still unchanged too.

@refractionpcsx2
Copy link
Member

The first cutscene has always had SPS, the only way to stop it happening is to not make the VU's run instantly but then it slows games down and people moan :P

@ssakash
Copy link
Member

ssakash commented Oct 20, 2015

yeah, the VIF Stalls will fix the SPS issues in shadow man. I have checked it before myself on the vifExecQueue() part.

@refractionpcsx2
Copy link
Member

Yup, I believe I even commented it about Shadowman 2

Edit: Yep i did :p

///NOTE: Shadowman 2 has SPS with this, uncommenting the correct code fixes it

@ssakash
Copy link
Member

ssakash commented Oct 20, 2015

///NOTE: Shadowman 2 has SPS with this, uncommenting the correct code fixes it

Yup, that's what made me test it. just to verify it :p

@refractionpcsx2
Copy link
Member

Yeah, doesn't quite work tho :P Something is going wrong causing other games (such as FFX) to freak out. Was trying to think of a sneeky way to make the games run quicker without the hack

@Codewyvern
Copy link

I am still waiting for the day this will be fixed :)

@refractionpcsx2
Copy link
Member

I am still waiting for the day this will be fixed :)

so are we :P

@ramapcsx2
Copy link
Member

It's still a total mystery.

@LoStraniero91
Copy link

LoStraniero91 commented May 31, 2018

@MrCK1
I also let the demo play, and I get the TLB Miss errors but the emulation goes on. When you get anywhere close to the tunnel that leads to the church (either in demo or in-game), then you get memory corruptions and the game gets really unstable with horrible graphical glitches and it can crash anytime.

@MrCK1
Copy link
Member

MrCK1 commented May 31, 2018

Yes I know, there's more details on the forum ;)

@ramapcsx2
Copy link
Member

An interresting OpenPS2Loader commit for this game. Apparently it has a bug in the CDVD buffered reader.
ps2homebrew/Open-PS2-Loader@f70090c

@godlikepanos
Copy link

That is great but what is this Open-PS2-Loader and how it interacts with PCSX2? Or you have to implement the same workaround for PCSX2 as well?

@ghost
Copy link

ghost commented Aug 11, 2019

Does anyone know what can be cause that SPS fix not work anymore?

///NOTE: Shadowman 2 has SPS with this, uncommenting the correct code fixes it

Since texturing problem can be fixed by IOP or disc patch, SPS seems to be last issue that game have. It would be nice to fix it, specially that looks at some point that code worked.
I recompiled pcsx2 with that code un-commented, but SPS still there. I also tried to not use newVIF, still the same. Not really sure what caused that fix no longer work.

ps. Texturing bug turned out to be IOP issue, and SPS looks to be VIF (by that comment). So is not exactly GSDX issue as label suggest.

@prafullpcsx2
Copy link
Contributor

@kozarovv Since the game doesn't suffer SPS at start and there are certain trigger points which cause the SPS (like the car accident in first cutscene) may be you can track down what changes these trigger points are causing which result in SPS?

@ghost
Copy link

ghost commented Aug 12, 2019

@prafullpcsx2 SPS seems to be cause by something in TextureCache (game engine texture cache, not pcsx2). I don't know exactly what it is. Maybe they not reserve enough memory like with that irx which broke textures. Hard to tell. I tried to increase cache size in TC_InitTextureCache, but that won't make any difference. Not sure that was good idea anyway, since cache is on bss so it will overwrite something else.

I found two patches that can later turnout to be helpful, but still don't have any solution to make it really playable.
crc = 60ad8fa7

First patch require to create save state on loading before cutscene, because it remove promoting new textures in cache. So it will just hang like on first movie.

patch=1,EE,001E927C,word,10000007

https://youtu.be/Modkn4InD8M

Second patch also remove SPS, but make some textures not load. More precisely it will clean them from GS pool before they are used. If you are desperate enough, you can probably finish game like that.

patch=1,EE,001E9158,word,00000000

https://youtu.be/N_bTExKjNjk

Like you can see on both, SPS is not there. And additionally on first movie textures are untouched, like they should. This make me sure that some kind of texture cache (in game) overflow is cause of that.

@ramapcsx2
Copy link
Member

IIrc, the SPS fix within PCSX2 had to to with the cycle delays for VIF1. Some kind of fixed cycle delay would prevent the SPS but cause some other issues.
So the proper fix within PCSX2 would probably be to "consume" data at the same rate as the PS2 does. Since we already attempt that anyway, I suppose we're missing some kind of important marker.

@daninthemix
Copy link

Is this likely to ever be playable?

@indio68
Copy link

indio68 commented Jan 2, 2020

Greetings, i'm a totally noob about pcsx2..so reading this post it's not that easy...but what i understand is that there is no solution yet for the texture and possibly gamebreaking bugs that can happen playing the game. am i right? or there is a aptch that let this game be played?? if onoy they relesed it for PC..uff thanks

@ghost
Copy link

ghost commented Jan 2, 2020

You can fix textures by patching game image (bin) directly in hex editor. Code for SLUS (US) version of game, but should be the same for others.

Find:
01 00 01 3C 21 08 22 00 C0 95 20 AC 01 00 01 3C 21 08 22 00 C4 95 20 AC 20 00 62 28 EB FF 40 14 40 11 03 00 44 03 00 0C 00 80 04 34 00 80 04 34 01 00 10 3C B0 9B 10 26 44 03 00 0C 00 00 02 AE 00 80 04 34 44 03 00 0C 04 00 02 AE 00 80 04 34 01 00 10 3C 48 A7 10 26 44 03 00 0C 00 00 02 AE

Replace to:
01 00 01 3C 21 08 22 00 C0 95 20 AC 01 00 01 3C 21 08 22 00 C4 95 20 AC 20 00 62 28 EB FF 40 14 40 11 03 00 44 03 00 0C 00 88 04 34 00 88 04 34 01 00 10 3C B0 9B 10 26 44 03 00 0C 00 00 02 AE 00 88 04 34 44 03 00 0C 04 00 02 AE 00 88 04 34 01 00 10 3C 48 A7 10 26 44 03 00 0C 00 00 02 AE

No way to make stable patch for IOP for that game, so disc need to be patched directly.
But this is only fix for loading textures (issue from first post), SPS issue is still there.

@PSI-Rockin
Copy link
Contributor

Hi kozarovv, can you elaborate on the IOP patch? Why do you think the broken textures are an IOP bug? What on the IOP could be causing this behavior? Could it be bad CDVD emulation, or is it something else?

@ghost
Copy link

ghost commented Jan 2, 2020

I just ported that ps2homebrew/Open-PS2-Loader@f70090c

According to patch author (sp193):

The game does not allocate sufficient memory for holding compressed data before decompression.
The corruption happens when the game tries to read 17 sectors due to the sound driver
rounding up to 17 when the reading amount being not a multiple of CD-ROM sector sizes.

Patch for OPL is required only for SMB mode which is most IOP memory demanding mode.
I initially posted it here: https://forums.pcsx2.net/Thread-Fixing-unplayable-games?pid=600132#pid600132

Problem is in SOUNDREL.IRX, luckily company left also debug version of that module on disc, at least on US version of game. It was long time ago so i don't have offsets for edited values, but you should easily find them by searching for hex i gave above.

@LoStraniero91
Copy link

You can fix textures by patching game image (bin) directly in hex editor. Code for SLUS (US) version of game, but should be the same for others.

Find:
01 00 01 3C 21 08 22 00 C0 95 20 AC 01 00 01 3C 21 08 22 00 C4 95 20 AC 20 00 62 28 EB FF 40 14 40 11 03 00 44 03 00 0C 00 80 04 34 00 80 04 34 01 00 10 3C B0 9B 10 26 44 03 00 0C 00 00 02 AE 00 80 04 34 44 03 00 0C 04 00 02 AE 00 80 04 34 01 00 10 3C 48 A7 10 26 44 03 00 0C 00 00 02 AE

Replace to:
01 00 01 3C 21 08 22 00 C0 95 20 AC 01 00 01 3C 21 08 22 00 C4 95 20 AC 20 00 62 28 EB FF 40 14 40 11 03 00 44 03 00 0C 00 88 04 34 00 88 04 34 01 00 10 3C B0 9B 10 26 44 03 00 0C 00 00 02 AE 00 88 04 34 44 03 00 0C 04 00 02 AE 00 88 04 34 01 00 10 3C 48 A7 10 26 44 03 00 0C 00 00 02 AE

No way to make stable patch for IOP for that game, so disc need to be patched directly.
But this is only fix for loading textures (issue from first post), SPS issue is still there.

I can confirm that patching the Europan version "SLES-50446" with your string fixes the texture corruptions.

@ghost
Copy link

ghost commented Jan 4, 2020

Not sure that helps anyhow but bios from emulators used in PS3 use setting called CDVD_READ_DELAY with 0x80600 value for that game. That is internal PPC setting from PS2 bios to emulated IOP, similar to what Deckard/xparam config do on real PS2 for other games.

Since sp193 mentioned CDVD reads, maybe is somehow related to that issue. Default value is 0x80000 for that setting. Just idea, not sure is really related.

@indio68
Copy link

indio68 commented Jan 6, 2020

so how to patch the image? i need some sort of program??There are many filkes and no one labeled as textures..what file i need to edit with hex program? and what is this SPS many mentined here?? i'm totally noob, cxan you pls me explain if i can fix and play this game finally?? thanks all

@owendemoney
Copy link

Can someone please xplain how this guy has managed to get this working? hes linked us here but i have no clue what im doing. i just wwant to play shadowman with no polygon issues or texture issues.. its been like 10 years how has no one explained this yet?

https://www.youtube.com/watch?v=RFxDZUq45eE&t=350s

@tadanokojin
Copy link
Member

For support on how to manually edit the game via hex editor I suggest you try asking at https://forums.pcsx2.net/. This ticket is for discussing the issue and workarounds, etc. Not for teaching you how to use a hex editor.

@owendemoney
Copy link

For support on how to manually edit the game via hex editor I suggest you try asking at https://forums.pcsx2.net/. This ticket is for discussing the issue and workarounds, etc. Not for teaching you how to use a hex editor.

I've managed to edit the game in hex editor, the problems still occur however. Have you read the thread and watched the links people prior have provided? The link I've provided shows someone has it in working order in full 4k. How has he done it? I've done the trings in hex edit I didn't get the same results.. I got a beaten up version of it that works better but not to standard

@tadanokojin
Copy link
Member

Did you try reading the video description which has a long explanation of how he did it? That might be a start.

Again, this is not the place to teach you. Please move to the forums.

@RedDevilus
Copy link
Contributor

@refractionpcsx2
Copy link
Member

Should be fixed with PR #3877

@indio68
Copy link

indio68 commented Oct 31, 2020

so what i need to do to finally play shadowman 2 without issues? what file si needs to download? i'm not used at all to Github...i find it very confusing and not userfriendly like discord...thanksa for help

@refractionpcsx2
Copy link
Member

refractionpcsx2 commented Oct 31, 2020

It won't be completely without issues yet, it will still have the spikey 3d models in the cutscenes.

What you need to do is go to that PR, go down to the bottom and the box at the bottom click "show all checks" in the top right, then click "Details" to the right of "Windows Build / windows-2019-Win32 (pull_request)", then in there click "artifacts" in the top right, then select the win32 build.

Alternatively you can wait for it to be merged and grab it from the build bot

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

Successfully merging a pull request may close this issue.