pcsx2 icon indicating copy to clipboard operation
pcsx2 copied to clipboard

Ratchet & Clank 2 - Megaturret Doesn't Work Correctly

Open erwark opened this issue 10 years ago • 36 comments

Core issue?

Issue title: Ratchet & Clank 2 (PAL/Australia) Megaturret Not Working

-PCSX2 version: 1.2.1 Stable

-PCSX2 options: Defaults, no settings modifications affect the issue

-Plugins used: GSdx (SW or HW), SPU2-X, Lilypad, Linuz or Gigaherz CDVD,rest null plugins. Same issue under ZeroGS - ruling out Graphics.

-Plugin settings: Defaults, no settings modifications affect the issue

-Description: The turrets from the Megaturret Glove (the upgraded Miniturrent Glove) just bounce up and down with their starting sound and animation looping. They don't work (shoot anything).

-How to replicate: Upgrade the Miniturret Glove to the Megaturret glove and use it.

-Last known version to work: Never worked (checked back to 0.9.7). Also checked most recent testing build.

-PC specifications: CPU: Intel Core i5 2500K @ 4.3Ghz GPU: Gigabyte Radeon 6950 1GB OS: Windows 7 x64 SP1

-Other comments: Aside from this issue, the game runs fine under Software Mode. No settings/gamefixes seem to make a difference. 2 other people have posted the issue in the past with no resolution (but they stopped following up the issue pretty quickly). These people seemed to have 64-bit Windows and PAL-Region games, like me. I have not tried the NTSC release.

I've filled out the required info as I understand it and welcome any ideas or requests for more information.

Thanks.

erwark avatar Nov 19 '14 11:11 erwark

This did happen on the consoles as well, but only occasionally. The R&C wiki also suggests the issue plagues the NTSC version.

Something in PCSX2's operation seems to trigger the issue for every single turret, so they all end up stuck in an initialising state. I've tried all the semi-relevant manual game hacks, as well as numerous combinations of the EE/VU precision options to no avail. Is there anything I can do to help debug this?

Hirato avatar Nov 13 '15 09:11 Hirato

I'll look into this sometime tonight.

Nobbs66 avatar Apr 26 '16 14:04 Nobbs66

There's also bug report on the forum about this: http://forums.pcsx2.net/Thread-Bug-Report-Ratchet-and-Clank-2-Megaturrets-PAL-Australia

FlatOutPS2 avatar Apr 26 '16 15:04 FlatOutPS2

Here is a blockdump of the issue: https://drive.google.com/file/d/1LIlXu6o3_66aVH5M_-MZbaJwvW7zIDLt/view?usp=sharing

ghost avatar Jan 02 '18 14:01 ghost

Has this bug been fixed yet?

RagnarokerXIII avatar Apr 08 '18 19:04 RagnarokerXIII

Nobody knows what causes it yet...

MrCK1 avatar Apr 08 '18 19:04 MrCK1

This seems to no longer be an issue.

NoShotz avatar Sep 26 '19 04:09 NoShotz

Issue persists for me (PAL version) on current master: loud video

Dreadmoth avatar Sep 26 '19 20:09 Dreadmoth

I was playing on the NTSC version on the latest v1.5.0 build

NoShotz avatar Sep 26 '19 21:09 NoShotz

Can confirm on 1.6.0 the PAL version of the game still got the issue. I also have to confirm this was a bug which was caused by extensive use of the turrets on PS2 Hardware. It was also later present in R&C3 but I did not look into that one yet on PCSX2.

If anything is needed I currently have time to provide some Information if needed.

Legion495 avatar Jan 08 '21 21:01 Legion495

Tried with: v1.7.0-dev-1163-ga6fac1e00 The problem still persists...

dualmacops avatar Mar 29 '21 01:03 dualmacops

This seems to have nothing to do with VU, game get incorrect data for FPU compare. Function that load $f0 also not take data from VU.

0x308140 move    $a0, $s4
0x308144 li.s    $f1, 6.5
0x30814C nop
0x308150 c.le.s  $f1, $f0 ($f0 at this point is 1.6 (0x3FCCCCCD))
0x308154 nop
0x308158 bc1f    def_307D34

Patching $f1 to 1.5 (0x3fc00000) make things work correctly. that what i was able to figure out. Real cause of bad data is still unknown. Also that can't be patched by pnach due to insane overlay system, and due to even more insane overlay loading system.. Only working way to hackfix it is patching iso with ppf, because every single game level have this function on different offset. And hooking loader not worked for me.

ghost avatar Apr 04 '21 21:04 ghost

I was hoping to find a solution, but I see that the problem is still mysterious. :')

