示例#1
0
 public MemoryController(int size, BIOS bios, IOPort[] ioPorts)
 {
     _bios = bios;
     _ioPorts = ioPorts;
     _ram = new byte[size];
     
     _tlb = new TranslationLookasideBuffer();
 }
示例#2
0
文件: MMU.cs 项目: claassen/RIVM
 public MMU(int size, BIOS bios, IOPort[] ioPorts, VideoCard videoCard)
 {
     _bios = bios;
     _ioPorts = ioPorts;
     _videoCard = videoCard;
     _ram = new byte[size];
     
     _tlb = new TLB();
 }
示例#3
0
文件: VM.cs 项目: claassen/RIVM
        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;
        }