Skip to content

Project-Sunshine-Native/cinnamon

Repository files navigation

Cinnamon


Important

Cinnamon is not finished and will have bugs.

When you create a game in GameMaker: Studio and export it, GameMaker: Studio exports the game code as bytecode instead of native compiled code, and that bytecode is compatible with any other GameMaker: Studio runner (also known as YoYo runner), as long as they have matching GameMaker: Studio versions. This is similar to how Java applications work.

This is how projects such as Droidtale can exist. We exploit that GameMaker: Studio games compile to bytecode, which means they can be ran on any platform that has an official runner for it!

If GameMaker games use bytecode, what prevents us from creating our own runner? And if we can write our own runner, what prevents us from porting GameMaker: Studio games to other platforms?

Thats where projects like Butterscotch come in! Butterscotch is an open source reimplementation of GameMaker: Studio's runner.

If this already exists, then whats stopping people from porting Butterscotch to MORE consoles? Whats stopping us from porting a variety of GameMaker: Studio games to the 3DS and Wii U?

This is where Cinnamon, a fork of Butterscotch comes in!

Cinnamon aims to be a open source re-implementation of GameMaker Studios runner for the 3DS and Wii U. This opens up lots of opportunities for games like Pizza Tower, Hyper Light Drifter, Undertale, and Deltarune to run on the 3DS and Wii U.

Game Compatibility

Butterscotch's and Cinnamon's goal is to be able to have Undertale v1.08 (GameMaker: Studio 1.4.1804, Bytecode Version 16) fully playable. But we do want to support more GameMaker: Studio games in the future too!

While our target is Undertale v1.08, that doesn't mean that other games CAN'T run in Cinnamon! Because Cinnamon itself is a runner and not a Undertale port/remake, you CAN run other GameMaker: Studio games with it and, as long as the game is compiled with GameMaker: Studio 1.4.1804 and they only use GML variables and functions that Cinnamon supports, it should work fine.

Here are the Bytecode Versions that Cinnamon supports

  • Bytecode Version 16
  • Bytecode Version 17

However, that doesn't mean that a game that uses a compatible version WILL run! The bytecode support is still a WIP, and Cinnamon may have quirks that the original GameMaker: Studio runner may not have.

Of course, there are exceptions that break game compatibility altogether:

  • Games compiled with YYC, because they use native code instead of bytecode.
  • Games compiled with the new GMRT, because they use native code instead of bytecode.

Supported Platforms

  • Nintendo 3DS
  • Nintendo Wii U
  • ...and maybe more in the future!

Project Sunshine

  • Project Sunshine is a project that aims to use Cinnamon to port a variety of games (such as UNDERTALE, DELTARUNE, and maybe more games in the future) to the Wii U, 3DS, and maybe more consoles like the GameCube in the future! You can get beta builds on our Discord aswell as news on the ports.

UNDERTALE: Wii U Edition

  • A released, full port of UNDERTALE on the Wii U. You can download this port on our releases page or on our Discord.

DELTARUNE: Wii U Edition

  • A full port of DELTARUNE to the Wii U. Still currently in development. Expect a Chapter 1 release date of before July.

UNDERTALE: 3DS Edition

  • A full port of UNDERTALE to the 3DS with 3DS exclusive features such as 3D and bottom screen features.

DELTARUNE: 3DS Edition

  • A full port of atleast Chapter One of DELTARUNE to the 3DS.

Building For Wii U

You must have a proper devkitPro Wii U enviroment set up and configured for your platform.

Configure with the Wii U CMake wrapper and then build:

powerpc-eabi-cmake -S . -B build/wiiu -DPLATFORM=wiiu -DCMAKE_BUILD_TYPE=Release
cmake --build build/wiiu

This produces Cinnamon.elf, Cinnamon.rpx, and a .wuhb bundle in build/wiiu.

You can also configure Wii U builds with the toolchain file directly:

cmake -S . -B build/wiiu -DPLATFORM=wiiu \
  -DCMAKE_TOOLCHAIN_FILE="$DEVKITPRO/cmake/WiiU.cmake" \
  -DCMAKE_BUILD_TYPE=Release
cmake --build build/wiiu

On Windows, build from PowerShell with:

.\build-windows-wiiu.ps1

Building for 3DS

You must have a proper devkitPro 3DS environment set up and configured for your platform.

