xemu-project / xemu

Original Xbox Emulator for Windows, macOS, and Linux (Active Development)
https://xemu.app
Other
2.78k stars 279 forks source link

Some titles have scissor issues #312

Open theboy181 opened 3 years ago

theboy181 commented 3 years ago

Scissors Hack

This is a hack, but shows the function that has the issue in the emulator, as a by product games get a significant boost in performance. Madden 2005 I was getting 22fps and with the change I got 60fps. This was observed in most cases.

Change the following in HEX editor, and if the function is used it will fix some of the issues caused with xemu and _D3DDevice_SetScissors_

HEX [ 85 D2 0F 85 B1 00 00 00 8B 95 E0 0E = 85 D2 0F 86 B1 00 00 00 8B 95 E0 0E ]

Games Tested

Batman Begins Colin McRae Rally 2005 Close Combat: First to Fight: United States Marines Madden 2005 Spikeout Battle Street

mborgerson commented 3 years ago

This type of issue is well suited to the issue template that I have created. It will guide you on which information to provide and make it easier to track which titles are affected. Please follow the template next time you file an issue.

JohnGodgames commented 3 years ago

More games that uses that function:

Battlefield 2 Modern Combat Destroy All Humans Headhunter: Redemption Future Tactics Uprising Gene Troopers Goblin Commander Robots TimeSplitters Future Perfect Toca 2 Toca 3 Winback 2 Project Poseidon

vanderleivieirainacio commented 3 years ago

Another game that uses this function:

Predator Concrete Jungle Shadow the Hedgehog

Triticum0 commented 3 years ago

Shikigami-no-Shiro series and Mafia suffer from this issue

Kohryujin commented 3 years ago

The Punisher game has subtitles during gameplay, that without this fix, get zoomed in on when they pop-up. Predator Concrete Jungle also has a similar zoom-in error where the game focus on the top left of the screen.

Triticum0 commented 3 years ago

Other titles affected Brian Lara International Cricket 2005 Club Football Fallout: Brotherhood of Steel Yourself!Fitness Tom Clancy's Rainbow Six: Critical Hour? Splat Magazine Renegade Paintball

dreamsyntax commented 3 years ago

I have confirmed _D3DDeviceSetScissors is the cause of the last remaining crashing issue in Shadow the Hedgehog.

Demo of issue + resolution with patching the function https://youtu.be/uMiV_4tWsP0?t=41

Triticum0 commented 2 years ago

@dreamsyntax I saw on your YouTube channel that you play through it did you 100% the game.

dreamsyntax commented 2 years ago

@Triticum0 Yes. It works as expected minus the SetScissors causing crashes in the 2P-GAME mode for "Shadow the Hedgehog" title. The entire 1P-GAME can be completed start to finish, I would consider it as Playable state in emulation game readiness. Upscaling does affect the framerate for some buffer effects (spring does a buffer copy effect) and this causes the physics to be a bit off. But playing at 1x res is 100% possible to finish as is currently.

From my description when I tested v0.6 (release ver)

  • The rest of the game is fully playable with no major issues.
  • UI corrupts sometimes (rare, and minor)
  • Spring/Dash 'blur' effect causes major slowdown, at higher render scale will affect physics
  • 2PGAME is unplayable (crashes), Issue 312 confirms it is caused by _D3DDeviceSetScissors.
dreamsyntax commented 2 years ago

An update on this, As of v0.7.39 (possibly earlier) The scissor issues causing crashes in the 2P-GAME mode for "Shadow the Hedgehog" title are fixed.

The mode renders and plays correctly without any obvious issues.

mborgerson commented 2 years ago

Thanks