A rainy day has given me some real time in my lab to rework the entire IO System so that it will be 6502 compatible.
Here is what was done today...
- Remove the XMega that was controlling all 30 individual IO Lines and the Address Bus.
- Add multiplexers to control up to 80 IO lines through 8 bit addressing (74HC138s).
- Add a 74HC688 comparator to detect the Hi Address value of 512 (6502 IO Page).
- Add 6502 style clock control to the multiplexer to only toggle IO during the Clock Hi Phase.
- Recode my entire XMega code to AVR ATmega to simulate the 6502 Address and Data Bus.
- Test the new IO System using the AVR 6502 Simulator code.
The IO System is now 6502 Compatible!The AVR 6502 Simulator address the Vulcan IO System just like the 6502 will, using a 16 bit Address Bus, 8 bit Data Bus, and RW Line.
Just like the 6502, the AVR only assumes valid data send or read from the bus during the clock high cycle.
I will be basing my 6502 libraries on the AVR assembly libraries written here, as the assembly syntax is so similar.
At this point, RW is not simulated because there is no external program memory (64K SRAM) on the 6502 bus.
Because of the way the IO System functions, RW will only have the job of disabling the SRAM during mapped IO reads.
I placed my 80 bit mapped IO lines at address 512 to 592. 80 IO lines will be plenty to control all Video and Sound functions.
As usual, 000 to 255 will be Page Zero, and 256 to 511 will be hardware stack. Everything beyond 767 is program memory.
As soon as I tighten up the AVR assembly libraries, I am dropping in the 6502!!!
The AVR will remain ONLY to boot load the 64K program memory for the 6502 until my boot logic is completed.
So far, everything is working exactly as planned!
Cheers!
Radical Brad