Ejemplo n.º 1
0
 public PutSettingsDirtyBits PutSyncSettings(NymaSyncSettings o)
 {
     _syncSettings = o.Clone();
     return(_syncSettings.Equals(_syncSettingsActual)
                         ? PutSettingsDirtyBits.None
                         : PutSettingsDirtyBits.RebootCore);
 }
Ejemplo n.º 2
0
 public Saturnus(CoreComm comm, GameInfo game,
                 IEnumerable <Disc> disks, NymaSettings settings, NymaSyncSettings syncSettings, bool deterministic)
     : base(comm, "SAT", "Saturn Controller", settings, syncSettings)
 {
     var firmwares = new Dictionary <string, (string, string)>
     {
         { "FIRMWARE:$J", ("SAT", "J") },
Ejemplo n.º 3
0
        public NeoGeoPort(CoreComm comm, byte[] rom, GameInfo game,
                          NymaSettings settings, NymaSyncSettings syncSettings, bool deterministic, string extension)
            : base(comm, VSystemID.Raw.NGP, "NeoGeo Portable Controller", settings, syncSettings)
        {
            _neopop = DoInit <LibNeoGeoPort>(game, rom, null, "ngp.wbx", extension, deterministic);

            _cachedSettingsInfo ??= SettingsInfo.Clone();
        }
Ejemplo n.º 4
0
 public TurboNyma(GameInfo game, byte[] rom, CoreComm comm, string extension,
                  NymaSettings settings, NymaSyncSettings syncSettings, bool deterministic)
     : base(comm, "PCE", "PC Engine Controller", settings, syncSettings)
 {
     if (game["BRAM"])
     {
         SettingOverrides["pce.disable_bram_hucard"].Default = "0";
     }
     _turboNyma = DoInit <LibTurboNyma>(game, rom, null, "turbo.wbx", extension, deterministic);
 }
Ejemplo n.º 5
0
        public PutSettingsDirtyBits PutSyncSettings(NymaSyncSettings o)
        {
            var n = o.Clone();

            n.Normalize(SettingsInfo);
            var ret = NymaSyncSettings.Reboot(_syncSettingsActual, n, SettingsInfo);

            _syncSettings = n;
            return(ret);
        }
Ejemplo n.º 6
0
        public Tst(CoreComm comm, GameInfo game,
                   IEnumerable <Disc> disks, NymaSettings settings, NymaSyncSettings syncSettings, bool deterministic)
            : base(comm, "PCFX", "PC-FX Controller", settings, syncSettings)
        {
            var firmwares = new Dictionary <string, (string, string)>
            {
                { "FIRMWARE:pcfx.rom", ("PCFX", "BIOS") },
            };

            DoInit <LibNymaCore>(game, null, disks.ToArray(), "pcfx.wbx", null, deterministic, firmwares);
        }
Ejemplo n.º 7
0
        public TerboGrafixSanic(GameInfo game, Disc[] discs, CoreComm comm,
                                NymaSettings settings, NymaSyncSettings syncSettings, bool deterministic)
            : base(comm, "PCE", "PC Engine Controller", settings, syncSettings)
        {
            var firmwares = new Dictionary <string, byte[]>
            {
                { "FIRMWARE:syscard3.pce", comm.CoreFileProvider.GetFirmware("PCECD", "Bios", true) },
            };

            _terboGrafix = DoInit <LibTerboGrafixSanic>(game, null, discs, "pce-fast.wbx", null, deterministic, firmwares);
        }
Ejemplo n.º 8
0
        public Faust(GameInfo game, byte[] rom, CoreComm comm, string extension,
                     NymaSettings settings, NymaSyncSettings syncSettings, bool deterministic)
            : base(comm, "SNES", "SNES Controller", settings, syncSettings)
        {
            if (deterministic)
            {
                // force ST renderer
                SettingOverrides.Add("snes_faust.renderer", new() { Hide = true, Default = "0" });
            }

            DoInit <LibNymaCore>(game, rom, null, "faust.wbx", extension, deterministic);
        }
Ejemplo n.º 9
0
        public Faust(GameInfo game, byte[] rom, CoreComm comm, string extension,
                     NymaSettings settings, NymaSyncSettings syncSettings, bool deterministic)
            : base(comm, "SNES", "I don't think anything uses this parameter", settings, syncSettings)
        {
            if (deterministic)
            {
                // force ST renderer
                SettingsOverrides.Add("snes_faust.renderer", "0");
            }

            DoInit <LibNymaCore>(game, rom, null, "faust.wbx", extension, deterministic);
        }
Ejemplo n.º 10
0
 protected NymaCore(CoreComm comm,
                    string systemId, string controllerDeckName,
                    NymaSettings settings, NymaSyncSettings syncSettings)
     : base(comm, new Configuration {
     SystemId = systemId
 })
 {
     _settings           = settings ?? new NymaSettings();
     _syncSettings       = syncSettings ?? new NymaSyncSettings();
     _syncSettingsActual = _syncSettings;
     _controllerDeckName = controllerDeckName;
 }
Ejemplo n.º 11
0
        public HyperNyma(GameInfo game, Disc[] discs, CoreComm comm,
                         NymaSettings settings, NymaSyncSettings syncSettings, bool deterministic)
            : base(comm, "PCE", "PC Engine Controller", settings, syncSettings)
        {
            var firmwares = new Dictionary <string, (string, string)>
            {
                { "FIRMWARE:syscard3.pce", ("PCECD", "Bios") },
                // { "FIRMWARE:gecard.pce", ("PCECD", "GE-Bios") },
            };

            _hyperNyma = DoInit <LibHyperNyma>(game, null, discs, "hyper.wbx", null, deterministic, firmwares);
        }
Ejemplo n.º 12
0
        public TerboGrafix(GameInfo game, Disc[] discs, CoreComm comm,
                           NymaSettings settings, NymaSyncSettings syncSettings)
            : base(comm, "PCE", "PC Engine Controller", settings, syncSettings)
        {
            // TODO: detect GECD and only ask for the firmware we need
            var firmwares = new Dictionary <string, byte[]>
            {
                { "FIRMWARE:syscard3.pce", comm.CoreFileProvider.GetFirmware("PCECD", "Bios", true) },
                { "FIRMWARE:gecard.pce", comm.CoreFileProvider.GetFirmware("PCECD", "GE-Bios", true) },
            };

            DoInit <LibNymaCore>(game, null, discs, "pce.wbx", null, firmwares);
        }
Ejemplo n.º 13
0
        public TerboGrafix(GameInfo game, Disc[] discs, CoreComm comm,
                           NymaSettings settings, NymaSyncSettings syncSettings, bool deterministic)
            : base(comm, "PCE", "PC Engine Controller", settings, syncSettings)
        {
            var firmwares = new Dictionary <string, byte[]>();
            var types     = discs.Select(d => new DiscIdentifier(d).DetectDiscType())
                            .ToList();

            if (types.Contains(DiscType.TurboCD))
            {
                firmwares.Add("FIRMWARE:syscard3.pce", comm.CoreFileProvider.GetFirmware("PCECD", "Bios", true));
            }
            if (types.Contains(DiscType.TurboGECD))
            {
                firmwares.Add("FIRMWARE:gecard.pce", comm.CoreFileProvider.GetFirmware("PCECD", "GE-Bios", true));
            }
            _terboGrafix = DoInit <LibTerboGrafix>(game, null, discs, "pce.wbx", null, deterministic, firmwares);
        }
Ejemplo n.º 14
0
        public TurboNyma(GameInfo game, Disc[] discs, CoreComm comm,
                         NymaSettings settings, NymaSyncSettings syncSettings, bool deterministic)
            : base(comm, "PCE", "PC Engine Controller", settings, syncSettings)
        {
            var ids = discs.Select(d => new DiscIdentifier(d).DetectDiscType())
                      .ToList();
            var firmwares = new Dictionary <string, (string, string)>();

            if (ids.Contains(DiscType.TurboCD))
            {
                firmwares.Add("FIRMWARE:syscard3.pce", ("PCECD", "Bios"));
            }
            if (ids.Contains(DiscType.TurboGECD))
            {
                firmwares.Add("FIRMWARE:gecard.pce", ("PCECD", "GE-Bios"));
            }
            _turboNyma = DoInit <LibTurboNyma>(game, null, discs, "turbo.wbx", null, deterministic, firmwares);
        }
Ejemplo n.º 15
0
            public static PutSettingsDirtyBits Reboot(NymaSyncSettings x, NymaSyncSettings y, NymaSettingsInfo info)
            {
                var restarters = info.AllOverrides.Where(kvp => !kvp.Value.NonSync && !kvp.Value.NoRestart).Select(kvp => kvp.Key);

                foreach (var key in restarters)
                {
                    x.MednafenValues.TryGetValue(key, out var xx);
                    y.MednafenValues.TryGetValue(key, out var yy);
                    if (xx != yy)
                    {
                        return(PutSettingsDirtyBits.RebootCore);
                    }
                }
                if (!new HashSet <KeyValuePair <int, string> >(x.PortDevices).SetEquals(y.PortDevices))
                {
                    return(PutSettingsDirtyBits.RebootCore);
                }
                return(PutSettingsDirtyBits.None);
            }
Ejemplo n.º 16
0
 public Tst(CoreComm comm, NymaSettings settings, NymaSyncSettings syncSettings)
     : base(comm, "PCFX", "PC-FX Controller", settings, syncSettings)
 {
     throw new InvalidOperationException("To load a PC-FX game, please load the CUE file and not the BIN file.");
 }
Ejemplo n.º 17
0
 public Saturnus(CoreComm comm, NymaSettings settings, NymaSyncSettings syncSettings)
     : base(comm, "SAT", "Saturn Controller", settings, syncSettings)
 {
     throw new InvalidOperationException("To load a Saturn game, please load the CUE file and not the BIN file.");
 }
Ejemplo n.º 18
0
 public NeoGeoPort(CoreComm comm, byte[] rom, GameInfo game,
                   NymaSettings settings, NymaSyncSettings syncSettings, bool deterministic, string extension)
     : base(comm, "NGP", "NeoGeo Portable Controller", settings, syncSettings)
 {
     _neopop = DoInit <LibNeoGeoPort>(game, rom, null, "ngp.wbx", extension, deterministic);
 }
Ejemplo n.º 19
0
 public HyperNyma(GameInfo game, byte[] rom, CoreComm comm, string extension,
                  NymaSettings settings, NymaSyncSettings syncSettings, bool deterministic)
     : base(comm, "PCE", "PC Engine Controller", settings, syncSettings)
 {
     _hyperNyma = DoInit <LibHyperNyma>(game, rom, null, "hyper.wbx", extension, deterministic);
 }
Ejemplo n.º 20
0
 public TerboGrafixSanic(GameInfo game, byte[] rom, CoreComm comm, string extension,
                         NymaSettings settings, NymaSyncSettings syncSettings, bool deterministic)
     : base(comm, "PCE", "PC Engine Controller", settings, syncSettings)
 {
     _terboGrafix = DoInit <LibTerboGrafixSanic>(game, rom, null, "pce-fast.wbx", extension, deterministic);
 }
Ejemplo n.º 21
0
 public TerboGrafix(GameInfo game, byte[] rom, CoreComm comm, string extension,
                    NymaSettings settings, NymaSyncSettings syncSettings)
     : base(comm, "PCE", "PC Engine Controller", settings, syncSettings)
 {
     DoInit <LibNymaCore>(game, rom, null, "pce.wbx", extension);
 }