Surprisingly, while trying to finish the last objective on a planet, the weapon evolved in Megaturret and time to got to the end, it was working, but it didn't last long, I didn't escape it. The problem unfortunately appeared when I changed planet. :(

Kwakoxium avatar Sep 14 '21 18:09 Kwakoxium

Patching $f1 to 1.5 (0x3fc00000) make things work correctly. that what i was able to figure out. Real cause of bad data is still unknown. Also that can't be patched by pnach due to insane overlay system, and due to even more insane overlay loading system.. Only working way to hackfix it is patching iso with ppf, because every single game level have this function on different offset. And hooking loader not worked for me.

Great info, thanks a lot!

I used your disassembly to create a patch based on the mechanism used by https://github.com/PCSX2/pcsx2/pull/4541 (merged but got reverted later again):

           if (cpuRegs.code == 0x0280202d)
           {
                   if (*(int*)PSM(pc + 0x4) == 0x3c0140d0 && *(int*)PSM(pc + 0x8) == 0x44810800 && *(int*)PSM(pc + 0x10) == 0x46000836)
                   {
                           DevCon.Warning("Fixing RC2 Mega Turret at PC %x", cpuRegs.pc);
                           memWrite32(pc + 0x4, 0x3c013f80);
                   }
           }

Appears to work fine here with the PAL version (sces-51607, CRC 2f486e6f).

Vogtinator avatar Sep 23 '21 18:09 Vogtinator

Could this fix the famous problem? :D

Kwakoxium avatar Sep 25 '21 13:09 Kwakoxium

@Vogtinator Nice! If you have the time, I'd need some help so I can know how to apply the patch, so then I can help testing it.

ghost avatar Sep 28 '21 14:09 ghost

@Vogtinator Nice! If you have the time, I'd need some help so I can know how to apply the patch, so then I can help testing it.

I pushed the hack into a repo here: https://github.com/Vogtinator/pcsx2/tree/rc2hack. You can build from that branch to test it.

Vogtinator avatar Sep 28 '21 14:09 Vogtinator

After many building hardships, I managed to compile it! Works like a charm!

I still noticed the bug happening, when several turrets are placed rapidly.

EDIT: pinpointed it, having more than 5 turrets makes the first ones bug; there can only be 5 turrets coexisting properly.

ghost avatar Sep 28 '21 15:09 ghost

EDIT: pinpointed it, having more than 5 turrets makes the first ones bug; there can only be 5 turrets coexisting properly.

That matches my experience on console, that generous use of turrets breaks new ones at some point.

Vogtinator avatar Sep 28 '21 18:09 Vogtinator

@Vogtinator Nice! If you have the time, I'd need some help so I can know how to apply the patch, so then I can help testing it.

I pushed the hack into a repo here: https://github.com/Vogtinator/pcsx2/tree/rc2hack. You can build from that branch to test it.

Well done in fixing the patch! For an absolute noob like myself, what is the easiest way to attach this patch or recode it? A step by step process if not too hard would be awesome thank you!

evjm avatar Sep 30 '21 17:09 evjm

@Vogtinator Nice! If you have the time, I'd need some help so I can know how to apply the patch, so then I can help testing it.

I pushed the hack into a repo here: https://github.com/Vogtinator/pcsx2/tree/rc2hack. You can build from that branch to test it.

Well done in fixing the patch! For an absolute noob like myself, what is the easiest way to attach this patch or recode it? A step by step process if not too hard would be awesome thank you!

I enabled builds in my fork, so you can download windows binaries from here: https://github.com/Vogtinator/pcsx2/actions/runs/1292303171

Vogtinator avatar Sep 30 '21 19:09 Vogtinator

@Vogtinator Nice! If you have the time, I'd need some help so I can know how to apply the patch, so then I can help testing it.

I pushed the hack into a repo here: https://github.com/Vogtinator/pcsx2/tree/rc2hack. You can build from that branch to test it.

Well done in fixing the patch! For an absolute noob like myself, what is the easiest way to attach this patch or recode it? A step by step process if not too hard would be awesome thank you!

I enabled builds in my fork, so you can download windows binaries from here: https://github.com/Vogtinator/pcsx2/actions/runs/1292303171

Thank you! I will replace the files in the original with these.

evjm avatar Sep 30 '21 20:09 evjm

It seems to work!

Kwakoxium avatar Nov 06 '21 21:11 Kwakoxium

@Vogtinator Nice! If you have the time, I'd need some help so I can know how to apply the patch, so then I can help testing it.

I pushed the hack into a repo here: https://github.com/Vogtinator/pcsx2/tree/rc2hack. You can build from that branch to test it.

Well done in fixing the patch! For an absolute noob like myself, what is the easiest way to attach this patch or recode it? A step by step process if not too hard would be awesome thank you!

I enabled builds in my fork, so you can download windows binaries from here: https://github.com/Vogtinator/pcsx2/actions/runs/1292303171

the download links for the binaries all say expired are you able to repost them.

Or is someone able to post a link or a step by step guide for complete beginners on how to turn the branch into a file i can apply to pcsx2 thank you

For reference i have the standalone version of pcsx2

frogdude129 avatar Dec 07 '21 13:12 frogdude129

the download links for the binaries all say expired are you able to repost them.

I triggered another build: https://github.com/Vogtinator/pcsx2/actions/runs/1549681004

Vogtinator avatar Dec 07 '21 13:12 Vogtinator

much appreciated thank you.

frogdude129 avatar Dec 09 '21 11:12 frogdude129

It works for me too, can we consider a PR?

GreyXor avatar Dec 30 '21 13:12 GreyXor

@Vogtinator Thanks, it works for me, maybe now we should open a PR for this patch ?

Could be done, but the way the patch is applied is quite a hack. OTOH, #4541 did get merged temporarily...

Vogtinator avatar Dec 30 '21 13:12 Vogtinator

I kinda want a better solution, I didn't like the hardcodedness of it, I kinda want a gamedb solution, but other stuff has gotten in the way.

refractionpcsx2 avatar Dec 30 '21 13:12 refractionpcsx2

I cleaned it up a bit and opened https://github.com/PCSX2/pcsx2/pull/5235. I noticed that for some reason my patch changed 6.5 to 1.0 instead of 1.5, so I changed it to 1.5 in the PR. It appears to work fine still.

Maybe this could be patched better if there was a mechanism to patch content read from disk? That would only work well if it's uncompressed though.

Vogtinator avatar Dec 30 '21 15:12 Vogtinator