Exemplo n.º 1
0
        public void outYM2203AllKeyOff(ClsChip chip)
        {
            if (chip == null)
            {
                return;
            }

            foreach (partWork pw in chip.lstPartWork)
            {
                if (pw.dataEnd)
                {
                    continue;
                }
                if (pw.ch > 2)
                {
                    continue;
                }

                OutFmKeyOff(pw, null);
                OutFmSetTl(null, pw, 0, 127);
                OutFmSetTl(null, pw, 1, 127);
                OutFmSetTl(null, pw, 2, 127);
                OutFmSetTl(null, pw, 3, 127);
            }
        }
Exemplo n.º 2
0
        public void outYM2203AllKeyOff(ClsChip chip)
        {
            foreach (partWork pw in chip.lstPartWork)
            {
                if (pw.dataEnd)
                {
                    continue;
                }
                if (pw.ch > 2)
                {
                    continue;
                }

                parent.OutFmKeyOff(pw);
                parent.OutFmSetTl(pw, 0, 127);
                parent.OutFmSetTl(pw, 1, 127);
                parent.OutFmSetTl(pw, 2, 127);
                parent.OutFmSetTl(pw, 3, 127);
            }
        }
Exemplo n.º 3
0
        private string DispPCMRegion(ClsChip c)
        {
            if (c.pcmDataEasy == null && c.pcmDataDirect.Count == 0)
            {
                return("");
            }

            string region = "";

            for (int i = 0; i < 256; i++)
            {
                if (!desVGM.instPCM.ContainsKey(i))
                {
                    continue;
                }
                if (desVGM.instPCM[i].chip != c.chipType)
                {
                    continue;
                }
                if (desVGM.instPCM[i].isSecondary != c.IsSecondary)
                {
                    continue;
                }

                region += c.DispRegion(desVGM.instPCM[i]);
            }

            long tl = 0;

            foreach (int i in desVGM.instPCM.Keys)
            {
                tl += desVGM.instPCM[i].size;
            }
            region += (string.Format(msg.get("I04018"), tl));
            region += "\r\n";

            return(region);
        }
