{"id":21917473,"url":"https://github.com/clusterm/nes-containers","last_synced_at":"2025-04-19T09:43:56.763Z","repository":{"id":62740789,"uuid":"294925469","full_name":"ClusterM/nes-containers","owner":"ClusterM","description":"A simple .NET library for working with NES/Famicom containers: .nes (iNES, NES 2.0), .unf (UNIF) and .fds (Famicom Disk System images).","archived":false,"fork":false,"pushed_at":"2024-02-20T18:56:27.000Z","size":195,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-16T02:06:10.909Z","etag":null,"topics":["famicom","famicom-disk-system","ines","nes"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ClusterM.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":["ClusterM"],"custom":["https://www.buymeacoffee.com/cluster","https://boosty.to/cluster"]}},"created_at":"2020-09-12T10:57:34.000Z","updated_at":"2025-04-09T07:13:39.000Z","dependencies_parsed_at":"2024-02-20T19:54:18.223Z","dependency_job_id":"e3535839-8828-4f46-93b4-9f9d6cd37fa0","html_url":"https://github.com/ClusterM/nes-containers","commit_stats":{"total_commits":103,"total_committers":2,"mean_commits":51.5,"dds":0.009708737864077666,"last_synced_commit":"fd7f38fa48c2c366b5469ec9e818dca76387aae8"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClusterM%2Fnes-containers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClusterM%2Fnes-containers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClusterM%2Fnes-containers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClusterM%2Fnes-containers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ClusterM","download_url":"https://codeload.github.com/ClusterM/nes-containers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249666763,"owners_count":21308154,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["famicom","famicom-disk-system","ines","nes"],"created_at":"2024-11-28T19:32:42.591Z","updated_at":"2025-04-19T09:43:56.742Z","avatar_url":"https://github.com/ClusterM.png","language":"C#","funding_links":["https://github.com/sponsors/ClusterM","https://www.buymeacoffee.com/cluster","https://boosty.to/cluster"],"categories":[],"sub_categories":[],"readme":"# NesContainers\nA 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).\n\nFull documentation: https://clusterm.github.io/nes-containers/\n\n## Usage\n\nThere are three classes for different type of containers.\n\n### .nes (iNES, NES 2.0)\n\nMost 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.\n\nLoad ROM: `var nesfile = new NesFile(filename)` or `var nesfile = NesFile.FromFile(filename)`\n\nAccess fields:\n\nSet mapper: `nesfile.Mapper = 4;`\n\nSet version to NES 2.0: `nes.Version = NesFile.iNesVersion.NES20;`\n\nSet PRG data: `nesfile.PRG = new byte[32768] { ... };`\n\nSet CHR data: `nesfile.CHR = new byte[8192] { ... };`\n\nEnable battery saves: `nesfile.Battery = true;`\n\nSave ROM as .nes file: `nesfile.Save(filename);`\n\nCheck [documentation](https://clusterm.github.io/nes-containers/classcom_1_1clusterrr_1_1_famicom_1_1_containers_1_1_nes_file.html) for all available properties.\n\nFull format specifications: https://www.nesdev.org/wiki/INES\n\n### .unf (UNIF)\n\nUNIF (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.\n\nUNIF 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.\n\nLoad ROM: `var uniffile = new UnifFile(filename)` or `var uniffile = UnifFile.FromFile(filename)`\n\nYou can assess fields like dictionary:\n\nSet mapper name: `uniffile[\"MAPR\"] = \"COOLGIRL\";`\n\nSet PRG data: `uniffile[\"PRG0\"] = new byte[...] {...};`\n\nBut all standatd fields also available as properties:\n\nSet mapper name: `uniffile.Mapper = \"COOLGIRL\";`\n\nSet mirroring: `uniffile.Mirroring = MirroringType.MapperControlled;`\n\nSave ROM as .unf file: `unif.Save(filename);`\n\nCheck [documentation](https://clusterm.github.io/nes-containers/classcom_1_1clusterrr_1_1_famicom_1_1_containers_1_1_unif_file.html) for all available properties.\n\nFull format specifications: https://www.nesdev.org/wiki/UNIF\n\n### .fds (Famicom Disk System images)\n\nThe 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.\n                                                     \n```\n                                                                         /-- File header block\n                                /-- Disk header block       /- File #1 --\n            /- Disk 1, side A ----- File amount block      /             \\-- File data block\n           /                    \\-- File blocks------------\nFDS file ----- Disk 1, side B                              \\             /-- File header block\n           \\                                                \\- File #2 --\n            \\- Disk 2, side A                                            \\-- File data block\n```\n\nLoad ROM: `var fdsfile = new FdsFile(filename)` or `var fdsfile = FdsFile.FromFile(filename)`\n\nGet disk(s) sides: `IList\u003cFdsDiskSide\u003e sides = fdsfile.Sides;`\n\nGet game name code: `var name = fdsfile.sides[0].GameName;`\n\nGet file name: `var filename = fdsfile.sides[0].Files[0].FileName;`\n\nGet file data: `var filedata = fdsfile.sides[0].Files[0].Data;`\n\nSave ROM as .fds file: `fdsfile.Save(filename);`\n\nCheck [documentation](https://clusterm.github.io/nes-containers/classcom_1_1clusterrr_1_1_famicom_1_1_containers_1_1_fds_file.html) for all available classes and properties.\n\nFull format specifications: https://www.nesdev.org/wiki/FDS_file_format\n\n## Get it on NuGet\nhttps://www.nuget.org/packages/NesContainers/\n\n## Donate\n* [Buy Me A Coffee](https://www.buymeacoffee.com/cluster)\n* [Donation Alerts](https://www.donationalerts.com/r/clustermeerkat)\n* [Boosty](https://boosty.to/cluster)\n* BTC: 1MBYsGczwCypXhMBocoDQWxx7KZT2iiwzJ\n* PayPal is not available in Armenia :(\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclusterm%2Fnes-containers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclusterm%2Fnes-containers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclusterm%2Fnes-containers/lists"}