Beispiel #1
0
        public void ReadWriteWord()
        {
            var mmu = new MMU();

            ushort testword = 0xf1b2;

            mmu.WriteWord(0xff80, testword);

            Assert.That(mmu.rw(0xff80), Is.EqualTo(testword));
        }
Beispiel #2
0
        public void LDxd8()
        {
            mmu.WriteWord(0xc000, 0xffff);
            mmu.WriteWord(0xc002, 0xffff);
            mmu.WriteWord(0xc006, 0xffff);
            regs.PC = 0xc000;

            cpu.Tick(0x06);
            Assert.That(regs.B, Is.EqualTo(0xff));

            cpu.Tick(0x16);
            Assert.That(regs.D, Is.EqualTo(0xff));

            cpu.Tick(0x26);
            Assert.That(regs.H, Is.EqualTo(0xff));

            regs.HL = 0xc006;
            Assert.That(regs.GetRegById(6), Is.EqualTo(0xff));
        }