Project

General

Profile

Actions

Emulator Issues #3393

closed

DSPLLE plugin crash if it's JIT Dynarec is ON with DSPLLE on Thread in single core mode

Added by rodiabloalmeida about 14 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
DSP
% 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

What steps will reproduce the problem?
1.Disable Dual Core mode and choose DSPLLE plugin as sound plugin. Also, enable DSPLLE on thread so you have one core for sound and one for the rest with a dual core cpu. Locking threads to core is optional.
2.In DSPLLE options, select all 3 options
3.Run i.e. Mario Kart:DD

What is the expected output? What do you see instead?
It's expected to see the game running. But it crashs instead. Disabling the Jit Dynarec in DSPLLE options or disabling DSPLLE on dedicated thread solves the problem. But I loose speed for sure. Tested with r6302x64. The issue doesn't happen with r5289 (when the JIT was introduced to windows version) but happens starting around r5541 when major changes to the plugin was made. Disabling DTK music or audio throttle doesn't make any difference btw.

Please provide any additional information below.
Tested in windows 7 x64 on a Pentium Dual Core with 3GB RAM + nvidia 9600GT. I would like to know if it's impossible to turn on the DSPLLE Jit dynarec if you're in single core mode with DSPLLE on a dedicated thread with a dual core cpu 'cos would be a cool thing to test. I mean... 3.8GHz just for the sound maybe it's enough in this gamecube game i.e. but not with the Jit dynarec OFF. And, not that it matters but, I can't afford a Intel Ci7/Ci5 cpu right now. :P

Anyway, thanks for this awesome piece of software by the way. And keep up the good work. ^^


Related issues 1 (0 open1 closed)

Has duplicate Emulator - Emulator Issues #1665: DSP_LLE slowdowns findout (Dual Core Issue)Duplicatenakeee

Actions
Actions #1

Updated by skidau about 14 years ago

  • Status changed from New to Accepted

Yes, the LLE on thread option will crash the emulator if the CPU thread runs ahead of the DSP thread. The issue is not caused by the revisions you've listed. There is no easy fix at this time. Possible solutions are to use a timer/clock to control the various components (CPU, GPU, DSP) of the Wii/GC or to send a signal back to the CPU to wait (similar to fifobusy in the GPU code).

Will accept this issue but do not expect a quick fix.

Actions #2

Updated by rodiabloalmeida about 14 years ago

I was trying to trackdown the culprit revision here and report back in a moment. But I think there is no need for it 'cos you may know what you're talking about. So, even if there will be no quick fix, I thank you anyway for accepting the issue, skidau. Thanks very much.

Just a question with no preasure intention: Is the "sending a signal back" solution too hard to code? What would be involved in the code? Again, no preasure. Just my curiosity. ^^'

Actions #3

Updated by skidau about 14 years ago

The tricky part with pausing the CPU is that Dolphin's timer/scheduler is based on the CPU. So if the DSP tells the CPU to pause, the whole system ends up pausing (including the DSP itself). This catch 22 will be a bit tricky to solve.

Actions #4

Updated by tommyhl2.SS about 14 years ago

Simple, give the cpu some other things to do that are unrelated so that it does not stop and will keep running. By the time the cpu finsishes doing other tasks, maybe the dsp would have caught up by then. Of course, I really have no idea what I'm talking about. :)

Actions #5

Updated by rodiabloalmeida about 14 years ago

@ skidau
Oh, I see the big picture now. Not an easy task indeed. It's like requesting to pcsx2 team to enable overlay statistics in GSdx. Needs a total rework of things. Well, I can live with that. Thanks for the explanation about how dolphin timings works, skidau. ^^

@ Tommy
I agree with you. You don't realy know what you're talking about. Or maybe you're just kidding. I don't know. :P No offense ^^'

Actions #6

Updated by tommyhl2.SS about 14 years ago

Yes, rodiabloalmeida, it was a bit of a joke. I was hoping for skid to respond to it but now you've ruined it. I'm kidding. :)

Actions #7

Updated by Xtreme2damax about 14 years ago

This affects dual core mode also.

I've gotten LLE on thread to work with JIT by doing what pierre suggested, replace all #ifdef _M_IX86 with #ifndef _M_X64.

This works as long as the game isn't a Zelda Ucode game such as Mario Kart Double Dash, Super Mario Galaxy 1/2, Zelda Windwaker, and Zelda Twilight Princess.

Yes Mario Kart Double Dash also uses the AFC decoder for race music, I was surprised as well.

Actions #8

Updated by Xtreme2damax about 14 years ago

By the way it doesn't crash for me, it just hangs. I suppose the reason I don't have to disable dual core mode is because I have a hyper-threaded quad core.

Actions #9

Updated by rodiabloalmeida about 14 years ago