Configure and build it with the devkitPro 3DS toolchain:

arm-none-eabi-cmake -S . -B build/n3ds -DPLATFORM=n3ds -DCMAKE_BUILD_TYPE=Release
cmake --build build/n3ds

On Windows, build from PowerShell with:

.\build-windows-n3ds.ps1

You can also use the repository Makefile on Linux or from an MSYS2/devkitPro shell on Windows:

make 3ds

If you prefer plain CMake, pass the toolchain file explicitly:

cmake -S . -B build/n3ds -DPLATFORM=n3ds \
  -DCMAKE_TOOLCHAIN_FILE="$DEVKITPRO/cmake/3DS.cmake" \
  -DCMAKE_BUILD_TYPE=Release
cmake --build build/n3ds

The main output is build/n3ds/cinnamon.3dsx.

The 3DS build will package resources/3ds/romfs into the .3dsx if that directory exists. The runner also checks sdmc:/3ds/cinnamon at runtime, so you can either bundle preprocessed assets into romfs or copy them onto the SD card.

Using the 3DS preprocessor

The 3DS port expects converted textures and audio instead of the original PC assets. Those files are generated by the standalone n3ds-preprocess host tool in tools/n3ds-preprocess.

Build the preprocessor with:

cmake -S tools/n3ds-preprocess -B build/n3ds-preprocess -DCMAKE_BUILD_TYPE=Release
cmake --build build/n3ds-preprocess

The preprocessor uses:

  • tex3ds from devkitPro for texture conversion
  • a built-in BCWAV encoder for audio output
  • built-in stb_vorbis decoding for Ogg Vorbis audio before encoding

On Linux:

  • Ensure tex3ds is available (usually /opt/devkitpro/tools/bin/tex3ds).
  • Run the built binary directly:
build/n3ds-preprocess/n3ds-preprocess /path/to/data.win resources/3ds/romfs

If your tools are not in default locations, pass explicit paths:

build/n3ds-preprocess/n3ds-preprocess /path/to/data.win resources/3ds/romfs \
  --tex3ds /opt/devkitpro/tools/bin/tex3ds

On Windows, running n3ds-preprocess.exe with no arguments starts an interactive setup that tries to find Undertale automatically and then writes to your SD card layout.

Command line usage:

n3ds-preprocess <path-to-data.win> <output-dir> [options]

Useful output directory choices:

  • resources/3ds/romfs to bundle the generated assets into the next 3DS build
  • Your SD card's 3ds/cinnamon folder to test assets without rebuilding the .3dsx

Example: generate bundled ROMFS assets from Undertale's data.win:

build/n3ds-preprocess/n3ds-preprocess /path/to/data.win resources/3ds/romfs

Example: write directly to an SD card layout:

build/n3ds-preprocess/n3ds-preprocess /path/to/data.win /path/to/SD/3ds/cinnamon

The preprocessor writes:

  • gfx/atlas.bin and converted texture pages to gfx/
  • gfx/direct_assets.bin, containing packed direct sprite/background/font .t3x data with seek metadata
  • packed sound effects directly in audio/sound_bank.bin (no per-SFX .bcwav output)
  • streamed music .bcwav files at the output root

At runtime, direct textures are loaded from gfx/direct_assets.bin when present, with loose-file fallback for overrides/custom files. Generated direct sprite/background/font .t3x files are removed after packing to keep output size down. To reduce SD wear, the preprocessor stages intermediate/unfinalized files in a local temp folder next to the preprocessor executable, then syncs only finalized/changed outputs to your selected destination.

Showcase

Wii U (Real Hardware)

  • UNDERTALE (Bytecode 16)

Image

Image

Image

  • SURVEY_PROGRAM (Bytecode 16)

Image

Image

Wii U (Cemu/Emulator)

  • SURVEY_PROGRAM (Bytecode 16)

Image

Image

  • Pizza Tower Demo (Demo 1, Sage 2019 Demo) (Bytecode 16)

Image

Image

3DS (Real Hardware)

  • UNDERTALE (Bytecode 16)

Image

Image

Image

Image

Disclaimer

Cinnamon has no association, endorsement, or any connection whatsoever with any of the software that it facilitates, and does not provide any of the software it can run by itself. In order to use Cinnamon, you will need to provide your own game files.