示例#1
0
        public static NymaSettingsInfo CachedSettingsInfo(CoreComm comm)
        {
            if (_cachedSettingsInfo is null)
            {
                using var n = new NeoGeoPort(comm);
                n.InitForSettingsInfo("ngp.wbx");
                _cachedSettingsInfo = n.SettingsInfo.Clone();
            }

            return(_cachedSettingsInfo);
        }
示例#2
0
 public void Dispose()
 {
     if (!_disposed)
     {
         _left.Dispose();
         _right.Dispose();
         _left     = null;
         _right    = null;
         _disposed = true;
     }
 }
示例#3
0
 public LinkInterop(NeoGeoPort core, BlockingCollection <LinkRequest> push, BlockingCollection <LinkResult> pull)
 {
     _core     = core;
     _push     = push;
     _pull     = pull;
     _exporter = BizExvoker.GetExvoker(this, CallingConventionAdapters.Waterbox);
     _readcb   = _exporter.SafeResolve("CommsReadCallback");
     _pollcb   = _exporter.SafeResolve("CommsPollCallback");
     _writecb  = _exporter.SafeResolve("CommsWriteCallback");
     ConnectPointers();
 }
示例#4
0
        public DualNeoGeoPort(CoreComm comm, byte[] rom, bool deterministic)
        {
            CoreComm = comm;
            _left    = new NeoGeoPort(comm, rom, new NeoGeoPort.SyncSettings {
                Language = LibNeoGeoPort.Language.English
            }, deterministic, PeRunner.CanonicalStart);
            _right = new NeoGeoPort(comm, rom, new NeoGeoPort.SyncSettings {
                Language = LibNeoGeoPort.Language.English
            }, deterministic, PeRunner.AlternateStart);
            _linkCable = new LinkCable();
            _leftEnd   = new LinkInterop(_left, _linkCable.LeftIn, _linkCable.LeftOut);
            _rightEnd  = new LinkInterop(_right, _linkCable.RightIn, _linkCable.RightOut);


            _serviceProvider = new BasicServiceProvider(this);
            _soundProvider   = new DualSyncSound(_left, _right);
            _serviceProvider.Register <ISoundProvider>(_soundProvider);
            _videoProvider = new SideBySideVideo(_left, _right);
            _serviceProvider.Register <IVideoProvider>(_videoProvider);
        }