Пример #1
0
        public static void Inject(string sourcebase, string sourcerom, string destination,
                                  byte speed, byte players, byte soundVolume, byte romType,
                                  short widthTv = 1920, short widthDrc = 854, short heightTv = 1080, short heightDrc = 480)
        {
            RPXNES rpx = new RPXNES(sourcebase);

            rpx.Edit(sourcerom, destination, speed, players, soundVolume, romType, widthTv, widthDrc, heightTv, heightDrc);
        }
Пример #2
0
 public VCNES GetBase(string path)
 {
     try
     {
         ValidateBase(path, false);
         RPXNES vc = ValidateRPX(path);
         return(VCNES.GetVC(vc.CRCsSum));
     }
     catch
     {
         return(null);
     }
 }
Пример #3
0
        protected override void InjectRom()
        {
            byte  speed   = (byte)(Speed == 50 ? 50 : 60);
            byte  players = (byte)(Players == 4 ? 4 : Players == 3 ? 3 : 2);
            short widthTv;
            short widthDrc;

            switch (AspectRatioValue)
            {
            case AspectRatio.H8V7:
                widthTv  = 2347;
                widthDrc = 1044;
                break;

            case AspectRatio.H4V3:
                widthTv  = 2012;
                widthDrc = 895;
                break;

            case AspectRatio.H16V9:
                widthTv  = 1509;
                widthDrc = 671;
                break;

            default:
                widthTv  = 1920;
                widthDrc = 854;
                break;
            }

            if (!Directory.Exists(Environment.CurrentDirectory + "\\resources"))
            {
                Directory.CreateDirectory(Environment.CurrentDirectory + "\\resources");
            }

            DirectoryInfo code = new DirectoryInfo(BasePath + "\\code");

            FileInfo[] rpxFiles = code.GetFiles("*.rpx");
            RPXNES.Inject(rpxFiles[0].FullName, RomPath, Environment.CurrentDirectory + "\\resources\\nes.rpx", speed, players, 0, 0, widthTv, widthDrc);

            File.Delete(rpxFiles[0].FullName);
            File.Move(Environment.CurrentDirectory + "\\resources\\nes.rpx", rpxFiles[0].FullName);
        }