예제 #1
0
        public void TestReadWriteBootFlag()
        {
            var  mmu     = new Mmu(_bios);
            byte testVal = 0x43;

            mmu.WriteByte(0xFF50, testVal);
            Assert.AreEqual(testVal, mmu.ReadByte(0xFF50));
        }
예제 #2
0
        public void TestReadBios()
        {
            var mmu = new Mmu(_bios);

            for (ushort i = 0; i < _bios.Length; i++)
            {
                Assert.AreEqual(_bios[i], mmu.ReadByte(i), $"Error reading BIOS byte {i}");
            }
            mmu.WriteByte(0xFF50, 0x01);
            //FIXME: reenable once MMU area supported after boot
            //for(ushort i = 0; i < _bios.Length; i++)
            //{
            //    Assert.AreEqual(0, mmu.ReadByte(i), $"Error reading byte {i} after boot");
            //}
        }
예제 #3
0
        public void TestWriteInvalid()
        {
            var mmu = new Mmu(_bios);

            mmu.WriteByte(0xFFFF, (byte)0xFF);
        }
예제 #4
0
        public void TestWriteBiosFailsDuringBoot()
        {
            var mmu = new Mmu(_bios);

            mmu.WriteByte(0x00, 42);
        }