Page 1 of 1
cpu_timing_test6 by Blargg
Posted: Sun Feb 27, 2011 1:16 pm
by cmoh89
The read me said to post Unknown Erros to the forum, so the following is the error I'm getting when testing my emulation.
6502 Timing Test (16 Seconds)
Official Instructions Only
Fail OP :$00
Unknown Error
$019B
If you have any advice/knowledge on what could possibly be wrong with my emulation that would cause this error, that would be great if you could share that to me.
Posted: Sun Feb 27, 2011 5:23 pm
by Zepper
- It's the BRK. Do you know the BRK timing diagram?
Code: Select all
1 PC R fetch opcode, increment PC
2 PC R read next instruction byte (and throw it away),
increment PC
3 $0100,S W push PCH on stack, decrement S
4 $0100,S W push PCL on stack, decrement S
5 $0100,S W push P on stack (with B flag set), decrement S
6 $FFFE R fetch PCL
7 $FFFF R fetch PCH
Posted: Sun Mar 20, 2011 1:29 pm
by cmoh89
I do not know the BRK timing diagram. Can you point me in the right direction to find more infomation about it?
Posted: Tue Mar 22, 2011 6:19 am
by Zepper
Perhaps I wasn't crystal clear. Look at my message: it has how the BRK works, cycle by cycle (first column at left).
Posted: Tue Mar 22, 2011 7:05 am
by cmoh89
Thank you. I didn't understand what the code was representing originally. Now, it makes sense to me.
Posted: Tue Mar 22, 2011 8:09 am
by cartlemmy
Zepper wrote:...the BRK timing diagram
That's pretty cool, is there similar diagrams for all the instructions, or did you just create this for this case?
Posted: Tue Mar 22, 2011 8:26 am
by tepples
I don't know about the 6502 data sheet (don't have it in front of me), but the 65C816 data sheet that I often referred to back when I coded for an Apple IIGS has similar diagrams.
Posted: Tue Mar 22, 2011 8:55 am
by albailey
About halfway down this document it looks to describe most of what is wanted:
http://nesdev.com/6502_cpu.txt
Al
Posted: Tue Mar 22, 2011 10:55 am
by Hamburgler
Also useful:
http://users.telenet.be/kim1-6502/6502/hwman.html#AA
Appendix A - SUMMARY OF SINGLE CYCLE EXECUTION