Skip to content
ChrisRxPublic

About

psxsdk is a collection of tools and libraries for Playstation 1 development

Topics

Resources

Contributing

Stars

50 stars

Watchers

4 watching

Forks

Repository files navigation

psxsdk

PkgGoDev Build/Test Pages

The Net Yaroze was Sony's 1990s kit for making PlayStation games at home. psxsdk is a Go toolchain for it: write programs in Go, build them onto discs that boot anywhere, and run them in an emulator, in the browser or on the desktop.

Terra Incognita Dog Tale Tunnel

  • Play the examples in your browser: Sony's Net Yaroze demos and members' games ported to Go, and a few new ones.
  • Write your own in the playground, or with nothing but Go installed: go run go.chrisrx.dev/psx/cmd/yaroze@latest disc ./mygame. The tutorial starts from nothing.
  • Read Sony's manuals, with the FAQs, supplements and tutorial the members' websites carried.

What it does

  • Write PlayStation programs in Go, compiled with TinyGo against bindings for the Net Yaroze library that keep Sony's names.
  • Make their data with converters from PNG, WAV, MIDI and OBJ to the console's TIM, VAG, VAB, SEQ and TMD, each tested against what Sony's own tools made.
  • Build them into discs that boot without Net Yaroze hardware, with streamed XA/STR files and CD audio tracks.
  • Run them in an emulator written in Go, which drives the tests headless, runs in a browser and opens a window on the desktop.

Why

A Net Yaroze program never had a disc of its own: the boot disc loaded the library, and the program came over a serial cable from a PC, so showing a game to anyone meant bringing the whole kit. The members' websites are gone, and the SDK is a set of binaries built for MS-DOS and Windows 95. psxsdk exists so that anyone can still write, build and play these programs, with modern tools, on a disc of their own. The history tells the rest.

Building from source

With Go 1.27 or newer:

git clone https://github.com/ChrisRx/psxsdk
cd psxsdk
go build -o bin/ ./cmd/... ./tools/...
go test ./...

The examples are built with yaroze, which carries its own compiler, TinyGo compiled to WebAssembly, so no tinygo command is needed. The Nix flake provides what working on the repository itself takes: the TinyGo with the PlayStation targets that compiler is built from, the cross binutils, go-task, mednafen and a patched psxe:

nix develop            # or: direnv allow
task build:discs       # every example onto .build/NAME/NAME.cue
task test:emu          # boot each disc in the emulator and compare screenshots
task serve             # build the site and the playground, and serve them on localhost:8000

Getting started has more, and the packages map the module.

Layout

Directory What is there
yaroze, disc, archive, scene What a program imports: the Net Yaroze library, its files on the disc, archives and scenes
cmd yaroze, which builds a program onto a disc in one step, with its compiler built in
tools The converters, the disc and executable tools, and the emulator's front ends, each documented
link, format Executables, discs and the console's file formats
emu The emulator, with emu/emutest for driving it from tests
examples The examples, one directory each, with the data they load
docs, web The documentation, Sony's manuals, the playground, and the site's generator

Contributing

Contributions are welcome. CONTRIBUTING.md has the details.

AI usage

AI was used for substantial portions of this project and you are free to use AI tools to help with your changes, and those changes are as welcome as any other. What matters is the change, not how it was made.

The one rule: no Co-Authored-By lines, or any other attribution, naming an AI in commits or pull requests. An AI cannot author anything. The person who submits a change is its author and is accountable for it, which means understanding it, having tested it, and being able to answer for it in review. Pull requests carrying AI attribution will be asked to remove it before they are merged.

License

MIT. Four parts carry their own notices:

Projects this one was informed by are listed in CREDITS.

About

psxsdk is a collection of tools and libraries for Playstation 1 development

Topics

Resources

Contributing

Stars

50 stars

Watchers

4 watching

Forks

Used by

Contributors

Languages