Beispiel #1
0
        public void FVTEXT(int vn)
        {
            int  fvfg   = 0;
            int  fmlib1 = 1;// 0x6001;
            bool found  = false;

            for (int i = 0; i < mucInfo.basSrc.Count; i++)
            {
                if (mucInfo.basSrc[i] == null)
                {
                    continue;
                }
                if (mucInfo.basSrc[i].Item2 == null)
                {
                    continue;
                }
                if (mucInfo.basSrc[i].Item2.Length < 4)
                {
                    continue;
                }
                if (mucInfo.basSrc[i].Item2[0] != ' ')
                {
                    continue;
                }
                if (mucInfo.basSrc[i].Item2[2] != '@')
                {
                    continue;
                }

                int srcCPtr = 3;
                if (mucInfo.basSrc[i].Item2[srcCPtr] == '%')
                {
                    srcCPtr++;
                    fvfg = '%';
                }

                int n = msub.REDATA(mucInfo.basSrc[i], ref srcCPtr);
                if (mucInfo.Carry || mucInfo.ErrSign)
                {
                    muc88.WriteWarning(msg.get("W0409"), i, srcCPtr);
                }
                if (n != vn)
                {
                    continue;
                }

                found = true;

                if (fvfg == '%')
                {
                    // ---	%(25BYTEシキ) ノ トキ ノ ヨミコミ	---

                    for (int row = 0; row < 6; row++)
                    {
                        i++;
                        srcCPtr = 1;
                        for (int col = 0; col < 4; col++)
                        {
                            byte v = (byte)msub.REDATA(mucInfo.basSrc[i], ref srcCPtr);
                            if (mucInfo.Carry || mucInfo.ErrSign)
                            {
                                muc88.WriteWarning(msg.get("W0409"), i, srcCPtr);
                            }
                            srcCPtr++;// SKIP','
                            mucInfo.mmlVoiceDataWork.Set(
                                fmlib1++
                                , v
                                );
                        }
                    }

                    i++;
                    srcCPtr = 2;
                    mucInfo.mmlVoiceDataWork.Set(
                        fmlib1
                        , (byte)msub.REDATA(mucInfo.basSrc[i], ref srcCPtr)
                        );
                }
                else
                {
                    //// --	38バイトベーシックホウシキノトキノ ヨミコミ	--

                    i++;
                    srcCPtr = 2;
                    int fb = msub.REDATA(mucInfo.basSrc[i], ref srcCPtr);
                    if (mucInfo.Carry || mucInfo.ErrSign)
                    {
                        muc88.WriteWarning(msg.get("W0409"), i, srcCPtr);
                    }
                    srcCPtr++;
                    int alg = msub.REDATA(mucInfo.basSrc[i], ref srcCPtr);
                    if (mucInfo.Carry || mucInfo.ErrSign)
                    {
                        muc88.WriteWarning(msg.get("W0409"), i, srcCPtr);
                    }
                    srcCPtr++;

                    for (int row = 0; row < 4; row++)
                    {
                        i++;
                        srcCPtr = 1;
                        for (int col = 0; col < 9; col++)
                        {
                            byte v = (byte)msub.REDATA(mucInfo.basSrc[i], ref srcCPtr);
                            if (mucInfo.Carry || mucInfo.ErrSign)
                            {
                                muc88.WriteWarning(msg.get("W0409"), i, srcCPtr);
                            }
                            srcCPtr++;// SKIP','
                            mucInfo.mmlVoiceDataWork.Set(
                                fmlib1++
                                , v
                                );
                        }
                    }
                    mucInfo.mmlVoiceDataWork.Set(fmlib1++, (byte)fb);
                    mucInfo.mmlVoiceDataWork.Set(fmlib1, (byte)alg);
                    //    Z80.HL = 0x6001;
                    smon.CONVERT();//38BYTE->25BYTE
                }

                break;
            }

            mucInfo.Carry = false;
            if (!found)
            {
                mucInfo.Carry = true;
            }
            return;
        }
