PSn00bSDK - Open Source PS1 SDK That Doesn't Suck
- ArthCarvalho
- Active PSXDEV User
- Posts: 45
- Joined: Jan 29, 2016
- I am a: Artist, Programmer
- PlayStation Model: SCPH-103
Do you plan on making a benchmark on both your SDK and PSY-Q to compare performance?
That'd be really interesting, not only a fresh implementation, but more optimized and using a newer compiler should give it some boost in performance.
I'm looking forward when the lib is more developed so I can port my project into it. For now, I've been using some functions from your code in my project, it's been really helpful. (isin, icos, tri_crop, quad_crop, and a few others)
Are you going to implement a VAB/SEQ player in the future?
That'd be really interesting, not only a fresh implementation, but more optimized and using a newer compiler should give it some boost in performance.
I'm looking forward when the lib is more developed so I can port my project into it. For now, I've been using some functions from your code in my project, it's been really helpful. (isin, icos, tri_crop, quad_crop, and a few others)
Are you going to implement a VAB/SEQ player in the future?
-
LameGuy64 Verified
- Psy-Q Enthusiast
- Posts: 388
- Joined: Apr 10, 2013
- I am a: Hobbyist Game Developer
- Motto: Commercial or not, play it!
- PlayStation Model: H2000/7000
- Location: Philippines
- Contact:
My libraries should perform a lot better than Sony's original libraries, as the latter is comprised mostly of unoptimized compiler generated code and other bloat whereas PSn00bSDK's libraries are a mix of optimized compiler generated and assembly. Programs compiled with PSn00bSDK usually yields a much smaller binary compared to an identical program compiled with PsyQ.
I probably won't implement support for VAB/SEQ anytime soon but instead opt to develop a new and possibly more powerful sequenced music format. The SPU libraries need to be developed first so its likely going to take a long while for a sequenced music framework to be implemented. In the meantime folks have to write their own music systems from scratch. Should include a hardware timer example which I forgot to include in the last commit.
I probably won't implement support for VAB/SEQ anytime soon but instead opt to develop a new and possibly more powerful sequenced music format. The SPU libraries need to be developed first so its likely going to take a long while for a sequenced music framework to be implemented. In the meantime folks have to write their own music systems from scratch. Should include a hardware timer example which I forgot to include in the last commit.
Please don't forget to include my name if you share my work around. Credit where it is due.
Dev. Console: SCPH-7000 with SCPH-7501 ROM, MM3, PAL color fix, Direct AV ports, DB-9 port for Serial I/O, and a Xplorer FX with Caetla 0.35.
DTL-H2000 PC: Dell Optiplex GX110, Windows 98SE & Windows XP, Pentium III 933MHz, 384MB SDRAM, ATI Radeon 7000 VE 64MB, Soundblaster Audigy, 40GB Seagate HDD, Hitachi Lite-on CD-RW Drive, ZIP 250 and 3.5" Floppy.
Dev. Console: SCPH-7000 with SCPH-7501 ROM, MM3, PAL color fix, Direct AV ports, DB-9 port for Serial I/O, and a Xplorer FX with Caetla 0.35.
DTL-H2000 PC: Dell Optiplex GX110, Windows 98SE & Windows XP, Pentium III 933MHz, 384MB SDRAM, ATI Radeon 7000 VE 64MB, Soundblaster Audigy, 40GB Seagate HDD, Hitachi Lite-on CD-RW Drive, ZIP 250 and 3.5" Floppy.
-
LameGuy64 Verified
- Psy-Q Enthusiast
- Posts: 388
- Joined: Apr 10, 2013
- I am a: Hobbyist Game Developer
- Motto: Commercial or not, play it!
- PlayStation Model: H2000/7000
- Location: Philippines
- Contact:
I just got my own implementation of CdSearchFile() working and used that to get around testing XA audio streaming. I got it working as shown in the video linked below. Audio stutters a lot because my test disc is just trash.
Link to video
I also got XA looping working by simply using the same CdReadyCallback() method used in many implementations. But I noticed something interesting about it is that the ones written for PsyQ/Programmers Tool would issue three CD commands in the callback at once (CdlSetFilter and CdlReadS w/ CdlLOC which internally issues CdlSetloc prior to CdlReadS) whereas the CD controller could only query up to two commands or the command busy status stays on until the IRQ of the last command has been acknowledged as waiting for and acknowledging IRQs in a callback is not possible for callbacks are executed from within the IRQ handler. Perhaps there's some internal command queuing going on in the official SDK where pending commands are sent on acknowledge or completion IRQs.
Link to video
I also got XA looping working by simply using the same CdReadyCallback() method used in many implementations. But I noticed something interesting about it is that the ones written for PsyQ/Programmers Tool would issue three CD commands in the callback at once (CdlSetFilter and CdlReadS w/ CdlLOC which internally issues CdlSetloc prior to CdlReadS) whereas the CD controller could only query up to two commands or the command busy status stays on until the IRQ of the last command has been acknowledged as waiting for and acknowledging IRQs in a callback is not possible for callbacks are executed from within the IRQ handler. Perhaps there's some internal command queuing going on in the official SDK where pending commands are sent on acknowledge or completion IRQs.
Please don't forget to include my name if you share my work around. Credit where it is due.
Dev. Console: SCPH-7000 with SCPH-7501 ROM, MM3, PAL color fix, Direct AV ports, DB-9 port for Serial I/O, and a Xplorer FX with Caetla 0.35.
DTL-H2000 PC: Dell Optiplex GX110, Windows 98SE & Windows XP, Pentium III 933MHz, 384MB SDRAM, ATI Radeon 7000 VE 64MB, Soundblaster Audigy, 40GB Seagate HDD, Hitachi Lite-on CD-RW Drive, ZIP 250 and 3.5" Floppy.
Dev. Console: SCPH-7000 with SCPH-7501 ROM, MM3, PAL color fix, Direct AV ports, DB-9 port for Serial I/O, and a Xplorer FX with Caetla 0.35.
DTL-H2000 PC: Dell Optiplex GX110, Windows 98SE & Windows XP, Pentium III 933MHz, 384MB SDRAM, ATI Radeon 7000 VE 64MB, Soundblaster Audigy, 40GB Seagate HDD, Hitachi Lite-on CD-RW Drive, ZIP 250 and 3.5" Floppy.
-
LameGuy64 Verified
- Psy-Q Enthusiast
- Posts: 388
- Joined: Apr 10, 2013
- I am a: Hobbyist Game Developer
- Motto: Commercial or not, play it!
- PlayStation Model: H2000/7000
- Location: Philippines
- Contact:
Just released the CD-ROM library to the main repo along with a boatload of bugfixes that have accumulated since the last commit. I've also added new hardware timer, render to texture and CD-XA audio examples.
I recommend reading the changelog in the github repository for more details.
I recommend reading the changelog in the github repository for more details.
Please don't forget to include my name if you share my work around. Credit where it is due.
Dev. Console: SCPH-7000 with SCPH-7501 ROM, MM3, PAL color fix, Direct AV ports, DB-9 port for Serial I/O, and a Xplorer FX with Caetla 0.35.
DTL-H2000 PC: Dell Optiplex GX110, Windows 98SE & Windows XP, Pentium III 933MHz, 384MB SDRAM, ATI Radeon 7000 VE 64MB, Soundblaster Audigy, 40GB Seagate HDD, Hitachi Lite-on CD-RW Drive, ZIP 250 and 3.5" Floppy.
Dev. Console: SCPH-7000 with SCPH-7501 ROM, MM3, PAL color fix, Direct AV ports, DB-9 port for Serial I/O, and a Xplorer FX with Caetla 0.35.
DTL-H2000 PC: Dell Optiplex GX110, Windows 98SE & Windows XP, Pentium III 933MHz, 384MB SDRAM, ATI Radeon 7000 VE 64MB, Soundblaster Audigy, 40GB Seagate HDD, Hitachi Lite-on CD-RW Drive, ZIP 250 and 3.5" Floppy.
Lameguy, do you have tutorials or anything on how to use your tools?
Ive not checked and just being lazy and asking
Ive not checked and just being lazy and asking

