Toolchain, libraries and headers relationship

General Programming help in C, C++ or ASM, Compiling / Debugging, and R3000A Central Processing Unit (CPU) information
Post Reply
User avatar
pool7
Verified
Curious PSXDEV User
Curious PSXDEV User
Posts: 27
Joined: Jun 27, 2014

Toolchain, libraries and headers relationship

Post by pool7 » March 10th, 2017, 4:51 pm

Ok, this will sound either really crazy, or really noob (or maybe both), but I thought I'd ask anyway:
The official SCE PS1 SDK (or whatever you want to call it) includes compilers, libraries and header files (plus other stuff irrelevant to this post).

Now, let's say I want to build my own compiler, or build a newer version of GCC with support for PS1 executables.
Would I be able to just grab the libs and headers and use them directly?
Or are libs/headers somehow dependent on the compiler they are bundled with?
Of course the questions assume same host and target platforms for the compilers.

User avatar
Shadow
Verified
Admin / PSXDEV
Admin / PSXDEV
Posts: 2670
Joined: Dec 31, 2012
PlayStation Model: H2000/5502
Discord: Shadow^PSXDEV

Post by Shadow » March 10th, 2017, 5:00 pm

No, you can use the latest GCC with the Psy-Q libs.
Development Console: SCPH-5502 with 8MB RAM, MM3 Modchip, PAL 60 Colour Modification (for NTSC), PSIO Switch Board, DB-9 breakout headers for both RGB and Serial output and an Xplorer with CAETLA 0.34.

PlayStation Development PC: Windows 98 SE, Pentium 3 at 400MHz, 128MB SDRAM, DTL-H2000, DTL-H2010, DTL-H201A, DTL-S2020 (with 4GB SCSI-2 HDD), 21" Sony G420, CD-R burner, 3.25" and 5.25" Floppy Diskette Drives, ZIP 100 Diskette Drive and an IBM Model M keyboard.

User avatar
pool7
Verified
Curious PSXDEV User
Curious PSXDEV User
Posts: 27
Joined: Jun 27, 2014

Post by pool7 » March 11th, 2017, 2:46 am

Not to get lost in translation... is that a:
1-Yes, you can grab the libs/headers and use them, they are indepentend of the compiler
or
2-No, you can't use them as-is, there is some kind of dependency between compiler and libs/headers.

User avatar
Shadow
Verified
Admin / PSXDEV
Admin / PSXDEV
Posts: 2670
Joined: Dec 31, 2012
PlayStation Model: H2000/5502
Discord: Shadow^PSXDEV

Post by Shadow » March 11th, 2017, 3:59 am

1. I'm certain that you can use GCC with the libs. I'm not too sure about the headers though, but I've seen companies use versions of GCC over CCPSX. I might have been mistaken above when I said any version though, because it actually might be a particular version or build of GCC. I'm not 100% sure on that part. I might actually be confusing this with the Yaroze, but I'm sure I saw some PlayStation build use GCC directly... It might have been the T-Rex demo.

When I do a version dump on CCPSX, I get:

Code: Select all

CCPSX 3.06.0017 (Win32, PSX version 3.02).
GNU C version 2.95.2 19991024 BUILD 4.0.0030 (PSX) compiled by CC.
CC for PlayStation (SDevTC) v3.06.0017 (Win32) (C) SN Systems Software Ltd 1998.
Development Console: SCPH-5502 with 8MB RAM, MM3 Modchip, PAL 60 Colour Modification (for NTSC), PSIO Switch Board, DB-9 breakout headers for both RGB and Serial output and an Xplorer with CAETLA 0.34.

PlayStation Development PC: Windows 98 SE, Pentium 3 at 400MHz, 128MB SDRAM, DTL-H2000, DTL-H2010, DTL-H201A, DTL-S2020 (with 4GB SCSI-2 HDD), 21" Sony G420, CD-R burner, 3.25" and 5.25" Floppy Diskette Drives, ZIP 100 Diskette Drive and an IBM Model M keyboard.

Sblorgz
Curious PSXDEV User
Curious PSXDEV User
Posts: 22
Joined: May 18, 2015

Post by Sblorgz » March 13th, 2017, 3:20 am

You will be stuck with PSY-Q linking format being incompatible. The whole toolchain is entirely based on custom builds of GCC, which also include customized object and library formats. Unless you can convert them to whatever GCC uses these days (was it ELF?), you cannot use a more recent build of GCC.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests