public MemoryController(int size, BIOS bios, IOPort[] ioPorts) { _bios = bios; _ioPorts = ioPorts; _ram = new byte[size]; _tlb = new TranslationLookasideBuffer(); }
public MMU(int size, BIOS bios, IOPort[] ioPorts, VideoCard videoCard) { _bios = bios; _ioPorts = ioPorts; _videoCard = videoCard; _ram = new byte[size]; _tlb = new TLB(); }
private IOPort[] CreateIODevices(string diskFile) { IOPort[] ioPorts = new IOPort[SystemMemoryMap.IO_PORT_END - SystemMemoryMap.IO_PORT_START + 1]; var disk = new DiskController(diskFile); ioPorts[0] = new IOPort(() => disk.ControlRegister, (val) => disk.ControlRegister = val); ioPorts[1] = new IOPort(() => disk.AddressRegister, (val) => disk.AddressRegister = val); ioPorts[2] = new IOPort(() => disk.IOByteCountRegister, (val) => disk.IOByteCountRegister = val); ioPorts[3] = new IOPort(() => disk.DataRegister, (val) => disk.DataRegister = val); return ioPorts; }