예제 #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;
        }