173210 / valentine-hbl

Half Byte Loader BETA
http://wololo.net/hbl
Other
22 stars 5 forks source link

[R107][Patapon2][PSP Go] Some games do not exit correctly anymore #342

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I ran a series of "Homebrew tests" That I run before all releases, and 
discovered that the following games crash on exit in R107:
CSPSP
Emumaster

(games can be found in my blog entry: 
http://wololo.net/wagic/2010/07/18/15-essential-homebrews-that-run-on-half-byte-
loader/ )

This wasn't the case in R101, but I can't tell when the problem started 
appearing, as I haven't run these tests on R102 to 106.

PSP Go 6.20, Patapon2 exploit, using the new savegame from neur0n

Historically the only game with a similar issue was gpsp kai.

I will post a log file if I find anything interesting in it

Original issue reported on code.google.com by wagic.the.homebrew@gmail.com on 14 Nov 2010 at 10:13

GoogleCodeExporter commented 8 years ago
Let me withdraw one thing: apparently Emumaster crashed on exit before, since I 
even mentioned it on my blog. I think CSPSP is supposed to exit ok, though.

Original comment by wagic.the.homebrew@gmail.com on 14 Nov 2010 at 10:14

GoogleCodeExporter commented 8 years ago
I have trouble "force exiting" from the homebrew game Mobile assault 1.4.2 , I 
always get a freeze, Is this in anyway related to this issue?

Original comment by karkinis...@gmail.com on 14 Nov 2010 at 2:01

GoogleCodeExporter commented 8 years ago
PSPdisp also crashes on exit 

Original comment by karkinis...@gmail.com on 15 Nov 2010 at 2:27

GoogleCodeExporter commented 8 years ago
It's always a small change that turns out to be a deal breaker.

In run_nid() there was a logstr1() call that I made debug only in R107 (by 
writing LOGSTR1). Turns out that this call is necessary to (I guess) invalidate 
the instruction cache or smth. Because without it calling function() freezes 
and shuts down the PSP. Actually this bug should cause trouble for all homebrew 
that use network functions. I could verify it for PSPdisp and CSPSP.

I will submit a fix in the next revision. Also I think we should keep track of 
sceIoOpen/Close calls because some homebrew like gpsp leave files open. This 
most likely causes the crash when running another homebrew.

Original comment by jochen.s...@gmail.com on 15 Nov 2010 at 8:54

GoogleCodeExporter commented 8 years ago
Nice catch and good news for gpsp, it should be easy to have a simple array of 
8 file descriptors in the global variables structure, and override 
sceIoOpen/sceIoclose (maybe the Async versions too ?)

Original comment by wagic.the.homebrew@gmail.com on 15 Nov 2010 at 9:17

GoogleCodeExporter commented 8 years ago
Should be fixed in R109.

I also added hooking for sceIoOpen/sceIoClose (no async yet). This was not the 
problem with gpsp though. It was actually caused by gpsp registering a lot of 
subinterrupt handlers. They not get released on exit.

Original comment by jochen.s...@gmail.com on 15 Nov 2010 at 4:46

GoogleCodeExporter commented 8 years ago

Original comment by jochen.s...@gmail.com on 15 Nov 2010 at 9:14