Exemplo n.º 4
0
        private string DispPCMRegionDataBlock(ClsChip c)
        {
            YM2609  opna2;
            YM2610B opnb;
            string  region = "";
            long    tl     = 0;

            if (c == null)
            {
                return("");
            }

            if (c.chipType == enmChipType.YM2609)
            {
                opna2 = (YM2609)c;
                if (opna2.pcmDataEasyA == null &&
                    opna2.pcmDataEasyB == null &&
                    opna2.pcmDataEasyC == null &&
                    opna2.pcmDataDirectA.Count == 0 &&
                    opna2.pcmDataDirectB.Count == 0 &&
                    opna2.pcmDataDirectC.Count == 0
                    )
                {
                    return("");
                }

                if (opna2.pcmDataEasyA != null)
                {
                    region += string.Format("{0,-10} {1,-7} ${2,-7:X6} ${3,-7:X6} ${4,-7:X6}  {5}\r\n"
                                            , opna2.Name + "_A"
                                            , opna2.ChipNumber != 0 ? "SEC" : "PRI"
                                            , 0
                                            , opna2.pcmDataEasyA.Length - 1
                                            , opna2.pcmDataEasyA.Length
                                            , "AUTO"
                                            );
                    tl += opna2.pcmDataEasyA.Length;
                }
                if (opna2.pcmDataEasyB != null)
                {
                    region += string.Format("{0,-10} {1,-7} ${2,-7:X6} ${3,-7:X6} ${4,-7:X6}  {5}\r\n"
                                            , opna2.Name + "_B"
                                            , opna2.ChipNumber != 0 ? "SEC" : "PRI"
                                            , 0
                                            , opna2.pcmDataEasyB.Length - 1
                                            , opna2.pcmDataEasyB.Length
                                            , "AUTO"
                                            );
                    tl += opna2.pcmDataEasyB.Length;
                }
                if (opna2.pcmDataEasyC != null)
                {
                    region += string.Format("{0,-10} {1,-7} ${2,-7:X6} ${3,-7:X6} ${4,-7:X6}  {5}\r\n"
                                            , opna2.Name + "_C"
                                            , opna2.ChipNumber != 0 ? "SEC" : "PRI"
                                            , 0
                                            , opna2.pcmDataEasyC.Length - 1
                                            , opna2.pcmDataEasyC.Length
                                            , "AUTO"
                                            );
                    tl += opna2.pcmDataEasyC.Length;
                }
            }
            else if (c.chipType == enmChipType.YM2610B)
            {
                opnb = (YM2610B)c;
                if (opnb.pcmDataEasyA == null &&
                    opnb.pcmDataEasyB == null &&
                    opnb.pcmDataDirectA.Count == 0 &&
                    opnb.pcmDataDirectB.Count == 0
                    )
                {
                    return("");
                }

                if (opnb.pcmDataEasyA != null)
                {
                    region += string.Format("{0,-10} {1,-7} ${2,-7:X6} ${3,-7:X6} ${4,-7:X6}  {5}\r\n"
                                            , opnb.Name + "_A"
                                            , opnb.ChipNumber != 0 ? "SEC" : "PRI"
                                            , 0
                                            , opnb.pcmDataEasyA.Length - 1
                                            , opnb.pcmDataEasyA.Length
                                            , "AUTO"
                                            );
                    tl += opnb.pcmDataEasyA.Length;
                }
                if (opnb.pcmDataEasyB != null)
                {
                    region += string.Format("{0,-10} {1,-7} ${2,-7:X6} ${3,-7:X6} ${4,-7:X6}  {5}\r\n"
                                            , opnb.Name + "_B"
                                            , opnb.ChipNumber != 0 ? "SEC" : "PRI"
                                            , 0
                                            , opnb.pcmDataEasyB.Length - 1
                                            , opnb.pcmDataEasyB.Length
                                            , "AUTO"
                                            );
                    tl += opnb.pcmDataEasyB.Length;
                }
            }
            else
            {
                if (c.pcmDataEasy == null && c.pcmDataDirect.Count == 0)
                {
                    return("");
                }

                if (c.pcmDataEasy != null)
                {
                    region += string.Format("{0,-10} {1,-7} ${2,-7:X6} ${3,-7:X6} ${4,-7:X6}  {5}\r\n"
                                            , c.Name
                                            , c.ChipNumber != 0 ? "SEC" : "PRI"
                                            , 0
                                            , c.pcmDataEasy.Length - 1
                                            , c.pcmDataEasy.Length
                                            , "AUTO"
                                            );
                    tl += c.pcmDataEasy.Length;
                }
            }


            if (c.pcmDataDirect.Count > 0)
            {
                foreach (clsPcmDatSeq pds in desVGM.instPCMDatSeq)
                {
                    if (pds.type == enmPcmDefineType.Set)
                    {
                        continue;
                    }
                    if (pds.type == enmPcmDefineType.Easy)
                    {
                        continue;
                    }
                    if (pds.chip != c.chipType)
                    {
                        continue;
                    }
                    if (pds.chipNumber != c.ChipNumber)
                    {
                        continue;
                    }
                    if (desVGM.chips[pds.chip] == null)
                    {
                        continue;
                    }
                    if (desVGM.chips[pds.chip][0] == null)
                    {
                        continue;
                    }
                    if (!desVGM.chips[pds.chip][0].CanUsePICommand())
                    {
                        continue;
                    }

                    region += string.Format("{0,-10} {1,-7} ${2,-7:X6} ${3,-7:X6} ${4,-7:X6}  {5}\r\n"
                                            , c.Name
                                            , pds.chipNumber != 0 ? "SEC" : "PRI"
                                            , pds.DatStartAdr
                                            , pds.DatEndAdr
                                            , pds.DatEndAdr - pds.DatStartAdr + 1
                                            , pds.type == enmPcmDefineType.Easy ? "AUTO" : "MANUAL"
                                            );
                    tl += pds.DatEndAdr - pds.DatStartAdr + 1;
                }
            }

            if (region != "")
            {
                region += (string.Format(msg.get("I04018"), tl));
                region += "\r\n";
            }

            return(region);
        }
