public AppleII(CoreComm comm, GameInfo game, byte[] rom, Settings settings) { GameInfoSet = new List<GameInfo>(); var ser = new BasicServiceProvider(this); ServiceProvider = ser; CoreComm = comm; Tracer = new TraceBuffer { Header = "6502: PC, opcode, register (A, X, Y, P, SP, Cy) flags (NVTBDIZC)" }; MemoryCallbacks = new MemoryCallbackSystem(); InputCallbacks = new InputCallbackSystem(); _disk1 = rom; RomSet.Add(rom); _appleIIRom = comm.CoreFileProvider.GetFirmware( SystemId, "AppleIIe", true, "The Apple IIe BIOS firmware is required"); _diskIIRom = comm.CoreFileProvider.GetFirmware( SystemId, "DiskII", true, "The DiskII firmware is required"); _machine = new Machine(_appleIIRom, _diskIIRom); _machine.BizInitialize(); //make a writeable memory stream cloned from the rom. //for junk.dsk the .dsk is important because it determines the format from that InitDisk(); ser.Register<ITraceable>(Tracer); setCallbacks(); InitSaveStates(); SetupMemoryDomains(); PutSettings(settings ?? new Settings()); }
public C64(CoreComm comm, IEnumerable<byte[]> roms, object settings, object syncSettings) { PutSyncSettings((C64SyncSettings)syncSettings ?? new C64SyncSettings()); PutSettings((C64Settings)settings ?? new C64Settings()); ServiceProvider = new BasicServiceProvider(this); InputCallbacks = new InputCallbackSystem(); CoreComm = comm; Roms = roms; Init(SyncSettings.VicType, Settings.BorderType, SyncSettings.SidType, SyncSettings.TapeDriveType, SyncSettings.DiskDriveType); _cyclesPerFrame = _board.Vic.CyclesPerFrame; SetupMemoryDomains(_board.DiskDrive != null); _memoryCallbacks = new MemoryCallbackSystem(); HardReset(); switch (SyncSettings.VicType) { case VicType.Ntsc: case VicType.Drean: case VicType.NtscOld: Region = DisplayType.NTSC; break; case VicType.Pal: Region = DisplayType.PAL; break; } if (_board.Sid != null) { SyncSoundProvider = DCFilter.AsISyncSoundProvider(_board.Sid, 512); } DeterministicEmulation = true; ((BasicServiceProvider) ServiceProvider).Register<IVideoProvider>(_board.Vic); ((BasicServiceProvider) ServiceProvider).Register<IDriveLight>(this); }
// framework public C64(CoreComm comm, GameInfo game, byte[] rom, string romextension, object settings, object syncSettings) { PutSyncSettings((C64SyncSettings)syncSettings ?? new C64SyncSettings()); PutSettings((C64Settings)settings ?? new C64Settings()); ServiceProvider = new BasicServiceProvider(this); InputCallbacks = new InputCallbackSystem(); _inputFileInfo = new InputFileInfo { Data = rom, Extension = romextension }; CoreComm = comm; Init(SyncSettings.VicType, Settings.BorderType, SyncSettings.SidType, SyncSettings.TapeDriveType, SyncSettings.DiskDriveType); _cyclesPerFrame = _board.Vic.CyclesPerFrame; SetupMemoryDomains(_board.DiskDrive != null); _memoryCallbacks = new MemoryCallbackSystem(); HardReset(); switch (SyncSettings.VicType) { case VicType.Ntsc: case VicType.Drean: case VicType.NtscOld: Region = DisplayType.NTSC; break; case VicType.Pal: Region = DisplayType.PAL; break; } ((BasicServiceProvider) ServiceProvider).Register<IVideoProvider>(_board.Vic); ((BasicServiceProvider) ServiceProvider).Register<IDriveLight>(_board.Serial); }
public LinkedDebuggable(IEmulator[] linkedCores, int numCores, MemoryCallbackSystem memoryCallbacks) { _linkedCores = linkedCores; _numCores = numCores; MemoryCallbacks = memoryCallbacks; }
/// <summary> /// for use in dual core /// </summary> /// <param name="ics"></param> internal void ConnectMemoryCallbackSystem(MemoryCallbackSystem mcs) { _memorycallbacks = mcs; }