From f6620e2e49c3e849c44aca71ba7680f12a066414 Mon Sep 17 00:00:00 2001 From: James Wallace Date: Mon, 23 Dec 2019 12:38:44 +0000 Subject: [PATCH] Changed headers with new info recently discovered --- U3_Loader/U3_Loader/Form1.cs | 70 ++++++++++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 2 deletions(-) diff --git a/U3_Loader/U3_Loader/Form1.cs b/U3_Loader/U3_Loader/Form1.cs index bad8a26..2505fa4 100644 --- a/U3_Loader/U3_Loader/Form1.cs +++ b/U3_Loader/U3_Loader/Form1.cs @@ -17,8 +17,8 @@ public partial class Form1 : Form private string ExportDir; private List Samples7a; private List Samples00; - string String7A = "CMD,Type,Offset1 Address(CPU),Offset1 Address(ROM),Priority,Offset2,Offset2 Address(CPU),Offset2 Address(ROM),Voice,Volume?,Offset3 Address(CPU),Offset3 Address(ROM),Offset4 Address(CPU),Offset4 Address(ROM),Offset5 Address(CPU),Offset5 Address(ROM),Bank,Pad?,Sample\n"; - string String00 = "CMD,Type,Offset1 Address(CPU),Offset1 Address(ROM),Priority,Offset2,Offset2 Address(CPU),Offset2 Address(ROM),Voice,Volume?,Offset3 Address(CPU),Offset3 Address(ROM),Offset4 Address(CPU),Offset4 Address(ROM),Offset5 Address(CPU),Offset5 Address(ROM),Bank,Pad?,Sample\n"; + string String7A = "CMD,Type,Offset1 Address(CPU),Offset1 Address(ROM),Type Code,Offset2,Offset2 Address(CPU),Offset2 Address(ROM),Voice,Volume?,Offset3 Address(CPU),Offset3 Address(ROM),Offset4 Address(CPU),Offset4 Address(ROM),Offset5 Address(CPU),Offset5 Address(ROM),Bank,Pad?,Sample\n"; + string String00 = "CMD,Type,Offset1 Address(CPU),Offset1 Address(ROM),Type Code,Offset2,Offset2 Address(CPU),Offset2 Address(ROM),Voice,Volume?,Offset3 Address(CPU),Offset3 Address(ROM),Offset4 Address(CPU),Offset4 Address(ROM),Offset5 Address(CPU),Offset5 Address(ROM),Bank,Pad?,Sample\n"; public Form1() { @@ -75,6 +75,40 @@ private void button1_Click(object sender, EventArgs e) if (synth == false) { samplecode.priority = tmp[samplecode.offset1ROM]; + + switch (samplecode.priority) + { + case 0x01: + { + samplecode.Type = "Music"; + break; + } + + case 0x04: + { + samplecode.Type = "SFX"; + break; + } + + case 0x07: + { + samplecode.Type = "Sample"; + break; + } + + case 0x0F: + { + samplecode.Type = "Code"; + break; + } + + default: + { + samplecode.Type = "0x"+ samplecode.priority.ToString("X2"); + break; + } + } + samplecode.offset2 = tmp[samplecode.offset1ROM + 1]; samplecode.offset2CPU = (int)(base2 + (2 * samplecode.offset2)); //6255 + 2 x (byte2) samplecode.offset2ROM = (int)(origstart + samplecode.offset2CPU - baseadd); //2255 + 2 x (byte2) @@ -181,6 +215,38 @@ private void button1_Click(object sender, EventArgs e) if (synth == false) { samplecode.priority = tmp[samplecode.offset1ROM]; + switch (samplecode.priority) + { + case 0x01: + { + samplecode.Type = "Music"; + break; + } + + case 0x04: + { + samplecode.Type = "SFX"; + break; + } + + case 0x07: + { + samplecode.Type = "Sample"; + break; + } + + case 0x0F: + { + samplecode.Type = "Code"; + break; + } + + default: + { + samplecode.Type = "0x" + samplecode.priority.ToString("X2"); + break; + } + } samplecode.offset2 = tmp[samplecode.offset1ROM + 1]; samplecode.offset2CPU = (int)(base2 + (2 * samplecode.offset2)); //6255 + 2 x (byte2) samplecode.offset2ROM = (int)(origstart + samplecode.offset2CPU - baseadd); //2255 + 2 x (byte2)