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
Curious PSXDEV User
Curious PSXDEV User
Posts: 23
Joined: June 27th, 2014, 12:17 pm

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
Admin / PSXDEV
Admin / PSXDEV
Posts: 2258
Joined: December 31st, 2012, 5:37 pm
PlayStation Model: H2000/5502

Re: Toolchain, libraries and headers relationship

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), DB-9 breakout headers for both RGB and Serial output and an Xplorer with CAETLA 0.34.

Development Computer: Windows 98, Pentium 3 [400MHz], 128MB SDRAM, DTL-H2000, DTL-H201A, 21" Sony Trinitron CRT, CD-ROM burner, 3.25" and 5.25" Floppy Diskette Drives and a ZIP 100 Diskette Drive.

User avatar
pool7
Curious PSXDEV User
Curious PSXDEV User
Posts: 23
Joined: June 27th, 2014, 12:17 pm

Re: Toolchain, libraries and headers relationship

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
Admin / PSXDEV
Admin / PSXDEV
Posts: 2258
Joined: December 31st, 2012, 5:37 pm
PlayStation Model: H2000/5502

Re: Toolchain, libraries and headers relationship

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), DB-9 breakout headers for both RGB and Serial output and an Xplorer with CAETLA 0.34.

Development Computer: Windows 98, Pentium 3 [400MHz], 128MB SDRAM, DTL-H2000, DTL-H201A, 21" Sony Trinitron CRT, CD-ROM burner, 3.25" and 5.25" Floppy Diskette Drives and a ZIP 100 Diskette Drive.

Sblorgz
Curious PSXDEV User
Curious PSXDEV User
Posts: 22
Joined: May 18th, 2015, 1:47 pm

Re: Toolchain, libraries and headers relationship

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 1 guest