Skip to content

Releases

superdevkit 0.10.1

Choose a tag to compare

@github-actions github-actions released this 27 Nov 12:44
3062d79

This is still an alpha release. It works for me, that doesn't necessarily mean it works for you at the moment. Sorry 😔.

superdevkit is a development kit for SNES games written in C. You write a game once, and it builds as a ROM for the Super Nintendo, a program for Linux and Windows, and a page for the browser. It comes with dampf, its own C compiler for the SNES's 65816 CPU.

Play the example games in your browser · Read the book

Download

Your system File
Windows (x64) superdevkit-0.10.1-windows-x64.zip
Linux or WSL (x64) superdevkit-0.10.1-linux-x64.zip

Each zip brings its own Java, so you don't need to install one.

Your first ROM

On Windows, in PowerShell, in the folder with the zip:

Expand-Archive superdevkit-0.10.1-windows-x64.zip .
$env:Path = "$PWD\superdevkit-0.10.1\bin;$env:Path"
superdevkit init mygame
cd mygame
superdevkit build snes

On Linux or WSL:

unzip superdevkit-0.10.1-linux-x64.zip
export PATH="$PWD/superdevkit-0.10.1/bin:$PATH"
superdevkit init mygame
cd mygame
superdevkit build snes

The ROM is build/snes/mygame.sfc. Getting started goes on from there.

What each target needs

Target Command You need
SNES superdevkit build snes nothing else (an emulator such as MesenCE to play the ROM)
Windows superdevkit build win64 Visual Studio with "Desktop development with C++"
Linux superdevkit build linux a C compiler and the OpenGL and X11 development libraries
Web superdevkit build web the Emscripten SDK, with emcc on the PATH

New in 0.10.1

The desktop and the web now draw every picture mode a game is likely to use. On the SNES nothing
changes: dampf, the code it generates and the kit's SNES library are the same as in 0.10.0, and
games written for 0.10.0 build and run as before.

Picture modes on the desktop and the web

Rachael, the kit's PPU for the desktop and the web, draws more of what the SNES can show. Each
is the same as in Mesen, pixel for pixel:

  • modes 0, 2, 3 and 4, with offsets per tile in modes 2 and 4 (a scroll for each column of tiles);
  • 256-colour tiles for BG1 in modes 3 and 4, and direct colour;
  • mosaic, on every layer;
  • mode 7's second layer (EXTBG);
  • VMAIN's address remapping, and VRAM, CGRAM and OAM read back by DMA (SDEVKIT_DMA_FROM_PPU).

Until now, the desktop's check failed on these. It still fails on modes 5 and 6, on the high
resolution, overscan and interlace of SETINI, and on HDMA with indirect tables. They wait for a
game that needs them.

The console API

sdevkit/snes.h has the names for them: SDEVKIT_BG_MODE0, _MODE2, _MODE3 and _MODE4,
SDEVKIT_OPT_BG1, _BG2 and _VERTICAL for offsets per tile, SDEVKIT_MOSAIC(),
SDEVKIT_VMAIN_REMAP_2BPP, _4BPP and _8BPP, and SDEVKIT_SETINI_EXTBG.

256-colour pictures

superdevkit png tiles8 converts a PNG into tiles of 8 bits a pixel (64 bytes a tile) and a
palette of 256 colours, and tiles8 is a new key in superdevkit.toml's [graphics].

A new example

examples/modes shows each of the modes, one screen each. Like the other examples, it can be
played in the browser.

Known limits

  • Music plays on the desktop and the web, but not yet on the SNES. Sound effects and save RAM work there.
  • The kit has been tested in emulators, not on a real SNES.
  • The C subset, the command line and the files dampf writes may change before 1.0.
  • The games on the website need a keyboard.

Licences

superdevkit is under the Apache License 2.0 with LLVM Exceptions. The zips include an unmodified OpenJDK runtime (Eclipse Temurin 25.0.5+8, GPL v2 with the Classpath Exception, source) and raylib 5.5 (zlib licence). NOTICE in each zip has the details.

superdevkit is an independent project, not affiliated with or endorsed by Nintendo.

Full changelog: v0.10.0...v0.10.1

superdevkit 0.10.0

Choose a tag to compare

@github-actions github-actions released this 26 Nov 18:40
f7974ad

This is still an alpha release. It works for me, that doesn't necessarily mean it works for you at the moment. Sorry 😔.

superdevkit is a development kit for SNES games written in C. You write a game once, and it builds as a ROM for the Super Nintendo, a program for Linux and Windows, and a page for the browser. It comes with dampf, its own C compiler for the SNES's 65816 CPU.

