diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..487f7f5
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,54 @@
+name: Build and Release
+on: [ push, pull_request ]
+
+jobs:
+ build-windows:
+ name: Build Windows binaries
+ runs-on: windows-latest
+
+ steps:
+ - name: Checkout source code
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+
+ - name: Setup MSBuild
+ uses: microsoft/setup-msbuild@v2
+
+ - name: Build and package VGMToolbox
+ run: |
+ $revision = $([int](git rev-list --count --first-parent HEAD) + 1040)
+ $appCfgPath = "VGMToolbox/App.config"
+ $asmNfoPath = "VGMToolbox/Properties/AssemblyInfo.cs"
+ (Get-Content ${appCfgPath} -Raw) -replace 'INSERT_REVISION_HERE \(INSERT_DATE_HERE INSERT_TIME_HERE\)', "${revision} ($((Get-Date).ToString('yyyy/MM/dd')))" | Set-Content ${appCfgPath} -NoNewline
+ (Get-Content ${asmNfoPath} -Raw) -replace '1\.0\.0\.0', "1.0.0.${revision}" | Set-Content ${asmNfoPath} -NoNewline
+ msbuild VGMToolbox.sln /p:Configuration=Release /p:Platform="x86"
+ Compress-Archive -Path VGMToolbox/bin/x86/Release/* -DestinationPath VGMToolbox_r${revision}_x86.zip
+
+ - name: Upload build artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: windows
+ path: |
+ VGMToolbox_r*_x86.zip
+
+ # This job takes care of creating a new release and upload the build
+ # artifacts if the last commit is associated to a tag.
+ create-release:
+ name: Create release
+ runs-on: ubuntu-latest
+ needs: [ build-windows ]
+
+ steps:
+ - name: Fetch build artifacts
+ if: ${{ github.ref_type == 'tag' }}
+ uses: actions/download-artifact@v4
+
+ - name: Publish release
+ if: ${{ github.ref_type == 'tag' }}
+ uses: softprops/action-gh-release@v2
+ with:
+ fail_on_unmatched_files: true
+ #generate_release_notes: true
+ files: |
+ windows/*
diff --git a/2sftimer/2sftimer.csproj b/2sftimer/2sftimer.csproj
index 3d8f53e..421e6bc 100644
--- a/2sftimer/2sftimer.csproj
+++ b/2sftimer/2sftimer.csproj
@@ -46,7 +46,7 @@
false
- pdbonly
+ none
true
bin\Release\
TRACE
@@ -67,7 +67,7 @@
bin\x86\Release\
TRACE
true
- pdbonly
+ none
x86
prompt
false
@@ -139,8 +139,7 @@
move format.dll ".\lib\format.dll"
move vgmtutil.dll ".\lib\vgmtutil.dll"
-move ICSharpCode.SharpZipLib.dll ".\lib\ICSharpCode.SharpZipLib.dll"
-del *.pdb
+move ICSharpCode.SharpZipLib.dll ".\lib\ICSharpCode.SharpZipLib.dll"
diff --git a/VGMToolbox.sln b/VGMToolbox.sln
index 06dd9d0..76248ff 100644
--- a/VGMToolbox.sln
+++ b/VGMToolbox.sln
@@ -199,28 +199,28 @@ Global
{3010B9D8-DDFC-4041-AD19-8CA9B93A5596}.Release|x86.Build.0 = Release|x86
{8E148500-6DD6-471D-881C-2BC0BB7AB19C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8E148500-6DD6-471D-881C-2BC0BB7AB19C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {8E148500-6DD6-471D-881C-2BC0BB7AB19C}.Debug|x86.ActiveCfg = Debug|Any CPU
- {8E148500-6DD6-471D-881C-2BC0BB7AB19C}.Debug|x86.Build.0 = Debug|Any CPU
+ {8E148500-6DD6-471D-881C-2BC0BB7AB19C}.Debug|x86.ActiveCfg = Debug|x86
+ {8E148500-6DD6-471D-881C-2BC0BB7AB19C}.Debug|x86.Build.0 = Debug|x86
{8E148500-6DD6-471D-881C-2BC0BB7AB19C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8E148500-6DD6-471D-881C-2BC0BB7AB19C}.Release|Any CPU.Build.0 = Release|Any CPU
- {8E148500-6DD6-471D-881C-2BC0BB7AB19C}.Release|x86.ActiveCfg = Release|Any CPU
- {8E148500-6DD6-471D-881C-2BC0BB7AB19C}.Release|x86.Build.0 = Release|Any CPU
+ {8E148500-6DD6-471D-881C-2BC0BB7AB19C}.Release|x86.ActiveCfg = Release|x86
+ {8E148500-6DD6-471D-881C-2BC0BB7AB19C}.Release|x86.Build.0 = Release|x86
{D6796C2A-AC35-4CF7-815F-7CD2A10094CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D6796C2A-AC35-4CF7-815F-7CD2A10094CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D6796C2A-AC35-4CF7-815F-7CD2A10094CE}.Debug|x86.ActiveCfg = Debug|Any CPU
- {D6796C2A-AC35-4CF7-815F-7CD2A10094CE}.Debug|x86.Build.0 = Debug|Any CPU
+ {D6796C2A-AC35-4CF7-815F-7CD2A10094CE}.Debug|x86.ActiveCfg = Debug|x86
+ {D6796C2A-AC35-4CF7-815F-7CD2A10094CE}.Debug|x86.Build.0 = Debug|x86
{D6796C2A-AC35-4CF7-815F-7CD2A10094CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D6796C2A-AC35-4CF7-815F-7CD2A10094CE}.Release|Any CPU.Build.0 = Release|Any CPU
- {D6796C2A-AC35-4CF7-815F-7CD2A10094CE}.Release|x86.ActiveCfg = Release|Any CPU
- {D6796C2A-AC35-4CF7-815F-7CD2A10094CE}.Release|x86.Build.0 = Release|Any CPU
+ {D6796C2A-AC35-4CF7-815F-7CD2A10094CE}.Release|x86.ActiveCfg = Release|x86
+ {D6796C2A-AC35-4CF7-815F-7CD2A10094CE}.Release|x86.Build.0 = Release|x86
{9D0F24B2-E700-4F25-BA45-6FFCCD02E6D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9D0F24B2-E700-4F25-BA45-6FFCCD02E6D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {9D0F24B2-E700-4F25-BA45-6FFCCD02E6D5}.Debug|x86.ActiveCfg = Debug|Any CPU
- {9D0F24B2-E700-4F25-BA45-6FFCCD02E6D5}.Debug|x86.Build.0 = Debug|Any CPU
+ {9D0F24B2-E700-4F25-BA45-6FFCCD02E6D5}.Debug|x86.ActiveCfg = Debug|x86
+ {9D0F24B2-E700-4F25-BA45-6FFCCD02E6D5}.Debug|x86.Build.0 = Debug|x86
{9D0F24B2-E700-4F25-BA45-6FFCCD02E6D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9D0F24B2-E700-4F25-BA45-6FFCCD02E6D5}.Release|Any CPU.Build.0 = Release|Any CPU
- {9D0F24B2-E700-4F25-BA45-6FFCCD02E6D5}.Release|x86.ActiveCfg = Release|Any CPU
- {9D0F24B2-E700-4F25-BA45-6FFCCD02E6D5}.Release|x86.Build.0 = Release|Any CPU
+ {9D0F24B2-E700-4F25-BA45-6FFCCD02E6D5}.Release|x86.ActiveCfg = Release|x86
+ {9D0F24B2-E700-4F25-BA45-6FFCCD02E6D5}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/VGMToolbox/App.config b/VGMToolbox/App.config
index 7454beb..a73d39e 100644
--- a/VGMToolbox/App.config
+++ b/VGMToolbox/App.config
@@ -457,7 +457,9 @@ WARNING: Duplicate checking compares ALL files dropped. If checked, "Move
-
+
+
+
@@ -471,8 +473,8 @@ WARNING: Duplicate checking compares ALL files dropped. If checked, "Move
+Be sure to add your PSYQ\BIN folder to your PATH environment variable.
+Also please create a PSYQ_PATH environment variable pointing to PSYQ\BIN folder."/>
diff --git a/VGMToolbox/VGMToolbox.csproj b/VGMToolbox/VGMToolbox.csproj
index 9cdf0a8..482dfc2 100644
--- a/VGMToolbox/VGMToolbox.csproj
+++ b/VGMToolbox/VGMToolbox.csproj
@@ -13,7 +13,7 @@
bin\x86\Release\
TRACE
true
- pdbonly
+ none
x86
prompt
false
@@ -63,7 +63,7 @@
false
- pdbonly
+ none
true
bin\Release\
TRACE
@@ -71,6 +71,9 @@
4
false
+
+ Resources\ToolBox-2.ico
+
3rd\ICSharpCode.SharpZipLib.dll
@@ -1456,7 +1459,6 @@ move ICSharpCode.SharpZipLib.dll ".\lib\ICSharpCode.SharpZipLib.dll"
move ICSharpCode.SharpZipLib.dll.COPYING.txt ".\lib\ICSharpCode.SharpZipLib.dll.COPYING.txt"
move System.Data.SQLite.dll ".\lib\System.Data.SQLite.dll"
move System.Data.SQLite.xml ".\lib\System.Data.SQLite.xml"
-del *.pdb
del "Bass.Net.dll"
del "Bass.Net.xml"
diff --git a/VGMToolbox/forms/AboutForm.cs b/VGMToolbox/forms/AboutForm.cs
index b227aa4..a32a7b3 100644
--- a/VGMToolbox/forms/AboutForm.cs
+++ b/VGMToolbox/forms/AboutForm.cs
@@ -14,7 +14,7 @@ public AboutForm()
{
InitializeComponent();
- this.linkLabelHomePage.Links.Add(0, this.linkLabelHomePage.Text.Length, "http://sourceforge.net/projects/vgmtoolbox/");
+ this.linkLabelHomePage.Links.Add(0, this.linkLabelHomePage.Text.Length, "https://github.com/snakemeat/VGMToolbox");
this.linkLabelSupport.Links.Add(0, this.linkLabelSupport.Text.Length, "http://hcs64.com/mboard/forum.php?showthread=22580");
}
diff --git a/VGMToolbox/forms/extraction/IsoExtractorForm.cs b/VGMToolbox/forms/extraction/IsoExtractorForm.cs
index 64974ab..1be6d8a 100644
--- a/VGMToolbox/forms/extraction/IsoExtractorForm.cs
+++ b/VGMToolbox/forms/extraction/IsoExtractorForm.cs
@@ -464,7 +464,7 @@ private void extractRAWToToolStripMenuItem_Click(object sender, EventArgs e)
private void fileListView_ItemDrag(object sender, ItemDragEventArgs e)
{
- int x = 1;
+ //int x = 1;
}
}
}
diff --git a/VGMToolbox/forms/xsf/Bin2PsfFrontEndForm.Designer.cs b/VGMToolbox/forms/xsf/Bin2PsfFrontEndForm.Designer.cs
index edb9988..bda09d6 100644
--- a/VGMToolbox/forms/xsf/Bin2PsfFrontEndForm.Designer.cs
+++ b/VGMToolbox/forms/xsf/Bin2PsfFrontEndForm.Designer.cs
@@ -29,6 +29,9 @@ protected override void Dispose(bool disposing)
private void InitializeComponent()
{
this.grpSource = new System.Windows.Forms.GroupBox();
+ this.cbVabMinipsf = new System.Windows.Forms.CheckBox();
+ this.lblVabLibName = new System.Windows.Forms.Label();
+ this.tbVablibName = new System.Windows.Forms.TextBox();
this.cbMinipsf = new System.Windows.Forms.CheckBox();
this.lblPsfLibName = new System.Windows.Forms.Label();
this.tbPsflibName = new System.Windows.Forms.TextBox();
@@ -98,6 +101,9 @@ private void InitializeComponent()
//
// grpSource
//
+ this.grpSource.Controls.Add(this.cbVabMinipsf);
+ this.grpSource.Controls.Add(this.lblVabLibName);
+ this.grpSource.Controls.Add(this.tbVablibName);
this.grpSource.Controls.Add(this.cbMinipsf);
this.grpSource.Controls.Add(this.lblPsfLibName);
this.grpSource.Controls.Add(this.tbPsflibName);
@@ -112,11 +118,39 @@ private void InitializeComponent()
this.grpSource.Dock = System.Windows.Forms.DockStyle.Top;
this.grpSource.Location = new System.Drawing.Point(0, 70);
this.grpSource.Name = "grpSource";
- this.grpSource.Size = new System.Drawing.Size(638, 117);
+ this.grpSource.Size = new System.Drawing.Size(638, 143);
this.grpSource.TabIndex = 5;
this.grpSource.TabStop = false;
this.grpSource.Text = "Source";
//
+ // cbVabMinipsf
+ //
+ this.cbVabMinipsf.AutoSize = true;
+ this.cbVabMinipsf.Location = new System.Drawing.Point(310, 118);
+ this.cbVabMinipsf.Name = "cbVabMinipsf";
+ this.cbVabMinipsf.Size = new System.Drawing.Size(101, 17);
+ this.cbVabMinipsf.TabIndex = 21;
+ this.cbVabMinipsf.Text = "Output VAB .minipsfs";
+ this.cbVabMinipsf.UseVisualStyleBackColor = true;
+ this.cbVabMinipsf.CheckedChanged += new System.EventHandler(this.cbVabMinipsf_CheckedChanged);
+ //
+ // lblVabLibName
+ //
+ this.lblVabLibName.AutoSize = true;
+ this.lblVabLibName.Location = new System.Drawing.Point(3, 119);
+ this.lblVabLibName.Name = "lblVabLibName";
+ this.lblVabLibName.Size = new System.Drawing.Size(73, 13);
+ this.lblVabLibName.TabIndex = 20;
+ this.lblVabLibName.Text = "VABLib Name";
+ //
+ // tbVablibName
+ //
+ this.tbVablibName.Location = new System.Drawing.Point(86, 116);
+ this.tbVablibName.Name = "tbVablibName";
+ this.tbVablibName.ReadOnly = true;
+ this.tbVablibName.Size = new System.Drawing.Size(218, 20);
+ this.tbVablibName.TabIndex = 19;
+ //
// cbMinipsf
//
this.cbMinipsf.AutoSize = true;
@@ -236,9 +270,9 @@ private void InitializeComponent()
this.grpOptions.Controls.Add(this.lblSeqOffset);
this.grpOptions.Controls.Add(this.tbSeqOffset);
this.grpOptions.Dock = System.Windows.Forms.DockStyle.Top;
- this.grpOptions.Location = new System.Drawing.Point(0, 187);
+ this.grpOptions.Location = new System.Drawing.Point(0, 213);
this.grpOptions.Name = "grpOptions";
- this.grpOptions.Size = new System.Drawing.Size(638, 200);
+ this.grpOptions.Size = new System.Drawing.Size(638, 174);
this.grpOptions.TabIndex = 6;
this.grpOptions.TabStop = false;
this.grpOptions.Text = "Options";
@@ -455,6 +489,9 @@ private void InitializeComponent()
private System.Windows.Forms.CheckBox cbMinipsf;
private System.Windows.Forms.Label lblPsfLibName;
private System.Windows.Forms.TextBox tbPsflibName;
+ private System.Windows.Forms.CheckBox cbVabMinipsf;
+ private System.Windows.Forms.TextBox tbVablibName;
+ private System.Windows.Forms.Label lblVabLibName;
private System.Windows.Forms.GroupBox grpGenericDrivers;
private System.Windows.Forms.ComboBox genericDriver;
private System.Windows.Forms.Label lblGenericDriver;
diff --git a/VGMToolbox/forms/xsf/Bin2PsfFrontEndForm.cs b/VGMToolbox/forms/xsf/Bin2PsfFrontEndForm.cs
index 492d67a..d2be8d8 100644
--- a/VGMToolbox/forms/xsf/Bin2PsfFrontEndForm.cs
+++ b/VGMToolbox/forms/xsf/Bin2PsfFrontEndForm.cs
@@ -33,6 +33,10 @@ public Bin2PsfFrontEndForm(TreeNode pTreeNode)
ConfigurationManager.AppSettings["Form_Bin2PsfFE_LblPsfLibName"];
this.cbMinipsf.Text =
ConfigurationManager.AppSettings["Form_Bin2PsfFE_CheckBoxMinipsf"];
+ this.lblVabLibName.Text =
+ ConfigurationManager.AppSettings["Form_Bin2PsfFE_LblVabLibName"];
+ this.cbVabMinipsf.Text =
+ ConfigurationManager.AppSettings["Form_Bin2PsfFE_CheckBoxVabMinipsf"];
this.grpOptions.Text =
ConfigurationManager.AppSettings["Form_Bin2PsfFE_GroupOptions"];
this.lblSeqOffset.Text =
@@ -56,6 +60,10 @@ private void btnDoTask_Click(object sender, EventArgs e)
{
tbPsflibName.Text += Bin2PsfWorker.PSFLIB_FILE_EXTENSION;
}
+ if ((cbVabMinipsf.Checked) && (!tbVablibName.Text.EndsWith(Bin2PsfWorker.PSFLIB_FILE_EXTENSION)))
+ {
+ tbVablibName.Text += Bin2PsfWorker.PSFLIB_FILE_EXTENSION;
+ }
if (this.validateInputs())
{
@@ -67,9 +75,11 @@ private void btnDoTask_Click(object sender, EventArgs e)
bpStruct.exePath = tbExePath.Text;
bpStruct.outputFolder = tbOutputFolderName.Text;
bpStruct.MakePsfLib = cbMinipsf.Checked;
+ bpStruct.MakeVabLib = cbVabMinipsf.Checked;
bpStruct.TryCombinations = this.cbTryMixing.Checked;
bpStruct.DriverName = (string)this.genericDriver.SelectedItem;
bpStruct.psflibName = tbPsflibName.Text;
+ bpStruct.vablibName = tbVablibName.Text;
bpStruct.SeqSize = this.tbMySeqSize.Text;
bpStruct.ParamOffset = this.tbParamOffset.Text;
@@ -98,26 +108,35 @@ private void cbMinipsf_CheckedChanged(object sender, EventArgs e)
}
private void doMiniPsfCheckChange()
{
- string selectedItem = (string)this.genericDriver.SelectedItem;
-
if (cbMinipsf.Checked)
{
this.tbPsflibName.ReadOnly = false;
this.tbPsflibName.Enabled = true;
- this.cbTryMixing.Checked = false;
- this.cbTryMixing.Enabled = false;
}
else
{
tbPsflibName.ReadOnly = true;
- this.cbTryMixing.Enabled = true;
tbPsflibName.Clear();
}
-
- if (String.IsNullOrEmpty((string)this.genericDriver.SelectedItem))
+ }
+ private void cbVabMinipsf_CheckedChanged(object sender, EventArgs e)
+ {
+ this.doVabMiniPsfCheckChange();
+ }
+ private void doVabMiniPsfCheckChange()
+ {
+ if (cbVabMinipsf.Checked)
{
- this.tbMySeqSize.Enabled = true;
- this.tbMySeqSize.ReadOnly = false;
+ this.tbVablibName.ReadOnly = false;
+ this.tbVablibName.Enabled = true;
+ this.cbTryMixing.Checked = false;
+ this.cbTryMixing.Enabled = false;
+ }
+ else
+ {
+ tbVablibName.ReadOnly = true;
+ this.cbTryMixing.Enabled = true;
+ tbVablibName.Clear();
}
}
@@ -189,13 +208,10 @@ private void loadStubBuilderPresets()
this.tbVhOffset.Text = "0x80130000";
this.tbVbOffset.Text = "0x80140000";
this.tbParamOffset.Text = "0x80101000";
-
- this.cbMinipsf.Enabled = true;
}
private void loadMarkGrassGenericPresets()
{
this.tbExePath.Text = Bin2PsfWorker.MGRASS_EXE_PATH;
- this.tbPsflibName.Clear();
this.tbSeqOffset.Text = "0x800A0000";
this.tbMySeqSize.Text = "0x00040000";
@@ -210,7 +226,6 @@ private void loadMarkGrassGenericPresets()
private void loadMarkGrass300GenericPresets()
{
this.tbExePath.Text = Bin2PsfWorker.MGRASS300_EXE_PATH;
- this.tbPsflibName.Clear();
this.tbSeqOffset.Text = "0x800A0000";
this.tbMySeqSize.Text = "0x00040000";
@@ -226,7 +241,6 @@ private void loadMarkGrass300GenericPresets()
private void loadMarkGrass422GenericPresets()
{
this.tbExePath.Text = Bin2PsfWorker.MGRASS422_EXE_PATH;
- this.tbPsflibName.Clear();
this.tbSeqOffset.Text = "0x800A0000";
this.tbMySeqSize.Text = "0x00040000";
@@ -242,7 +256,6 @@ private void loadMarkGrass422GenericPresets()
private void loadDavironicaGenericPresets()
{
this.tbExePath.Text = Bin2PsfWorker.EZPSF_EXE_PATH;
- this.tbPsflibName.Clear();
this.tbSeqOffset.Text = "0x80100000";
this.tbMySeqSize.Text = "0x00020000";
@@ -260,8 +273,6 @@ private void disablePresetFields()
// this.tbExePath.Enabled = false;
// this.tbExePath.ReadOnly = true;
// this.btnExeBrowse.Enabled = false;
- this.tbPsflibName.Enabled = false;
- this.tbPsflibName.ReadOnly = true;
this.tbParamOffset.Enabled = false;
this.tbParamOffset.ReadOnly = true;
@@ -281,10 +292,6 @@ private void enablePresetFields()
this.tbExePath.ReadOnly = false;
// this.tbExePath.Text = String.Empty;
this.btnExeBrowse.Enabled = true;
- this.tbPsflibName.Enabled = true;
- this.tbPsflibName.ReadOnly = false;
- this.cbMinipsf.Enabled = true;
- this.cbMinipsf_CheckedChanged(null, null);
this.tbParamOffset.Enabled = true;
this.tbParamOffset.ReadOnly = false;
@@ -302,8 +309,6 @@ private void enablePresetFields()
this.tbVbOffset.Enabled = true;
this.tbVbOffset.ReadOnly = false;
this.tbVbOffset.Clear();
-
- this.doMiniPsfCheckChange();
}
private bool validateInputs()
@@ -344,11 +349,11 @@ private void btnLoadFromStubMaker_Click(object sender, EventArgs e)
if (psfForm != null)
{
- this.tbSeqOffset.Text = psfForm.GetSeqOffset();
- this.tbVhOffset.Text = psfForm.GetVhOffset();
- this.tbVbOffset.Text = psfForm.GetVbOffset();
- this.tbMySeqSize.Text = psfForm.GetSeqSize();
- this.tbParamOffset.Text = psfForm.GetParamOffset();
+ this.tbSeqOffset.Text = !string.IsNullOrWhiteSpace(psfForm.GetSeqOffset()) ? psfForm.GetSeqOffset() : "0x80120000";
+ this.tbVhOffset.Text = !string.IsNullOrWhiteSpace(psfForm.GetVhOffset()) ? psfForm.GetVhOffset() : "0x80130000";
+ this.tbVbOffset.Text = !string.IsNullOrWhiteSpace(psfForm.GetVbOffset()) ? psfForm.GetVbOffset() : "0x80140000";
+ this.tbMySeqSize.Text = !string.IsNullOrWhiteSpace(psfForm.GetSeqSize()) ? psfForm.GetSeqSize() : "0x00010000";
+ this.tbParamOffset.Text = !string.IsNullOrWhiteSpace(psfForm.GetParamOffset()) ? psfForm.GetParamOffset() : "0x80101000";
}
}
diff --git a/VGMToolbox/forms/xsf/PsfStubMakerForm.Designer.cs b/VGMToolbox/forms/xsf/PsfStubMakerForm.Designer.cs
index 99ac31a..fa11d58 100644
--- a/VGMToolbox/forms/xsf/PsfStubMakerForm.Designer.cs
+++ b/VGMToolbox/forms/xsf/PsfStubMakerForm.Designer.cs
@@ -396,6 +396,8 @@ private void InitializeComponent()
// cbIncludeReverb
//
this.cbIncludeReverb.AutoSize = true;
+ this.cbIncludeReverb.Checked = true;
+ this.cbIncludeReverb.CheckState = System.Windows.Forms.CheckState.Checked;
this.cbIncludeReverb.Location = new System.Drawing.Point(9, 67);
this.cbIncludeReverb.Name = "cbIncludeReverb";
this.cbIncludeReverb.Size = new System.Drawing.Size(441, 17);
diff --git a/VGMToolbox/forms/xsf/PsfStubMakerForm.cs b/VGMToolbox/forms/xsf/PsfStubMakerForm.cs
index b4f637d..12a1822 100644
--- a/VGMToolbox/forms/xsf/PsfStubMakerForm.cs
+++ b/VGMToolbox/forms/xsf/PsfStubMakerForm.cs
@@ -133,7 +133,8 @@ private bool validateInputs()
ret = ret && AVgmtForm.checkTextBox(this.tbMyVb.Text, this.lblMyVb.Text);
ret = ret && AVgmtForm.checkTextBox(this.tbMyVbSize.Text, this.lblMyVbSize.Text);
}
-
+ ret = ret && AVgmtForm.checkTextBox(this.tbDriverText.Text, this.lblDriverText.Text);
+
return ret;
}
diff --git a/VGMToolbox/tools/xsf/Bin2PsfWorker.cs b/VGMToolbox/tools/xsf/Bin2PsfWorker.cs
index 7b83abd..323859c 100644
--- a/VGMToolbox/tools/xsf/Bin2PsfWorker.cs
+++ b/VGMToolbox/tools/xsf/Bin2PsfWorker.cs
@@ -23,8 +23,9 @@ public enum PsfMakerTask
SepMiniPsf,
SepMiniPsfWithVhVbLib,
SepPsfLib,
- SepPsfLibWithVhVbLib,
- SepPsfWithVhVbLib
+ //SepPsfLibWithVhVbLib,
+ SepPsfWithVhVbLib,
+ PsfLibDriver
}
public enum PsfDriverNames
@@ -81,6 +82,8 @@ public struct Bin2PsfStruct
public string outputFolder;
public bool MakePsfLib { set; get; }
public string psflibName;
+ public bool MakeVabLib { set; get; }
+ public string vablibName;
public bool TryCombinations;
public string DriverName;
@@ -157,9 +160,14 @@ private void makePsfs(Bin2PsfStruct pBin2PsfStruct, DoWorkEventArgs e)
}
}
}
+
+ if (pBin2PsfStruct.MakePsfLib)
+ {
+ this.maxFiles++;
+ }
// check psflib counts
- if (pBin2PsfStruct.MakePsfLib)
+ if (pBin2PsfStruct.MakeVabLib)
{
this.maxFiles++;
@@ -257,8 +265,30 @@ private void buildPsfs(string[] pUniqueSequences, string[] pVhFiles, Bin2PsfStru
return;
}
- // modify minipsf .exe for VH/VB lib and make .psflib
+ // make driver .psflib and point to minipsf.exe from now on
if (pBin2PsfStruct.MakePsfLib)
+ {
+ this.makePsfFile(
+ PsfMakerTask.PsfLibDriver,
+ pBin2PsfStruct,
+ pBin2PsfStruct.exePath,
+ null,
+ null,
+ null,
+ bin2PsfDestinationPath,
+ ripOutputFolder,
+ null,
+ //null,
+ Path.GetFileNameWithoutExtension(pBin2PsfStruct.psflibName),
+ -1,
+ -1);
+
+ originalExe = pBin2PsfStruct.exePath;
+ pBin2PsfStruct.exePath = setMiniPsfValues(GENERIC_MINIPSF_EXE_PATH, pBin2PsfStruct, null);
+ }
+
+ // modify minipsf .exe for VH/VB lib and make .psflib
+ if (pBin2PsfStruct.MakeVabLib)
{
// vhVbMiniPsfLibExePath = setMiniPsfValues(GENERIC_MINIPSF_EXE_PATH, pBin2PsfStruct, false);
@@ -271,9 +301,9 @@ private void buildPsfs(string[] pUniqueSequences, string[] pVhFiles, Bin2PsfStru
Path.ChangeExtension(pVhFiles[0], ".vb"),
bin2PsfDestinationPath,
ripOutputFolder,
- null,
- null,
- Path.GetFileNameWithoutExtension(pBin2PsfStruct.psflibName),
+ pBin2PsfStruct.psflibName,
+ //null,
+ Path.GetFileNameWithoutExtension(pBin2PsfStruct.vablibName),
-1,
-1);
}
@@ -284,9 +314,20 @@ private void buildPsfs(string[] pUniqueSequences, string[] pVhFiles, Bin2PsfStru
{
if (!CancellationPending)
{
- originalExe = pBin2PsfStruct.exePath;
sequenceType = this.getPsxSequenceType(sequenceFile);
+ if (pBin2PsfStruct.MakePsfLib)
+ {
+ if (sequenceType == PsxSequenceType.SeqType)
+ {
+ setMiniPsfValues(GENERIC_MINIPSF_EXE_PATH, pBin2PsfStruct, false);
+ }
+ else // sequenceType == PsxSequenceType.SepType
+ {
+ setMiniPsfValues(GENERIC_MINIPSF_EXE_PATH, pBin2PsfStruct, true);
+ }
+ }
+
// get sequence count
if (pBin2PsfStruct.ForceSepTrackNo && PsxSequence.IsSepTypeSequence(sequenceFile))
{
@@ -349,8 +390,8 @@ private void buildPsfs(string[] pUniqueSequences, string[] pVhFiles, Bin2PsfStru
Path.ChangeExtension(vhFile, ".vb"),
bin2PsfDestinationPath,
ripOutputFolder,
- null,
- null,
+ pBin2PsfStruct.psflibName,
+ //null,
filePrefix,
trackId,
(int)totalSequences);
@@ -376,8 +417,8 @@ private void buildPsfs(string[] pUniqueSequences, string[] pVhFiles, Bin2PsfStru
Path.ChangeExtension(vhFile, ".vb"),
bin2PsfDestinationPath,
ripOutputFolder,
- null,
- null,
+ pBin2PsfStruct.psflibName,
+ //null,
filePrefix,
i,
(int)totalSequences);
@@ -421,7 +462,7 @@ private void buildPsfs(string[] pUniqueSequences, string[] pVhFiles, Bin2PsfStru
}
}
- if (pBin2PsfStruct.MakePsfLib)
+ if (pBin2PsfStruct.MakeVabLib)
{
vhName = null;
vbName = null;
@@ -429,12 +470,12 @@ private void buildPsfs(string[] pUniqueSequences, string[] pVhFiles, Bin2PsfStru
if (sequenceType == PsxSequenceType.SeqType)
{
task = PsfMakerTask.SeqMiniPsf;
- vhVbMiniPsfLibExePath = setMiniPsfValues(GENERIC_MINIPSF_EXE_PATH, pBin2PsfStruct, false);
+ vhVbMiniPsfLibExePath = !pBin2PsfStruct.MakePsfLib ? setMiniPsfValues(GENERIC_MINIPSF_EXE_PATH, pBin2PsfStruct, false) : pBin2PsfStruct.exePath;
}
else // sequenceType == PsxSequenceType.SepType
{
task = PsfMakerTask.SepPsfWithVhVbLib;
- vhVbMiniPsfLibExePath = setMiniPsfValues(GENERIC_MINIPSF_EXE_PATH, pBin2PsfStruct, true);
+ vhVbMiniPsfLibExePath = !pBin2PsfStruct.MakePsfLib ? setMiniPsfValues(GENERIC_MINIPSF_EXE_PATH, pBin2PsfStruct, true) : pBin2PsfStruct.exePath;
}
exePath = vhVbMiniPsfLibExePath;
@@ -444,15 +485,6 @@ private void buildPsfs(string[] pUniqueSequences, string[] pVhFiles, Bin2PsfStru
vhName = Path.ChangeExtension(sequenceFile, ".vh");
vbName = Path.ChangeExtension(sequenceFile, ".vb");
exePath = pBin2PsfStruct.exePath;
-
- if (sequenceType == PsxSequenceType.SeqType)
- {
- task = PsfMakerTask.SeqPsf;
- }
- else // sequenceType == PsxSequenceType.SepType
- {
- task = PsfMakerTask.SepPsf;
- }
}
try
@@ -466,8 +498,8 @@ private void buildPsfs(string[] pUniqueSequences, string[] pVhFiles, Bin2PsfStru
vbName,
bin2PsfDestinationPath,
ripOutputFolder,
- pBin2PsfStruct.psflibName,
- null,
+ pBin2PsfStruct.MakeVabLib ? pBin2PsfStruct.vablibName : pBin2PsfStruct.psflibName,
+ //null,
filePrefix,
trackId,
(int)totalSequences);
@@ -484,14 +516,13 @@ private void buildPsfs(string[] pUniqueSequences, string[] pVhFiles, Bin2PsfStru
{
// make SEP psflib
psfLibName = Path.GetFileName(Path.ChangeExtension(sequenceFile, PSFLIB_FILE_EXTENSION));
+ sepPsfLibExePath = setMiniPsfValues(GENERIC_MINIPSF_EXE_PATH, pBin2PsfStruct, false);
- if (pBin2PsfStruct.MakePsfLib)
+ if (pBin2PsfStruct.MakeVabLib)
{
vhName = null;
vbName = null;
task = PsfMakerTask.SepMiniPsfWithVhVbLib;
- // sepPsfLibExePath = setMiniPsfValues(GENERIC_MINIPSF_EXE_PATH, pBin2PsfStruct, true);
- sepPsfLibExePath = setMiniPsfValues(GENERIC_MINIPSF_EXE_PATH, pBin2PsfStruct, false);
}
else
{
@@ -510,8 +541,8 @@ private void buildPsfs(string[] pUniqueSequences, string[] pVhFiles, Bin2PsfStru
vbName,
bin2PsfDestinationPath,
ripOutputFolder,
- null,
- null,
+ pBin2PsfStruct.MakeVabLib ? pBin2PsfStruct.vablibName : pBin2PsfStruct.psflibName,
+ //null,
Path.GetFileNameWithoutExtension(psfLibName),
-1,
-1);
@@ -538,8 +569,8 @@ private void buildPsfs(string[] pUniqueSequences, string[] pVhFiles, Bin2PsfStru
null,
bin2PsfDestinationPath,
ripOutputFolder,
- pBin2PsfStruct.psflibName,
psfLibName,
+ //null,
filePrefix,
i,
(int)totalSequences);
@@ -585,8 +616,9 @@ private void makePsfFile(
string vbFile,
string bin2PsfDestinationPath,
string ripOutputFolder,
- string vhVhPsfLibFileName,
- string sepPsfLibFileName,
+ string psfLibFileName,
+ //string vhVhPsfLibFileName,
+ //string sepPsfLibFileName,
string filePrefix,
int sepCount,
int sepTotalSeqs)
@@ -597,6 +629,7 @@ private void makePsfFile(
long pcOffsetVb;
long pcOffsetSepParams = 0;
long textSectionOffsetValue;
+ uint textSectionSizeValue;
bool isSeqPresent = !String.IsNullOrEmpty(seqFile);
bool isVbPresent = !String.IsNullOrEmpty(vbFile);
@@ -631,6 +664,7 @@ private void makePsfFile(
break;
case PsfMakerTask.SepPsfLib:
case PsfMakerTask.SeqPsfLib:
+ case PsfMakerTask.PsfLibDriver:
builtFilePath = String.Format("{0}.{1}", filePrefix, "psflib");
break;
default:
@@ -644,12 +678,17 @@ private void makePsfFile(
File.Copy(sourceExePath, destinationExeFile, true);
// determine offsets
+ bool isPAL;
using (FileStream fs = File.OpenRead(destinationExeFile))
{
// get offset of text section
byte[] textSectionOffset = ParseFile.ParseSimpleOffset(fs, 0x18, 4);
textSectionOffsetValue = BitConverter.ToUInt32(textSectionOffset, 0);
+ // check if it is a PAL version
+ string asciiMarker = ParseFile.ReadAsciiString(fs, Psf.MINIPSF_ASCII_MARKER_OFFSET);
+ isPAL = asciiMarker.Contains("Europe");
+
// calculate pc offsets
pcOffsetSeq = VGMToolbox.util.ByteConversion.GetLongValueFromString(pBin2PsfStruct.seqOffset) -
textSectionOffsetValue + Psf.PC_OFFSET_CORRECTION;
@@ -711,7 +750,7 @@ private void makePsfFile(
(task == PsfMakerTask.SepPsf) ||
(task == PsfMakerTask.SepPsfWithVhVbLib))
{
- byte[] tickModeBytes = BitConverter.GetBytes((uint)1);
+ byte[] tickModeBytes = BitConverter.GetBytes(isPAL ? 4 : 1);
byte[] loopOffBytes = BitConverter.GetBytes((uint)1);
byte[] sepCountBytes = BitConverter.GetBytes((uint)sepCount);
byte[] sepTotalSeqsBytes = BitConverter.GetBytes((uint)sepTotalSeqs);
@@ -720,20 +759,16 @@ private void makePsfFile(
FileUtil.UpdateChunk(destinationExeFile, (int)(pcOffsetSepParams + PARAM_MAXSEQ_LOOPOFF), loopOffBytes);
FileUtil.UpdateChunk(destinationExeFile, (int)(pcOffsetSepParams + PARAM_SEQNUM_OFFSET), sepCountBytes);
FileUtil.UpdateChunk(destinationExeFile, (int)(pcOffsetSepParams + PARAM_MAXSEQ_OFFSET), sepTotalSeqsBytes);
-
- if ((task == PsfMakerTask.SepMiniPsf) ||
- (task == PsfMakerTask.SepMiniPsfWithVhVbLib))
- {
- uint totalFileSize = (uint)(pcOffsetSepParams + PARAM_MAXSEQ_OFFSET + 4);
- byte[] totalFileSizeBytes = BitConverter.GetBytes(totalFileSize);
-
- FileUtil.TrimFileToLength(destinationExeFile, (int)totalFileSize);
- }
}
-
+
+ // update Text Section Size
+ textSectionSizeValue = (uint)FileUtil.GetFileSize(destinationExeFile) - Psf.PC_OFFSET_CORRECTION;
+ byte[] textSectionSizeBytes = BitConverter.GetBytes(textSectionSizeValue);
+ FileUtil.UpdateChunk(destinationExeFile, (int)Psf.TEXT_SIZE_OFFSET, textSectionSizeBytes);
+
// build bin2psf arguments
StringBuilder bin2PsfArguments = new StringBuilder();
- bin2PsfArguments.Append(String.Format(" {0} 1 {1}.bin", Path.GetExtension(builtFilePath).Substring(1), filePrefix));
+ bin2PsfArguments.Append(String.Format(" {0} 1 \"{1}.bin\"", Path.GetExtension(builtFilePath).Substring(1), filePrefix));
// run bin2psf
Process bin2PsfProcess = new Process();
@@ -747,10 +782,7 @@ private void makePsfFile(
if (isSuccess)
{
// add lib tag(s)
- if ((task == PsfMakerTask.SepMiniPsf) ||
- (task == PsfMakerTask.SeqMiniPsf) ||
- (task == PsfMakerTask.SepPsfWithVhVbLib) ||
- (task == PsfMakerTask.SepMiniPsfWithVhVbLib))
+ if (!String.IsNullOrEmpty(psfLibFileName))
{
using (FileStream ofs = File.Open(builtFilePath, FileMode.Open, FileAccess.Write))
{
@@ -759,7 +791,9 @@ private void makePsfFile(
{
System.Text.Encoding enc = System.Text.Encoding.ASCII;
bw.Write(enc.GetBytes(Xsf.ASCII_TAG)); // [TAG]
-
+ bw.Write(enc.GetBytes(String.Format("_lib={0}", psfLibFileName)));
+ bw.Write(new byte[] { 0x0A });
+ /*
if (!String.IsNullOrEmpty(vhVhPsfLibFileName))
{
bw.Write(enc.GetBytes(String.Format("_lib={0}", vhVhPsfLibFileName)));
@@ -778,7 +812,7 @@ private void makePsfFile(
bw.Write(enc.GetBytes(String.Format("_lib={0}", sepPsfLibFileName)));
bw.Write(new byte[] { 0x0A });
}
- }
+ }*/
}
}
}
@@ -798,42 +832,42 @@ private void makePsfFile(
}
}
- private string setMiniPsfValues(string templateMiniPsfPath, Bin2PsfStruct pBin2PsfStruct, bool useSepParameters)
+ private string setMiniPsfValues(string templateMiniPsfPath, Bin2PsfStruct pBin2PsfStruct, bool? useSepParameters)
{
+ byte[] offsetBytes;
string modifiedMiniPsfPath = Path.Combine(WORKING_FOLDER, Path.GetFileName(templateMiniPsfPath));
- long seqSize = VGMToolbox.util.ByteConversion.GetLongValueFromString(pBin2PsfStruct.SeqSize);
- int totalFileSize;
// copy file
- File.Copy(templateMiniPsfPath, modifiedMiniPsfPath, true);
-
- // edit values
- if (!useSepParameters)
+ if (!File.Exists(modifiedMiniPsfPath))
{
- byte[] seqOffsetBytes = BitConverter.GetBytes((uint)VGMToolbox.util.ByteConversion.GetLongValueFromString(pBin2PsfStruct.seqOffset));
- byte[] seqSizeBytes = BitConverter.GetBytes((uint)seqSize);
+ File.Copy(templateMiniPsfPath, modifiedMiniPsfPath);
+ //FileUtil.TrimFileToLength(modifiedMiniPsfPath, Psf.PC_OFFSET_CORRECTION + PARAM_MAXSEQ_OFFSET - 8);
- FileUtil.UpdateChunk(modifiedMiniPsfPath, Psf.MINIPSF_INITIAL_PC_OFFSET, seqOffsetBytes);
- FileUtil.UpdateChunk(modifiedMiniPsfPath, Psf.MINIPSF_TEXT_SECTION_OFFSET, seqOffsetBytes);
- FileUtil.UpdateChunk(modifiedMiniPsfPath, Psf.MINIPSF_TEXT_SECTION_SIZE_OFFSET, seqSizeBytes);
+ // replace ascii marker
+ string asciiMarker;
+ using (FileStream fs = File.OpenRead(pBin2PsfStruct.exePath))
+ {
+ asciiMarker = ParseFile.ReadAsciiString(fs, Psf.MINIPSF_ASCII_MARKER_OFFSET);
+ }
+ FileUtil.UpdateTextField(modifiedMiniPsfPath, asciiMarker, Psf.MINIPSF_ASCII_MARKER_OFFSET, 0x38);
+ }
- // trim end of file
- totalFileSize = (int)(seqSize + Psf.PC_OFFSET_CORRECTION);
+ // edit values
+ if (useSepParameters == true)
+ {
+ offsetBytes = BitConverter.GetBytes((uint)ByteConversion.GetLongValueFromString(pBin2PsfStruct.ParamOffset) + PARAM_SEQNUM_TICKMODE);
+ }
+ else if (useSepParameters == false)
+ {
+ offsetBytes = BitConverter.GetBytes((uint)ByteConversion.GetLongValueFromString(pBin2PsfStruct.seqOffset));
}
else
{
- uint paramOffet = (uint)VGMToolbox.util.ByteConversion.GetLongValueFromString(pBin2PsfStruct.ParamOffset);
- byte[] paramOffsetBytes = BitConverter.GetBytes(paramOffet);
-
- totalFileSize = (int)(Psf.PC_OFFSET_CORRECTION + PARAM_MAXSEQ_OFFSET + 4);
- byte[] textSectionSizeBytes = BitConverter.GetBytes((uint)(totalFileSize - Psf.PC_OFFSET_CORRECTION));
-
- FileUtil.UpdateChunk(modifiedMiniPsfPath, Psf.MINIPSF_INITIAL_PC_OFFSET, paramOffsetBytes);
- FileUtil.UpdateChunk(modifiedMiniPsfPath, Psf.MINIPSF_TEXT_SECTION_OFFSET, paramOffsetBytes);
- FileUtil.UpdateChunk(modifiedMiniPsfPath, Psf.MINIPSF_TEXT_SECTION_SIZE_OFFSET, textSectionSizeBytes);
+ offsetBytes = BitConverter.GetBytes((uint)ByteConversion.GetLongValueFromString(pBin2PsfStruct.vhOffset));
}
-
- FileUtil.TrimFileToLength(modifiedMiniPsfPath, totalFileSize);
+
+ //FileUtil.UpdateChunk(modifiedMiniPsfPath, Psf.MINIPSF_INITIAL_PC_OFFSET, offsetBytes);
+ FileUtil.UpdateChunk(modifiedMiniPsfPath, Psf.MINIPSF_TEXT_SECTION_OFFSET, offsetBytes);
return modifiedMiniPsfPath;
}
diff --git a/VGMToolbox/tools/xsf/PsfStubMakerWorker.cs b/VGMToolbox/tools/xsf/PsfStubMakerWorker.cs
index 1fd102a..8cc82fe 100644
--- a/VGMToolbox/tools/xsf/PsfStubMakerWorker.cs
+++ b/VGMToolbox/tools/xsf/PsfStubMakerWorker.cs
@@ -73,8 +73,8 @@ class PsfStubMakerWorker : AVgmtDragAndDropWorker, IVgmtBackgroundWorker
public static readonly string WorkingFolderPath =
Path.GetFullPath(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "working_psf"));
- private const int COMMENT_REVERB_OPEN = 295;
- private const int COMMENT_REVERB_CLOSE = 318;
+ private const int COMMENT_REVERB_OPEN = 300;
+ private const int COMMENT_REVERB_CLOSE = 325;
private const int DoSeqDefineLineNo = 11;
@@ -290,6 +290,16 @@ private PsfPsyQAddresses getAdditionalDriverInfo(PsfPsyQAddresses existingValues
ret.ExeFileNameCrc = String.Format(" (int)\"{0}\", 0x{1},", Path.GetFileName(driverPath), checksum);
ret.JumpPatchAddress = String.Format("0x{0}", BitConverter.ToUInt32(jumpAddress, 0).ToString("X8"));
+ // >4.6 drivers uses SpuInitHot (3.7) as SsUtReverbOn and SpuInit (3.7) as SsUtReverbOff.
+ if ((stubMakerParameters.IncludeReverb) &&
+ (String.IsNullOrEmpty(ret.SpuSetReverb)) &&
+ (String.IsNullOrEmpty(ret.SsUtReverbOn)) &&
+ (!String.IsNullOrEmpty(ret.SpuInitHot)))
+ {
+ long address = VGMToolbox.util.ByteConversion.GetLongValueFromString(ret.SpuInitHot);
+ ret.SsUtReverbOn = String.Format("0x{0}", address.ToString("X8"));
+ }
+
return ret;
}
diff --git a/VGMToolbox/tools/xsf/PsfTimerWorker.cs b/VGMToolbox/tools/xsf/PsfTimerWorker.cs
index 8151054..2a3f824 100644
--- a/VGMToolbox/tools/xsf/PsfTimerWorker.cs
+++ b/VGMToolbox/tools/xsf/PsfTimerWorker.cs
@@ -89,25 +89,25 @@ protected override void DoTaskForFile(string pPath, IVgmtWorkerStruct pPsxSeqExt
// loop entire track
if (psxSeqExtractStruct.loopEntireTrack)
{
- timingInfoSeconds = 2d * psxSeq.TimingInfo.TimeInSeconds;
+ timingInfoSeconds = Math.Round(2d * psxSeq.TimingInfo.TimeInSeconds, 6);
timingInfoFadeInSeconds = 10;
}
// Add line to batch file.
minutes = (int)(timingInfoSeconds / 60d);
- seconds = timingInfoSeconds - (minutes * 60);
+ seconds = Math.Round(timingInfoSeconds - (minutes * 60), 6);
// seconds = Math.Ceiling(seconds);
if (loopStartInSeconds > -1)
{
loopStartMinutes = (int)(loopStartInSeconds / 60d);
- loopStartSeconds = loopStartInSeconds - (loopStartMinutes * 60);
+ loopStartSeconds = Math.Round(loopStartInSeconds - (loopStartMinutes * 60), 6);
}
if (loopEndInSeconds > -1)
{
loopEndMinutes = (int)(loopEndInSeconds / 60d);
- loopEndSeconds = loopEndInSeconds - (loopEndMinutes * 60);
+ loopEndSeconds = Math.Round(loopEndInSeconds - (loopEndMinutes * 60), 6);
}
// shouldn't be needed without Math.Ceiling call, but whatever
@@ -117,14 +117,24 @@ protected override void DoTaskForFile(string pPath, IVgmtWorkerStruct pPsxSeqExt
seconds -= 60d;
}
- if ((loopStartInSeconds > -1) && (loopEndInSeconds > -1))
+ if (loopStartInSeconds > -1)
+ {
+ batchFile.AppendFormat("REM {0}: Loop Start: {1}:{2}",
+ Path.GetFileName(pPath),
+ loopStartMinutes.ToString(), loopStartSeconds.ToString().PadLeft(2, '0'));
+
+ if (loopEndInSeconds > -1)
+ {
+ batchFile.AppendFormat(" Loop Finish: {0}:{1}",
+ loopEndMinutes.ToString(), loopEndSeconds.ToString().PadLeft(2, '0'));
+ }
+
+ batchFile.AppendLine();
+ }
+ else
{
- batchFile.AppendLine(
- String.Format(
- "REM {0}: Loop Start: {1}:{2} Loop Finish: {3}:{4}",
- Path.GetFileName(pPath),
- loopStartMinutes.ToString(), loopStartSeconds.ToString().PadLeft(2, '0'),
- loopEndMinutes.ToString(), loopEndSeconds.ToString().PadLeft(2, '0')));
+ batchFile.AppendFormat("REM {0}: No Loop Found\n",
+ Path.GetFileName(pPath));
}
batchFile.AppendFormat("psfpoint.exe -length=\"{0}:{1}\" -fade=\"{2}\" \"{3}\"",
diff --git a/atracloop/Program.cs b/atracloop/Program.cs
index 821c2b4..ba17182 100644
--- a/atracloop/Program.cs
+++ b/atracloop/Program.cs
@@ -142,7 +142,7 @@ static long GetRiffValue(FileStream fs, string chunk, string offset)
ret = ParseFile.GetRiffCalculatedVaryingByteValueAtAbsoluteOffset(fs, riffCalculatingOffset, true);
}
- catch (IndexOutOfRangeException iorEx)
+ catch// (IndexOutOfRangeException iorEx)
{
// Console.WriteLine(String.Format("Error processing RIFF item for <{0}>: {1}", Path.GetFileName(fs.Name), iorEx.Message));
}
diff --git a/atracloop/atracloop.csproj b/atracloop/atracloop.csproj
index ffb2140..3eb39fa 100644
--- a/atracloop/atracloop.csproj
+++ b/atracloop/atracloop.csproj
@@ -26,13 +26,31 @@
AnyCPU
- pdbonly
+ none
true
bin\Release\
TRACE
prompt
4
+
+ true
+ bin\x86\Debug\
+ DEBUG;TRACE
+ full
+ x86
+ prompt
+ false
+
+
+ bin\x86\Release\
+ TRACE
+ true
+ none
+ x86
+ prompt
+ false
+
diff --git a/dbutil/dbutil.csproj b/dbutil/dbutil.csproj
index d30f5bf..95e2d07 100644
--- a/dbutil/dbutil.csproj
+++ b/dbutil/dbutil.csproj
@@ -30,7 +30,7 @@
false
- pdbonly
+ none
true
bin\Release\
TRACE
@@ -51,7 +51,7 @@
bin\x86\Release\
TRACE
true
- pdbonly
+ none
x86
prompt
false
diff --git a/format/VGMToolbox/format/CriUtfTable.cs b/format/VGMToolbox/format/CriUtfTable.cs
index 1ceeea6..a8040b3 100644
--- a/format/VGMToolbox/format/CriUtfTable.cs
+++ b/format/VGMToolbox/format/CriUtfTable.cs
@@ -803,7 +803,7 @@ public string ReadAsciiString(FileStream fs, long BaseOffset, long UtfOffset)
byte decryptedByte;
StringBuilder asciiVal = new StringBuilder();
- byte xorByte;
+ //byte xorByte;
long fileSize = fs.Length;
if (this.IsEncrypted)
diff --git a/format/VGMToolbox/format/FujitsuEup.cs b/format/VGMToolbox/format/FujitsuEup.cs
index 80b499c..f7a6b2d 100644
--- a/format/VGMToolbox/format/FujitsuEup.cs
+++ b/format/VGMToolbox/format/FujitsuEup.cs
@@ -24,7 +24,7 @@ public class FujitsuEup : IFormat
public string ShortTrackName { get; set; }
public string FmbFileName { get; set; }
public string PmbFileName { get; set; }
-
+ /*
private byte[] trackNameBytes;
private byte[] shortTrackNameBytes;
private byte[] fmbFileNameBytes;
@@ -35,7 +35,7 @@ public class FujitsuEup : IFormat
private int dataOffset;
private int dataLength;
-
+ */
Dictionary tagHash = new Dictionary();
public FujitsuEup() { }
diff --git a/format/VGMToolbox/format/Kssx.cs b/format/VGMToolbox/format/Kssx.cs
index 746ca80..ac2a5f8 100644
--- a/format/VGMToolbox/format/Kssx.cs
+++ b/format/VGMToolbox/format/Kssx.cs
@@ -38,7 +38,7 @@ public class Kssx
private const int DEVICE_FLAG_OFFSET = 0x0F;
private const int DEVICE_FLAG_LENGTH = 0x01;
-
+ /*
private byte[] asciiSignature;
private byte[] loadAddress;
private byte[] loadSize;
@@ -62,7 +62,7 @@ public class Kssx
public byte[] ExtraHeaderSize { get { return this.extraHeaderSize; } }
public byte[] DeviceFlag { get { return this.deviceFlag; } }
public byte[] Data { get { return this.data; } }
-
+ */
#region METHODS
public byte[] getAsciiSignature(Stream pStream)
diff --git a/format/VGMToolbox/format/MicrosoftExFatFileSystem.cs b/format/VGMToolbox/format/MicrosoftExFatFileSystem.cs
index 59b518a..39f9f18 100644
--- a/format/VGMToolbox/format/MicrosoftExFatFileSystem.cs
+++ b/format/VGMToolbox/format/MicrosoftExFatFileSystem.cs
@@ -586,7 +586,7 @@ private void processDirectory(
byte[] secondaryRecord;
byte entryType = 0xFF;
- MicrosoftExFatDirectoryStructure directory;
+ //MicrosoftExFatDirectoryStructure directory;
MicrosoftExFatFileStructure newFile;
MicrosoftExFatDirectoryStructure newDirectory;
ulong objectOffset;
diff --git a/format/VGMToolbox/format/MicrosoftSecureTransactedFileSystem.cs b/format/VGMToolbox/format/MicrosoftSecureTransactedFileSystem.cs
index 88c365f..58d6616 100644
--- a/format/VGMToolbox/format/MicrosoftSecureTransactedFileSystem.cs
+++ b/format/VGMToolbox/format/MicrosoftSecureTransactedFileSystem.cs
@@ -266,7 +266,7 @@ public static long ComputeBlockNumberAndGetOffset(int xBlock, uint headerSize, b
// from Free60 wiki
public static int ComputeDataBlockNumber(int xBlock, uint headerSize, byte blockSeparation)
{
- int xBlockShift;
+ /*int xBlockShift;
if (((headerSize + 0xFFF) & 0xF000) == 0xB000)
{
@@ -282,7 +282,7 @@ public static int ComputeDataBlockNumber(int xBlock, uint headerSize, byte block
{
xBlockShift = 1;
}
- }
+ }*/
int xBase = ((xBlock + 0xAA) / 0xAA);
diff --git a/format/VGMToolbox/format/Midi.cs b/format/VGMToolbox/format/Midi.cs
index 8d18e33..b1bf818 100644
--- a/format/VGMToolbox/format/Midi.cs
+++ b/format/VGMToolbox/format/Midi.cs
@@ -86,7 +86,7 @@ public long TotalFileLength
set { totalFileLength = value; }
}
- private string trackName;
+ //private string trackName;
public Midi()
{
diff --git a/format/VGMToolbox/format/MobiclipStream.cs b/format/VGMToolbox/format/MobiclipStream.cs
index 4e77ddf..c91ad5c 100644
--- a/format/VGMToolbox/format/MobiclipStream.cs
+++ b/format/VGMToolbox/format/MobiclipStream.cs
@@ -108,10 +108,10 @@ public virtual void DemultiplexStreams(MpegStream.DemuxOptionsStruct demuxOption
while (currentOffset < fileSize)
{
- if (currentOffset == 0x4C7DC)
+ /*if (currentOffset == 0x4C7DC)
{
int ccc = 1;
- }
+ }*/
blockSize = this.GetBlockSize(fs, currentOffset);
diff --git a/format/VGMToolbox/format/MobiclipWiiStream.cs b/format/VGMToolbox/format/MobiclipWiiStream.cs
index 2777373..b382f1d 100644
--- a/format/VGMToolbox/format/MobiclipWiiStream.cs
+++ b/format/VGMToolbox/format/MobiclipWiiStream.cs
@@ -164,7 +164,7 @@ protected override void DoFinalTasks(Dictionary streamWriters,
MpegStream.DemuxOptionsStruct demuxOptions)
{
GenhCreationStruct gcStruct;
- ushort frequency;
+ //ushort frequency;
string sourceFile;
string genhFile = null;
@@ -174,7 +174,7 @@ protected override void DoFinalTasks(Dictionary streamWriters,
{
if (demuxOptions.AddHeader &&
(key != MobiclipWiiStream.VideoChunkId) &&
- (this.AudioStreamFeatures[key].StreamType != null) &&
+ (this.AudioStreamFeatures[key].StreamType != 0) &&
(this.AudioStreamFeatures[key].StreamType == AudioChunkSignaturePcm))
{
if (streamWriters[key].Name.EndsWith(this.FileExtensionAudio))
diff --git a/format/VGMToolbox/format/Psf.cs b/format/VGMToolbox/format/Psf.cs
index e403764..d9813d0 100644
--- a/format/VGMToolbox/format/Psf.cs
+++ b/format/VGMToolbox/format/Psf.cs
@@ -30,6 +30,7 @@ public void Init()
public const int MINIPSF_INITIAL_PC_OFFSET = 0x10;
public const int MINIPSF_TEXT_SECTION_OFFSET = 0x18;
public const int MINIPSF_TEXT_SECTION_SIZE_OFFSET = 0x1C;
+ public const int MINIPSF_ASCII_MARKER_OFFSET = 0x4C;
public static readonly byte[] VB_START_BYTES = new byte[] { 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
diff --git a/format/VGMToolbox/format/PsxSequence.cs b/format/VGMToolbox/format/PsxSequence.cs
index 599cb8c..69ce501 100644
--- a/format/VGMToolbox/format/PsxSequence.cs
+++ b/format/VGMToolbox/format/PsxSequence.cs
@@ -152,12 +152,12 @@ private PsxSqTimingStruct getTimingInfo(Stream pStream)
bool running = false;
bool loopFound = false;
- bool loopEndFound = false;
+ bool loopCountFound = false;
bool emptyTimeNext = false;
double loopTime;
- int loopTimeMultiplier = 1;
+ sbyte loopTimeMultiplier = 1;
Stack loopTimeStack = new Stack();
ulong loopTicks;
Stack loopTickStack = new Stack();
@@ -398,36 +398,32 @@ private PsxSqTimingStruct getTimingInfo(Stream pStream)
loopTickStack.Push(0);
loopsOpened++;
- ret.LoopStartInSeconds = ((totalTime) * Math.Pow(10, -6));
+ ret.LoopStartInSeconds = Math.Round(totalTime * 1E-06, 6);
+ continue;
}
- // check for loop end
- if ((((currentByte & 0xF0) == 0xB0) || ((runningCommand & 0xF0) == 0xB0)) &&
- dataByte1 == 0x63 && dataByte2 == 0x1E)
+ // check for loop count
+ if (!loopCountFound && (loopTimeStack.Count > 0) &&
+ (((currentByte & 0xF0) == 0xB0) || ((runningCommand & 0xF0) == 0xB0)) &&
+ dataByte1 == 0x06)
{
- loopEndFound = true;
- loopsClosed++;
+ loopCountFound = true;
+ loopTimeMultiplier = (sbyte)dataByte2;
+ continue;
}
+ // check for loop end
if ((((currentByte & 0xF0) == 0xB0) || ((runningCommand & 0xF0) == 0xB0)) &&
- dataByte1 == 0x06)
+ dataByte1 == 0x63 && dataByte2 == 0x1E)
{
- loopTimeMultiplier = dataByte2;
- }
+ loopCountFound = false;
+ loopsClosed++;
- // check for loop count
- if (loopEndFound)
- {
if (this.force2Loops)
{
loopTimeMultiplier = 2;
loopFound = true;
}
- else if (loopTimeMultiplier == 127)
- {
- loopTimeMultiplier = 2;
- loopFound = true;
- }
else if (loopTimeMultiplier == 0)
{
loopTimeMultiplier = 1;
@@ -439,14 +435,24 @@ private PsxSqTimingStruct getTimingInfo(Stream pStream)
loopTime = loopTimeStack.Pop();
// set loop end
- ret.LoopEndInSeconds = ((totalTime + loopTime) * Math.Pow(10, -6));
+ ret.LoopEndInSeconds = Math.Round((totalTime + loopTime) * 1E-06, 6);
// multiply by loop multiplier.
- loopTime = (loopTime * loopTimeMultiplier);
- totalTime += loopTime;
+ if (loopTimeMultiplier < 127)
+ {
+ loopTime *= loopTimeMultiplier;
+ totalTime += loopTime;
+ }
+ else // infinite, loop twice
+ {
+ loopTime *= 2d;
+ totalTime += loopTime;
+ loopFound = true;
+ break;
+ }
loopTicks = loopTickStack.Pop();
- loopTicks = (loopTicks * (ulong)loopTimeMultiplier);
+ loopTicks *= (ulong)loopTimeMultiplier;
totalTicks += loopTicks;
timeSinceLastLoopEnd = 0;
@@ -454,7 +460,6 @@ private PsxSqTimingStruct getTimingInfo(Stream pStream)
}
- loopEndFound = false;
// emptyTimeNext = true;
}
}
@@ -471,12 +476,22 @@ private PsxSqTimingStruct getTimingInfo(Stream pStream)
// since it should be the outermost loop.
if (loopTimeStack.Count > 0)
{
- ret.Warnings += "Unmatched Loop Start tag(s) found." + Environment.NewLine;
+ loopFound = true;
+ if (this.force2Loops)
+ {
+ loopTimeMultiplier = 2;
+ }
+ else if ((loopTimeMultiplier <= 1) || (loopTimeMultiplier == 127))
+ {
+ loopTimeMultiplier = 1;
+ loopFound = false;
+ }
+
+ ret.Warnings += "Unmatched Loop Start tag(s) found. Set to " + loopTimeMultiplier + " loop(s)." + Environment.NewLine;
while (loopTimeStack.Count > 0)
{
- totalTime += loopTimeStack.Pop() * 2d;
- loopFound = true;
+ totalTime += loopTimeStack.Pop() * loopTimeMultiplier;
}
}
@@ -486,7 +501,7 @@ private PsxSqTimingStruct getTimingInfo(Stream pStream)
totalTime -= timeSinceLastLoopEnd;
}
- ret.TimeInSeconds = ((totalTime) * Math.Pow(10, -6));
+ ret.TimeInSeconds = Math.Round(totalTime * 1E-06, 6);
if (loopFound)
{
diff --git a/format/VGMToolbox/format/Vgm.cs b/format/VGMToolbox/format/Vgm.cs
index a69d8b7..2666ad9 100644
--- a/format/VGMToolbox/format/Vgm.cs
+++ b/format/VGMToolbox/format/Vgm.cs
@@ -93,7 +93,7 @@ public string FilePath
private byte[] totalNumOfSamples;
private byte[] loopOffset;
private byte[] loopNumOfSamples;
- private byte[] vgmData;
+ //private byte[] vgmData;
public byte[] SignatureTag { get { return this.signatureTag; } }
public byte[] EofOffset { get { return this.eofOffset; } }
@@ -104,7 +104,7 @@ public string FilePath
public byte[] TotalNumOfSamples { get { return this.totalNumOfSamples; } }
public byte[] LoopOffset { get { return this.loopOffset; } }
public byte[] LoopNumOfSamples { get { return this.loopNumOfSamples; } }
- public byte[] VgmData { get { return this.vgmData; } }
+ //public byte[] VgmData { get { return this.vgmData; } }
// All
public uint FullHeaderSize { set; get; }
diff --git a/format/VGMToolbox/format/XmvStream.cs b/format/VGMToolbox/format/XmvStream.cs
index 69d8fba..3cac16e 100644
--- a/format/VGMToolbox/format/XmvStream.cs
+++ b/format/VGMToolbox/format/XmvStream.cs
@@ -38,7 +38,7 @@ public struct XmvVideoDataHeader
public XmvAudioDataHeader[] AudioHeaders { set; get; }
}
-
+ /*
public struct XmvPacketHeader
{
byte[] NextPacketSize { set; get; }
@@ -65,7 +65,7 @@ public struct XmvAdpcmChunk
{
byte[] AudioDataSize { set; get; }
}
-
+ */
public string FilePath { get; set; }
diff --git a/format/VGMToolbox/format/sdat/SdatSymbSection.cs b/format/VGMToolbox/format/sdat/SdatSymbSection.cs
index d7c1ef2..4fb3b45 100644
--- a/format/VGMToolbox/format/sdat/SdatSymbSection.cs
+++ b/format/VGMToolbox/format/sdat/SdatSymbSection.cs
@@ -84,22 +84,22 @@ public SdatSymbSection() { }
private byte[] symbRecordPlayer2Offset;
private byte[] symbRecordStrmOffset;
- private byte[][] symbSeqSubRecords;
+ //private byte[][] symbSeqSubRecords;
private byte[][] symbSeqFileNames;
private byte[][] symbSeqArcFileNames;
- private byte[][] symbBankSubRecords;
+ //private byte[][] symbBankSubRecords;
private byte[][] symbBankFileNames;
- private byte[][] symbWaveArcSubRecords;
+ //private byte[][] symbWaveArcSubRecords;
private byte[][] symbWaveArcFileNames;
- private byte[][] symbPlayerSubRecords;
+ //private byte[][] symbPlayerSubRecords;
private byte[][] symbPlayerFileNames;
- private byte[][] symbGroupSubRecords;
+ //private byte[][] symbGroupSubRecords;
private byte[][] symbGroupFileNames;
- private byte[][] symbPlayer2SubRecords;
+ //private byte[][] symbPlayer2SubRecords;
private byte[][] symbPlayer2FileNames;
- private byte[][] symbStrmSubRecords;
+ //private byte[][] symbStrmSubRecords;
private byte[][] symbStrmFileNames;
private SdatSymbolRec sdatSymbolRecSeq;
diff --git a/format/VGMToolbox/format/sdat/Swav.cs b/format/VGMToolbox/format/sdat/Swav.cs
index 4f1f971..2fe0719 100644
--- a/format/VGMToolbox/format/sdat/Swav.cs
+++ b/format/VGMToolbox/format/sdat/Swav.cs
@@ -35,7 +35,7 @@ public string FilePath
get { return filePath; }
set { filePath = value; }
}
-
+ /*
// Tag Hash
Dictionary tagHash = new Dictionary();
@@ -50,7 +50,7 @@ public string FilePath
UInt32 swavHeaderSize;
SwavInfo swavInfo;
byte[] data;
-
+ */
// FILE INFO
private const int STD_HEADER_SIGNATURE_OFFSET = 0x00;
private const int STD_HEADER_SIGNATURE_LENGTH = 0x08;
diff --git a/format/VGMToolbox/format/util/GenhUtil.cs b/format/VGMToolbox/format/util/GenhUtil.cs
index 44082bc..309e086 100644
--- a/format/VGMToolbox/format/util/GenhUtil.cs
+++ b/format/VGMToolbox/format/util/GenhUtil.cs
@@ -91,7 +91,7 @@ public static string CreateGenhFile(string pSourcePath, GenhCreationStruct pGenh
{
string ret = String.Empty;
System.Text.Encoding enc = System.Text.Encoding.ASCII;
- long testCoefficient;
+ //long testCoefficient;
int dspInterleaveType =
GetDspInterleave(pGenhCreationStruct.Interleave, pGenhCreationStruct.Channels);
diff --git a/format/VGMToolbox/format/util/RiffUtil.cs b/format/VGMToolbox/format/util/RiffUtil.cs
index 9ed7988..2ae5dcb 100644
--- a/format/VGMToolbox/format/util/RiffUtil.cs
+++ b/format/VGMToolbox/format/util/RiffUtil.cs
@@ -376,8 +376,8 @@ public static ushort GetChannelsFromRiffHeader(Stream inputStream)
public static void InterleaveRiffToWavOutputFiles(string[] inputFiles, string outputFile,
InterleaveRiffFilesOptionsStruct interleaveOptions)
{
- uint frequency;
- uint channels;
+ //uint frequency;
+ //uint channels;
// verify that two or more files have been input
if (inputFiles.Length < 2)
diff --git a/format/VGMToolbox/format/util/XsfUtil.cs b/format/VGMToolbox/format/util/XsfUtil.cs
index b997614..16fbb0f 100644
--- a/format/VGMToolbox/format/util/XsfUtil.cs
+++ b/format/VGMToolbox/format/util/XsfUtil.cs
@@ -212,7 +212,10 @@ public class PsfPsyQAddresses
private string ssSetTableSize;
private string ssSetTickMode;
private string ssSeqSetVol;
+ private string ssUtSetReverbDelay;
+ private string ssUtSetReverbDepth;
private string ssUtSetReverbType;
+ private string ssUtSetReverbFeedback;
private string ssUtReverbOn;
private string ssVabOpenHead;
private string ssVabOpenHeadSticky;
@@ -221,6 +224,7 @@ public class PsfPsyQAddresses
private string ssVabTransCompleted;
private string spuInit;
+ private string spuInitHot;
private string spuIsTransferCompleted;
private string spuSetReverb;
@@ -300,11 +304,26 @@ public string SsSeqSetVol
set { ssSeqSetVol = value; }
get { return ssSeqSetVol; }
}
+ public string SsUtSetReverbDelay
+ {
+ set { ssUtSetReverbDelay = value; }
+ get { return ssUtSetReverbDelay; }
+ }
+ public string SsUtSetReverbDepth
+ {
+ set { ssUtSetReverbDepth = value; }
+ get { return ssUtSetReverbDepth; }
+ }
public string SsUtSetReverbType
{
set { ssUtSetReverbType = value; }
get { return ssUtSetReverbType; }
}
+ public string SsUtSetReverbFeedback
+ {
+ set { ssUtSetReverbFeedback = value; }
+ get { return ssUtSetReverbFeedback; }
+ }
public string SsUtReverbOn
{
set { ssUtReverbOn = value; }
@@ -341,6 +360,11 @@ public string SpuInit
set { spuInit = value; }
get { return spuInit; }
}
+ public string SpuInitHot
+ {
+ set { spuInitHot = value; }
+ get { return spuInitHot; }
+ }
public string SpuIsTransferCompleted
{
set { spuIsTransferCompleted = value; }
@@ -1213,12 +1237,7 @@ private static int GetSepSeqIndex(Stream data, string seqIndexOffset, string seq
return ret;
}
- public static PsfPsyQAddresses GetSigFindItems(Stream sigFindOutputStream, bool relaxLoadAddressRestriction)
- {
- return GetSigFindItems(sigFindOutputStream, relaxLoadAddressRestriction, null);
- }
-
- public static PsfPsyQAddresses GetSigFindItems(Stream sigFindOutputStream, bool relaxLoadAddressRestriction, PsfPsyQAddresses addressesToUpdate)
+ public static PsfPsyQAddresses GetSigFindItems(Stream sigFindOutputStream, bool relaxLoadAddressRestriction, PsfPsyQAddresses addressesToUpdate = null)
{
PsfPsyQAddresses ret;
@@ -1269,10 +1288,15 @@ public static PsfPsyQAddresses GetSigFindItems(Stream sigFindOutputStream, bool
if (psyQFunctions.Contains(firstChunk))
{
+ if ((firstChunk == "SpuInitHot") && (splitInput[1] != "(3.7)"))
+ {
+ continue;
+ }
+
addressValue = XsfUtil.getSigFindAddress(inputLine, false);
psyQValue = ret.GetType().GetProperty(firstChunk);
- if ((addressesToUpdate == null) || (psyQValue.GetValue(ret, null) == null))
+ if ((addressesToUpdate == null) || (psyQValue.GetValue(ret, null) == null) || (firstChunk == "SpuInitHot"))
{
psyQValue.SetValue(ret, addressValue, null);
}
@@ -1327,7 +1351,10 @@ public static ArrayList GetPsyQFunctionList()
psyQFunctionList.Add("SsSetTableSize");
psyQFunctionList.Add("SsSetTickMode");
psyQFunctionList.Add("SsSeqSetVol");
+ psyQFunctionList.Add("SsUtSetReverbDelay");
+ psyQFunctionList.Add("SsUtSetReverbDepth");
psyQFunctionList.Add("SsUtSetReverbType");
+ psyQFunctionList.Add("SsUtSetReverbFeedback");
psyQFunctionList.Add("SsUtReverbOn");
psyQFunctionList.Add("SsVabOpenHead");
psyQFunctionList.Add("SsVabTransBodyPartly");
@@ -1342,6 +1369,7 @@ public static ArrayList GetPsyQFunctionList()
psyQFunctionList.Add("SsVabTransBody");
psyQFunctionList.Add("SpuIsTransferCompleted");
psyQFunctionList.Add("SpuInit");
+ psyQFunctionList.Add("SpuInitHot");
psyQFunctionList.Add("SsStart2");
// SEP
@@ -1369,7 +1397,10 @@ public static Dictionary getPsyQSourceCodeList()
list.Add("SsSetTableSize", " #define SsSetTableSize(a,b,c) F3({0}) ((int)(a),(int)(b),(int)(c))");
list.Add("SsSetTickMode", " #define SsSetTickMode(a) F1({0}) ((int)(a))");
list.Add("SsSeqSetVol", " #define SsSeqSetVol(a,b,c) F3({0}) ((int)(a),(int)(b),(int)(c))");
+ list.Add("SsUtSetReverbDelay", " #define SsUtSetReverbDelay(a) ((short)( F1({0}) ((int)(a)) ))");
+ list.Add("SsUtSetReverbDepth", " #define SsUtSetReverbDepth(a,b) F2({0}) ((int)(a),(int)(b))");
list.Add("SsUtSetReverbType", " #define SsUtSetReverbType(a) ((short)( F1({0}) ((int)(a)) ))");
+ list.Add("SsUtSetReverbFeedback", " #define SsUtSetReverbFeedback(a) ((short)( F1({0}) ((int)(a)) ))");
list.Add("SsUtReverbOn", " #define SsUtReverbOn F0({0})");
list.Add("SsVabOpenHead", " #define SsVabOpenHead(a,b) ((short)( F2({0}) ((int)(a),(int)(b)) ))");
list.Add("SsVabTransBodyPartly", " #define SsVabTransBodyPartly(a,b,c) ((short)( F3({0}) ((int)(a),(int)(b),(int)(c)) ))");
@@ -1412,27 +1443,30 @@ public static Dictionary getPsyQSourceCodeLineNumberList()
list.Add(200, "SsSetTableSize");
list.Add(201, "SsSetTickMode");
list.Add(202, "SsSeqSetVol");
- list.Add(203, "SsUtSetReverbType");
- list.Add(204, "SsUtReverbOn");
- list.Add(205, "SsVabOpenHead");
- list.Add(206, "SsVabTransBodyPartly");
- list.Add(207, "SsVabTransCompleted");
+ list.Add(203, "SsUtSetReverbDelay");
+ list.Add(204, "SsUtSetReverbDepth");
+ list.Add(205, "SsUtSetReverbType");
+ list.Add(206, "SsUtSetReverbFeedback");
+ list.Add(207, "SsUtReverbOn");
+ list.Add(208, "SsVabOpenHead");
+ list.Add(209, "SsVabTransBodyPartly");
+ list.Add(210, "SsVabTransCompleted");
- list.Add(209, "SpuSetReverb");
- list.Add(210, "SpuSetReverbModeParam");
- list.Add(211, "SpuSetReverbDepth");
- list.Add(212, "SpuSetReverbVoice");
+ list.Add(212, "SpuSetReverb");
+ list.Add(213, "SpuSetReverbModeParam");
+ list.Add(214, "SpuSetReverbDepth");
+ list.Add(215, "SpuSetReverbVoice");
// alternatives
- list.Add(215, "SsVabOpenHeadSticky");
- list.Add(216, "SsVabTransBody");
- list.Add(217, "SpuIsTransferCompleted");
- list.Add(218, "SpuInit");
- list.Add(219, "SsStart2");
+ list.Add(218, "SsVabOpenHeadSticky");
+ list.Add(219, "SsVabTransBody");
+ list.Add(220, "SpuIsTransferCompleted");
+ list.Add(221, "SpuInit");
+ list.Add(222, "SsStart2");
// SEP
- list.Add(223, "SsSepOpen");
- list.Add(224, "SsSepPlay");
+ list.Add(226, "SsSepOpen");
+ list.Add(227, "SsSepPlay");
return list;
}
diff --git a/format/external/psf/minipsf.exe b/format/external/psf/minipsf.exe
index dbbf700..c987b33 100644
Binary files a/format/external/psf/minipsf.exe and b/format/external/psf/minipsf.exe differ
diff --git a/format/external/psf/psfdrv.c b/format/external/psf/psfdrv.c
index a521682..461e5df 100644
--- a/format/external/psf/psfdrv.c
+++ b/format/external/psf/psfdrv.c
@@ -200,7 +200,10 @@ unsigned long loopforever_data[] = {0x1000FFFF,0};
#define SsSetTableSize(a,b,c) F3(0x800396B0) ((int)(a),(int)(b),(int)(c))
#define SsSetTickMode(a) F1(0x80039490) ((int)(a))
#define SsSeqSetVol(a,b,c) F3(0x80039A40) ((int)(a),(int)(b),(int)(c))
+ #define SsUtSetReverbDelay(a) ((short)( F1(0x8003ACDC) ((int)(a)) ))
+ #define SsUtSetReverbDepth(a,b) F2(0x8003AD1C) ((int)(a),(int)(b))
#define SsUtSetReverbType(a) ((short)( F1(0x8003ADAC) ((int)(a)) ))
+ #define SsUtSetReverbFeedback(a) ((short)( F1(0x8003ADFC) ((int)(a)) ))
#define SsUtReverbOn F0(0x8003AE5C)
#define SsVabOpenHead(a,b) ((short)( F2(0x8003A2B0) ((int)(a),(int)(b)) ))
#define SsVabTransBodyPartly(a,b,c) ((short)( F3(0x8003A7C4) ((int)(a),(int)(b),(int)(c)) ))
@@ -252,8 +255,8 @@ int psfdrv(void) {
rtype = PARAM_RTYPE;
rdepth = PARAM_RDEPTH;
if(!seqvol) seqvol = 127;
- if(!rtype) rtype = 4;
- if(!rdepth) rdepth = 0x2A;
+ if(!rtype) rtype = 0;
+ if(!rdepth) rdepth = 0x50;
#ifndef DO_SEQ
tickmode = PARAM_TICKMODE;
@@ -295,7 +298,6 @@ int psfdrv(void) {
** Reverb setup
*/
-
{ unsigned reverb_attr[5] = {7,0x100,0,0,0};
reverb_attr[1] |= rtype;
reverb_attr[2] = (rdepth << 8) | (rdepth << 24);
@@ -306,6 +308,8 @@ int psfdrv(void) {
#ifdef SpuSetReverbDepth
SpuSetReverbDepth(reverb_attr);
+#elif defined SsUtSetReverbDepth
+ SsUtSetReverbDepth(rdepth, rdepth);
#endif
#ifdef SpuSetReverbVoice
@@ -317,15 +321,8 @@ int psfdrv(void) {
#elif defined SsUtReverbOn
SsUtReverbOn();
#endif
- }
-
-#ifdef SpuSetReverb
- SpuSetReverb(1);
-#elif defined SsUtReverbOn
- SsUtReverbOn();
-#endif
+ }
-
/*
** Start sound engine
*/
diff --git a/format/format.csproj b/format/format.csproj
index acb591e..4d5680e 100644
--- a/format/format.csproj
+++ b/format/format.csproj
@@ -30,7 +30,7 @@
false
- pdbonly
+ none
true
bin\Release\
TRACE
@@ -51,7 +51,7 @@
bin\x86\Release\
TRACE
true
- pdbonly
+ none
x86
prompt
false
@@ -250,7 +250,7 @@
- Always
+ Never
diff --git a/gzipext/gzipext.csproj b/gzipext/gzipext.csproj
index 1a0948d..4bcb846 100644
--- a/gzipext/gzipext.csproj
+++ b/gzipext/gzipext.csproj
@@ -30,7 +30,7 @@
false
- pdbonly
+ none
true
bin\Release\
TRACE
@@ -51,7 +51,7 @@
bin\x86\Release\
TRACE
true
- pdbonly
+ none
x86
prompt
false
@@ -84,8 +84,7 @@
-->
- del /Q *.pdb
-del /Q .\lib\7z.dll
+ del /Q .\lib\7z.dll
del /Q .\lib\SevenZipSharp.dll
del /Q ICSharpCode.SharpZipLib.dll
move vgmtutil.dll .\lib\vgmtutil.dll
diff --git a/hoot_vermouth_gen/Program.cs b/hoot_vermouth_gen/Program.cs
index 8d12019..d76c05d 100644
--- a/hoot_vermouth_gen/Program.cs
+++ b/hoot_vermouth_gen/Program.cs
@@ -89,7 +89,7 @@ static void Main(string[] args)
- int x = 1;
+ //int x = 1;
// write output file
diff --git a/hoot_vermouth_gen/hoot_vermouth_gen.csproj b/hoot_vermouth_gen/hoot_vermouth_gen.csproj
index 5d39c06..bd28511 100644
--- a/hoot_vermouth_gen/hoot_vermouth_gen.csproj
+++ b/hoot_vermouth_gen/hoot_vermouth_gen.csproj
@@ -26,13 +26,31 @@
AnyCPU
- pdbonly
+ none
true
bin\Release\
TRACE
prompt
4
+
+ true
+ bin\x86\Debug\
+ DEBUG;TRACE
+ full
+ x86
+ prompt
+ false
+
+
+ bin\x86\Release\
+ TRACE
+ true
+ none
+ x86
+ prompt
+ false
+
diff --git a/manakut/manakut.csproj b/manakut/manakut.csproj
index 7f309e6..81dd254 100644
--- a/manakut/manakut.csproj
+++ b/manakut/manakut.csproj
@@ -30,7 +30,7 @@
false
- pdbonly
+ none
true
bin\Release\
TRACE
@@ -51,7 +51,7 @@
bin\x86\Release\
TRACE
true
- pdbonly
+ none
x86
prompt
false
@@ -81,8 +81,7 @@
-->
- del /Q *.pdb
-del /Q .\lib\*.dll
+ del /Q .\lib\*.dll
del /Q .\lib\*.txt
del /Q ICSharpCode.SharpZipLib.dll
move vgmtutil.dll .\lib\vgmtutil.dll
diff --git a/mkpsf2fe/mkpsf2fe.csproj b/mkpsf2fe/mkpsf2fe.csproj
index 11d0721..449c640 100644
--- a/mkpsf2fe/mkpsf2fe.csproj
+++ b/mkpsf2fe/mkpsf2fe.csproj
@@ -30,7 +30,7 @@
false
- pdbonly
+ none
true
bin\Release\
TRACE
@@ -51,7 +51,7 @@
bin\x86\Release\
TRACE
true
- pdbonly
+ none
x86
prompt
false
diff --git a/sdatext/sdatext.csproj b/sdatext/sdatext.csproj
index 2e0be23..582ccbb 100644
--- a/sdatext/sdatext.csproj
+++ b/sdatext/sdatext.csproj
@@ -30,7 +30,7 @@
false
- pdbonly
+ none
true
bin\Release\
TRACE
@@ -51,7 +51,7 @@
bin\x86\Release\
TRACE
true
- pdbonly
+ none
x86
prompt
false
@@ -84,7 +84,6 @@
if not exist ".\lib" mkdir lib
move format.dll ".\lib\format.dll"
move vgmtutil.dll ".\lib\vgmtutil.dll"
-move ICSharpCode.SharpZipLib.dll ".\lib\ICSharpCode.SharpZipLib.dll"
-del *.pdb
+move ICSharpCode.SharpZipLib.dll ".\lib\ICSharpCode.SharpZipLib.dll"
\ No newline at end of file
diff --git a/sdatfind/sdatfind.csproj b/sdatfind/sdatfind.csproj
index 105809d..9d02526 100644
--- a/sdatfind/sdatfind.csproj
+++ b/sdatfind/sdatfind.csproj
@@ -30,7 +30,7 @@
false
- pdbonly
+ none
true
bin\Release\
TRACE
@@ -51,7 +51,7 @@
bin\x86\Release\
TRACE
true
- pdbonly
+ none
x86
prompt
false
@@ -88,7 +88,6 @@
if not exist ".\lib" mkdir lib
move format.dll ".\lib\format.dll"
move vgmtutil.dll ".\lib\vgmtutil.dll"
-move ICSharpCode.SharpZipLib.dll ".\lib\ICSharpCode.SharpZipLib.dll"
-del *.pdb
+move ICSharpCode.SharpZipLib.dll ".\lib\ICSharpCode.SharpZipLib.dll"
\ No newline at end of file
diff --git a/sdatopt/sdatopt.csproj b/sdatopt/sdatopt.csproj
index c12e840..7e44803 100644
--- a/sdatopt/sdatopt.csproj
+++ b/sdatopt/sdatopt.csproj
@@ -30,7 +30,7 @@
false
- pdbonly
+ none
true
bin\Release\
TRACE
@@ -51,7 +51,7 @@
bin\x86\Release\
TRACE
true
- pdbonly
+ none
x86
prompt
false
@@ -95,7 +95,6 @@
if not exist ".\lib" mkdir lib
move format.dll ".\lib\format.dll"
move vgmtutil.dll ".\lib\vgmtutil.dll"
-move ICSharpCode.SharpZipLib.dll ".\lib\ICSharpCode.SharpZipLib.dll"
-del *.pdb
+move ICSharpCode.SharpZipLib.dll ".\lib\ICSharpCode.SharpZipLib.dll"
\ No newline at end of file
diff --git a/snakebite/snakebite.csproj b/snakebite/snakebite.csproj
index 8698398..e63f6aa 100644
--- a/snakebite/snakebite.csproj
+++ b/snakebite/snakebite.csproj
@@ -30,7 +30,7 @@
false
- pdbonly
+ none
true
bin\Release\
TRACE
@@ -51,7 +51,7 @@
bin\x86\Release\
TRACE
true
- pdbonly
+ none
x86
prompt
false
@@ -81,8 +81,7 @@
-->
- del /Q *.pdb
-del /Q .\lib\*.dll
+ del /Q .\lib\*.dll
del /Q .\lib\*.txt
del /Q ICSharpCode.SharpZipLib.dll
move vgmtutil.dll .\lib\vgmtutil.dll
diff --git a/snakesplit/snakesplit.csproj b/snakesplit/snakesplit.csproj
index 6bfbe73..0951551 100644
--- a/snakesplit/snakesplit.csproj
+++ b/snakesplit/snakesplit.csproj
@@ -4,7 +4,7 @@
bin\x86\Release\
TRACE
true
- pdbonly
+ none
x86
prompt
false
@@ -48,7 +48,7 @@
false
- pdbonly
+ none
true
bin\Release\
TRACE
@@ -81,8 +81,7 @@
-->
- del /Q *.pdb
-del /Q .\lib\*.dll
+ del /Q .\lib\*.dll
del /Q .\lib\*.txt
del /Q ICSharpCode.SharpZipLib.dll
move vgmtutil.dll .\lib\vgmtutil.dll
diff --git a/utflist/utflist.csproj b/utflist/utflist.csproj
index bbcfcbe..98463e1 100644
--- a/utflist/utflist.csproj
+++ b/utflist/utflist.csproj
@@ -26,13 +26,31 @@
AnyCPU
- pdbonly
+ none
true
bin\Release\
TRACE
prompt
4
+
+ true
+ bin\x86\Debug\
+ DEBUG;TRACE
+ full
+ x86
+ prompt
+ false
+
+
+ bin\x86\Release\
+ TRACE
+ true
+ none
+ x86
+ prompt
+ false
+
diff --git a/vgmtinfo/vgmtinfo.csproj b/vgmtinfo/vgmtinfo.csproj
index 9b5b7c7..050ce87 100644
--- a/vgmtinfo/vgmtinfo.csproj
+++ b/vgmtinfo/vgmtinfo.csproj
@@ -30,7 +30,7 @@
false
- pdbonly
+ none
true
bin\Release\
TRACE
@@ -51,7 +51,7 @@
bin\x86\Release\
TRACE
true
- pdbonly
+ none
x86
prompt
false
@@ -81,8 +81,7 @@
-->
- del /Q *.pdb
-del /Q .\Bass.Net.dll
+ del /Q .\Bass.Net.dll
del /Q .\Bass.Net.xml
del /Q .\lib\Bass.Net.dll
diff --git a/vgmtplugin/vgmtplugin.csproj b/vgmtplugin/vgmtplugin.csproj
index 8488fb0..4771dfc 100644
--- a/vgmtplugin/vgmtplugin.csproj
+++ b/vgmtplugin/vgmtplugin.csproj
@@ -30,7 +30,7 @@
false
- pdbonly
+ none
true
bin\Release\
TRACE
@@ -51,7 +51,7 @@
bin\x86\Release\
TRACE
true
- pdbonly
+ none
x86
prompt
false
diff --git a/vgmtutil/App.config b/vgmtutil/App.config
deleted file mode 100644
index a6c6ef3..0000000
--- a/vgmtutil/App.config
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/vgmtutil/VGMToolbox/util/MathUtil.cs b/vgmtutil/VGMToolbox/util/MathUtil.cs
index b51a0f8..33fde96 100644
--- a/vgmtutil/VGMToolbox/util/MathUtil.cs
+++ b/vgmtutil/VGMToolbox/util/MathUtil.cs
@@ -6,15 +6,14 @@ public class MathUtil
{
public static string Evaluate(string expression)
{
- object results = null;
string outputValue;
try
{
- results = JSUtil.Util.Eval(expression);
+ object results = JSUtil.Util.Eval(expression);
outputValue = Convert.ToString((long)Convert.ToUInt64(results), 10);
}
- catch (Exception ex)
+ catch// (Exception ex)
{
outputValue = null;
}
@@ -24,18 +23,14 @@ public static string Evaluate(string expression)
public static long RoundUpToByteAlignment(long valueToRound, long byteAlignment)
{
- long roundedValue = -1;
-
- roundedValue = (valueToRound + byteAlignment - 1) / byteAlignment * byteAlignment;
+ long roundedValue = (valueToRound + byteAlignment - 1) / byteAlignment * byteAlignment;
return roundedValue;
}
public static ulong RoundUpToByteAlignment(ulong valueToRound, ulong byteAlignment)
{
- ulong roundedValue;
-
- roundedValue = (valueToRound + byteAlignment - 1) / byteAlignment * byteAlignment;
+ ulong roundedValue = (valueToRound + byteAlignment - 1) / byteAlignment * byteAlignment;
return roundedValue;
}
diff --git a/vgmtutil/VGMToolbox/util/ParseFile.cs b/vgmtutil/VGMToolbox/util/ParseFile.cs
index 5ff7d82..029d2c4 100644
--- a/vgmtutil/VGMToolbox/util/ParseFile.cs
+++ b/vgmtutil/VGMToolbox/util/ParseFile.cs
@@ -1508,7 +1508,7 @@ public static void ParseVirtualFileSystem(string sourcePath, string headerFilePa
{
fileItem = GetNextVfsRecord(headerFs, vfsInformation, currentOffset, currentFileCount, sourcePath, outputFolderPath);
}
- catch(Exception exp)
+ catch//(Exception exp)
{
//throw new Exception("foo", exp);
}
@@ -1654,7 +1654,6 @@ private static SimpleFileExtractionStruct GetNextVfsRecord(
break;
default:
throw new Exception("Invalid relative location type for relative file name offset.");
- break;
}
}
@@ -1804,7 +1803,6 @@ public static long GetRiffCalculatedVaryingByteValueAtAbsoluteOffset(Stream inSt
break;
default:
throw new InvalidDataException("Unknown relative location string for RIFF: " + offsetInfo.RelativeLocationToRiffChunkString);
- break;
}
// get the value
@@ -1894,7 +1892,6 @@ public static long GetByteSearchCalculatedVaryingByteValueAtAbsoluteOffset(Strea
break;
default:
throw new InvalidDataException("Unknown relative location string for bytes string search: " + offsetInfo.RelativeLocationToByteString);
- break;
}
// get the value
diff --git a/vgmtutil/vgmtutil.csproj b/vgmtutil/vgmtutil.csproj
index d8a6ae5..4a7c910 100644
--- a/vgmtutil/vgmtutil.csproj
+++ b/vgmtutil/vgmtutil.csproj
@@ -32,7 +32,7 @@
false
- pdbonly
+ none
true
bin\Release\
TRACE
@@ -55,7 +55,7 @@
bin\x86\Release\
TRACE
true
- pdbonly
+ none
x86
prompt
false
@@ -115,9 +115,6 @@
Always
-
-
-
- del /Q *.pdb
-del /Q .\lib\7z.dll
+ del /Q .\lib\7z.dll
del /Q .\lib\SevenZipSharp.dll
del /Q .\lib\Ionic.Zip.dll
del /Q .\lib\Ionic.Zip.License.txt
diff --git a/zlibext/zlibext.csproj b/zlibext/zlibext.csproj
index 88a9d23..17a6c15 100644
--- a/zlibext/zlibext.csproj
+++ b/zlibext/zlibext.csproj
@@ -30,7 +30,7 @@
false
- pdbonly
+ none
true
bin\Release\
TRACE
@@ -51,7 +51,7 @@
bin\x86\Release\
TRACE
true
- pdbonly
+ none
x86
prompt
false
@@ -81,8 +81,7 @@
-->
- del /Q *.pdb
-del /Q .\lib\7z.dll
+ del /Q .\lib\7z.dll
del /Q .\lib\SevenZipSharp.dll
del /Q ICSharpCode.SharpZipLib.dll
move vgmtutil.dll .\lib\vgmtutil.dll