SceneGate.Ekona 1.2.0

dotnet add package SceneGate.Ekona --version 1.2.0
                    
NuGet\Install-Package SceneGate.Ekona -Version 1.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SceneGate.Ekona" Version="1.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SceneGate.Ekona" Version="1.2.0" />
                    
Directory.Packages.props
<PackageReference Include="SceneGate.Ekona" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SceneGate.Ekona --version 1.2.0
                    
#r "nuget: SceneGate.Ekona, 1.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SceneGate.Ekona@1.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SceneGate.Ekona&version=1.2.0
                    
Install as a Cake Addin
#tool nuget:?package=SceneGate.Ekona&version=1.2.0
                    
Install as a Cake Tool

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:
    • 📁 File system: 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:
    • 📁 File system: 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.
  • đŸ“Ļ Compressions:
    • BIOS LZSS compression and decompression
    • BIOS RLE compression and decompression

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 work on supported versions of .NET.

  • SceneGate.Ekona
    • SceneGate.Ekona.Compression: Common compressions.
    • 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.

CUE for documentation work on the GBA / DS compression algorithms.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on SceneGate.Ekona:

Package Downloads
SceneGate.Games.MegaManStarForce3

File formats from DS game "Mega Man Star Force 3".

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on SceneGate.Ekona:

Repository Stars
MeltyPlayer/MeltyTool
Multitool for viewing/extracting assets from various N64/GCN/3DS/PC games en-masse.
Version Downloads Last Updated
1.2.0 84 4/28/2026
1.1.0 3,326 5/12/2024
1.0.0 217 2/11/2024

## v1.2.0 (April 28, 2026)

# Version 1.2 - Compression

- C# implementation of BIOS compression algorithms: LZSS, BLZ, LZE, and RLE.
- .NET 10 support, and dependency upgrade to latest stable versions.
- Support for NativeAOT, trimming, and browser platforms (WebAssembly).
- Support for nullable reference annotations.

## Improvements

- \#39: implement LZSS compression and decompression by @pleonex
- \#48: implement reverse LZSS (BLZ) compression and decompression by @pleonex
- \#49: implement LZSS enhanced (LZE / LZ11) compression by @pleonex
- \#39: implement RLE compression and decompression by @pleonex
- \#43: improve CRC performance and trimming with custom CRC-16 by @pleonex
- \#52: TCM block info documentation, and models by @pleonex
- \#42: support NativeAOT, trimming by @pleonex
- \#53, \#52: add reference nullable annotations by @pleonex
- \#47: support .NET 10 and browser platforms by @pleonex
- \#54, \#51, \#42, \#41: upgrade .NET, Yarhl, and Texim by @pleonex and @priverop

## Fixes

- \#50: reading non-compressed programs and padding bytes for old SDKs by @pleonex
- \#46: serialization of AgeRating and DSi block padding by @pleonex

## Infrastructure

- \#40: migrate repo to Forgejo by @pleonex
- \#45: migrate tests to Verify framework by @pleonex