Collection of PsyQ basic examples NOT using libgs
So you want to begin developping on the original PSX but don't know where to start ?
This repo is destined to host a bunch of simple examples, each describing how to do one thing.
The code here will be using Nugget + PsyQ, the "Official" Sony SDK but with a modern MIPS toolchain.
We will not be using libGS, the Extended Graphics Library for the graphic stuff...
Instead we'll try to devise methods to reproduce libgs functions. This will not necessarly be more efficient, but we'll learn a lot more stuff !
We'll keep things simple for now. If you want to read about more methods to get things up and running, see the wiki's Installation methods section.
You can setup a pre-built MIPS toolchain by copy-pasting the following into a command prompt:
powershell -c "& { iwr https://raw.githubusercontent.com/grumpycoders/pcsx-redux/main/mips.ps1 | iex }"
Then, open a new command prompt, and type the following:
mips install 11.2.0
git clone https://github.com/ABelliqueux/nolibgs_hello_worlds.git --recursive
nolibgs_hello_worlds.zip
's content to C:\no_libgs_hello_worlds\
.psyq-4.7-converted-full.7z
in C:\no_libgs_hello_worlds\psyq
. You should now have C:\no_libgs_hello_worlds\psyq\include
and C:\no_libgs_hello_worlds\psyq\lib
;no_libgs_hello_worlds
├── common.mk
├── hello_world
| ├── hello_world.c
| ├── Makefile
├── hello_...
└── psyq
├── lib
| └── *.a
└── include
└── *.h
C:\no_libgs_hello_worlds\
directory with the following command: cd C:\no_libgs_hello_worlds\
, then type make
and hit enter.hello_world
example, and you should now have a hello_world.ps-exe
file in C:\no_libgs_hello_worlds\hello_world
. This a PSX executable that can be run in an emulator like pcsx-redux.In a terminal :
On Debian derivatives (Ubuntu, Mint...) :
sudo apt-get install gcc-mipsel-linux-gnu g++-mipsel-linux-gnu binutils-mipsel-linux-gnu
On Arch derivatives (Manjaro), the mipsel environment can be installed from AUR : cross-mipsel-linux-gnu-binutils and cross-mipsel-linux-gnu-gcc using your AURhelper of choice:
trizen -S cross-mipsel-linux-gnu-binutils cross-mipsel-linux-gnu-gcc
Let's do it all on the CLI !
sudo apt-get install git
git clone https://github.com/ABelliqueux/nolibgs_hello_worlds.git --recursive
cd nolibgs_hello_worlds
wget http://psx.arthus.net/sdk/Psy-Q/psyq-4.7-converted-full.7z
7z x psyq-4.7-converted-full.7z -o./psyq
make
By default, this should build the hello_world
example, and you should now have a hello_world.ps-exe
file in ./hello_world/
. This a PSX executable that can be run in an emulator like pcsx-redux.
A brew installation script can be found here..
In a terminal, cd
to your psxdev setup directory and type make all
to build all examples in their respective directories.
Alternatively, you can use make example_name
to only build that example, i.e : make hello_poly
.
If you want to remove all the files generated by the compilation process, type make clean
.
Everything here was learnt from some more talented persons, mainly but not excluding others that hang around on the psxdev discord Nicolas Noble, Lameguy64, NDR008, Jaby smoll seamonstah, danhans42, rama, sickle, paul, squaresoft74, and lot mores !