mirror of
https://github.com/Ed94/pikuma_ps1.git
synced 2026-08-27 19:40:35 +00:00
748b58c5c5b41a12d55da2de5fafdfcd58c466ea
Need to rewrite the ps1 lua metaprogram sometime soonish. Getting too bloated... need to consolidate code paths. In this push codebase structure is starting to get a bit more realized. Decided todo now to match Pikuma's linking module files vods beginning to reorganize its codebase as well. Atoms & atom components are not in their on *.atom.c files. (Not calling it tape.c as I don't really bake tapes like that outside of the unity c file so far...) The lua metaprogram has had additional features added to it yet again to avoid hardcoding module handling and supporting multiple atom files per-module. Either after the camera or cd-rom section I'll be most likely pausing to fully refactor the metaprogram. Possibly as a full re-write to get the loc minimal.
Pikuma PS1
A rest from the usual.
Dependencies
I will be programming from a Windows 11 machine (may eventually try this on the Steam Deck...):
- Supports doing bare-metal assembly for the ps1
scoop install armipsor just clone and build..- Was used early in the course. Now I just use an macro asm dsl in C11.
scoop install luajit
- Used for lua scripts
- Particularly, ps1_meta.lua which is a staged metaprogram pass for the custom C11 Assembly DSL used in this codebase.
- Lua is slow (even jitted) so this helps.
- Native directory enumeration +
mkdirfor the build scripts. - Used by
passes/word_count_eval.lua :: scan_dir(native walk vs.dir /b /ssubprocess, ~2ms vs. ~56ms) and byduffle.lua :: ensure_dir+to_absolute_path(avoidscmd.exe mkdir+cdshell spawns, ~50ms each).
pscx-redux: A collection of tools, research, hardware design, and libraries aiming at development and reverse engineering on the PlayStation 1.
- Used as the runtime sandbox emulated the ps1
- Has hookups to behaving as a gdb server which can be utilized with the gdb client in vscode.
- Supports symbolic info emitted by armips
- pysq library has been sucessfully adjusted for modern compiler usage (see:
src/)
MIPS Toolchain (from pscx-redux)
- Used for building ps1 programs for the C runtime provided by the psyq/o SDK
- Readonly mirror of pcsx-redux's
src/mipsdirectory. - Not necessary if the pcsx-redux repo is cloned
PSX Psy-Q SDK (supplied by psx.arthus.net)
- Original official SDK
- Modernized using obj parser to extract info for GNU toolchain usage.
- Can either grab from arthus psyq-4.7-converted-full.7z or psyq-4_7-converted-light.zip
- The light version omits the link modules (object files), just keeps the static archives.
- Can be utilized effectively with the includes below
- Fixes psyq headers to include what they use, so changing the include order in your project doesn't break compiling.
- Needed if you want to link and utilize the psyq C SDK
Other toolchains (not used here)
Gallery
Win 11 machine:
Still haven't gotten around to trying this on linux...
Languages
Lua
52.3%
C
41.9%
Assembly
3.4%
PowerShell
2.1%
GDB
0.2%







