Self-hosted service
alekmaul/pvsneslib avatar
alekmaul/pvsneslib

PVSnesLib packs a 65816 compiler, linker and game library into one kit

PVSnesLib : A small, open and free development kit for the Nintendo SNES

1,118 stars95 forksCMIT

At a glance

What is it?
PVSnesLib is a MIT licensed C and assembly toolkit for the Super Nintendo that ships its own compiler and linker, so you do not have to assemble a separate SDK first. The price is that you are expected to already know C and the SNES hardware.
Who is it for?
PVSnesLib fits a programmer who already writes C and wants to produce a real ROM without assembling a toolchain by hand, because the compiler, linker and library arrive together and the examples cover backgrounds, sprites, input and audio. It does not fit someone hoping to learn SNES programming as a first project, since the README states plainly that learning C and the hardware at once will slow you down.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 2 days ago.
What is it written in?
Mainly C, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.

Editorial analysis

The toolchain arrives inside the library, so there is no separate SDK to install

The most unusual thing about PVSnesLib is what it includes. The feature list names a C compiler, 816-tcc, and a linker, and states that no separate install is needed. For someone coming from a modern embedded toolchain, that is the whole pitch. A typical homebrew setup expects you to fetch a compiler, a linker, a set of headers and a library separately, then point environment variables at each one. Here those pieces ship in the same archive as the game code, and the environment surface reduces to a single variable.

The library layer itself covers the parts of the console a game touches. Backgrounds get tile and map loading and multiple BG modes, sprites get OAM management helpers for animation, input covers controller pads as well as mouse and superscope, and sound and music is handled through SPC700 audio driver integration. It is a mostly assembler-optimized library, and the README says it is usable directly from assembly if you would rather skip C entirely, which is the escape hatch for people writing tight loops that the C layer cannot express well.

There is also HiROM and FastROM support, which matters if your project outgrows the smaller memory maps. The library comes with full source, and the repository carries example projects that demonstrate the techniques, including a Mode 7 demo and a complete map and platformer engine example. Those two examples are the fastest way to see the intended structure of a real project.

One root Makefile builds the compiler, the tools, the library and the examples in order

The root Makefile is the entry point for building from source, and its dependency graph is worth reading because it explains the shape of the project. The default target is all, which depends on compiler, tools, pvsneslib and examples, and the documentation notes that those dependencies allow parallel builds with make -j. Each stage is a recursive call into a subdirectory, and the tools/ and compiler/ directories can be built in parallel with each other while pvsneslib waits for the compiler and examples waits for both.

The top-level Makefile also does platform detection before anything else. It maps Windows_NT to windows, a MINGW64_NT uname to mingw, Darwin to darwin, Linux to linux and FreeBSD to freebsd, and it errors out with Unsupported operating system for anything else. That check is why the README tells Windows users to work inside a unix-like environment such as msys2: the Makefile understands mingw, but the surrounding shell has to be a unix-like one.

A separate release target exists for producing the packaged archives, and it has a hard dependency. If doxygen is not installed, the build stops with the error "doxygen is not installed but is mandatory to create the release version." The API documentation that the README links to is therefore generated from source during a release, which is why the published docs and the published package are produced together rather than drifting apart.

PVSNESLIB_HOME is the single environment variable between you and a build

The quickstart is short because the setup is short. Download the archive for your platform from the latest release page, unzip it, and set the environment variable the toolchain expects.

bash
export PVSNESLIB_HOME="/path/to/pvsneslib"

Adjust the path to wherever you unzipped the archive. That single variable is what the build and the Makefile-based project templates look for, and it is the piece most likely to go wrong on a first attempt, because a wrong path shows up as a failed toolchain lookup rather than as a helpful message. Setting it in your shell profile is what the quickstart implies, since every build you do afterwards reads it.

From a source checkout, the build itself is the same make invocation that the Makefile's all target defines:

bash
make

On success the Makefile echoes a build finished message. What you should end up with is a compiler binary, the helper tools, the library objects and the example projects built in dependency order. If you would rather not deal with host dependencies at all, the repository carries a docker/ folder with a ready-to-use image and its own build instructions, which is the path to take when the prebuilt archive does not work on your setup.

Prebuilt archives are published for Windows, Linux and macOS, and the feature list describes the platform support the same way. The release downloads are versioned archives, for example pvsneslib_460_64b_linux_release.zip for release 4.6.0.

The library is mostly assembly, and that is the point

A design decision inside the library is worth calling out, because it explains both the performance and the learning curve. The README describes PVSnesLib as a mostly assembler-optimized library that is just as usable directly from assembly. The C API is a layer, not the only door.

For a game console where every frame budget counts, that matters. A call into optimized assembly for sprite OAM handling or tile loading is not a micro-optimization exercise, it is the difference between a routine that fits in a frame and one that does not. The bundled C compiler, 816-tcc, targets the 65816 directly, and the README notes that you can write your whole game in C, drop into assembly where you need the speed, or skip C altogether.

The practical consequence for a reader is that the library is not only an API. It is also a reference implementation of how the hardware is driven, and the full source is shipped. If you want to know how a background mode is set up, or how the SPC700 audio driver is fed, the answers are in the tree rather than in a black box.

The other side of the same coin is the skill requirement. The README states that PVSnesLib assumes you are already comfortable with C, and that trying to learn C and SNES programming at the same time will slow you down a lot. A solid grasp of the SNES hardware is described as going a long way too, and the project points readers at the SFC Development Wiki, the SNESdev Wiki and the Super NES Programming wikibook as background reading.

