psp-gcc vs PSPE

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

psp-gcc vs PSPE

Post by jimparis »

Just a note:

The pgp-gcc toolchain (20050619) generates seb/seh in the output, due to this portion of gcc-4.0.0.patch:

Code: Select all

@@ -987,6 +993,7 @@
 /* ISA includes the MIPS32r2 seb and seh instructions.  */
 #define ISA_HAS_SEB_SEH         (!TARGET_MIPS16                        \
                                  && (ISA_MIPS32R2                      \
+                                     || TARGET_ALLEGREX                \
                                      ))
These opcodes do work on the PSP, but crash PSPE (as of 0.9b). Hopefully a more complete emulator will be available at some point.
Guest

Post by Guest »

Did you look at how easy it might be to add them to PSPE ?
jboldiga
Posts: 27
Joined: Mon Jun 20, 2005 10:16 am

Post by jboldiga »

Is there source available for PSPE?
User avatar
sq377
Posts: 87
Joined: Mon Apr 11, 2005 3:30 am

Post by sq377 »

if source was available, someone would have ported it to linux by now.
Guest

Post by Guest »

There is no source ? Its Windows only ? Screw that.

Rinco mentioned "gxemul" in another thread and is using it on Mac. It comes with source. I downloaded it last night to eventually start using. Undoubtedly it works on many platforms.

Is it usable for your purposes ? Here is the reference thread....

http://forums.ps2dev.org/viewtopic.php? ... ght=gxemul

EDIT: Found at this website: http://gavare.se/gxemul/
jboldiga
Posts: 27
Joined: Mon Jun 20, 2005 10:16 am

Post by jboldiga »

thanks gorim ;)
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

gorim wrote:There is no source ? Its Windows only ? Screw that.
Yeah.
gorim wrote:Rinco mentioned "gxemul" in another thread and is using it on Mac.
gxemul won't do any of the PSP syscalls out of the box, of course, but that could be added. Not sure if it handles seb/seh; source doesn't appear to reference those opcodes. Maybe someday I'll work on a psp machine definition for gxemul; for now I'll probably just stick with testing on a real PSP.
jboldiga
Posts: 27
Joined: Mon Jun 20, 2005 10:16 am

Post by jboldiga »

its just too timely to keep testing on psp, especially with no debug support...kinda like throwing a dart at a dartboard hoping things will just workout.
MrHTFord
Posts: 35
Joined: Tue Feb 10, 2004 2:04 am
Location: England

Post by MrHTFord »

If that's how you think of programming then you'd be better off taking up professional darts instead.
jason
Posts: 28
Joined: Thu Apr 14, 2005 3:48 am

Post by jason »

jboldiga
Posts: 27
Joined: Mon Jun 20, 2005 10:16 am

Post by jboldiga »

Excellent! :)
PacManFan
Posts: 66
Joined: Sat Jun 25, 2005 6:01 am

No seb seh

Post by PacManFan »

Well, I understand that the PSPE will crash if it encounters an seb/seh instruction. I've taken out the define in the gcc 4.0.0 patch to generate the seb/seh, and I'm rebuilding the tool chain now. I'll let everyone know if it works to produce elfs that run flawlessly in the PSPE.

-PMF
Warren
Posts: 175
Joined: Sat Jan 24, 2004 8:26 am
Location: San Diego, CA

Post by Warren »

OK we need a sticky or something about PSPE.
PSPE DOES NOT EMULATE A PSP. It emulates a MIPS r4000 CPU which IS NOT the same thing.

This is akin to taking a PC emulator that only emulates an i386 and trying to run i686 code on it, some simple things will work but most anything that's meant for the real system will crash it.

In short, stop hacking apart the toolchain to try and get the POS PSPE to work with your code, if you really want an emulator for the PSP get some people together, grab gxemul sourcecode and properly implement the main Allegrex PSP CPU core based on the binutils patches in the toolchain.

DO NOT POST ANYMORE ABOUT PSPE NOT WORKING. CODE ON A REAL PSP OR MAKE A PROPER ALLEGREX EMU.
PacManFan
Posts: 66
Joined: Sat Jun 25, 2005 6:01 am

Still building

Post by PacManFan »

The tool chain is still building at this point, but I see no reason why I shouldn't disable the SEB/SEH instructions. My perspective is that if I can get compiled code to run on the PSPE, it WILL run on the PSP. Once I've gone through my lengthy compile/test/debug cycle, I'll rebuild my toolchain and put the proper one back in place.

To take from your example, 386 code will run on a 686, but not the other way around. If I can compile/test/debug on the PSPE, this will save a vast amount of time, Then I can switch compilers and turn on optimizations.

To each thier own I say.

-PMF
ector
Posts: 195
Joined: Thu May 12, 2005 10:22 pm

Post by ector »

If you really want to, but please don't spread your broken compiler.

This may be the final drop that causes me to polish up and release my emulator, it's slower than PSPE but has tons more debugging capabilities and supports more instructions, but right now it's a little too iffy to release.
User avatar
Agoln
Posts: 326
Joined: Wed Jun 08, 2005 3:14 am
Location: Fort Wayne, IN

Post by Agoln »

ector wrote:If you really want to, but please don't spread your broken compiler.

This may be the final drop that causes me to polish up and release my emulator, it's slower than PSPE but has tons more debugging capabilities and supports more instructions, but right now it's a little too iffy to release.
Run on linux?
Savoury SnaX
Posts: 3
Joined: Wed Jun 22, 2005 4:35 am

Post by Savoury SnaX »

How about an svn repository for the source then? More hands would make the project stabler (less iffy?) faster. And a source version would be much more useful, than a windows/linux or mac only binary.
PacManFan
Posts: 66
Joined: Sat Jun 25, 2005 6:01 am

New PSP emulator?

Post by PacManFan »

ector,

By all means, release your EMU soon. The only reason i'm hacking the toolchain is to have a faster dev cycle. If you release your source, we can all work on it and get something good and stable for the community fast.

BTW, my tool chain is almost done building, I'll report my results soon.

-PMF
ector
Posts: 195
Joined: Thu May 12, 2005 10:22 pm

Post by ector »

Yeah I'm thinking about a source release.

The sweet debugger GUI is all Win32 but the core is reasonably abstracted out and shouldn't be a very difficult port for anyone so inclined. I'd expect it to work just great on Wine though as I'm not using anything strange.

I need to figure out how to compile ELFIO as a dynamic library first though, as I'm not sure yet I want to release under LGPL.
PacManFan
Posts: 66
Joined: Sat Jun 25, 2005 6:01 am

new gcc without seb/seh

Post by PacManFan »

OK it's compiled, I recompiled my pspquake source under it , and it's now running (somewhat) under the PSPE. When I say somewhat, I mean more than before. Back to debugging for me, hopefully I'll have quake fully working in a day or so..

-PMF out..
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Re: new gcc without seb/seh

Post by mrbrown »

PacManFan wrote:OK it's compiled, I recompiled my pspquake source under it , and it's now running (somewhat) under the PSPE. When I say somewhat, I mean more than before. Back to debugging for me, hopefully I'll have quake fully working in a day or so..

-PMF out..
Instead of recompiling the toolchain you could've just used -march=6000 with your current one.

Know thy tools....
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

Is this project dead?
Warren
Posts: 175
Joined: Sat Jan 24, 2004 8:26 am
Location: San Diego, CA

Post by Warren »

We can only hope so.
Post Reply