Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/nes-containers.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2022-11-05 14:55:34 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2022-11-05 14:55:34 +0300
commit06d72920648e5ed3d5a77a2062521d887edf7675 (patch)
tree22ee09d235b2f1dccb16ac788fc7a14c70498dfc
parentaccc2effac2ad9a53074367975e669e68cf11ceb (diff)
More UNIF fields
-rw-r--r--NesFile.cs2
-rw-r--r--UnifFile.cs168
2 files changed, 169 insertions, 1 deletions
diff --git a/NesFile.cs b/NesFile.cs
index a012afe..3877027 100644
--- a/NesFile.cs
+++ b/NesFile.cs
@@ -7,7 +7,7 @@ using System.Security.Cryptography;
namespace com.clusterrr.Famicom.Containers
{
/// <summary>
- /// iNES file container for NES/Famicom games
+ /// iNES / NES 2.0 file container for NES/Famicom games
/// </summary>
public partial class NesFile
{
diff --git a/UnifFile.cs b/UnifFile.cs
index f7362b5..6872372 100644
--- a/UnifFile.cs
+++ b/UnifFile.cs
@@ -418,6 +418,174 @@ namespace com.clusterrr.Famicom.Containers
}
/// <summary>
+ /// PRG0 field
+ /// </summary>
+ public IEnumerable<byte>? PRG0
+ {
+ get
+ {
+ if (ContainsField("PRG0"))
+ return this["PRG0"];
+ else
+ return null;
+ }
+ set
+ {
+ if (value != null)
+ this["PRG0"] = value;
+ else
+ RemoveField("PRG0");
+ }
+ }
+
+ /// <summary>
+ /// PRG1 field
+ /// </summary>
+ public IEnumerable<byte>? PRG1
+ {
+ get
+ {
+ if (ContainsField("PRG1"))
+ return this["PRG1"];
+ else
+ return null;
+ }
+ set
+ {
+ if (value != null)
+ this["PRG1"] = value;
+ else
+ RemoveField("PRG1");
+ }
+ }
+
+ /// <summary>
+ /// PRG2 field
+ /// </summary>
+ public IEnumerable<byte>? PRG2
+ {
+ get
+ {
+ if (ContainsField("PRG2"))
+ return this["PRG2"];
+ else
+ return null;
+ }
+ set
+ {
+ if (value != null)
+ this["PRG2"] = value;
+ else
+ RemoveField("PRG2");
+ }
+ }
+
+ /// <summary>
+ /// PRG3 field
+ /// </summary>
+ public IEnumerable<byte>? PRG3
+ {
+ get
+ {
+ if (ContainsField("PRG3"))
+ return this["PRG3"];
+ else
+ return null;
+ }
+ set
+ {
+ if (value != null)
+ this["PRG3"] = value;
+ else
+ RemoveField("PRG3");
+ }
+ }
+
+ /// <summary>
+ /// CHR0 field
+ /// </summary>
+ public IEnumerable<byte>? CHR0
+ {
+ get
+ {
+ if (ContainsField("CHR0"))
+ return this["CHR0"];
+ else
+ return null;
+ }
+ set
+ {
+ if (value != null)
+ this["CHR0"] = value;
+ else
+ RemoveField("CHR0");
+ }
+ }
+
+ /// <summary>
+ /// CHR1 field
+ /// </summary>
+ public IEnumerable<byte>? CHR1
+ {
+ get
+ {
+ if (ContainsField("CHR1"))
+ return this["CHR1"];
+ else
+ return null;
+ }
+ set
+ {
+ if (value != null)
+ this["CHR1"] = value;
+ else
+ RemoveField("CHR1");
+ }
+ }
+
+ /// <summary>
+ /// CHR2 field
+ /// </summary>
+ public IEnumerable<byte>? CHR2
+ {
+ get
+ {
+ if (ContainsField("CHR2"))
+ return this["CHR2"];
+ else
+ return null;
+ }
+ set
+ {
+ if (value != null)
+ this["CHR2"] = value;
+ else
+ RemoveField("CHR2");
+ }
+ }
+
+ /// <summary>
+ /// CHR3 field
+ /// </summary>
+ public IEnumerable<byte>? CHR3
+ {
+ get
+ {
+ if (ContainsField("CHR3"))
+ return this["CHR3"];
+ else
+ return null;
+ }
+ set
+ {
+ if (value != null)
+ this["CHR3"] = value;
+ else
+ RemoveField("CHR3");
+ }
+ }
+
+ /// <summary>
/// Calculate CRC32 for PRG and CHR fields and store it into PCKx and CCKx fields
/// </summary>
public void CalculateAndStoreCRCs()