You have no idea how excited I am whenever I hear news about this and the associated engine 
Keep up the good work! I'm hoping I can learn C with it eventually.

Keep up the good work! I'm hoping I can learn C with it eventually.
Hi. Thanks for this awesome project!
I was playing with psyq and realized it may not be the best way to do things with so many 16 bit utils not working. So I decided to try this.
I'm using windows 10 64, I followed the steps but I just can't compile the tools and libs.
Calling "make" inside tools, just creates a liblzp.a file and that's all. Inside lipsn00b, it just creates a libc.a and stops.
I tried msys2 console, and also windows CMD.
Also I wanted to ask if you are going to support something like XMPLAY... CD audio is awesome, but ps1 midi/tracker music is perfect for my little project.
Thanks.
EDIT: I just realized libc.a is huge, so.. it compiled all libs inside one file?... I still can't compile the tools.
I was playing with psyq and realized it may not be the best way to do things with so many 16 bit utils not working. So I decided to try this.
I'm using windows 10 64, I followed the steps but I just can't compile the tools and libs.
Calling "make" inside tools, just creates a liblzp.a file and that's all. Inside lipsn00b, it just creates a libc.a and stops.
I tried msys2 console, and also windows CMD.
Also I wanted to ask if you are going to support something like XMPLAY... CD audio is awesome, but ps1 midi/tracker music is perfect for my little project.
Thanks.
EDIT: I just realized libc.a is huge, so.. it compiled all libs inside one file?... I still can't compile the tools.
-
Verified
- C Programming Expert
- Posts: 161
- Joined: Oct 06, 2012
- PlayStation Model: SCPH-5502
- Contact:
I forked PSn00bSDK to fix some issues that wouldn't let me compile it. Could you please test it yourself? Please remember to configure GCC path and version before compiling.Mills wrote: ↑March 4th, 2020, 6:13 am Hi. Thanks for this awesome project!
I was playing with psyq and realized it may not be the best way to do things with so many 16 bit utils not working. So I decided to try this.
I'm using windows 10 64, I followed the steps but I just can't compile the tools and libs.
Calling "make" inside tools, just creates a liblzp.a file and that's all. Inside lipsn00b, it just creates a libc.a and stops.
I tried msys2 console, and also windows CMD.
Also I wanted to ask if you are going to support something like XMPLAY... CD audio is awesome, but ps1 midi/tracker music is perfect for my little project.
Thanks.
EDIT: I just realized libc.a is huge, so.. it compiled all libs inside one file?... I still can't compile the tools.
I finally could compile it without the "lzpack" util (anyway I'm not interested at all in it). If I have some time I can try your version.
For the moment I made a mario "32" sample, using mario's head from mario 64.

I had to replace the eyes by textures because the "z buffer" in PS1 is very bad, and it was not rendering them at all.
You do not have the required permissions to view the files attached to this post.
- Abelliqueux
- Curious PSXDEV User
- Posts: 18
- Joined: Apr 29, 2016
- I am a: wannabee PSX dev
- Motto: nope, bicycle
- PlayStation Model: 7502/5502
- Location: PAL
- Contact:
Who ! I compiled it from master and it works almost flawlessly on Manjaro Linux ( Arch derivative ).
I have one issue and a few suggestions/corrections :
- All examples run fine in ePSXe, except your demo. It loads fine, but black screens even after a few seconds... all others graphics examples work but this one
- in Readme.md > Building the SDK > Linux and Unix-likes > Step 5 : You should mention the need to adapt GCC_BASE to reflect the path used with --prefix when building the toolchain.
- in toolchain.txt > Updating the ldscript, could you precise if one should add the new content to the existing one, or replace it ? EDIT: In my case I did replace it.
Other than that, your instructions for the toolchain and SDK setup are remarkably complete and clear, kudos to you and great work on the SDK !
I have one issue and a few suggestions/corrections :
- All examples run fine in ePSXe, except your demo. It loads fine, but black screens even after a few seconds... all others graphics examples work but this one

- in Readme.md > Building the SDK > Linux and Unix-likes > Step 5 : You should mention the need to adapt GCC_BASE to reflect the path used with --prefix when building the toolchain.
- in toolchain.txt > Updating the ldscript, could you precise if one should add the new content to the existing one, or replace it ? EDIT: In my case I did replace it.
Other than that, your instructions for the toolchain and SDK setup are remarkably complete and clear, kudos to you and great work on the SDK !
Hardware : 5552 + Xstation, 7502 + Psnee Attiny85, 9002, 102, ftdi cable + unirom carts
https://wiki.arthus.net - https://psx.arthus.net
https://wiki.arthus.net - https://psx.arthus.net
-
- What is PSXDEV?
- Posts: 2
- Joined: Sep 29, 2020
Later Have Easily Followable Instructions On Setup Or Make Completely Compiled Version Like Jo-engine Did It!
Link To Sega Saturn Jo-engine Website = https://jo-engine.org/ For Example Of Perfectly Already Compiled And Easy To Setup SDK
And Even If The Sega Saturn Doesn't Have Power Of PS1 But It's Not That Bad!
Link To Sega Saturn Jo-engine Website = https://jo-engine.org/ For Example Of Perfectly Already Compiled And Easy To Setup SDK
And Even If The Sega Saturn Doesn't Have Power Of PS1 But It's Not That Bad!
-
LameGuy64 Verified
- Psy-Q Enthusiast
- Posts: 388
- Joined: Apr 10, 2013
- I am a: Hobbyist Game Developer
- Motto: Commercial or not, play it!
- PlayStation Model: H2000/7000
- Location: Philippines
- Contact:
Apologies for not keeping up with this thread for a very long while, hope people just checked the Github repo for updates being implemented to the SDK while I was inactive on the forums for awhile.
PSn00bSDK more or less follows the same programming API as the official PsyQ/Programmers Tool SDK, only without libgs, so tutorials that just use libgpu should still be applicable for PSn00bSDK. As for building with PSn00bSDK, I don't really expect beginners to try to use it as its still somewhat experimental, and is meant more towards those who are already familiar with using the GNU toolchain directly. I have tried making the process of setting up a PSn00bSDK project a bit easier though, with setup templates and environment variables to fit many setup configurations of PSn00bSDK with minimal fuss, as well as improving instructions to make it easier to get going.
I've heard reports of all PSn00bSDK programs only displaying a black screen in Mednafen. It might be fixed by now when I improved my ResetGraph() implementation a few months back, though I haven't tested it myself as I don't really use Mednafen nor ePSXe in my testing, the former of which didn't like ISOs created by my MKPSXISO tool.Abelliqueux wrote: ↑May 13th, 2020, 4:43 am - All examples run fine in ePSXe, except your demo. It loads fine, but black screens even after a few seconds... all others graphics examples work but this one![]()
You're supposed to add the bit of code into the .text section in the ldscript, but it seems I didn't write it clearly enough. I'll fix that up shortly.Abelliqueux wrote: ↑May 13th, 2020, 4:43 am - in toolchain.txt > Updating the ldscript, could you precise if one should add the new content to the existing one, or replace it ? EDIT: In my case I did replace it.
Please don't forget to include my name if you share my work around. Credit where it is due.
Dev. Console: SCPH-7000 with SCPH-7501 ROM, MM3, PAL color fix, Direct AV ports, DB-9 port for Serial I/O, and a Xplorer FX with Caetla 0.35.
DTL-H2000 PC: Dell Optiplex GX110, Windows 98SE & Windows XP, Pentium III 933MHz, 384MB SDRAM, ATI Radeon 7000 VE 64MB, Soundblaster Audigy, 40GB Seagate HDD, Hitachi Lite-on CD-RW Drive, ZIP 250 and 3.5" Floppy.
Dev. Console: SCPH-7000 with SCPH-7501 ROM, MM3, PAL color fix, Direct AV ports, DB-9 port for Serial I/O, and a Xplorer FX with Caetla 0.35.
DTL-H2000 PC: Dell Optiplex GX110, Windows 98SE & Windows XP, Pentium III 933MHz, 384MB SDRAM, ATI Radeon 7000 VE 64MB, Soundblaster Audigy, 40GB Seagate HDD, Hitachi Lite-on CD-RW Drive, ZIP 250 and 3.5" Floppy.
-
LameGuy64 Verified
- Psy-Q Enthusiast
- Posts: 388
- Joined: Apr 10, 2013
- I am a: Hobbyist Game Developer
- Motto: Commercial or not, play it!
- PlayStation Model: H2000/7000
- Location: Philippines
- Contact:
Managed to compile together a pre-compiled binary release of PSn00bSDK for 64-bit Windows with MSys2. The package includes a pre-compiled and pre-configured GCC 10.2.0 toolchain and a few other tools of mine included. It depends on MSys2 not only for the run-time libraries that the toolchain and included tools need but also build utilities such as make, and trying to include them into the package would be a whole load of hassle and generally difficult to maintain... Once the MSys2 prerequisites are installed and required paths in your environment are set it should be ready to go.
The package can be obtained through the PSn00bSDK page on my website. I was originally going to distribute it as a package that MSys2's package manager would take, but found it to be an absolute pain to build a package that way.
The package can be obtained through the PSn00bSDK page on my website. I was originally going to distribute it as a package that MSys2's package manager would take, but found it to be an absolute pain to build a package that way.
Please don't forget to include my name if you share my work around. Credit where it is due.
Dev. Console: SCPH-7000 with SCPH-7501 ROM, MM3, PAL color fix, Direct AV ports, DB-9 port for Serial I/O, and a Xplorer FX with Caetla 0.35.
DTL-H2000 PC: Dell Optiplex GX110, Windows 98SE & Windows XP, Pentium III 933MHz, 384MB SDRAM, ATI Radeon 7000 VE 64MB, Soundblaster Audigy, 40GB Seagate HDD, Hitachi Lite-on CD-RW Drive, ZIP 250 and 3.5" Floppy.
Dev. Console: SCPH-7000 with SCPH-7501 ROM, MM3, PAL color fix, Direct AV ports, DB-9 port for Serial I/O, and a Xplorer FX with Caetla 0.35.
DTL-H2000 PC: Dell Optiplex GX110, Windows 98SE & Windows XP, Pentium III 933MHz, 384MB SDRAM, ATI Radeon 7000 VE 64MB, Soundblaster Audigy, 40GB Seagate HDD, Hitachi Lite-on CD-RW Drive, ZIP 250 and 3.5" Floppy.
-
- What is PSXDEV?
- Posts: 2
- Joined: Sep 29, 2020
Thank You For Listening To Me And Eliminating Some Building Problems!LameGuy64 wrote: ↑February 18th, 2021, 12:12 pm Managed to compile together a pre-compiled binary release of PSn00bSDK for 64-bit Windows with MSys2. The package includes a pre-compiled and pre-configured GCC 10.2.0 toolchain and a few other tools of mine included. It depends on MSys2 not only for the run-time libraries that the toolchain and included tools need but also build utilities such as make, and trying to include them into the package would be a whole load of hassle and generally difficult to maintain... Once the MSys2 prerequisites are installed and required paths in your environment are set it should be ready to go.
The package can be obtained through the PSn00bSDK page on my website. I was originally going to distribute it as a package that MSys2's package manager would take, but found it to be an absolute pain to build a package that way.
- kruglij701
- What is PSXDEV?
- Posts: 4
- Joined: Mar 06, 2021
- I am a: Tipical user
- PlayStation Model: SCPH-102
- Location: Russia
How good can I make games on it, given that I know C?
-
LameGuy64 Verified
- Psy-Q Enthusiast
- Posts: 388
- Joined: Apr 10, 2013
- I am a: Hobbyist Game Developer
- Motto: Commercial or not, play it!
- PlayStation Model: H2000/7000
- Location: Philippines
- Contact:
Depends on how skilled you are overall really.
Please don't forget to include my name if you share my work around. Credit where it is due.
Dev. Console: SCPH-7000 with SCPH-7501 ROM, MM3, PAL color fix, Direct AV ports, DB-9 port for Serial I/O, and a Xplorer FX with Caetla 0.35.
DTL-H2000 PC: Dell Optiplex GX110, Windows 98SE & Windows XP, Pentium III 933MHz, 384MB SDRAM, ATI Radeon 7000 VE 64MB, Soundblaster Audigy, 40GB Seagate HDD, Hitachi Lite-on CD-RW Drive, ZIP 250 and 3.5" Floppy.
Dev. Console: SCPH-7000 with SCPH-7501 ROM, MM3, PAL color fix, Direct AV ports, DB-9 port for Serial I/O, and a Xplorer FX with Caetla 0.35.
DTL-H2000 PC: Dell Optiplex GX110, Windows 98SE & Windows XP, Pentium III 933MHz, 384MB SDRAM, ATI Radeon 7000 VE 64MB, Soundblaster Audigy, 40GB Seagate HDD, Hitachi Lite-on CD-RW Drive, ZIP 250 and 3.5" Floppy.
Hi;
I installed the SDK according to the instructions given on the page: https://github.com/Lameguy64/PSn00bSDK/ ... llation.md
Then I created a new project, copied the "Template" files to the project folder and everything works fine. Now I want to add *.h and *.c files but I don't know how to compile it all together. I am asking for help in this matter.
I installed the SDK according to the instructions given on the page: https://github.com/Lameguy64/PSn00bSDK/ ... llation.md
Then I created a new project, copied the "Template" files to the project folder and everything works fine. Now I want to add *.h and *.c files but I don't know how to compile it all together. I am asking for help in this matter.
Who is online
Users browsing this forum: No registered users and 15 guests