The wiki, not the README, owns flashing to real hardware

There is a deliberate gap in the documentation, and the README is upfront about it. The quickstart ends with a Hello World tutorial, and the full walkthrough for Makefile setup, folder layout and flashing to real hardware is delegated to the project Wiki. If you want to know how a project's Makefile should look or how the ROM ends up on a cartridge or flash cart, the repository README is not where you will find it.

That is a reasonable division, since a wiki can be updated without a release, and it does mean the adoption path has two steps. The release gives you a compiler, a linker and a library. The wiki gives you the project structure and the deployment path.

The examples in snes-examples/ are the bridge between the two. A Mode 7 demo shows the scrolling background technique, and the map and platformer engine example shows a larger project with the pieces arranged the way a real game needs them. The Makefile treats the examples as a first-class target: examples depends on pvsneslib and tools, then runs make install into that directory, so building them is part of the normal build rather than a separate chore.

Editor support is also shipped, in the form of a Visual Studio Code template in the vscode-template folder that sets up syntax highlighting, build tasks and debugging. That is a convenience layer over the same toolchain, useful if you plan to work in VS Code and unhelpful if you do not.

Where PVSnesLib sits against the SDK it grew out of

PVSnesLib started in 2012 for the SNES twentieth anniversary, building on Ulrich Hecht's earlier SNES SDK, which was hosted on Google Code. That lineage explains the shape of the project: That earlier SDK provided the foundation, and PVSnesLib extends it with a game-level library, examples and a packaged release for each platform.

The difference in approach is the layer that sits between you and the processor. A bare SDK gives you a compiler, a linker and the memory map, and leaves you to write the graphics, input and audio routines yourself. PVSnesLib keeps the same kind of low-level foundation and adds the routines most projects would write anyway, in assembly, with a C interface on top and examples that show the intended usage.

That is the honest comparison, and it cuts both ways. If you are building something with unusual hardware requirements, the library layer may not match your needs and you will end up reading assembly anyway, in which case the underlying toolchain is what you are really using. If you want to get a game running, the library removes a large amount of repetitive setup.

Licensing is straightforward. PVSnesLib and its affiliated tools are distributed under the MIT licence, and the licence text is kept in the repository as pvsneslib_license. That permits use, modification and redistribution in commercial work, with the notice travelling alongside the code. This is a licensing fact rather than legal advice, but for a game you intend to sell, MIT terms mean the toolchain does not restrict what you do with the result.

Releases every few months, and a project that still ships example code

The release record shows a project with a steady but unhurried cadence. Version 4.4.0 was published on 2025-03-08, 4.5.0 on 2025-12-28 and 4.6.0 on 2026-07-28. The repository is not archived, the default branch is master, and the last push was on 2026-10-02, so commits are landing between releases rather than only at tag time.

What you get in a release archive is a working toolchain, so the upgrade cost is mostly disk space and the small risk that a library change affects existing code. Since the library ships as full source and the API documentation is generated from it, you can diff the two versions yourself and see what moved. A project built against 4.5.0 and then rebuilt against 4.6.0 is the practical way to find out whether the change was cosmetic.

The example projects are part of that upgrade surface. Because snes-examples/ is built by the root Makefile, a source build exercises the examples too, which makes them a rough regression check on your toolchain before you start your own game. If the examples still build after an upgrade, the compiler and linker are in reasonable shape, and if they do not, you have found out before you have written a thousand lines against a broken baseline.

Editorial conclusion

PVSnesLib fits a programmer who already writes C and wants to produce a real ROM without assembling a toolchain by hand, because the compiler, linker and library arrive together and the examples cover backgrounds, sprites, input and audio. It does not fit someone hoping to learn SNES programming as a first project, since the README states plainly that learning C and the hardware at once will slow you down. Before starting, set PVSNESLIB_HOME to the unzipped release, run make at the repository root to build the compiler, tools, library and examples in that order, and confirm the machine you use has the unix-like environment the Makefile expects.

Frequently asked questions

How do I install PVSnesLib and set it up?

Download the prebuilt archive for Windows, Linux or macOS from the latest release page, unzip it, and export PVSNESLIB_HOME pointing at the unzipped folder. The rest of the setup, including Makefile layout and flashing to hardware, is documented in the project wiki.

Do I need to install a separate compiler or SDK for PVSnesLib?

No. The kit bundles a C compiler, 816-tcc, and a linker, and the feature list states that no separate install is needed. If you would rather build from source, the root Makefile builds the compiler, the tools, the library and the examples in dependency order.

Can I write a PVSnesLib game in assembly instead of C?

Yes. The library is described as mostly assembler-optimized and is just as usable directly from assembly. The README frames it as a choice between writing the whole game in C, dropping into assembly for speed, or skipping C entirely.

Does PVSnesLib build on Windows?

Windows is supported and there is a prebuilt Windows release, but the README says you need a unix-like environment such as msys2. The root Makefile detects Windows_NT and MINGW64_NT and errors out with Unsupported operating system on anything else.

What licence is PVSnesLib under and can I use it for a commercial game?

PVSnesLib and its affiliated tools are distributed under the MIT licence, with the text kept in the repository as pvsneslib_license. MIT terms allow commercial use and modification as long as the notice and licence text are kept with the code.

Official sources

  1. alekmaul/pvsneslib on GitHub
  2. Issues
  3. License: MIT
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/alekmaul-pvsneslib.svg)](https://hysenlabs.com/projects/alekmaul-pvsneslib)

Was this useful?