/// <summary>Initializes a new instance of the <see cref="T:System.Object" /> class.</summary> public SpectrumAdvancedTestMachine(IScreenFrameProvider renderer = null, IScreenConfiguration screenConfig = null, ICpuConfiguration cpuConfig = null, string ulaIssue = "3") : base(new DeviceInfoCollection { new CpuDeviceInfo(cpuConfig ?? SpectrumModels.ZxSpectrum48Pal.Cpu), new RomDeviceInfo(new ResourceRomProvider(typeof(RomResourcesPlaceHolder).Assembly), new RomConfigurationData { NumberOfRoms = 1, RomName = "ZxSpectrum48", Spectrum48RomIndex = 0 }, new SpectrumRomDevice()), new MemoryDeviceInfo( new MemoryConfigurationData { SupportsBanking = false, ContentionType = MemoryContentionType.Ula }, null), new ClockDeviceInfo(new ClockProvider()), new BeeperDeviceInfo(new AudioConfigurationData { AudioSampleRate = 35000, SamplesPerFrame = 699, TactsPerSample = 100 }, null), new ScreenDeviceInfo(screenConfig ?? SpectrumModels.ZxSpectrum48Pal.Screen, renderer ?? new TestPixelRenderer(screenConfig ?? SpectrumModels.ZxSpectrum48Pal.Screen)) }, ulaIssue) { StackPointerManipulations = new List <StackPointerManipulationEvent>(); StackContentManipulations = new List <StackContentManipulationEvent>(); BranchEvents = new List <BranchEvent>(); Cpu.StackDebugSupport = this; }
public LevelFactory(IEventAggregator eventAggregator, IScreenConfiguration screenConfiguration, ILevelConfiguration levelConfiguration) { _eventAggregator = eventAggregator; _screenConfiguration = screenConfiguration; _levelConfiguration = levelConfiguration; }
/// <summary>Initializes a new instance of the <see cref="T:System.Object" /> class.</summary> public SpectrumAdvancedTestMachine(IScreenFrameProvider renderer = null, IScreenConfiguration screenConfig = null, ICpuConfiguration cpuConfig = null): base(new DeviceInfoCollection { new CpuDeviceInfo(cpuConfig ?? SpectrumModels.ZxSpectrum48Pal.Cpu), new RomDeviceInfo(new ResourceRomProvider(), new RomConfigurationData { NumberOfRoms = 1, RomName = "ZXSpectrum48", Spectrum48RomIndex = 0 }, new SpectrumRomDevice()), new ClockDeviceInfo(new ClockProvider()), new BeeperDeviceInfo(new BeeperConfigurationData { AudioSampleRate = 35000, SamplesPerFrame = 699, TactsPerSample = 100 }, null), new ScreenDeviceInfo(screenConfig ?? SpectrumModels.ZxSpectrum48Pal.Screen, renderer ?? new TestPixelRenderer(screenConfig ?? SpectrumModels.ZxSpectrum48Pal.Screen)) }) { }
public StartScreen(IEventAggregator eventAggregator, ITextDrawer textDrawer, IScreenConfiguration screenConfiguration, ITextConfiguration textConfiguration) { _eventAggregator = eventAggregator; _textDrawer = textDrawer; _screenConfiguration = screenConfiguration; _textConfiguration = textConfiguration; _titleText = "Ping Em Down"; _titleTextPosition = new Vector2(_screenConfiguration.ScreenWidth / 2.0f, _screenConfiguration.ScreenHeight / 4.0f); _takeActionText = "Press any key to start"; _showTakeActionText = true; _takActionTextPosition = new Vector2(_screenConfiguration.ScreenWidth / 2.0f, _screenConfiguration.ScreenHeight / 2.0f); _textBlickTimeSpan = TimeSpan.FromMilliseconds(750); _timeSinceLastBlick = TimeSpan.Zero; }
/// <summary> /// Initializes a new instance of the <see cref="T:System.Object" /> class. /// </summary> public ScreenConfiguration(IScreenConfiguration configData) { // --- Simple configuration values VerticalSyncLines = configData.VerticalSyncLines; NonVisibleBorderTopLines = configData.NonVisibleBorderTopLines; BorderTopLines = configData.BorderTopLines; BorderBottomLines = configData.BorderBottomLines; NonVisibleBorderBottomLines = configData.NonVisibleBorderBottomLines; DisplayLines = configData.DisplayLines; BorderLeftTime = configData.BorderLeftTime; BorderRightTime = configData.BorderRightTime; DisplayLineTime = configData.DisplayLineTime; HorizontalBlankingTime = configData.HorizontalBlankingTime; NonVisibleBorderRightTime = configData.NonVisibleBorderRightTime; PixelDataPrefetchTime = configData.PixelDataPrefetchTime; AttributeDataPrefetchTime = configData.AttributeDataPrefetchTime; // --- Calculated configuration values CalculateValues(); }
/// /// <summary>Initializes a new instance of the <see cref="T:System.Object" /> class. /// </summary> public Spectrum128AdvancedTestMachine(IScreenFrameProvider renderer = null, IScreenConfiguration screenConfig = null, ICpuConfiguration cpuConfig = null) : base(new DeviceInfoCollection { new CpuDeviceInfo(cpuConfig ?? SpectrumModels.ZxSpectrum128Pal.Cpu), new RomDeviceInfo(new ResourceRomProvider(typeof(RomResourcesPlaceHolder).Assembly), new RomConfigurationData { NumberOfRoms = 2, RomName = "ZxSpectrum128", Spectrum48RomIndex = 1 }, new SpectrumRomDevice()), new ClockDeviceInfo(new ClockProvider()), new MemoryDeviceInfo(new MemoryConfigurationData { SupportsBanking = true, RamBanks = 8 }, new Spectrum128MemoryDevice()), new PortDeviceInfo(null, new Spectrum128PortDevice()), new BeeperDeviceInfo(new AudioConfigurationData { AudioSampleRate = 35000, SamplesPerFrame = 699, TactsPerSample = 100 }, null), new ScreenDeviceInfo(screenConfig ?? SpectrumModels.ZxSpectrum128Pal.Screen, renderer ?? new TestPixelRenderer(screenConfig ?? SpectrumModels.ZxSpectrum48Pal.Screen)), new SoundDeviceInfo(new AudioConfigurationData { AudioSampleRate = 55420, SamplesPerFrame = 1107, TactsPerSample = 64 }, null) }) { StackPointerManipulations = new List <StackPointerManipulationEvent>(); StackContentManipulations = new List <StackContentManipulationEvent>(); BranchEvents = new List <BranchEvent>(); Cpu.StackDebugSupport = this; }
/// /// <summary>Initializes a new instance of the <see cref="T:System.Object" /> class. /// </summary> public Spectrum128AdvancedTestMachine(IScreenFrameProvider renderer = null, IScreenConfiguration screenConfig = null, ICpuConfiguration cpuConfig = null) : base(new DeviceInfoCollection { new CpuDeviceInfo(cpuConfig ?? SpectrumModels.ZxSpectrum128Pal.Cpu), new RomDeviceInfo(new ResourceRomProvider(), new RomConfigurationData { NumberOfRoms = 2, RomName = "ZxSpectrum128", Spectrum48RomIndex = 1 }, new SpectrumRomDevice()), new ClockDeviceInfo(new ClockProvider()), new MemoryDeviceInfo(new MemoryConfigurationData { SupportsBanking = true, SlotSize = 16, RamBanks = 8 }, new Spectrum128MemoryDevice()), new PortDeviceInfo(null, new Spectrum128PortDevice()), new BeeperDeviceInfo(new AudioConfigurationData { AudioSampleRate = 35000, SamplesPerFrame = 699, TactsPerSample = 100 }, null), new ScreenDeviceInfo(screenConfig ?? SpectrumModels.ZxSpectrum128Pal.Screen, renderer ?? new TestPixelRenderer(screenConfig ?? SpectrumModels.ZxSpectrum48Pal.Screen)), new SoundDeviceInfo(new AudioConfigurationData { AudioSampleRate = 55420, SamplesPerFrame = 1107, TactsPerSample = 64 }, null) }) { }
/// <summary> /// Initializes a new instance of the <see cref="T:System.Object" /> class. /// </summary> public TestPixelRenderer(IScreenConfiguration displayPars) { _displayPars = new ScreenConfiguration(displayPars); }