Updating PSYQ Compiler and Linker?

General help for the PSY-Q SDK, such as setting the SDK up, compiling correctly, linking and debugging
Post Reply
User avatar
Jaberwocky
Active PSXDEV User
Active PSXDEV User
Posts: 35
Joined: Oct 31, 2019

Updating PSYQ Compiler and Linker?

Post by Jaberwocky » December 17th, 2019, 5:42 am

Heyho :3

I was wondering if there is a way to update the PSYQ Compiler and Linker with a modern version of GCC, so I looked a bit into this but.... to me it seems like this is not possible.

I tried basicly the most obvious thing you can do, building a GCC compiler supporting MIPS. This took me way longer then I could be proud about it. But when I was done with it, I compiled a simple PSYQ programm and tried linking it with psylink. Well, the linker rejected the object files because of them having a wrong format, probably because they were in .elf format and not ecoff. I then read that, GCC does not support that format anymore.

It didn't took me long until I encountered some other PSX SDKs that seemed to be working with GCC and the elf format, but they all required patching the executable, also they lacked full support of what PSYQ can do.

To sum it up:
If I want to use a modern compiler, I have no way of using PSYQ and the documents for it anymore, right?

If I want to use PSYQ I have to stick with the old compiler and linker, right?

Xavi92
Verified
C Programming Expert
C Programming Expert
Posts: 161
Joined: Oct 06, 2012
PlayStation Model: SCPH-5502
Contact:

Post by Xavi92 » December 17th, 2019, 9:20 am

AFAIK PsyQ uses the (propietary?) .LIB format, which is not compatible with the ELF specification, as you said. So there is no way you can link those static libraries against any modern version of GCC.
Jaberwocky wrote:It didn't took me long until I encountered some other PSX SDKs that seemed to be working with GCC and the elf format, but they all required patching the executable, also they lacked full support of what PSYQ can do.
That's one of the reasons why modern SDKs such as PSXSDK or PSn00bSDK reimplement (their own version of) PsyQ libs from source and compile them to ELF using the GNU toolchain for mipsel-unknown-elf. Shendo posted a tutorial about how to set up PSXSDK (and the GNU toolchain) a few years ago that will surely be helpful to you.

TL;DR: you must stick to the old toolchain if you want to use PsyQ libs.

User avatar
Jaberwocky
Active PSXDEV User
Active PSXDEV User
Posts: 35
Joined: Oct 31, 2019

Post by Jaberwocky » December 18th, 2019, 3:42 am

Xavi92 wrote: December 17th, 2019, 9:20 am TL;DR: you must stick to the old toolchain if you want to use PsyQ libs.
That is sad acutally >o< But I expected that... Is there any ELF PSX SDK that coveres there entire PsyQ features? Because this is all I know currently... I'm actually drawn between sticking with the old compiler, which is "pure retro" or heading for a new SDK.
On the other hand, PsyQ has a very extensive documentation!

Xavi92
Verified
C Programming Expert
C Programming Expert
Posts: 161
Joined: Oct 06, 2012
PlayStation Model: SCPH-5502
Contact:

Post by Xavi92 » January 28th, 2020, 4:15 am

Jaberwocky wrote:Is there any ELF PSX SDK that coveres there entire PsyQ features?
I don't know if there's a full replacement for Psy-Q, but Lameguy's PSn000bSDK, Fromage's candyk-psx and PSXSDK are good alternatives with different available features. IMHO it is much more sensible to use modern open source tools and contribute to them instead of keep using an old, unmantained and copyrighted SDK.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest