Project

General

Profile

Actions

Emulator Issues #4128

closed

Spider-Man 2 (GCN) can't boot using JIT recompiler

Added by calc84maniac over 13 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
PPC
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

Spider-Man 2 gives these error messages immediately after booting:
"BackPatch: Currently only supporting reads. Attempted to write to f0004004."
"BackPatch write: not through EAX"
Then it freezes (not completely, as I can still close the game)

On the other hand, booting in Interpreter mode works just fine (albeit with the expected ~2 FPS).

Dolphin version with the problem: All that I have tried. My current revision is r7128.

Operating system and version: Windows 7 Home Premium
32-bit or 64-bit: 64-bit

Game ID: GK2E52


Related issues 3 (0 open3 closed)

Has duplicate Emulator - Emulator Issues #4951: Spiderman 2 crashes after launchDuplicate

Actions
Has duplicate Emulator - Emulator Issues #5503: Ultimate Spiderman is unstableDuplicate

Actions
Has duplicate Emulator - Emulator Issues #6311: Backpatch error on Spider-Man2Duplicate

Actions
Actions #1

Updated by tommyhl2.SS over 13 years ago

Yep, this is one of those games that just refuses to work.

Actions #2

Updated by calc84maniac over 13 years ago

Oddly enough, this game boots and runs quite accurately when running in debug mode (and still using the JIT recompiler). It's a bit slow, though, because the code cache keeps getting cleared. I feel like there should be some fairly simple change that allows this game to boot normally, since it boots in both interpreter mode and in debug mode. If any developer wants to look into this, that would be much appreciated. I'll also try messing around with the Dolphin source and see if I can come up with anything.

Actions #3

Updated by calc84maniac about 13 years ago

Okay, I finally got around to messing with this, and I found out exactly what code was allowing the game to work properly in debug mode. (MMU must be on for it to work, MMU speed hack is fine too, BAT not required)

In Jit64::DoJit():

if (Core::g_CoreStartupParameter.bEnableDebugging)
{
// Comment out the following to disable breakpoints (speed-up)
blockSize = 1;
broken_block = true;
Trace();
}

Trace(), of course, was irrelevant, but commenting the other two lines caused the normal hang at game boot. I'll see if I'm able to come up with anything else.

Actions #4

Updated by calc84maniac about 13 years ago

It looks like the game boots properly for block sizes of 6 or less, and hangs for sizes 7 or more. I tested this in the Release build.

Actions #5

Updated by skidau about 13 years ago

Based on that information, the crash is probably due to the exceptions not being executed frequently enough.

Actions #6

Updated by Anonymous about 13 years ago

:>

Actions #7

Updated by Anonymous about 13 years ago

try the gc-mic branch

Actions #8

Updated by calc84maniac about 13 years ago

Nope, that doesn't fix the problem (yes, I tried the JitIL core). From what I tested in the debugger earlier, the initialization code seems do some weird stuff with bit 0x00008000 of the MSR.

Actions #9

Updated by skidau about 13 years ago

Please test Spider-Man 2 with these test builds: r78b74101b0dc6cb7e2dc8424928e34138423c116

Let me know if the game works.

Actions #10

Updated by calc84maniac about 13 years ago

Sadly, it is still broken. Note, the "infinite loop" always happens before any of the emulator messages are displayed onscreen, which means very soon after the game boots. It might be worth stepping through in the debugger if possible.

Actions #11

Updated by skidau about 13 years ago

Try enabling OSReport in the logs and see if anything shows up. Would be even better if you could change the log level to Debug.

Actions #12

Updated by calc84maniac about 13 years ago

It's just the normal Apploader Initialized and such.

Actions #13

Updated by skidau about 13 years ago

Issue 4951 has been merged into this issue.

Actions #14

Updated by janben31 over 12 years ago

Interpreter: Game runs at about 1fps.
JIT: Dolphin shuts down immediately.
JITIL: Black screen. No yellow notations either.

Somehow, in my case even the debug mode doesn't fix the issue.
In debug mode I just get a black screen in all three cases -.-

Actions #15

Updated by skidau over 12 years ago

With the latest changes to the debugger, the debug mode trick will no longer boot this game. Comment 4 describes the changes needed to get the game to boot.

Actions #16

Updated by rdragoon over 12 years ago

It still works in debug mode if you boot in interpreter than switch to JIT. It's prone to random crashing though.

Actions #17

Updated by janben31 over 12 years ago

Thanks for the quick answers. Sadly, I'm pretty much of a noob xD
Would you explain how I apply this change?

Actions #18

Updated by janben31 over 12 years ago

When i follow comment 16's advice I get "DSI exception"

Actions #19

Updated by rdragoon over 12 years ago

