1
0
mirror of https://github.com/ariejan/i6502.git synced 2024-06-06 21:29:29 +00:00

Add Klaus Dormann's 65C02 extended opcodes test rom.

This commit is contained in:
Ariejan de Vroom 2014-08-20 06:25:54 +02:00
parent f934c5cdf6
commit a174259751
3 changed files with 11334 additions and 0 deletions

View File

@ -3258,3 +3258,29 @@ func TestKlausDormann6502(t *testing.T) {
prevPC = cpu.PC
}
}
// Run this last, as the full suite takes ±10 seconds to run at
// maximum speed
func TestKlausDormann65C02ExtendedOpcodes(t *testing.T) {
fmt.Println("Running Klaus Dormann' 65C02 extended opcodes tests. This may take some time...")
cpu, _, _ := NewRamMachine()
cpu.LoadProgram(loadProgram("test/65C02_extended_opcodes_test.bin"), 0x0000)
cpu.PC = 0x0400
prevPC := uint16(0x0400)
for {
cpu.Step()
if cpu.PC == prevPC {
if cpu.PC != 0x3399 {
str := "Looping PC detected at PC 0x%04X. We've hit a failing Klaus Dormann test."
panic(fmt.Sprintf(str, cpu.PC))
} else {
fmt.Println("Klaus Dormann's 6502 functional tests passed.")
break
}
}
prevPC = cpu.PC
}
}

Binary file not shown.

File diff suppressed because it is too large Load Diff