Play the example games in your browser · Read the book

Download

Your system File
Windows (x64) superdevkit-0.10.0-windows-x64.zip
Linux or WSL (x64) superdevkit-0.10.0-linux-x64.zip

Each zip brings its own Java, so you don't need to install one.

Your first ROM

On Windows, in PowerShell, in the folder with the zip:

Expand-Archive superdevkit-0.10.0-windows-x64.zip .
$env:Path = "$PWD\superdevkit-0.10.0\bin;$env:Path"
superdevkit init mygame
cd mygame
superdevkit build snes

On Linux or WSL:

unzip superdevkit-0.10.0-linux-x64.zip
export PATH="$PWD/superdevkit-0.10.0/bin:$PATH"
superdevkit init mygame
cd mygame
superdevkit build snes

The ROM is build/snes/mygame.sfc. Getting started goes on from there.

What each target needs

Target Command You need
SNES superdevkit build snes nothing else (an emulator such as MesenCE to play the ROM)
Windows superdevkit build win64 Visual Studio with "Desktop development with C++"
Linux superdevkit build linux a C compiler and the OpenGL and X11 development libraries
Web superdevkit build web the Emscripten SDK, with emcc on the PATH

New in 0.10.0

This release concludes milestone M10. A game can now run C code in interrupts, dampf links
hand-written assembly into optimized code, and the console API is new. Games written for 0.9
need changes
: see What a game written for 0.9 must change.

The console API

  • The core, sdevkit/snes.h, is the hardware at once. Every PPU register is written with
    sdevkit_reg_write and sdevkit_reg_write_twice, which dampf turns into one store each.
    Copies into VRAM, CGRAM and OAM go by DMA (sdevkit_dma, sdevkit_vram_copy,
    sdevkit_cgram_copy, sdevkit_oam_copy and others), and HDMA has sdevkit_hdma_set and
    sdevkit_hdma_enable. Macros build the registers' values (SDEVKIT_BGSC, SDEVKIT_OBSEL,
    SDEVKIT_OAM_ATTR, ...).
  • The kit writes nothing in the vertical blank by itself. The main loop no longer copies the
    sprite table, so the whole vertical blank belongs to game_vblank.
  • Optional layers sit above the core, and a game pays only for the ones it calls:
    sdevkit/shadow.h (the registers in memory), sdevkit/sprites.h (a sprite list),
    sdevkit/queue.h (copies queued in the tick, with a budget), sdevkit/input.h (the buttons
    pressed since the last tick), and sdevkit/easy.h, which brings all of them and one
    sdevkit_commit() for game_vblank.
  • dampf leaves out the functions a program never reaches, so the layers a game does not use cost
    it nothing. The examples' code got 4 to 48 % smaller.
  • The desktop check fails on a PPU register or an HDMA channel written while the picture is
    drawn, as it already did for bytes written to VRAM, CGRAM or OAM then. Switching the screen
    off is allowed at any time.

The book's console API reference
lists every call with its cost in cycles.

Interrupts

  • The game's IRQ (sdevkit/irq.h). The game defines
    DAMPF_INTERRUPT(irq) void game_irq(void) and calls sdevkit_irq_line(row). The handler then
    runs before that row of the picture, on the SNES and on the desktop and the web. It reads its
    data, calls sdevkit_irq_wait_hblank(), and has about 25 CPU cycles for its register writes,
    enough for a scroll split. The desktop check fails on a write before the wait. The handler can
    set the next row itself, for several splits a frame.
  • Data for interrupt code (sdevkit/publish.h). SDEVKIT_PUBLISH(type, name, tick, vblank)
    declares one struct the tick writes and defines game_tick and game_vblank, which call the
    game's own tick and vblank and copy the struct after the tick. Interrupt code reads
    it through SDEVKIT_PUBLISHED(name) and always gets the data of the tick the picture on the
    screen was made from, whole. The copy costs about 10.5 CPU cycles per byte and tick.
  • The kit's NMI. A game that publishes gets its vblank function run in every vertical
    blank by the kit's NMI, also while a tick takes longer than a frame. A game that does not
    publish keeps game_vblank in the loop, as before.
  • C in interrupt handlers. DAMPF_INTERRUPT(irq) gives a handler frames and a direct page
    of its own, so it never overwrites the locals of the code it interrupted; the kit's NMI is
    built the same way. A function that both the main code and a handler call is compiled once for each.
    Interrupt code multiplies in software, since the CPU's multiplier cannot be saved. The timing
    report has a line for each handler.