Sorry, forgot to mention it only works in 64 bit. 32 bit does not seem to work at all with JIT. And i've only tried it on windows.

What i do is run in debug mode, and makes sure boot to pause is enabled. Once it starts up, switch to interpreter (under JIT menu), frame advance once, then turn interpreter off. From there, you can unpause, and it should run mostly fine. Save state often, and when you get an error, close the error box, and load your last state, and either do something different and hope for the best, or switch to interpreter for the frame before the error occurred.

It's not exactly playable, but it does work.

Actions #20

Updated by skidau over 12 years ago

Issue 5503 has been merged into this issue.

Actions #21

Updated by needo2 about 12 years ago

any news on this ?

Actions #22

Updated by spiderjjr45 about 12 years ago

I would definitely like an update, this is one of my favorite games of all time.

Actions #23

Updated by ericleslie almost 12 years ago

Giving this thread a bump. I have tried the debug instructions from without any success - after I switch back to JIT and try to unpause, I still get the infinte looping error.

Win8 64 bit.

Actions #24

Updated by chriswholtshouser almost 12 years ago

Bumping this thread, hoping for an update.

Actions #25

Updated by blastoisedrc almost 12 years ago

I'll bump this too i also wanna see a update on this

Actions #26

Updated by Billiard26 almost 12 years ago

  • Issue type set to Bug
  • Category set to ppc
Actions #27

Updated by skidau almost 12 years ago

  • Status changed from New to Fixed

Fixed by r8cfceb1186c8.

Actions #28

Updated by erlloyd almost 12 years ago

Still seems like this problem occurs on Mac. Using 3.5-329. I get the attached error message using either the JIT Recompiler or the JITIL Recompiler.

Does anyone know if this is really fixed on the Windows side?

Actions #29

Updated by calc84maniac almost 12 years ago

You need to turn on the MMU in the game properties.

Actions #30

Updated by erlloyd almost 12 years ago

Ok, I must have missed that option. Now I can start the game, but after when it tries to load the tutorial level, the whole dolphin emulator locks up (screen shot during lockup attached). I was able to try this on a windows machine, and it seemed to work fine there. Should I file a new bug for this, or is there anything I should try in the settings first?

Using Mac OS X 10.8.2, NVIDIA 330M graphics card.

Actions #31

Updated by skidau almost 12 years ago

Try matching the settings first. Copy all of the ini files from your Windows Dolphin folder to the OSX one.

Actions #32

Updated by erlloyd almost 12 years ago

Yep, even after copying the .ini files, the Mac side still locks up. Is there a more informative log file somewhere? Or a way to enable deeper debug messages? The dolphin.log file I found has only a few minimal entries.

Actions #33

Updated by jefftaylordesign over 11 years ago

Bump. I get the same results as comment #30 on this issue using the latest Mac release. Has any progress been made in resolving it? I've tried it in Windows 7 and can confirm that it is working there.

Actions #34

Updated by Sonicadvance1 over 11 years ago

Issue 6311 has been merged into this issue.

Actions #35

Updated by lolmaniac621 over 11 years ago

UPDATE: Version 3.5-1334 (haven't tried newer yet) works by setting the game properties to this look, although it still plays at about 25 fps. Make sure to EXACTLY MATCH it or it doesn't work at all. --> http://imgur.com/wrSRNWI

I'm gonna try some different settings paired with those properties to see if I can get it running without lag.

Actions #36

Updated by calc84maniac over 11 years ago

The MMU Speed Hack is meant to be used in place of the enabling the full MMU for certain games; if the game doesn't work without full MMU enabled (and this one doesn't) then the speed hack does nothing or possibly may cause glitches. It's probably a good idea for the MMU to be enabled by default for this game. The fact that it's not is why Issue 6311 was actually an issue.

You won't be able to get it to run much faster at this point. MMU emulation is slow, that's the real bottleneck here. I can't say it's impossible to be optimized, though.

Actions #37

Updated by exodude25 over 11 years ago

How do you get to that menu in the pic?

Actions #38

Updated by pauldacheez over 11 years ago

Right-click the game, click Properties.

Actions #39

Updated by Baterang over 11 years ago

When I run the game with the setting required to run the game it only gives me 57% speed and no fps, so I practically cant play the game. What can I do to fix this?

Actions #40

Updated by MayImilae over 11 years ago

Use the support forum for questions like that. Don't ask that kind of stuff here.

https://forums.dolphin-emu.org/

Actions #41

Updated by law6059 over 11 years ago

i'm on windows and i'm trying to apply the fix for spider-man 2, how exactly do i apply this?

Actions #42

Updated by pauldacheez over 11 years ago

law6, right-click the game in your game list and click Properties, then make the checkboxes match this screenshot. http://imgur.com/wrSRNWI

Actions

Also available in: Atom PDF