Beispiel #2
0
        public void FVTEXT(int vn)
        {
            int  fvfg;
            int  fmlib1 = 1;// 0x6001;
            bool found  = false;
            bool warningFlag;

            for (int i = 0; i < mucInfo.basSrc.Count; i++)
            {
                if (mucInfo.basSrc[i] == null)
                {
                    continue;
                }
                if (mucInfo.basSrc[i].Item2 == null)
                {
                    continue;
                }
                if (mucInfo.basSrc[i].Item2.Length < 4)
                {
                    continue;
                }
                if (mucInfo.basSrc[i].Item2[0] != ' ')
                {
                    continue;
                }
                if (mucInfo.basSrc[i].Item2[2] != '@')
                {
                    continue;
                }

                int srcCPtr = 3;
                fvfg = '\0';
                if (mucInfo.basSrc[i].Item2[srcCPtr] == '%')
                {
                    srcCPtr++;
                    fvfg = '%';
                }
                else if (mucInfo.basSrc[i].Item2[srcCPtr] == 'M' || mucInfo.basSrc[i].Item2[srcCPtr] == 'm')
                {
                    srcCPtr++;
                    fvfg = 'M';
                }

                int n = msub.REDATA(mucInfo.basSrc[i], ref srcCPtr);
                if (mucInfo.Carry || mucInfo.ErrSign)
                {
                    muc88.WriteWarning(msg.get("W0409"), i, srcCPtr);
                }
                if (n != vn)
                {
                    continue;
                }

                found = true;

                if (fvfg == '%')
                {
                    // ---	%(25BYTEシキ) ノ トキ ノ ヨミコミ	---
                    for (int row = 0; row < 6; row++)
                    {
                        i++;
                        srcCPtr = 1;
                        for (int col = 0; col < 4; col++)
                        {
                            byte v = (byte)msub.REDATA(mucInfo.basSrc[i], ref srcCPtr);
                            if (mucInfo.Carry || mucInfo.ErrSign)
                            {
                                if (!warningToneFormatFlag)
                                {
                                    muc88.WriteWarning(msg.get("W0409"), i, srcCPtr);
                                }
                                warningToneFormatFlag = true;
                            }
                            if (skipSpaceAndTab(i, ref srcCPtr))
                            {
                                if (!warningToneFormatFlag)
                                {
                                    muc88.WriteWarning(msg.get("W0800"), i, srcCPtr);                        //mucom88で読み込めない恐れあり
                                }
                                warningToneFormatFlag = true;
                            }
                            if (NumPattern.IndexOf(getMoji(i, srcCPtr)) < 0)
                            {
                                srcCPtr++;// SKIP','
                            }
                            mucInfo.mmlVoiceDataWork.Set(
                                fmlib1++
                                , v
                                );
                        }
                    }

                    i++;
                    srcCPtr = 2;
                    mucInfo.mmlVoiceDataWork.Set(
                        fmlib1
                        , (byte)msub.REDATA(mucInfo.basSrc[i], ref srcCPtr)
                        );
                }
                else if (fvfg == 'M')
                {
                    //// --	42バイトベーシックホウシキノトキノ ヨミコミ	--

                    List <byte> voi = new List <byte>();

                    i++;
                    srcCPtr = 2;
                    int fb = msub.REDATA(mucInfo.basSrc[i], ref srcCPtr);
                    if (mucInfo.Carry || mucInfo.ErrSign)
                    {
                        muc88.WriteWarning(msg.get("W0409"), i, srcCPtr);
                    }
                    srcCPtr++;
                    int alg = msub.REDATA(mucInfo.basSrc[i], ref srcCPtr);
                    if (mucInfo.Carry || mucInfo.ErrSign)
                    {
                        muc88.WriteWarning(msg.get("W0409"), i, srcCPtr);
                    }
                    srcCPtr++;

                    voi.Add((byte)fb);
                    voi.Add((byte)alg);

                    for (int row = 0; row < 4; row++)
                    {
                        i++;
                        srcCPtr = 1;
                        for (int col = 0; col < 10; col++)
                        {
                            byte v = (byte)msub.REDATA(mucInfo.basSrc[i], ref srcCPtr);
                            if (mucInfo.Carry || mucInfo.ErrSign)
                            {
                                muc88.WriteWarning(msg.get("W0409"), i, srcCPtr);
                            }
                            if (skipSpaceAndTab(i, ref srcCPtr))
                            {
                                if (!warningToneFormatFlag)
                                {
                                    muc88.WriteWarning(msg.get("W0800"), i, srcCPtr);                        //mucom88で読み込めない恐れあり
                                }
                                warningToneFormatFlag = true;
                            }
                            if (NumPattern.IndexOf(getMoji(i, srcCPtr)) < 0)
                            {
                                srcCPtr++;// SKIP','
                            }
                            voi.Add((byte)v);
                        }
                    }

                    smon.CONVERTopm(voi);//42BYTE->25BYTE
                }
                else
                {
                    //// --	38バイトベーシックホウシキノトキノ ヨミコミ	--

                    i++;
                    srcCPtr = 2;
                    int fb = msub.REDATA(mucInfo.basSrc[i], ref srcCPtr);
                    if (mucInfo.Carry || mucInfo.ErrSign)
                    {
                        muc88.WriteWarning(msg.get("W0409"), i, srcCPtr);
                    }
                    srcCPtr++;
                    int alg = msub.REDATA(mucInfo.basSrc[i], ref srcCPtr);
                    if (mucInfo.Carry || mucInfo.ErrSign)
                    {
                        muc88.WriteWarning(msg.get("W0409"), i, srcCPtr);
                    }
                    srcCPtr++;

                    for (int row = 0; row < 4; row++)
                    {
                        i++;
                        srcCPtr = 1;
                        for (int col = 0; col < 9; col++)
                        {
                            byte v = (byte)msub.REDATA(mucInfo.basSrc[i], ref srcCPtr);
                            if (mucInfo.Carry || mucInfo.ErrSign)
                            {
                                muc88.WriteWarning(msg.get("W0409"), i, srcCPtr);
                            }

                            if (skipSpaceAndTab(i, ref srcCPtr))
                            {
                                if (!warningToneFormatFlag)
                                {
                                    muc88.WriteWarning(msg.get("W0800"), i, srcCPtr);                        //mucom88で読み込めない恐れあり
                                }
                                warningToneFormatFlag = true;
                            }
                            if (NumPattern.IndexOf(getMoji(i, srcCPtr)) < 0)
                            {
                                srcCPtr++;// SKIP','
                            }
                            mucInfo.mmlVoiceDataWork.Set(
                                fmlib1++
                                , v
                                );
                        }
                    }
                    mucInfo.mmlVoiceDataWork.Set(fmlib1++, (byte)fb);
                    mucInfo.mmlVoiceDataWork.Set(fmlib1, (byte)alg);
                    //    Z80.HL = 0x6001;
                    smon.CONVERT();//38BYTE->25BYTE
                }

                break;
            }

            mucInfo.Carry = false;
            if (!found)
            {
                mucInfo.Carry = true;
            }
            return;
        }