Skip to content

Commit

Permalink
TAG040 2020/08/31
Browse files Browse the repository at this point in the history
  他アプリとの連携のための微調整(Q,q:GateTime)
  • Loading branch information
kumatan committed Aug 30, 2020
1 parent 14d26c4 commit 96bf9af
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
�X�V����
TAG040 2020/08/31
���A�v���Ƃ̘A�g�̂��߂̔�����(Q,q:GateTime)

TAG039 2020/08/29 2nd
���A�v���Ƃ̘A�g�̂��߂̔�����

Expand Down
27 changes: 21 additions & 6 deletions PMDDotNETCompiler/mc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand Down
20 changes: 20 additions & 0 deletions PMDDotNETDriver/PMD.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4512,6 +4512,8 @@ public Func<object> 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;
}

Expand All @@ -4523,6 +4525,8 @@ public Func<object> comq3()

r.al = (byte)pw.md[r.si++].dat;
pw.partWk[r.di].qdat2 = r.al;
comq_dmy();

return null;
}

Expand All @@ -4534,6 +4538,8 @@ public Func<object> comq4()

r.al = (byte)pw.md[r.si++].dat;
pw.partWk[r.di].qdat3 = r.al;
comq_dmy();

return null;
}

Expand All @@ -4551,10 +4557,24 @@ public Func<object> 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
Expand Down
Binary file modified PMDDotNETPlayer/lib/MDSound.dll
Binary file not shown.

0 comments on commit 96bf9af

Please sign in to comment.