NDS game file formats
Ekona is a library part of the SceneGate
framework that provides support for DS and DSi file formats.
arm9i
and arm7i
programs.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");
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.Containers.Rom
: DS and DSi cartridge (ROM) format.SceneGate.Ekona.Security
: hash and encryption algorithmsPreview releases can be found in this
Azure DevOps package repository.
To use a preview release, create a file nuget.config
in the same directory of
your solution file (.sln) with the following content:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear></clear>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" ></add>
<add key="SceneGate-Preview" value="https://pkgs.dev.azure.com/SceneGate/SceneGate/_packaging/SceneGate-Preview/nuget/v3/index.json" ></add>
</packageSources>
<packageSourceMapping>
<packageSource key="nuget.org">
<package pattern="*" ></package>
</packageSource>
<packageSource key="SceneGate-Preview">
<package pattern="Yarhl*" ></package>
<package pattern="Texim*" ></package>
<package pattern="SceneGate*" ></package>
</packageSource>
</packageSourceMapping>
</configuration>
You can get full details about how to use library from the
documentation
website.
Don’t miss the
formats specifications
in case you need to do further research.
And don’t hesitate to ask questions in the
project Discussion site!
The project requires to build .NET 8.0 SDK.
To build, test and generate artifacts run:
# Build and run tests
dotnet run --project build/orchestrator
# (Optional) Create bundles (nuget, zips, docs)
dotnet run --project build/orchestrator -- --target=Bundle
To build the documentation only, run:
dotnet docfx docs/docfx.json --serve
To run the performance test with memory and CPU traces:
dotnet run --project src/Ekona.PerformanceTests/ -c Release -- -f "*<TestName>*" -m -p EP --maxWidth 60
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.