Table of Contents

Ekona MIT License

Ekona is a library part of the SceneGate framework that provides support for DS and DSi file formats.

Supported formats

  • 🎮 DS cartridge:
    • 📁 Filesystem: read and write
    • ℹ️ Header: read and write, including extended header
    • 🖼️ Banner and icon: read and write.
    • 🔐 ARM9 secure area encryption and decryption (KEY1).
  • 🎮 DSi cartridge:
    • 📁 Filesystem: read and write arm9i and arm7i programs.
    • ℹ️ Extended header: read and write
    • 🖼️ Animated banner icons
    • 🔐 Modcrypt encryption and decryption
    • 🔏 HMAC validation and generation when keys are provided.
    • 🔏 Signature validation when keys are provided.

Getting started

Check-out the getting started guide to start using Ekona in no time! Below you can find an example that shows how to open a DS/DSi ROM file (cartridge dump).

// Create Yarhl node from a file (binary format).
Node game = NodeFactory.FromFile("game.nds", FileOpenMode.Read);

// Use the `Binary2NitroRom` converter to convert the binary format
// into node containers (virtual file system tree with files and directories).
game.TransformWith<Binary2NitroRom>();

// And it's done!
// Now we can access to every game file. For instance, we can export one file
Node items = Navigator.SearchNode(game, "data/Items.dat");
items.Stream.WriteTo("dump/Items.dat");

Usage

The project provides the following .NET libraries (NuGet packages in nuget.org). The libraries works on supported versions of .NET: 6.0 and 8.0.

  • SceneGate.Ekona
    • SceneGate.Ekona.Containers.Rom: DS and DSi cartridge (ROM) format.
    • SceneGate.Ekona.Security: hash and encryption algorithms

Special thanks

The DS / DSi cartridge format was based on the amazing reverse engineering work of Martin Korth at GBATek. Its specifications of the hardware of the video controller and I/O ports was also a great help in additional reverse engineering.