I'm creating an 65c816 SBC based on the POC-V1 design of BigDumbDinosaur. My board differs from BDD's in that I'm using a 15ns 28c256 EEPROM (rather than BDD's 27c256) and two 15ns 71256SA SRAMs (rather than BDD's single SMT SRAM). Also, at the moment, I'm using a 6551 for serial I/O (sorry, BDD), because that's what I have on hand. I've got an 88C92 that I'll switch to once I get the board working. Which it's not, at the present time. The construction is wire-wrap, which I've used successfully in the past.
The board firmware is based on that in the KIM-1, with modifications to use a 6551 rather than the original KIM bit-banging. I've used this firmware successfully with 6502 and 65c02 boards I've built in the past. I started this '816 project with a 1mhz clock and will step up the speed, once the board is working. My initial goal is to explore the additional instruction capabilities of the 65c816, not to create a high-speed SBC.
My first attempts at running the board were no-gos and I spent quite a bit of time checking my wiring for errors and fixing a couple. With the board still not working, I tried monitoring the CPU activity with an Arduino MEGA and a very slow clock.
Diagnosis attempts:
Before starting this project, I had watched a series of videos from Ben Eater, in which he builds a simple 65c02 computer on a breadboard and diagnoses issues with a Arduino MEGA and a very slow clock built with 555 timers. What a great idea! So, I put one together, too. The MEGA, with Ben's software, monitors the 16 address lines, 8 data lines, and RWB, and is triggered by the rising edge of PHI2. Pretty cool to see the processor chugging along at 1 to 10hz!
I programmed an EEPROM with all values set to $EA, except for the first six bytes, which were set to AD 00 D0 4C 00 E0 (LDA $D000 - JMP $E000.) The RST vector is set to $E000. My 6551 is located at $D000 and initially, I wanted to make sure it was being selected correctly. I later temporarily removed the SRAM and 6551 from the board, thinking that they could be causing problems. The board was now running at ~2hz with just the 65c816, EEPROM and glue logic.
Tracing with the MEGA:
With the clock stopped, I reset the board and then started the clock. The results from the MEGA were:
Code: Select all
Address Data addr R/W data
0000001100000000 00110110 0300 r 36 ; processor starting up
1111111111111111 11101010 ffff r ea
1110101011100110 11101010 eae6 r ea
0000000100010110 00000000 0116 r 00
0000000100010011 00000000 0113 r 00
0000000100010010 00000000 0112 r 00
1111111111111010 00000000 fffa r 00 ; reads from NMI vector (which is set to $EAEA) ?
1111111111111011 11100000 fffb r e0
1110000000000000 10101101 e000 r ad ; but starts executing at the RST vector ($E000) ?
1110000000000001 00000000 e001 r 00
1110000000000100 11010000 e004 r d0
1011000000000000 00000000 b000 r 00
1110000000000101 01001100 e005 r 4c
1110000000001000 00000000 e008 r 00
1110000000001001 11100000 e009 r e0
1110000000000000 10101101 e000 r ad ; looking good
1110000000000001 00000000 e001 r 00
1110000000000100 11010000 e004 r d0
1011000000000000 00000000 b000 r 00
1110000000000101 01001100 e005 r 4c
1110000000001000 00000000 e008 r 00
1110000000001001 11100000 e009 r e0
1110000000000000 10101101 e000 r ad ; still looking good
1110000000000001 00000000 e001 r 00
1110000000000100 11010000 e004 r d0
1011000000000000 00000000 b000 r 00
1110000000000101 01001100 e005 r 4c
1110000000000101 01001100 e005 r 4c ; starting to go off the rails
0000000100011101 11100000 011d W e0 ; doing writes in deep space
0000000100011100 00000000 011c W 00 ; this pattern continues ad infinitum
0000000100011001 01100111 0119 W 67
1111111111110010 11101010 fff2 r ea
1111111111110011 11101010 fff3 r ea
1110101011100110 11101010 eae6 r ea
1110101011100110 11101010 eae6 r ea
0000000100011101 11100000 011d W e0 ; ...
I have a Digilent Analog Discovery 2 and used its scope to look at the address and data lines. The address lines look sharp and well defined, but several of the data lines are peculiar. This trace is of the D0 (blue) and D1 (red) data lines running at the slow (~2hz) speed with the test firmware. Continuing with the test firmware and slow clock, the D0 and D1 lines have occasionally shown some severe distortion. Reinstalling the original firmware, RAM and 6551 and 1mhz clock, the data lines look more peculiar. D7 is blue and D6 is orange. Haven't seen the wild distortion, though. Conclusion:
Any and all suggestions on how to continue make progress with debugging the problem are welcome!