dampf

  • Hand-written assembly with the optimizing code generator: DAMPF_ASM("file.s") after a C
    function's parameter list links the assembly in place of the compiled body. dampf reads the
    assembly for its cycles and its safety checks, and checks it against the C body in every
    build. --replace fn=file.s does the same from the command line. Interrupt code cannot call
    an assembly function yet.
  • switch as a jump table where that costs fewer cycles than the compares: from 4 to 7
    cases, depending on the range check.
  • A constant on an index goes into the address (a[i + 1] is sta a+1,x): the examples
    do 0.7 % less work.
  • Warnings where gcc warns by default, starting with -Woverflow: a constant that does not
    fit the type it initialises or is assigned to (uint8_t w[] = { 420 }). Warnings do not stop
    the build.
  • --lib FILE-OR-FOLDER names a library's sources. They are compiled into the program, but
    the -D defines do not reach them. superdevkit build snes passes the kit's lib/snes this
    way.

What a game written for 0.9 must change

  • The console API. The PVSnesLib-style calls are gone: sdevkit_set_mode,
    sdevkit_bg_set_scroll, sdevkit_oam_set, sdevkit_dma_copy_vram and the rest. Write the
    registers with sdevkit_reg_write, copy with the core's copies (the destination comes first
    now: sdevkit_vram_copy(address, source, bytes)), or move to the layers. A game that relied
    on the loop copying its sprite table copies it in game_vblank (sdevkit_oam_copy), or uses
    sdevkit/sprites.h. The rename script tools/sdevkit_rename.py is gone, since its target
    names are gone. The seven examples show both ways: Mode 7, Mandelbrot, Steinschlag and Er-Tüp
    use the core, Hello, Schach and CatchMe the layers.
  • Plain char is for text only. A char can be copied, tested for zero, compared with ==
    and != against another char or a constant from 0 to 127, and converted to another 8-bit
    type. Arithmetic, ordering, shifts and widening a char are errors now, since their result
    depends on whether char is signed. The message says what to write instead; usually that is
    uint8_t, or a cast (uint8_t)c first ((uint8_t)c - '0' for a digit).
  • An enum object takes only values of its enum: its enumerators, or another value of the
    same enum type. ++, -- and compound assignment on it are errors, and so is a cast to the
    enum from anything else. In return dampf stores it in the smallest width that holds its
    values, usually one byte.
  • Defines in superdevkit.toml no longer reach the kit's library on the SNES, as on the
    desktop and the web. A game that set a define for lib/snes cannot do that any more.

What the files dampf writes add

  • Labels for the copies of a function per interrupt context, such as __irq_clamp, in the
    assembly, the timing report and Mesen's debug file.
  • The timing report's lines dampf_irq and dampf_nmi, the entry code and the handler's cycles.
  • The desktop and web builds generate game_interrupts.c, which tells Rachael whether the game
    has an IRQ handler or the kit's NMI.
  • Functions a program never reaches are no longer in the ROM, the listing or the timing report.

Known limits

  • Music plays on the desktop and the web, but not yet on the SNES. Sound effects and save RAM work there.
  • The kit has been tested in emulators, not on a real SNES.
  • The C subset, the command line and the files dampf writes may change before 1.0.
  • The games on the website need a keyboard.

Licences

superdevkit is under the Apache License 2.0 with LLVM Exceptions. The zips include an unmodified OpenJDK runtime (Eclipse Temurin 25.0.5+8, GPL v2 with the Classpath Exception, source) and raylib 5.5 (zlib licence). NOTICE in each zip has the details.

superdevkit is an independent project, not affiliated with or endorsed by Nintendo.

Full changelog: v0.9.2...v0.10.0

superdevkit 0.9.2

Choose a tag to compare

@github-actions github-actions released this 24 Nov 00:01
01fd043

This is still an alpha release. It works for me, that doesn't necessarily mean it works for you at the moment. Sorry 😔.

superdevkit is a development kit for SNES games written in C. You write a game once, and it builds as a ROM for the Super Nintendo, a program for Linux and Windows, and a page for the browser. It comes with dampf, its own C compiler for the SNES's 65816 CPU.

Play the example games in your browser · Read the book

Download

Your system File
Windows (x64) superdevkit-0.9.2-windows-x64.zip
Linux or WSL (x64) superdevkit-0.9.2-linux-x64.zip

Each zip brings its own Java, so you don't need to install one.

