diff --git a/CHANGE.txt b/CHANGE.txt index b1efbaf..7e48b2e 100644 --- a/CHANGE.txt +++ b/CHANGE.txt @@ -1,4 +1,7 @@ 更新履歴 +TAG040 2020/08/31 + 他アプリとの連携のための微調整(Q,q:GateTime) + TAG039 2020/08/29 2nd 他アプリとの連携のための微調整 diff --git a/PMDDotNETCompiler/mc.cs b/PMDDotNETCompiler/mc.cs index 1884ab7..9275461 100644 --- a/PMDDotNETCompiler/mc.cs +++ b/PMDDotNETCompiler/mc.cs @@ -7191,10 +7191,13 @@ private enmPass2JumpTable qset() work.dx = ((byte)'q') * 0x100 + (byte)work.dx; get_clock(); - work.dx = work.al * 0x100 + (byte)0xfe; - - m_seg.m_buf.Set(work.di++, new MmlDatum((byte)work.dx)); - m_seg.m_buf.Set(work.di++, new MmlDatum((byte)(work.dx >> 8))); + //work.dx = work.al * 0x100 + (byte)0xfe; + //m_seg.m_buf.Set(work.di++, new MmlDatum((byte)work.dx)); + //m_seg.m_buf.Set(work.di++, new MmlDatum((byte)(work.dx >> 8))); + work.ctype = enmMMLType.Gatetime; + work.cargs = new object[] { (int)work.al }; + work.dx = 0xfe00 + work.al; + parset(); al = work.si < mml_seg.mml_buf.Length ? mml_seg.mml_buf[work.si] : (char)0x1a; if (al != '-') goto qseta; @@ -7221,8 +7224,14 @@ private enmPass2JumpTable qset() qrnd_set:; if ((work.dx & 0xff00) == 0) goto qseta; - m_seg.m_buf.Set(work.di++, new MmlDatum((byte)work.dx)); - m_seg.m_buf.Set(work.di++, new MmlDatum((byte)(work.dx >> 8))); + //m_seg.m_buf.Set(work.di++, new MmlDatum((byte)work.dx)); + //m_seg.m_buf.Set(work.di++, new MmlDatum((byte)(work.dx >> 8))); + + byte b = (byte)work.dx; + work.dx = (work.dx >> 8) + b * 0x100; + work.ctype = enmMMLType.Gatetime; + work.cargs = new object[] { (int)work.al }; + parset(); qseta:; al = work.si < mml_seg.mml_buf.Length ? mml_seg.mml_buf[work.si] : (char)0x1a; @@ -7233,6 +7242,8 @@ private enmPass2JumpTable qset() work.dx = ((byte)'q') * 0x100 + (byte)work.dx; get_clock(); work.dx = 0xb300 + work.al; + work.ctype = enmMMLType.Gatetime; + work.cargs = new object[] { (int)work.al }; return enmPass2JumpTable.parset; } @@ -7265,6 +7276,8 @@ private enmPass2JumpTable qset2() q2_not_inc:; work.al = (byte)~work.al; work.dx = 0xc400 + work.al; + work.ctype = enmMMLType.Gatetime; + work.cargs = new object[] { (int)work.al }; return enmPass2JumpTable.parset; } @@ -7281,6 +7294,8 @@ private enmPass2JumpTable qset3() cy = lngset(out bx, out al); work.al = (byte)~work.al; work.dx = 0xc400 + work.al; + work.ctype = enmMMLType.Gatetime; + work.cargs = new object[] { (int)work.al }; return enmPass2JumpTable.parset; } diff --git a/PMDDotNETDriver/PMD.cs b/PMDDotNETDriver/PMD.cs index 38b6a4a..12d220f 100644 --- a/PMDDotNETDriver/PMD.cs +++ b/PMDDotNETDriver/PMD.cs @@ -4512,6 +4512,8 @@ public Func comq() r.al = (byte)pw.md[r.si++].dat; pw.partWk[r.di].qdata = r.al; pw.partWk[r.di].qdat3 = 0; + comq_dmy(); + return null; } @@ -4523,6 +4525,8 @@ public Func comq3() r.al = (byte)pw.md[r.si++].dat; pw.partWk[r.di].qdat2 = r.al; + comq_dmy(); + return null; } @@ -4534,6 +4538,8 @@ public Func comq4() r.al = (byte)pw.md[r.si++].dat; pw.partWk[r.di].qdat3 = r.al; + comq_dmy(); + return null; } @@ -4551,10 +4557,24 @@ public Func comq2() r.al = (byte)pw.md[r.si++].dat; pw.partWk[r.di].qdatb = r.al; + comq_dmy(); return null; } + private void comq_dmy() + { + //IDE蜷代¢ + ChipDatum cd = new ChipDatum(-1, -1, -1); + MmlDatum md = new MmlDatum(-1, enmMMLType.Gatetime, pw.cmd.linePos + , (int)pw.partWk[r.di].qdatb // Q% + , (int)pw.partWk[r.di].qdata // q [X] -x , x :謨ー蛟、1 + , (int)pw.partWk[r.di].qdat2 // q x -x , [X] :謨ー蛟、3 + , (int)pw.partWk[r.di].qdat3 // q x [-X] , x :謨ー蛟、2 + ); + cd.addtionalData = md; + WriteDummy(cd); + } //3403-3410 diff --git a/PMDDotNETPlayer/lib/MDSound.dll b/PMDDotNETPlayer/lib/MDSound.dll index c5bc1c7..07ef1dc 100644 Binary files a/PMDDotNETPlayer/lib/MDSound.dll and b/PMDDotNETPlayer/lib/MDSound.dll differ