This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PCSP v0.5.1 released
#5
ok i think i understand what it happens. The emulator has a state : normally it is RUNNING when interpreting a PSP game. Some events like Audio, Vsync, Clock may occur and try to set this state to an event state so the emulator thread is leaving the interpreter to handle the event. In a multi-core processor, each event has its time-critical thread running on one core whereas the emulator thread is running on another core. So a core tries to set a state to make the other core to suspend interpretation and handle event in the emulator thread. I feared an event state might be set when the emulator was already set to another event set (a vsync event occuring when the emulator state is set to an audio event state), so in 5.1.0, i changed into something like that :
Code:
step 1:
    lock mutex;
    if emulator state is RUNNING,
        set emulator state to event and unlock mutex;
    else
        unlock mutex and repeat step 1;
it didn't fix the freeze issue but i left this code. However i never realized that code might not work properly for a mono-core as those threads will be executed in a sequential order and might create some slowness or deadlocks indeed.
Reply


Messages In This Thread
PCSP v0.5.1 released - by shadow - 01-26-2011, 09:53 PM
RE: PCSP v0.5.1 released - by Kai3213 - 01-27-2011, 07:33 PM
RE: PCSP v0.5.1 released - by hlide - 01-27-2011, 08:34 PM
RE: PCSP v0.5.1 released - by Kai3213 - 01-27-2011, 08:46 PM
RE: PCSP v0.5.1 released - by hlide - 01-28-2011, 12:02 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)