Skip to content

Commit 65e34e5

Browse files
committed
Add raw cuesheet bytes
1 parent f66c81b commit 65e34e5

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

SabreTools.RedumpLib.Test/FormatterTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ public void FormatOutputData_TAWO_Formatted()
302302
{
303303
ClrMameProData = "XXXXXX",
304304
Cuesheet = "XXXXXX",
305+
CuesheetRaw = [0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39],
305306
OtherWriteOffsets = "XXXXXX",
306307
};
307308

SabreTools.RedumpLib.Test/SubmissionInfoTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ public void FullSerializationTest()
143143
{
144144
ClrMameProData = "Datfile",
145145
Cuesheet = "Cuesheet",
146+
CuesheetRaw = [0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39],
146147
CommonWriteOffsets = [0, 12, -12],
147148
OtherWriteOffsets = "-2",
148149
},

SabreTools.RedumpLib/Data/Sections/TracksAndWriteOffsetsSection.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ public class TracksAndWriteOffsetsSection : ICloneable
1414
[JsonProperty(PropertyName = "d_cue", NullValueHandling = NullValueHandling.Ignore)]
1515
public string? Cuesheet { get; set; }
1616

17+
[JsonProperty(PropertyName = "d_cue_raw", NullValueHandling = NullValueHandling.Ignore)]
18+
public byte[]? CuesheetRaw { get; set; }
19+
1720
[JsonProperty(PropertyName = "d_offset", NullValueHandling = NullValueHandling.Ignore)]
1821
public int[]? CommonWriteOffsets { get; set; }
1922

@@ -26,6 +29,7 @@ public object Clone()
2629
{
2730
ClrMameProData = this.ClrMameProData,
2831
Cuesheet = this.Cuesheet,
32+
CuesheetRaw = this.CuesheetRaw?.Clone() as byte[],
2933
CommonWriteOffsets = this.CommonWriteOffsets?.Clone() as int[],
3034
OtherWriteOffsets = this.OtherWriteOffsets,
3135
};

SabreTools.RedumpLib/Formatter.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,7 @@ internal static void FormatOutputData(StringBuilder output, TracksAndWriteOffset
479479

480480
AddIfExists(output, Template.DATField, section.ClrMameProData + "\n", 1);
481481
AddIfExists(output, Template.CuesheetField, section.Cuesheet, 1);
482+
// TODO: Figure out how to emit raw cuesheet field instead of normal cuesheet
482483
var offset = section.OtherWriteOffsets;
483484
if (int.TryParse(offset, out int i))
484485
offset = i.ToString("+#;-#;0");

0 commit comments

Comments
 (0)