>> What kinds of tests have you already run (and passed)?
My original inspiration came from
http://6502asm.com and became interested in the implementation to refresh my 6502 programming skills (I stopped messing with the 6502 when I built my Heath Zenith 8086 in 1985). Once I began playing with the javascript, I started fixing bugs, and straightening out inconsistencies here:
https://github.com/inindev/6502asm/blob ... cpu6502.jsAs I dug, I decided doing a ground-up implementation would be more straight-forward (and more fun), plus be something I called my own. To avoid transcription errors, I exported the tables from pages 27-29 from the Nov 11, 2016 Western Design Center w65c02s datasheet into Excel, then into CSV format where I pasted it into javascript. The first issue I hit were mistakes in the datasheet itself.
All three errors were located on Page 29 as follows:
1) TAY is listed with mode 3 opcode "BC" and mode 8 opcode "AB". TAY only supports mode 8 opcode "A8".
2) TRB is listed with mode 3 opcode "5E". This is incorrect and should be deleted. Also note that the TRB mode 1 opcode written as "IC" (letter I, letter C) and should be "1C" (number 1, letter C).
3) TSX is listed with mode 3 opcode "1D". This is incorrect and should be deleted.
A gracious Bill Mench thanked me and they were able to produce the October 08, 2018 datasheet addressing these issues in quick order.
Once I finished the CPU implementation, I wanted to test it with real code, so I tried all of the programs found here:
http://6502asm.com/examplesI quickly discovered an issue with my DEC and INC. I was setting the carry flag, but you are not supposed to:
https://github.com/inindev/65c02_emu/co ... 1532afef3bOnce I had done that, all programs I found on that site worked:
https://inindev.github.io/65c02_emu/tes ... s.brickouthttps://inindev.github.io/65c02_emu/tes ... .adventureWith this, I assumed it would be easy to load Apple ROMs and run them too:
ftp://ftp.apple.asimov.net/pub/apple_II ... 20ROMs.zipAnd in fact it was! I was pretty excited at this point, and wanted to run actual Apple disks. This is where the easy part ended. I spent months reviewing historical tech references to figure it all out.
I have run no formal test suites, but running Apple software has empirically shown me a variety things that are just not clear in the documentation.