Skip to content

Commit

Permalink
TAG721 2024/02/29
Browse files Browse the repository at this point in the history
  Core,IDE:XGM2を追加。
  • Loading branch information
kumatan committed Feb 28, 2024
1 parent a830e10 commit 4a167e4
Show file tree
Hide file tree
Showing 35 changed files with 4,193 additions and 144 deletions.
3 changes: 3 additions & 0 deletions mml2vgm/CHANGE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
�X�V����
TAG721 2024/02/29
Core,IDE:XGM2��lj��B

TAG720 2024/02/04
License��GPL�ɕύX

Expand Down
9 changes: 9 additions & 0 deletions mml2vgm/Core/Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,13 @@
<Compile Include="chips\QSound.cs" />
<Compile Include="chips\RF5C164.cs" />
<Compile Include="chips\segaPcm.cs" />
<Compile Include="chips\SN76489X2.cs" />
<Compile Include="chips\SN76489.cs" />
<Compile Include="chips\VRC6.cs" />
<Compile Include="chips\Y8950.cs" />
<Compile Include="chips\YM2151.cs" />
<Compile Include="chips\YM2203.cs" />
<Compile Include="chips\YM2612X2.cs" />
<Compile Include="chips\YM3526.cs" />
<Compile Include="chips\YM3812.cs" />
<Compile Include="chips\YMF262.cs" />
Expand Down Expand Up @@ -110,12 +112,16 @@
<Compile Include="partWork.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SourceParser.cs" />
<Compile Include="XGM2maker.cs" />
<Compile Include="ZGMmaker.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="fnum\FNUM_Gigatron.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="fnum\FNUM_SN76489X2.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="fnum\FNUM_VRC6.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
Expand Down Expand Up @@ -143,6 +149,9 @@
<Content Include="fnum\FNUM_Y8950.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="fnum\FNUM_YM2612X2.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="fnum\FNUM_YM3526.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
Expand Down
5 changes: 4 additions & 1 deletion mml2vgm/Core/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ public enum enmFormat
{
VGM,
XGM,
XGM2,
ZGM
}

Expand Down Expand Up @@ -66,7 +67,9 @@ public enum enmChipType : int
NES = 25,
DMG = 26,
VRC6 = 27,
Gigatron=28
Gigatron=28,
YM2612X2 = 29,
SN76489X2 = 30,
}

public enum EnmZGMDevice : int
Expand Down
2 changes: 1 addition & 1 deletion mml2vgm/Core/GD3maker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void make(List<outDatum> dat, Information info, string lyric)
dat.Add(new outDatum(enmMMLType.unknown, null, null, 0x00));

//歌詞
if (lyric != "")
if (!string.IsNullOrEmpty(lyric))
{
foreach (byte b in Encoding.Unicode.GetBytes(lyric)) dat.Add(new outDatum(enmMMLType.unknown, null, null, b));
dat.Add(new outDatum(enmMMLType.unknown, null, null, 0x00));
Expand Down
15 changes: 5 additions & 10 deletions mml2vgm/Core/Information.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,22 +144,15 @@ private void SetFormat(string val)
case "VGM":
default:
format = enmFormat.VGM;
//tempo = DEFAULT_TEMPO;
//clockCount = DEFAULT_CLOCK_COUNT;
//samplesPerClock = DEFAULT_SAMPLES_PER_CLOCK;
break;
case "XGM":
format = enmFormat.XGM;
//tempo = DEFAULT_TEMPO;
//clockCount = XGM_DEFAULT_CLOCK_COUNT;
//samplesPerClock = XGM_DEFAULT_SAMPLES_PER_CLOCK;
//samplesPerClock = xgmSamplesPerSecond * 60.0 * 4.0 / (tempo * clockCount);
break;
case "XGM2":
format = enmFormat.XGM2;
break;
case "ZGM":
format = enmFormat.ZGM;
//tempo = DEFAULT_TEMPO;
//clockCount = DEFAULT_CLOCK_COUNT;
//samplesPerClock = DEFAULT_SAMPLES_PER_CLOCK;
break;
}
}
Expand Down Expand Up @@ -200,6 +193,7 @@ public void SetTimers()
samplesPerClock = Information.VGM_SAMPLE_PER_SECOND * 60.0 * 4.0 / (tempo * clockCount);
break;
case enmFormat.XGM:
case enmFormat.XGM2:
samplesPerClock = xgmSamplesPerSecond * 60.0 * 4.0 / (tempo * clockCount);
break;
case enmFormat.ZGM:
Expand All @@ -217,6 +211,7 @@ public void SetTimers()
samplesPerClock = 44100 / vgmVsync;
break;
case enmFormat.XGM:
case enmFormat.XGM2:
vgmVsync = (int)xgmSamplesPerSecond;
samplesPerClock = 1;
break;
Expand Down
Binary file modified mml2vgm/Core/MDSound.dll
Binary file not shown.
Loading

0 comments on commit 4a167e4

Please sign in to comment.