Exemplo n.º 1
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();
        }
Exemplo n.º 2
0
        internal NeoGeoPort(CoreComm comm, byte[] rom, SyncSettings syncSettings, bool deterministic, ulong startAddress)
            : base(comm, new Configuration
        {
            DefaultFpsNumerator   = 6144000,
            DefaultFpsDenominator = 515 * 198,
            DefaultWidth          = 160,
            DefaultHeight         = 152,
            MaxWidth   = 160,
            MaxHeight  = 152,
            MaxSamples = 8192,
            SystemId   = "NGP"
        })
        {
            if (rom.Length > 4 * 1024 * 1024)
            {
                throw new InvalidOperationException("ROM too big!");
            }

            _syncSettings = syncSettings ?? new SyncSettings();

            _neopop = PreInit <LibNeoGeoPort>(new WaterboxOptions
            {
                Filename                   = "ngp.wbx",
                SbrkHeapSizeKB             = 256,
                SealedHeapSizeKB           = 5 * 1024,      // must be a bit larger than the ROM size
                InvisibleHeapSizeKB        = 4,
                PlainHeapSizeKB            = 5 * 1024,      // must be a bit larger than the ROM size
                StartAddress               = startAddress,
                SkipCoreConsistencyCheck   = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxCoreConsistencyCheck),
                SkipMemoryConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxMemoryConsistencyCheck),
            });

            if (!_neopop.LoadSystem(rom, rom.Length, _syncSettings.Language))
            {
                throw new InvalidOperationException("Core rejected the rom");
            }

            PostInit();

            DeterministicEmulation = deterministic || !_syncSettings.UseRealTime;
            InitializeRtc(_syncSettings.InitialTime);
        }
Exemplo n.º 3
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);
 }