Page 1 of 1

6502 Instruction timing tester

Posted: Mon Aug 29, 2022 8:47 pm
by dp11
I've created a 6502 /65C02/65C12 instruction timing checking test suite.

It first of all targeted BBC micro and Master machines ( which have been checked against real hardware). I've extended it to support C64 , but this hasn't yet been checked against real hardware. It passes in VICE , but not in MAME so one of them is in error.

It should be reasonably easy to add other targets. It requires some sort of "putc" function and a timer e.g. 6522 VIA timer.

Hopefully people will find it useful.

https://github.com/dp111/6502Timing

Re: 6502 Instruction timing tester

Posted: Sun Sep 04, 2022 5:21 pm
by dp11
I've added vectors to the beginning of the code to make it easier to port the test to another system. Now you just need to patch the vectors with putchar, start timer and read timer, instead of building the code.

Re: 6502 Instruction timing tester

Posted: Sun Sep 04, 2022 6:13 pm
by BigEd
Thanks Dominic!

As this tester has shown up issues in (almost?) all Acorn emulators, it feels like it's worth running against emulators of other machines. (Although, I think some of the problems have been in modelling clock-stretching or RDY usage, and in the precise timing of each memory access - some systems might be simple enough that they don't need to be accurate at this level.)