Host-side CLI tools for the PS2BUILD SDK: bin2c, adpenc, ps2pack, ps2pkgconf.
  • Go 80.7%
  • C 18.2%
  • Shell 0.7%
  • Assembly 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
techwritescode ff202c2ef4
All checks were successful
Build / build (push) Successful in 57s
Add ps2symbolize: resolve crash screen addresses from an ELF
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-15 09:08:32 -05:00
.forgejo release.yml: build darwin/arm64 in the regular matrix, drop build-macos 2026-09-29 18:42:25 -05:00
cmd Add ps2symbolize: resolve crash screen addresses from an ELF 2026-10-15 09:08:32 -05:00
internal dvp-as: accept hex bit patterns for loi and negative load/store offsets 2026-10-06 03:03:10 +00:00
licenses/tools Switch to go-licenses; commit licenses/ into the repo 2026-09-08 14:50:56 -05:00
stub ps2pack stub: pass the launch arguments to the payload 2026-09-29 17:53:54 -05:00
.gitignore Ignore stub/build and stub/.cache 2026-09-07 20:04:45 -05:00
go.mod Move to new package setup 2026-09-05 13:33:47 -05:00
go.sum Bundle real third-party Go dependency licenses with every release 2026-09-08 14:33:32 -05:00
LICENSE Add bin2c replacement 2026-08-25 12:59:50 -05:00
README.md Add ps2symbolize: resolve crash screen addresses from an ELF 2026-10-15 09:08:32 -05:00

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.