コード例 #1
0
ファイル: MemoryController.cs プロジェクト: claassen/RIVM
 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;
        }