public ColecoVision(CoreComm comm, GameInfo game, byte[] rom, ColecoSettings settings, ColecoSyncSettings syncSettings) { var ser = new BasicServiceProvider(this); ServiceProvider = ser; _syncSettings = (ColecoSyncSettings)syncSettings ?? new ColecoSyncSettings(); bool skipBios = _syncSettings.SkipBiosIntro; _cpu = new Z80A { FetchMemory = ReadMemory, ReadMemory = ReadMemory, WriteMemory = WriteMemory, ReadHardware = ReadPort, WriteHardware = WritePort, MemoryCallbacks = MemoryCallbacks }; PSG = new SN76489col(); SGM_sound = new AY_3_8910_SGM(); _blip.SetRates(3579545, 44100); ControllerDeck = new ColecoVisionControllerDeck(_syncSettings.Port1, _syncSettings.Port2); _vdp = new TMS9918A(_cpu); ser.Register <IVideoProvider>(_vdp); ser.Register <IStatable>(new StateSerializer(SyncState)); // TODO: hack to allow bios-less operation would be nice, no idea if its feasible _biosRom = comm.CoreFileProvider.GetFirmware("Coleco", "Bios", true, "Coleco BIOS file is required."); // gamedb can overwrite the SyncSettings; this is ok if (game["NoSkip"]) { skipBios = false; } use_SGM = _syncSettings.UseSGM; if (use_SGM) { Console.WriteLine("Using the Super Game Module"); } LoadRom(rom, skipBios); SetupMemoryDomains(); _tracer.Header = _cpu.TraceHeader; ser.Register <IDisassemblable>(_cpu); ser.Register <ITraceable>(_tracer); }
public bool PutSettings(ColecoSettings o) { _settings = o; return(false); }
public PutSettingsDirtyBits PutSettings(ColecoSettings o) { _settings = o; return(PutSettingsDirtyBits.None); }