Exemplo n.º 5
0
        private string DispPCMRegion(ClsChip c)
        {
            if (c == null)
            {
                return("");
            }

            if (c.chipType == enmChipType.YM2609)
            {
                YM2609 opna2 = (YM2609)c;
                if (opna2.pcmDataEasyA == null &&
                    opna2.pcmDataEasyB == null &&
                    opna2.pcmDataEasyC == null &&
                    opna2.pcmDataDirectA.Count == 0 &&
                    opna2.pcmDataDirectB.Count == 0 &&
                    opna2.pcmDataDirectC.Count == 0
                    )
                {
                    return("");
                }
            }
            else if (c.chipType == enmChipType.YM2610B)
            {
                YM2610B opnb = (YM2610B)c;
                if (opnb.pcmDataEasyA == null &&
                    opnb.pcmDataEasyB == null &&
                    opnb.pcmDataDirectA.Count == 0 &&
                    opnb.pcmDataDirectB.Count == 0
                    )
                {
                    return("");
                }
            }
            else
            {
                if (c.pcmDataEasy == null && c.pcmDataDirect.Count == 0)
                {
                    return("");
                }
            }

            string region = "";

            for (int i = 0; i < 256; i++)
            {
                if (!desVGM.instPCM.ContainsKey(i))
                {
                    continue;
                }
                if (desVGM.instPCM[i].chip != c.chipType)
                {
                    continue;
                }
                if (desVGM.instPCM[i].chipNumber != c.ChipNumber)
                {
                    continue;
                }

                region += c.DispRegion(desVGM.instPCM[i]);
            }

            long tl = 0;

            foreach (int i in desVGM.instPCM.Keys)
            {
                tl += desVGM.instPCM[i].size;
            }
            region += (string.Format(msg.get("I04018"), tl));
            region += "\r\n";

            return(region);
        }
Exemplo n.º 6
0
        private string DispPCMRegionDataBlock(ClsChip c)
        {
            string region = "";
            long   tl     = 0;

            if (c.pcmDataEasy == null && c.pcmDataDirect.Count == 0)
            {
                return("");
            }

            if (c.pcmDataEasy != null)
            {
                region += string.Format("{0,-10} {1,-7} ${2,-7:X6} ${3,-7:X6} ${4,-7:X6}  {5}\r\n"
                                        , c.Name
                                        , c.IsSecondary ? "SEC" : "PRI"
                                        , 0
                                        , c.pcmDataEasy.Length - 1
                                        , c.pcmDataEasy.Length
                                        , "AUTO"
                                        );
                tl += c.pcmDataEasy.Length;
            }


            if (c.pcmDataDirect.Count > 0)
            {
                foreach (clsPcmDatSeq pds in desVGM.instPCMDatSeq)
                {
                    if (pds.type == enmPcmDefineType.Set)
                    {
                        continue;
                    }
                    if (pds.type == enmPcmDefineType.Easy)
                    {
                        continue;
                    }
                    if (pds.chip != c.chipType)
                    {
                        continue;
                    }
                    if (pds.isSecondary != c.IsSecondary)
                    {
                        continue;
                    }
                    if (!desVGM.chips[pds.chip][0].CanUsePICommand())
                    {
                        continue;
                    }

                    region += string.Format("{0,-10} {1,-7} ${2,-7:X6} ${3,-7:X6} ${4,-7:X6}  {5}\r\n"
                                            , c.Name
                                            , pds.isSecondary ? "SEC" : "PRI"
                                            , pds.DatStartAdr
                                            , pds.DatEndAdr
                                            , pds.DatEndAdr - pds.DatStartAdr + 1
                                            , pds.type == enmPcmDefineType.Easy ? "AUTO" : "MANUAL"
                                            );
                    tl += pds.DatEndAdr - pds.DatStartAdr + 1;
                }
            }

            if (region != "")
            {
                region += (string.Format(msg.get("I04018"), tl));
                region += "\r\n";
            }

            return(region);
        }