Let's Make a simple 6502-based computer, Part 3: A different clock circuit, and adding the I/O chip
After a long period of trying to figure out what went wrong, I finally get things working by using a simpler and slower clock circuit. The rest of the project works without further problems. To finish off the story about the clock circuit: After making these videos, I did get my hands on a Rockwell TTL 6502, and it works perfectly with the clock circuit I showed in the first video (the one which uses a 2 MHz crystal and a 74F04 chip). So the circuit I showed really does work with a TTL 6502, it just doesn't work with the WDC 65C02. For more stuff like this, check out Ben Eater's channel here: https://www.youtube.com/channel/UCS0N5baNlQWJCUrhCEo8WlA
The original website documenting the construction of this project can be found at these two locations:
http://lateblt.tripod.com/6502prj1.htm
http://lateblt.tripod.com/6502prj2.htm
For reference, the program loaded into the ROM chip in this video is shown below. The first number on each line is the memory address, and the second number is the contents of that address, represented first as a binary and then as a hexadecimal number. The beginning of each instruction is accompanied by an assembly-language mnemonic. Essentially, the program turns all the I/O pins on the VIA chip into outputs by sending 0xFF to the two direction registers, then the outputs are all set to alternating 1s and 0s. Then the program just enters a JMP which infinitely loops.
0000000000000: 10101001 (A9) ;LDA #$FF
0000000000001: 11111111 (FF)
0000000000010: 10001101 (8D) ;STA $8002
0000000000011: 00000010 (02)
0000000000100: 10000000 (80)
0000000000101: 10001101 (8D) ;STA $8003
0000000000110: 00000011 (03)
0000000000111: 10000000 (80)
0000000001000: 10101001 (A9) ;LDA #$AA
0000000001001: 10101010 (AA)
0000000001010: 10001101 (8D) ;STA $8000
0000000001011: 00000000 (00)
0000000001100: 10000000 (80)
0000000001101: 10001101 (8D) ;STA $8001
0000000001110: 00000001 (01)
0000000001111: 10000000 (80)
0000000010000: 01001100 (4C) ;JMP $E010
0000000010001: 00010000 (10)
0000000010010: 11100000 (E0)