Collection of PsyQ basic examples NOT using libgs
Go to file
2021-11-01 18:53:45 +01:00
.github/workflows Update windows-build.yml 2021-11-01 18:53:45 +01:00
hello_2pads Remove empty lines, useless global initialization 2021-07-26 18:00:40 +02:00
hello_bs Update credits 2021-07-25 17:39:20 +02:00
hello_cd Update credits 2021-07-25 17:39:20 +02:00
hello_cdda Fix bad spu config 2021-08-30 16:53:02 +02:00
hello_cube Fix bad includes 2021-11-01 15:59:59 +01:00
hello_cubetex Use rounded values 2021-07-25 17:49:46 +02:00
hello_cubetex_stp Add missing cubetex 2021-11-01 16:51:37 +01:00
hello_font Add readme 2021-10-29 14:43:10 +02:00
hello_gte_opti Update credits 2021-07-25 17:39:20 +02:00
hello_light Fix bad includes 2021-11-01 15:59:59 +01:00
hello_mod Update readmes 2021-11-01 12:05:14 +01:00
hello_multi_vag Remove useless addition for spu_malloc_rec size 2021-09-17 23:20:29 +02:00
hello_multi_xa Correct ffmpeg cmd 2021-08-14 11:31:15 +02:00
hello_ovl_exec Update readmes 2021-11-01 12:05:14 +01:00
hello_pad Remove empty lines, useless global initialization 2021-07-26 18:00:40 +02:00
hello_poly Remove empty lines, useless global initialization 2021-07-26 18:00:40 +02:00
hello_poly_ft Remove empty lines, useless global initialization 2021-07-26 18:00:40 +02:00
hello_poly_fun Remove ptr arithmetic 2021-08-04 17:53:55 +02:00
hello_poly_gt Remove empty lines, useless global initialization 2021-07-26 18:00:40 +02:00
hello_poly_gt_tw Remove empty lines, useless global initialization 2021-07-26 18:00:40 +02:00
hello_poly_inline Remove empty lines, useless global initialization 2021-07-26 18:00:40 +02:00
hello_poly_stp Links to wiki 2021-10-29 14:57:33 +02:00
hello_sio Remove empty lines, useless global initialization 2021-07-26 18:00:40 +02:00
hello_sprt Update url 2021-10-25 18:09:33 +02:00
hello_str Fix buffer pointers 2021-07-23 20:07:53 +02:00
hello_strplay Remove unused init stuff 2021-09-13 19:01:58 +02:00
hello_tile Correct line numbers, remove ptr arithmetic 2021-08-04 17:47:03 +02:00
hello_vag Derpy derp derp 2021-09-18 11:10:38 +02:00
hello_world Remove empty lines, useless global initialization 2021-07-26 18:00:40 +02:00
hello_xa New multi VAG example 2021-08-14 16:56:32 +02:00
includes Move to better file structure 2021-07-10 13:36:57 +02:00
thirdparty Update nugget gitlink 2021-11-01 11:35:29 +01:00
TIM Link to wiki 2021-08-14 17:00:46 +02:00
VAG Add vag sample files 2021-08-14 16:58:55 +02:00
.gitmodules Move to better file structure 2021-07-10 13:36:57 +02:00
common.mk Add Hello_mod example 2021-10-28 20:29:05 +02:00
LICENSE Initial commit 2020-12-21 17:26:40 +01:00
Makefile Update makefile, add overlay example 2021-10-30 12:22:04 +02:00
README.md Update Win install instructions 2021-11-01 15:10:12 +01:00

Nolibgs Hello Worlds !

3D power ! 3D power ! 3D power !

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 !

Installation

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.

Windows

MIPS toolchain setup

  1. Download the MIPS toolchain here : https://static.grumpycoder.net/pixel/mips/g++-mipsel-none-elf-10.3.0.zip
  2. Extract the archive's content in C:\g++-mipsel-none-elf-10.3.0 and add the C:\g++-mipsel-none-elf-10.3.0\bin folder to your $PATH.
  3. Test everything is fine by launching a command prompt and typing mipsel-none-elf-gcc.exe --version. If you get a message like mipsel-none-gnu-gcc (GCC) 10.3.0, then it's working !

Nugget + PsyQ setup

  1. Download the PsyQ converted libraries here : http://psx.arthus.net/sdk/Psy-Q/psyq-4.7-converted-full.7z
  2. Clone the 'nolibgs_hello_worlds' repo with
    git clone https://github.com/ABelliqueux/nolibgs_hello_worlds.git --recursive
    or download this repository's release and extract nolibgs_hello_worlds.zip's content to C:\no_libgs_hello_worlds\ .
  3. Extract the content of 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  
  1. Test everything is working by launching a command prompt, change to the C:\no_libgs_hello_worlds\ directory with the following command: cd C:\no_libgs_hello_worlds\, then type make and hit enter.
    By default, this should build the 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.

Linux

Install your distribution's MIPS toolchain

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

Nugget + PsyQ setup

Let's do it all on the CLI !

  1. Install the git client :
sudo apt-get install git
  1. Clone this repository :
git clone https://github.com/ABelliqueux/nolibgs_hello_worlds.git --recursive
  1. Change to the repo's directory and get the PsyQ converted libraries:
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
  1. Try your setup :
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.

MacOS

A brew installation script can be found here..

Compilation

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.

Upcoming examples

  • hello_poly_subdiv (polygon subdivision)
  • hello_rsd (rsd format)

Links and Doc

Credits, thanks, hugs

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 !