Hi guys
As you've probably noticed I've been developing OS routines for my homebrew 6502
.
I've now run into an interesting issue, in that if I write to anything above $3FFF I end up with rubbish.
Memory map:
0000-7FFF ... RAM (HY62256BLLP-70)
6000-6015 ... I/O (WDC 65C22S -mapped over the top of RAM at these addresses)
8000-FFFF ... ROM (Winbond W27C512-45Z -only upper 32KB mapped)
If I access ROM all is fine.
If I access I/O all is fine.
If I access RAM between 0000-2FFF all is fine
If I access RAM above 3000 then the data bus corrupts above the first two bits
I've done the following:
- tested for shorts across the data and address buses
- swapped the RAM IC for another of the same make/model
- Tested the data bus voltages - 0v for low, 5v for high without jitter
- Checked the /RAM select and /ROM selects never conflict. /VIA and/RAM do conflict, but never select at the sametime as the RAM /OE never enables if the VIA is being accessed.
- Ran some test code to store a number at 4000 then read it back - see attached for results (read using a bus monitor and using a single cycle stepping circuit).
Attachment:
tabler.png [ 40.74 KiB | Viewed 639 times ]
Ignore the pre-amble in green - there are three LDA#01's, LDA#&52 then STA &4000 (in yellow). It then LDA#0 to clear A, then attempts to reload the contents of 4000 (in purple)...but seem to get 0 in the databus as a result.
It's late so I'll do more tests tomorrow, but in the meantime has anyone got any suggestions? Or is there a known issue with the RAM IC type that I've chosen?