GNU General Public License v3.0

项目介绍

Project-Sunshine-Native/cinnamon 是一个托管在 GitHub 上的开源项目,主要使用 C 编写,采用 GNU General Public License v3.0 许可证,目前获得 427 个 Star、22 次 Fork。

仓库全名
Project-Sunshine-Native/cinnamon
开源许可证
GNU General Public License v3.0
Star 数
427
Fork 数
22
未关闭 Issue
8

README 摘要

Cinnamon [!IMPORTANT] The latest version of Cinnamon can now be found here due to GitHub support being very bad. This repo will still be updated with releases and will have occasional code updates. 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…

完整内容见 GitHub 原始 README 或本页 。

常见问题

cinnamon 用什么语言开发?

主要使用 C 编写,采用 GNU General Public License v3.0 许可证,目前有 427 个 Star。

cinnamon 可以免费商用吗?

仓库标注的许可证为 GNU General Public License v3.0,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 cinnamon 的源码?

可以直接克隆仓库:git clone https://github.com/Project-Sunshine-Native/cinnamon.git,默认分支为 main;安装与运行步骤见仓库 README。

cinnamon 最近还在维护吗?

仓库最近一次更新为 3 周前,当前有 8 个未关闭 Issue;Star 数为 427,可作为社区活跃度的参考。

关于

The best working and fully optimized GML runner in C for the Nintendo 3DS and Wii U.

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

语言占比

C
C++
CMake
GLSL
Kotlin
Makefile
Objective-C
Shell

README

Cinnamon


[!IMPORTANT]
The latest version of Cinnamon can now be found here due to GitHub support being very bad. This repo will still be updated with releases and will have occasional code updates.

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, Wii, GameCube, and Wii U. This opens up lots of opportunities for games like Pizza Tower, Undertale Yellow, Undertale, and Deltarune to run on the 3DS, Wii, GameCube, and Wii U.

Game Compatibility

Cinnamon’s goal is to be able to have most GML games fully playable.

Of course, there are hardware limits. These are consoles that are more than a decade old and while Cinnamon is heavily optimized, games with heavy 3D or heavy particle systems MAY not work.

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.

We do want to support more bytecode versions in the future (since Butterscotch supports more than 16 and 17) but currently, bytecode versions that arent 16 or 17 wont work.

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. This includes game like Forager, Hyperlight Drifter, and more.

Supported Platforms

  • Nintendo 3DS
  • Nintendo Wii U
  • Nintendo Wii
  • Nintendo Gamecube (in the future)
  • …and maybe more Nintendo consoles in the future!

Cinnamon was made for Project Sunshines ports.

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, Wii, GameCube, and maybe more consoles 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 Chapters 1-5 to the Wii U. Still currently in development.

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 DELTARUNE Chapters 1-5 to the old and new 3DS.

UNDERTALE: Wii Edition

  • A full port of UNDERTALE to the Wii.

DELTARUNE Wii Edition

  • A full port of DELTARUNE to the Wii.

UNDERTALE: GameCube Edition

  • A full port of UNDERTALE to the GameCube.

DELTARUNE GameCube Edition

  • A full port of DELTARUNE Chapter 1 to the GameCube.

Building For Wii U

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

On Windows, make sure MinGW is located in your system PATH (C:/MinGW/bin) before proceeding with build instructions

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.

On Windows, make sure MinGW is located in your system PATH (C:/MinGW/bin) before proceeding with build instructions

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

To build without bottom screen features, pass the disable flag like so:

cmake -S . -B build/n3ds -DN3DS_DISABLE_BOTTOM_SCREEN=ON

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

Cinnamon expects converted textures and audio instead of original texture and audio assets from data.win. 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
  • stb_vorbis for decoding OGG vorbis audio files for converting to BCWAV 4-bit ADPCM

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]

By default the preprocessor uses hybrid atlas formatting: sprite/background pages stay rgba5551 for cleaner edges, while safer non-sprite pages may still use etc1a4. Use --texture-format etc1a4, --texture-format rgba5551, or --page-format-overrides <file> if you need to force a specific format.

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
  • SOND data packed directly in audio/sound_bank.bin
  • streamed music .bcwav files at the output root

Optional sprite replacements can be placed in a Sprite_replacements folder next to the n3ds-preprocess executable or in tools/n3ds-preprocess/Sprite_replacements. The preprocessor accepts PNGs named by sprite name or sprite index, such as spr_battlebutton_0.png, spr_battlebutton_0_frame_00000.png, spr_00042.png, or spr_00042_frame_00000.png. Replacement PNGs must match the logical sprite frame size.

Optional room border PNGs can be placed in a Borders folder next to the n3ds-preprocess executable or in tools/n3ds-preprocess/Borders. Every top-level *.png in that folder is converted to gfx/borders/<name>.t3x; useful names include border_none.png, room_ruins.png, room_tundra.png, room_water.png, room_fire.png, room_castle.png, room_truelab.png, and room_gaster.png.

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.

评论

暂无评论