NesContainers 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package NesContainers --version 1.0.0                
NuGet\Install-Package NesContainers -Version 1.0.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="NesContainers" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NesContainers --version 1.0.0                
#r "nuget: NesContainers, 1.0.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.
// Install NesContainers as a Cake Addin
#addin nuget:?package=NesContainers&version=1.0.0

// Install NesContainers as a Cake Tool
#tool nuget:?package=NesContainers&version=1.0.0                

NesContainers

A simple .NET Standard 2.0 library for reading and modifying NES/Famicom ROM containers: .nes (iNES, NES 2.0), .unf (UNIF), and .fds (Famicom Disk System images).

Full documentation: https://clusterm.github.io/nes-containers/

Usage

There are three classes for different type of containers.

.nes (iNES, NES 2.0)

Most popular ROM container. Most older ROMs are stored in the iNES format, but most modern dumps usually use the newer version: NES 2.0. This class supports both.

Load ROM: var nesfile = new NesFile(filename) or var nesfile = NesFile.FromFile(filename)

Access fields:

Set mapper: nesfile.Mapper = 4;

Set version to NES 2.0: nes.Version = NesFile.iNesVersion.NES20;

Set PRG data: nesfile.PRG = new byte[32768] { ... };

Set CHR data: nesfile.CHR = new byte[8192] { ... };

Enable battery saves: nesfile.Battery = true;

Save ROM as .nes file: nesfile.Save(filename);

Check documentation for all available properties.

Full format specifications: https://www.nesdev.org/wiki/INES

.unf (UNIF)

UNIF (Universal NES Image Format) is an alternative format for holding NES and Famicom ROM images. Its motivation was to offer more description of the mapper board than the popular iNES format, but it suffered from other limiting constraints and a lack of popularity. The format is considered deprecated, replaced by the NES 2.0 revision of the iNES format, which better addresses the issues it had hoped to solve. There are a small number of game rips that currently only exist as UNIF. UNIF is currently considered a deprecated standard.

UNIF uses key-value format fields. Key is four character string and value is binary data. In theory you can save data as any field but there are several standard fields.

Load ROM: var uniffile = new UnifFile(filename) or var uniffile = UnifFile.FromFile(filename)

You can assess fields like dictionary:

Set mapper name: uniffile["MAPR"] = "COOLGIRL";

Set PRG data: uniffile["PRG0"] = new byte[...] {...};

But all standatd fields also available as properties:

Set mapper name: uniffile.Mapper = "COOLGIRL";

Set mirroring: uniffile.Mirroring = MirroringType.MapperControlled;

Save ROM as .unf file: unif.Save(filename);

Check documentation for all available properties.

Full format specifications: https://www.nesdev.org/wiki/UNIF

.fds (Famicom Disk System images)

The FDS format is a way to store Famicom Disk System disk data. It's much more complex format as it can contain multiple disks/sides and each disk/side contains a disk header and files.

                                                                         /-- File header block
                                /-- Disk header block       /- File #1 --
            /- Disk 1, side A ----- File amount block      /             \-- File data block
           /                    \-- File blocks------------
FDS file ----- Disk 1, side B                              \             /-- File header block
           \                                                \- File #2 --
            \- Disk 2, side A                                            \-- File data block

Load ROM: var fdsfile = new FdsFile(filename) or var fdsfile = FdsFile.FromFile(filename)

Get disk(s) sides: IList<FdsDiskSide> sides = fdsfile.Sides;

Get game name code: var name = fdsfile.sides[0].GameName;

Get file name: var filename = fdsfile.sides[0].Files[0].FileName;

Get file data: var filedata = fdsfile.sides[0].Files[0].Data;

Save ROM as .fds file: fdsfile.Save(filename);

Check documentation for all available classes and properties.

Full format specifications: https://www.nesdev.org/wiki/FDS_file_format

https://www.donationalerts.com/r/clustermeerkat

https://boosty.to/cluster

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.9 942 9/4/2023
1.1.8 162 9/4/2023
1.1.7 238 9/3/2023
1.1.6 152 9/3/2023
1.1.5 220 9/2/2023
1.1.4 1,481 12/19/2022
1.1.3 1,414 11/28/2022
1.1.2 322 11/28/2022
1.1.1 2,851 11/8/2022
1.1.0 669 11/8/2022
1.0.1 424 11/5/2022
1.0.0 379 11/5/2022