Skip to content

Commit

Permalink
TAG728 2024/03/06
Browse files Browse the repository at this point in the history
  Core:XGM2:Jコマンド挙動修正。普通(?)の動きになりました。TAG727の動作はエクスポート或いはMDPlayerによる演奏を指定したときに発動します。
  • Loading branch information
kumatan committed Mar 5, 2024
1 parent 019e79a commit cfef1de
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 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����
TAG728 2024/03/06
Core:XGM2:J�R�}���h�����C���B����(?)�̓����ɂȂ�܂����BTAG727�̓���̓G�N�X�|�[�g������MDPlayer�ɂ�鉉�t���w�肵���Ƃ��ɔ������܂��B

TAG727 2024/03/05
Core:XGM2:J�R�}���h����(������J�̑O��L�R�}���h�������Ƃǂ�ȂɎ��ԓI�ɑO�̈ʒu��L�������Ă�J�̈ʒu��L������W�J�ɂȂ�܂��B)

Expand Down
17 changes: 13 additions & 4 deletions mml2vgm/Core/XGM2maker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,11 @@ private List<outDatum> AddWaitFM(List<outDatum> ret, int w)
//Core: XGM2: Jコマンド実装(ただしJの前にLコマンドを書くとどんなに時間的に前の位置にLがあってもJの位置にLがある展開になります。)

bool flgJ = false;//ジャンプコマンドに到達していないか。true:未到達(ジャンプコマンド無しを含む。到達済みだけど分割済みも含む) false:到達
if (mmlInfo.jumpPointClock > fmWaitCounter || mmlInfo.jumpPointClock == -1 || fmJumpPtr >= 0) flgJ = true;
if (exportMode)
{
if (mmlInfo.jumpPointClock > fmWaitCounter || mmlInfo.jumpPointClock == -1 || fmJumpPtr >= 0) flgJ = true;
}
else flgJ = true;

bool flgL = false;//ループコマンドに到達していないか。 true:未到達(ループコマンド 無しを含む。到達済みだけど分割済みも含む) false;到達
if (mmlInfo.loopSamples > fmWaitCounter || mmlInfo.loopSamples == -1 || fmLoopPtr >= 0) flgL = true;
Expand Down Expand Up @@ -799,7 +803,7 @@ private List<outDatum> AddWaitFM(List<outDatum> ret, int w)

private void AddWaitFM2(List<outDatum> ret, int w)
{
if (mmlInfo.jumpPointClock != -1 && fmJumpPtr < 0) return;
if (exportMode) if (mmlInfo.jumpPointClock != -1 && fmJumpPtr < 0) return;

while (w > 0)
{
Expand Down Expand Up @@ -842,7 +846,11 @@ private List<outDatum> AddWaitPSG(List<outDatum> ret, int w)
//Core: XGM2: Jコマンド実装(ただしJの前にLコマンドを書くとどんなに時間的に前の位置にLがあってもJの位置にLがある展開になります。)

bool flgJ = false;//ジャンプコマンドに到達していないか。true:未到達(ジャンプコマンド無しを含む。到達済みだけど分割済みも含む) false:到達
if (mmlInfo.jumpPointClock > psgWaitCounter || mmlInfo.jumpPointClock == -1 || psgJumpPtr >= 0) flgJ = true;
if (exportMode)
{
if (mmlInfo.jumpPointClock > psgWaitCounter || mmlInfo.jumpPointClock == -1 || psgJumpPtr >= 0) flgJ = true;
}
else flgJ = true;

bool flgL = false;//ループコマンドに到達していないか。 true:未到達(ループコマンド 無しを含む。到達済みだけど分割済みも含む) false;到達
if (mmlInfo.loopSamples > psgWaitCounter || mmlInfo.loopSamples == -1 || psgLoopPtr >= 0) flgL = true;
Expand Down Expand Up @@ -874,7 +882,8 @@ private List<outDatum> AddWaitPSG(List<outDatum> ret, int w)

private void AddWaitPSG2(List<outDatum> ret, int w)
{
if (mmlInfo.jumpPointClock != -1 && psgJumpPtr < 0) return;
if (exportMode)
if (mmlInfo.jumpPointClock != -1 && psgJumpPtr < 0) return;

while (w > 0)
{
Expand Down
7 changes: 7 additions & 0 deletions mml2vgm/mml2vgmIDEx64/Driver/xgm2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,13 @@ private void oneFrameMain()
vgmFrameCounter++;
Audio.DriverSeqCounter++;

//jump処理
while (jumpPointClock > 0)
{
oneFrameXGM();
jumpPointClock--;
}

musicStep = Common.DataSequenceSampleRate / (isNTSC ? 60.0 : 50.0);

if (musicDownCounter <= 0.0)
Expand Down

0 comments on commit cfef1de

Please sign in to comment.