So, I went back to my usual process for bringing up a new 6502 board which is to slow the clock WAY down and use some LEDs.
Started with an 8K EEPROM (28C64) filled with NOPs and watched A0..A4 count up nicely in binary.
Changed to an actual program with a loop of 256 NOPs (and the rest of the EEPROM filled with 0x00) : no success. So, it seems like I don't understand how the addressing works. Clearly the CS logic for the EEPROM is working (it wouldn't do such a nice binary count on the address lines if it wasn't reading 0xEAs from the EEPROM).
I made a (private) youtube video showing how I did this testing:
https://www.youtube.com/watch?v=Q99VXCovgvk
After I made the video I noticed that the start of my 8K EEPROM (28C64) is 0xE000 :
So, I did some more testing:
- moving the program in the EEPROM from 0xE000 to 0xF000
- switching IO to 0xD000
- trying again with IO at 0xE000
- trying the same with 32K EEPROM (28C256)
Same random results on the address lines : no nice binary count on A0..A4 as I expect to see.
Here's my NOP program for reference:
Code: Select all
F000 D8 CLD
F001 A2 FF LDX #$FF
F003 9A TXS
F004 EA NOP
F005 EA NOP
F006 EA NOP
F007 EA NOP
F008 EA NOP
F009 EA NOP
F00A EA NOP
F00B EA NOP
F00C EA NOP
F00D EA NOP
F00E EA NOP
< trimmed >
F039 EA NOP
F03A EA NOP
F03B EA NOP
F03C EA NOP
F03D EA NOP
F03E EA NOP
F03F EA NOP
F040 EA NOP
F041 EA NOP
F042 EA NOP
F043 EA NOP
F044 80 BE BRA $F004 (-66)
F046 EA NOP
F047 DB STP
F048 40 RTI
F049 40 RTI
0xFFFA 0xF048 // NMI vector
0xFFFC 0xF000 // Reset vector
0xFFFE 0xF049 // IRQ vector
What am I missing?
PS - if ever there was reason to have some 8-bit_LED_Things ...