Host-side CLI tools for the PS2BUILD SDK: bin2c, adpenc, ps2pack, ps2pkgconf.
- Go 80.7%
- C 18.2%
- Shell 0.7%
- Assembly 0.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
Build / build (push) Successful in 57s
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> |
||
| .forgejo | ||
| cmd | ||
| internal | ||
| licenses/tools | ||
| stub | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| README.md | ||
tools
Small host-side CLI utilities used by the PS2BUILD SDK's
build/install pipeline - ps2build resolves each of these from a
$PS2DEV/bin/tools/$PS2DEV/tools install, no PATH setup required.
| Tool | Purpose |
|---|---|
ps2symbolize |
Resolves addresses from a crash screen report to function names and offsets using an ELF's symbol table (use the unstripped ELF). |
bin2c |
Converts a binary file into a C header (byte array + size). Output format matches real upstream ps2sdk's own bin2c exactly, byte-for-byte. |
adpenc |
Converts a WAV file to PS2 ADPCM (.sad), with optional loop-point encoding. |
ps2pack |
Compresses a PS2 ELF for a self-decompressing loader stub, reporting the resulting compression ratio. |
ps2pkgconf |
A pkg-config-compatible resolver over ps2build's own package.yaml manifests - just enough of pkg-config's CLI surface for CMake's FindPkgConfig module to work against an installed SDK. |
dvp-as |
Assembles .vsm VU microcode sources into relocatable ELF objects, as a Go replacement for GNU binutils' dvp-as. Covers essentially all of .vu mode's real instruction vocabulary (verified against openvcl's own instruction table), byte-for-byte against every real .vsm in this workspace, including real openvcl-generated output. VIF/GIF/DMA sub-formats aren't started - see internal/dvpas's package docs for scope and verification. |
masp |
Expands macros, conditionals, repeats and includes in assembly source (the .macro, .aif, .arepeat and .include directives) before it goes to openvcl or an assembler, for example ps2gl's VU1 renderers. Output matches the original masp byte for byte on ps2gl's renderers. |
ps2client |
Talks to a PS2 running ps2link: sends commands (reset, execee, execiop, dumpmem, writemem, dumpreg, ...), serves the PS2's host: file requests from a directory, and prints its console output. CC0, written from the wire protocol rather than from the C ps2client (see cmd/ps2client/CLEANROOM.md). |
Development
go build ./cmd/...
go vet ./...
gofmt -l .
go test ./...
Each tool's own third-party Go dependency licenses are bundled at release
time under licenses/tools/ (see --help on any of the built binaries).
Credit
Based on the tools of ps2dev/ps2sdk. A huge thank you to the creators and maintainers over the years. None of this would be possible without their hard work and research.
Licensing
CC0 1.0 (see LICENSE)
masp is a clean-room reimplementation of the original GPL-2.0 masp: it was written from the documented behavior of GASP/MASP and from black-box comparison of their output, without reference to the original source.