EmulatorArchive / jpcsp

Automatically exported from code.google.com/p/jpcsp
1 stars 0 forks source link

JPCSP cannot run homebrew #210

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I have a homebrew APP (CDOGS-SDL) and it crashes at start
2. It runs on the PSP
3. It was compiled with GCC 4.3.5 and Newlib 1.18.0 (latest toolchain)
4. If i use a very old toolchain it works...

What is the expected output? What do you see instead?
Work as expected (since it runs on the PSP)

What version of the product are you using? On what operating system?
SVN and latest binary for linux 64 
(http://jpcsp.googlecode.com/files/jpcsp-1772-linux-amd64.7z)

Please provide any additional information below.

java.lang.RuntimeException: Cannot find executable
    at jpcsp.Allegrex.compiler.RuntimeContext.jumpCall(RuntimeContext.java:113)
    at jpcsp.Allegrex.compiler.RuntimeContext.jump(RuntimeContext.java:154)
    at _S1_2_8950DA4.s(_S1_2_8950DA4.java:736)
    at _S1_2_895147C.s(_S1_2_895147C.java:16)
    at _S1_2_8950FFC.s(_S1_2_8950FFC.java:60)
    at _S1_2_8949640.s(_S1_2_8949640.java:16)
    at _S1_2_8900180.s(_S1_2_8900180.java:132)
    at _S1_2_8900180.exec(_S1_2_8900180.java)
    at jpcsp.Allegrex.compiler.RuntimeContext.runThread(RuntimeContext.java:683)
    at jpcsp.Allegrex.compiler.RuntimeThread.run(RuntimeThread.java:47)

I get this exception in most of homebrew, however if i try to run psplink also 
compiled with the same toolchain it works. I expect this is some newlib issue 
that is not recognized on the emulator since the code works on the physical 
PSP-1000.

Original issue reported on code.google.com by pmlo...@gmail.com on 7 Dec 2010 at 3:34

GoogleCodeExporter commented 9 years ago
Could you please attach your application's binaries? It is most likely an issue 
with Newlib's.

Original comment by hykem.the.demon on 7 Dec 2010 at 3:41

GoogleCodeExporter commented 9 years ago
I've recompiled with -g -O0 so all debug info is there, the source code is from 
here: http://gtamp.com/PSP/cdogsPSP_v0.1.3.80_src.7z

Original comment by pmlo...@gmail.com on 7 Dec 2010 at 3:59

Attachments:

GoogleCodeExporter commented 9 years ago
It seems that Newlib now uses R_MIPS_GPREL16 relocations. We've implemented 
this method only in r1881, but I tested it with your homebrew and it was 
causing an overflow.
A new condition was found and added for this method on r1885, could you please 
test this revision and check if it can run the hombrew applications build with 
that toolchain?

Original comment by hykem.the.demon on 8 Dec 2010 at 8:15

GoogleCodeExporter commented 9 years ago
I've checked out SVN r1892 and i get exactly the same results.

Original comment by pmlo...@gmail.com on 9 Dec 2010 at 10:22

GoogleCodeExporter commented 9 years ago
That's really odd. I can run your homebrew using the c-dogs sdl distribution 
from lumaki.com under Windows 32-bit, so it may be an issue with the Linux 
64-bit distribution. Do you have any means to test it under any other system?

Original comment by hykem.the.demon on 9 Dec 2010 at 2:44

GoogleCodeExporter commented 9 years ago
I encounter the same problem with all releases. It is in latest 2570 too.
The only solution is to make an ISO, load the ISO file and press Run.
So far I didn't find any UMD Generators for Linux that's why I am using wine 
with the windows tools to create it.

I've tried linux-amd64 and linux-x86

This is the stderr output of 2570 linux-amd64
java.lang.RuntimeException: Cannot find executable
    at jpcsp.Allegrex.compiler.RuntimeContext.jumpCall(RuntimeContext.java:135)
    at jpcsp.Allegrex.compiler.RuntimeContext.jump(RuntimeContext.java:176)
    at _S1_2_885E94C.s(_S1_2_885E94C.java:440)
    at _S1_2_885EC20.s(_S1_2_885EC20.java:16)
    at _S1_2_885E550.s(_S1_2_885E550.java:60)
    at _S1_2_88523D4.s(_S1_2_88523D4.java:16)
    at _S1_2_8804030.s(_S1_2_8804030.java:140)
    at _S1_2_8804030.exec(_S1_2_8804030.java)
    at jpcsp.Allegrex.compiler.RuntimeContext.runThread(RuntimeContext.java:694)
    at jpcsp.Allegrex.compiler.RuntimeThread.run(RuntimeThread.java:51)

Original comment by jopa...@gmail.com on 14 Jun 2012 at 6:54

GoogleCodeExporter commented 9 years ago
@jopadan: which homebrew are you trying? Can you send me a download link (best 
with source code).

Original comment by gi...@web.de on 18 Jun 2012 at 3:41

GoogleCodeExporter commented 9 years ago
You can just use the samples included in the jpcsp build it doesn't matter 
which *.PBP you try.
They only work if you create an iso image for them.

Original comment by jopa...@gmail.com on 22 Jun 2012 at 11:42

GoogleCodeExporter commented 9 years ago
I have no problem loading and running the *.PBP included in the "demos" 
directory from the Jpcsp build. Be sure to use "Load file" and not "Load UMD".

Original comment by gi...@web.de on 22 Jun 2012 at 1:30

GoogleCodeExporter commented 9 years ago
I am using Load file and for me only the clut.pbp works. celshading.pbp crashes 
for me if you press run like most of the other demos too.

Original comment by jopa...@gmail.com on 22 Jun 2012 at 1:38

GoogleCodeExporter commented 9 years ago
Iam using IcedTea-bin 6.1.10.4 [icedtea-bin-6] on sabayon-weekly for amd64

Original comment by jopa...@gmail.com on 22 Jun 2012 at 1:44

GoogleCodeExporter commented 9 years ago
Could you post a complete log file at DEBUG level?

Original comment by gi...@web.de on 22 Jun 2012 at 3:51

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Ok here is the Full Debug log for celshading.pbp

Original comment by jopa...@gmail.com on 22 Jun 2012 at 5:49

Attachments:

GoogleCodeExporter commented 9 years ago
The issue is in the compiler settings:
     [0] Maximum method size

This value can't be zero! What are the proposed values when you go into the 
configuration under the compiler tab? It should be 50, 100, 500, 1000 and 3000.

Original comment by gi...@web.de on 23 Jun 2012 at 6:28

GoogleCodeExporter commented 9 years ago
I've tried to set manually the "Maximum method size" to zero, but this is not 
causing the issue.
You said that it works for an ISO image. Could you also attach the log at DEBUG 
level when running the cube ISO?

It seems that there is a problem with the clock: the VBLANK is triggered too 
often. But I can't understand why it should then work with an ISO...

Thank you for your support!

Original comment by gi...@web.de on 23 Jun 2012 at 6:52

GoogleCodeExporter commented 9 years ago
Here is the log for cube.iso

Original comment by jopa...@gmail.com on 23 Jun 2012 at 1:39

Attachments:

GoogleCodeExporter commented 9 years ago
maximum method size is set to 3000 in compiler tab

Original comment by jopa...@gmail.com on 23 Jun 2012 at 1:52

GoogleCodeExporter commented 9 years ago
I could reproduce the problem :-)
The PSP startup code requires a ":" in the file name passed as the argument of 
the root thread.
When starting from a UMD, the file name is "disc0:/PSP_GAME/SYSDIR/EBOOT.BIN".
When starting a .PBP on Windows, the file name is 
"C:/..../demos/celshading.pbp": there is luckily a ":" due to the windows 
syntax.
When starting a .PBP on Linux, the file name is 
"/home/..../demos/celshading.pbp": no ":" in the file name and the startup code 
crashes badly.

I will provide a fix soon.

Original comment by gi...@web.de on 29 Jun 2012 at 10:36

GoogleCodeExporter commented 9 years ago
Should now be fixed in r2576. Thanks for testing again!

Original comment by gi...@web.de on 30 Jun 2012 at 5:39

GoogleCodeExporter commented 9 years ago
Please Help me 
i have the same problem
what should i do with r2576 

Original comment by ujjawalm...@ymail.com on 8 Mar 2014 at 1:34