X2D, I know that affects dual core mode. I think skidau knows it too. And when I say "it crash", I meant it just stays there doing nothing. The emu keeps "running". Or, as you say, it hangs. And I already tried the said "replace method" 4 days ago. No luck with that, of course, as I'm trying to run one of the aformentioned games. By the way, the aformentioned games are the ones that actually NEEDS LLE to have proper sound, so it's a no go. And no surprise here. But thanks for the help :P

And yes, you don't have to disable dual core for sure, man. That's kinda obvious. 'Cos you have an extra free core to dedicate it to the LLE thread. Even two I can say! Note: if you haven't figured out yet, dolphin will not use the forth core. I don't suppose that. I can confirm it for you [lol]. :P (Btw, nice rig you got. A Ci7, right?^^)

Actions #10

Updated by Xtreme2damax about 14 years ago

As I mentioned replacing #ifdef _M_IX86 with #ifndef _M_X64 only works if the game isn't a Zelda Ucode game. I have it working fine with Starfox, RE games, DBZ games etc.. just not Mario or Zelda games such as the games I mentioned above.

Anyways LLE is just too slow right now, the only time I really use it if something isn't passable with HLE. I'm somewhat able to bear the crappy music or no music in some games with HLE, however hoping that will change soon and issues with LLE will be fixed or the impossible, most major issues with HLE fixed which I doubt.

Actions #11

Updated by rodiabloalmeida about 14 years ago

X2D, I think you're missing something here. Emulation is emulation. It doesn't matter if it's ubber slow at first. If it was the case, pcsx2 couldn't never have reached the current state it has today 'cos the beta testers would have just gone crazy in the process. Ask General Plot for example (if you find him). Or you can ask Ector or skidau in this case.

Oh, btw, disabling HT on your Ci7 could help you with speed in dolphin. Unless you're setting the cpu affinity to the physical cores in task manager, preferably the last ones in the CPU list. Just a hint.

Anyway, back on topic. Shall we?^^ Want to chat? PM me at dolphin's forum. It's a better place for that. Not here.

Actions #12

Updated by Xtreme2damax about 14 years ago

Me and General Plot are actually buddies, I'm an admin over at General Emulation. I've been around for quite a while myself. :P

And no, I'm not complaining, I am fully aware of what you mentioned. I know there are going to be these issues, but I as anyone hope they will be fixed someday. I used PCSX2 0.8.1 and then the new versions with the speed improvements were released and it was like a godsend.

Hyper-threading isn't the problem, the problem is using lock threads to cores when hyper-threading is enabled. By disabling lock threads to cores, using Dolphin with hyper-threading enabled is just fine. ;)

By the way I was just discussing the issue in my last replies. Every bit of information helps the developers.

Actions #13

Updated by tommyhl2.SS about 14 years ago

There seems to be a tone of arrogance and disrespect with you, rodia, maybe you can calm down a bit and realize when someone is trying to help rather than making a point to be an ass to people?

Actions #14

Updated by rodiabloalmeida about 14 years ago

Sorry, that's not the intention by a hundred miles of distance. X2D got my msg right way in dolphins forum. I just have a tendency to be sarcastic sometimes. But I know he is always trying to help. Thing is: I'm 36 hours without sleeping at the time I'm writing this post. So sorry for any misunderstanding. Not my intention. Really.
But I really think this issue page is not the proper place to chat. No offense. You too can PM me if you want to. At dolphin's forum I'm rodiabloalmeida there too.

Again, sincerely sorry. u.u

Actions #15

Updated by skidau about 14 years ago

  • Category set to dsp
Actions #16

Updated by chane2k1 almost 14 years ago

just updating, issue is still present on zelda ucode games with r6584 64bit.

Actions #17

Updated by skidau almost 14 years ago

Issue 1665 has been merged into this issue.

Actions #18

Updated by skidau almost 14 years ago

  • Status changed from Accepted to Fixed

Fixed by r7040.

Actions #19

Updated by rodiabloalmeida almost 14 years ago

Well, it still hangs in Super Mario Galaxy 1 and 2. For others games its fixed. Any clue about this, skidau?

And thanks for trying.

Actions #20

Updated by skidau almost 14 years ago

These games work for me: ZTP Wii, ZWW, SMG and SMG2. Sometimes, it takes a few tries for the game to boot, but when it boots, the game works fine.

Actions #21

Updated by rodiabloalmeida almost 14 years ago

Skidau, I've tried many many times to boot SMG and SMG2 and it always hang. Could you please share your settings for it to boot, 'cos I've already tried many combinations without success. Do you close Dolphin between each try? Or do you just hit ESC and try to run it again?

Actions #22

Updated by rodiabloalmeida almost 14 years ago

Nevermind. After sometime, I managed to get SMG booting. It's indeed fixed. Thanks again, skid. o/

Actions

Also available in: Atom PDF