Skip to content

Getting Started

Peterson Fernandes edited this page Aug 15, 2026 · 1 revision

Getting Started

Installation

Library (NuGet)

dotnet add package RetroAchievementsSharp

Works with the .NET 8, 9, and 10 SDKs/runtimes on Windows, Linux, macOS, x64 and arm64.

CLI

Build from source:

dotnet build RetroAchievementsSharp.sln -c Release

or publish self-contained single-file executables:

dotnet publish RetroAchievementsSharp.Cli -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -o artifacts/win-x64

First hash

using RetroAchievementsSharp;

// Hash a ROM exactly the way RetroAchievements does:
if (RcHash.GenerateFromFile(out string hash, ConsoleIds.RcConsoleNintendo, "game.nes"))
    Console.WriteLine(hash); // 32 hex chars — matches the published RA hash

Auto-detect the console

var iterator = new RcHashIterator();
HashIterator.InitializeIterator(iterator, "Super Mario (USA).sfc", null, 0);
while (HashIterator.Iterate(out var hash, iterator) != 0)
    Console.WriteLine(hash); // the first hash that matched a console
HashIterator.DestroyIterator(iterator);

3DS keys

.cia/.3ds files need key material before hashing:

Hash3Ds.InitHash3Ds(@"C:\RetroArch\system"); // dir with aes_keys.txt/seeddb.bin
if (RcHash.GenerateFromFile(out hash, ConsoleIds.RcConsoleNintendo3Ds, "game.cia"))
    Console.WriteLine(hash);

The CLI accepts the same directory via -s <systempath>.

Clone this wiki locally