THIS CODE IS A MESS. It's a school project finished on the last minute and I don't give any warranty with it. This code is to be rewritten on top of psyqo and this is pretty much a public archive. A better engine is comming. This is a proof of concept.
A game engine for the PSX based on spicyjpeg's bare metal tutorials The toolchain, cmake and basic header files are taken from his project and will be built upon. They are and will be developed under the MIT license
git clone --recursive https://github.com/pslib-cz/MP2023-24_Racek-Jan_Herni-engine-pro-PlayStation-
It's important to clone recursively on Linux due to mkpsxiso and it's submodules. You don't need to clone recursively on Windows as you will be required to download mkpsxiso by yourself as seen further below.
You're going to need the mips-none-elf gcc toolchain, Cmake>=3.25, Python>=3.10 and Ninja
You can install the toolchain from the pcsx-redux project
powershell -c "& { iwr -UseBasicParsing https://raw.githubusercontent.com/grumpycoders/pcsx-redux/main/mips.ps1 | iex }"
A reboot might be needed
mips install 13.2.0
You can spawn it from source using this compile script by pcsx-redux
chmod +x spawn-compiler.sh
sudo ./spawn-compiler.sh
py -m pip install -r tools/requirements.txt # Windows
pip3 install -r tools/requirements.txt # Linux/macOS
If you're on Windows you will need to download mkpsxiso and ensure it's in your PATH
This projects builds its own mkpsxiso from source on Linux
cmake --preset debug
cmake --build ./build
game.cue and game.bin will be found in the build directory
You're gonna need psxfudge make sure to use the refactor branch. If you get audio resampler errors while using it, use my fork instead. Fudgebundle is pretty easy to use. Just read its documentation
SPRITESHEETS AND OTHER HANDY-DANDY FEATURES OF FUDGEBUNDLE ARE NOT SUPPORTED BY THIS ENGINE
Once you create your bundle you need to put it into assets and tell mkpsxiso (which is called by cmake) to bundle it in in iso.xml in the root of the project.
If you want to see the source JSONs for the Tetris clone bundles they can be found in assets/tetrisfudge
Now go read game/main.cpp and game/scenes/MainMenu.cpp where the coding of the engine is explained.
If you want to use the 3D capabilties go check out game/scenes/Test3D.cpp You can convert .obj files to .bwm files which this engine uses using this tool
This engine contains a lot of PSn00b code. If the original creators of that code want this taken down, please contact me and I will...
Thanks to spicyjpeg who is the author of the register header files, the cmake files, the compiler configuration and who's been extemely helpful with debugging some complex issues
More thanks goes to Nicolas Noble who's intelligence is beyond my comprehension keeps wasting his time to help me solve trivial issues. <3