Beispiel #1
0
        public void InitializeFsServer(LibHac.Horizon horizon, out HorizonClient fsServerClient)
        {
            LocalFileSystem serverBaseFs = new LocalFileSystem(AppDataManager.BaseDirPath);

            fsServerClient = horizon.CreatePrivilegedHorizonClient();
            var fsServer = new FileSystemServer(fsServerClient);

            DefaultFsServerObjects fsServerObjects = DefaultFsServerObjects.GetDefaultEmulatedCreators(serverBaseFs, KeySet, fsServer);

            // Use our own encrypted fs creator that always uses all-zero keys
            fsServerObjects.FsCreators.EncryptedFileSystemCreator = new EncryptedFileSystemCreator();

            GameCard = fsServerObjects.GameCard;
            SdCard   = fsServerObjects.SdCard;

            SdCard.SetSdCardInsertionStatus(true);

            var fsServerConfig = new FileSystemServerConfig
            {
                DeviceOperator = fsServerObjects.DeviceOperator,
                ExternalKeySet = KeySet.ExternalKeySet,
                FsCreators     = fsServerObjects.FsCreators
            };

            FileSystemServerInitializer.InitializeWithConfig(fsServerClient, fsServer, fsServerConfig);
        }
Beispiel #2
0
        private void InitLibHacHorizon()
        {
            LibHac.Horizon horizon = new LibHac.Horizon(null, Device.FileSystem.FsServer);

            horizon.CreateHorizonClient(out HorizonClient ryujinxClient).ThrowIfFailure();
            horizon.CreateHorizonClient(out HorizonClient bcatClient).ThrowIfFailure();

            ryujinxClient.Sm.RegisterService(new LibHacIReader(this), "arp:r").ThrowIfFailure();
            new BcatServer(bcatClient);

            LibHacHorizonServer = horizon;
            LibHacHorizonClient = ryujinxClient;
        }
        public static Horizon CreateWithDefaultFsConfig(HorizonConfiguration config, IFileSystem rootFileSystem, KeySet keySet)
        {
            var horizon = new Horizon(config);

            var defaultObjects = DefaultFsServerObjects.GetDefaultEmulatedCreators(rootFileSystem, keySet);

            HorizonClient fsServerClient = horizon.CreatePrivilegedHorizonClient();
            var           fsServer       = new FileSystemServer(fsServerClient);

            var fsServerConfig = new FileSystemServerConfig
            {
                DeviceOperator = defaultObjects.DeviceOperator,
                ExternalKeySet = keySet.ExternalKeySet,
                FsCreators     = defaultObjects.FsCreators
            };

            FileSystemServerInitializer.InitializeWithConfig(fsServerClient, fsServer, fsServerConfig);

            HorizonClient bcatServerClient = horizon.CreateHorizonClient();

            _ = new BcatServer(bcatServerClient);

            return(horizon);
        }
Beispiel #4
0
        private void InitializeServer()
        {
            Server = new LibHac.Horizon(new HorizonConfiguration());

            RyujinxClient = Server.CreatePrivilegedHorizonClient();
        }