Your first ROM

On Windows, in PowerShell, in the folder with the zip:

Expand-Archive superdevkit-0.9.2-windows-x64.zip .
$env:Path = "$PWD\superdevkit-0.9.2\bin;$env:Path"
superdevkit init mygame
cd mygame
superdevkit build snes

On Linux or WSL:

unzip superdevkit-0.9.2-linux-x64.zip
export PATH="$PWD/superdevkit-0.9.2/bin:$PATH"
superdevkit init mygame
cd mygame
superdevkit build snes

The ROM is build/snes/mygame.sfc. Getting started goes on from there.

What each target needs

Target Command You need
SNES superdevkit build snes nothing else (an emulator such as MesenCE to play the ROM)
Windows superdevkit build win64 Visual Studio with "Desktop development with C++"
Linux superdevkit build linux a C compiler and the OpenGL and X11 development libraries
Web superdevkit build web the Emscripten SDK, with emcc on the PATH

New in 0.9.2

A small maintenance release: the website is set up for Google Search, so the book and the games can be found there. The kit works as it did in 0.9.1, and dampf and the code it generates are unchanged since 0.9.0.

Known limits

  • Music plays on the desktop and the web, but not yet on the SNES. Sound effects and save RAM work there.
  • The kit has been tested in emulators, not on a real SNES.
  • The C subset, the command line and the files dampf writes may change before 1.0.
  • The games on the website need a keyboard.

Licences

superdevkit is under the Apache License 2.0 with LLVM Exceptions. The zips include an unmodified OpenJDK runtime (Eclipse Temurin 25.0.5+8, GPL v2 with the Classpath Exception, source) and raylib 5.5 (zlib licence). NOTICE in each zip has the details.

superdevkit is an independent project, not affiliated with or endorsed by Nintendo.

Full changelog: v0.9.1...v0.9.2

superdevkit 0.9.1

Choose a tag to compare

@github-actions github-actions released this 23 Nov 22:19
4681dfb

This is still an alpha release. It works for me, that doesn't necessarily mean it works for you at the moment. Sorry 😔.

superdevkit is a development kit for SNES games written in C. You write a game once, and it builds as a ROM for the Super Nintendo, a program for Linux and Windows, and a page for the browser. It comes with dampf, its own C compiler for the SNES's 65816 CPU.

Play the example games in your browser · Read the book

Download

Your system File
Windows (x64) superdevkit-0.9.1-windows-x64.zip
Linux or WSL (x64) superdevkit-0.9.1-linux-x64.zip

Each zip brings its own Java, so you don't need to install one.

Your first ROM

On Windows, in PowerShell, in the folder with the zip:

Expand-Archive superdevkit-0.9.1-windows-x64.zip .
$env:Path = "$PWD\superdevkit-0.9.1\bin;$env:Path"
superdevkit init mygame
cd mygame
superdevkit build snes

On Linux or WSL:

unzip superdevkit-0.9.1-linux-x64.zip
export PATH="$PWD/superdevkit-0.9.1/bin:$PATH"
superdevkit init mygame
cd mygame
superdevkit build snes

The ROM is build/snes/mygame.sfc. Getting started goes on from there.

What each target needs

Target Command You need
SNES superdevkit build snes nothing else (an emulator such as MesenCE to play the ROM)
Windows superdevkit build win64 Visual Studio with "Desktop development with C++"
Linux superdevkit build linux a C compiler and the OpenGL and X11 development libraries
Web superdevkit build web the Emscripten SDK, with emcc on the PATH

New in 0.9.1

  • The first release with downloads: a zip each for Windows and Linux, with Java and raylib included.
  • A website with the book and all seven example games.
  • A missing Visual Studio, Emscripten or Mesen now gets a message that says what to install.

dampf and the code it generates are unchanged since 0.9.0.

Known limits

  • Music plays on the desktop and the web, but not yet on the SNES. Sound effects and save RAM work there.
  • The kit has been tested in emulators, not on a real SNES.
  • The C subset, the command line and the files dampf writes may change before 1.0.
  • The games on the website need a keyboard.

Licences

superdevkit is under the Apache License 2.0 with LLVM Exceptions. The zips include an unmodified OpenJDK runtime (Eclipse Temurin 25.0.5+8, GPL v2 with the Classpath Exception, source) and raylib 5.5 (zlib licence). NOTICE in each zip has the details.

superdevkit is an independent project, not affiliated with or endorsed by Nintendo.

Full changelog: v0.9.0...v0.9.1