public Intellivision(CoreComm comm, GameInfo game, byte[] rom) { CoreComm = comm; Rom = rom; Game = game; Cart = new Intellicart(); if (Cart.Parse(Rom) == -1) { Cart = new Cartridge(); Cart.Parse(Rom); } Cpu = new CP1610(); Cpu.ReadMemory = ReadMemory; Cpu.WriteMemory = WriteMemory; Cpu.Reset(); Stic = new STIC(); Stic.ReadMemory = ReadMemory; Stic.WriteMemory = WriteMemory; Stic.Reset(); Psg = new PSG(); Psg.ReadMemory = ReadMemory; Psg.WriteMemory = WriteMemory; Connect(); Cpu.LogData(); LoadExecutiveRom(CoreComm.CoreFileProvider.GetFirmwarePath("INTV", "EROM", true, "Executive ROM is required.")); LoadGraphicsRom(CoreComm.CoreFileProvider.GetFirmwarePath("INTV", "GROM", true, "Graphics ROM is required.")); }
public Intellivision(CoreComm comm, GameInfo game, byte[] rom, object settings, object syncSettings) { var ser = new BasicServiceProvider(this); ServiceProvider = ser; CoreComm = comm; _rom = rom; _settings = (IntvSettings)settings ?? new IntvSettings(); _syncSettings = (IntvSyncSettings)syncSettings ?? new IntvSyncSettings(); _controllerDeck = new IntellivisionControllerDeck(_syncSettings.Port1, _syncSettings.Port2); _cart = new Intellicart(); if (_cart.Parse(_rom) == -1) { _cart = new Cartridge(); _cart.Parse(_rom); } _cpu = new CP1610 { ReadMemory = ReadMemory, WriteMemory = WriteMemory, MemoryCallbacks = MemoryCallbacks }; _cpu.Reset(); _stic = new STIC { ReadMemory = ReadMemory, WriteMemory = WriteMemory }; _stic.Reset(); _psg = new PSG { ReadMemory = ReadMemory, WriteMemory = WriteMemory }; _psg.Reset(); ser.Register <IVideoProvider>(_stic); ser.Register <ISoundProvider>(_psg); Connect(); LoadExecutiveRom(CoreComm.CoreFileProvider.GetFirmware("INTV", "EROM", true, "Executive ROM is required.")); LoadGraphicsRom(CoreComm.CoreFileProvider.GetFirmware("INTV", "GROM", true, "Graphics ROM is required.")); _tracer = new TraceBuffer { Header = _cpu.TraceHeader }; ser.Register <ITraceable>(_tracer); SetupMemoryDomains(); }
private void HardReset() { _cpu.Reset(); _stic.Reset(); _psg.Reset(); Connect(); ScratchpadRam = new byte[240]; SystemRam = new ushort[352]; _cart = new Intellicart(); if (_cart.Parse(_rom) == -1) { _cart = new Cartridge(); _cart.Parse(_rom); } }
public Intellivision(CoreComm comm, GameInfo game, byte[] rom, object Settings, object SyncSettings) { ServiceProvider = new BasicServiceProvider(this); CoreComm = comm; _rom = rom; _gameInfo = game; this.Settings = (IntvSettings)Settings ?? new IntvSettings(); this.SyncSettings = (IntvSyncSettings)SyncSettings ?? new IntvSyncSettings(); ControllerDeck = new IntellivisionControllerDeck(this.SyncSettings.Port1, this.SyncSettings.Port2); ControllerDefinition.BoolButtons.Add("Power"); ControllerDefinition.BoolButtons.Add("Reset"); _cart = new Intellicart(); if (_cart.Parse(_rom) == -1) { _cart = new Cartridge(); _cart.Parse(_rom); } _cpu = new CP1610(); _cpu.ReadMemory = ReadMemory; _cpu.WriteMemory = WriteMemory; _cpu.Reset(); _stic = new STIC(); _stic.ReadMemory = ReadMemory; _stic.WriteMemory = WriteMemory; _stic.Reset(); (ServiceProvider as BasicServiceProvider).Register <IVideoProvider>(_stic); _psg = new PSG(); _psg.Reset(); _psg.ReadMemory = ReadMemory; _psg.WriteMemory = WriteMemory; (ServiceProvider as BasicServiceProvider).Register <ISoundProvider>(_psg); Connect(); //_cpu.LogData(); LoadExecutiveRom(CoreComm.CoreFileProvider.GetFirmware("INTV", "EROM", true, "Executive ROM is required.")); LoadGraphicsRom(CoreComm.CoreFileProvider.GetFirmware("INTV", "GROM", true, "Graphics ROM is required.")); Tracer = new TraceBuffer { Header = _cpu.TraceHeader }; (ServiceProvider as BasicServiceProvider).Register <ITraceable>(Tracer); SetupMemoryDomains(); }
public Intellivision(CoreComm comm, GameInfo game, byte[] rom) { ServiceProvider = new BasicServiceProvider(this); CoreComm = comm; _rom = rom; _gameInfo = game; _cart = new Intellicart(); if (_cart.Parse(_rom) == -1) { _cart = new Cartridge(); _cart.Parse(_rom); } _cpu = new CP1610(); _cpu.ReadMemory = ReadMemory; _cpu.WriteMemory = WriteMemory; _cpu.Reset(); _stic = new STIC(); _stic.ReadMemory = ReadMemory; _stic.WriteMemory = WriteMemory; _stic.Reset(); (ServiceProvider as BasicServiceProvider).Register <IVideoProvider>(_stic); _psg = new PSG(); _psg.ReadMemory = ReadMemory; _psg.WriteMemory = WriteMemory; Connect(); _cpu.LogData(); LoadExecutiveRom(CoreComm.CoreFileProvider.GetFirmware("INTV", "EROM", true, "Executive ROM is required.")); LoadGraphicsRom(CoreComm.CoreFileProvider.GetFirmware("INTV", "GROM", true, "Graphics ROM is required.")); }