So, the good news is that I have successfully implemented a 65C22 to my L-Star.
I have the VIA mapped to $4000+.
For those that don't know, the L-Star provides 16K of RAM and 8K of ROM to the 65C02.
Anyway, I wrote a little BASIC program to cycle through PORT A of the VIA.
Things are working great until I noticed some of the pins are backwards. I have checked and rechecked the datasheet but it appears that P3 and P2 are reversed as are P6 and P5. I cannot see where I've connected anything incorrectly. P0 goes to LED0, P1 to LED1, etc.
I initially ran the following code:
Code:
poke 16387, 255 -- PORT A output all pins
poke 16385, 170 -- %10101010
I connected all 8 pins of PORT A to some LED's but the pattern that's lit up is: %11000110
I've tried several examples:
%00001111 results in %00001111 (CORRECT)
%00000100 results in %00001000 (INCORRECT... P3 lit instead of P2)
%11111111 results in %11111111 (CORRECT)
Am I missing something?
For reference, I have A15 tied to CS2, A14 tied to CS1 and A3:0 tied to RS3:0
Thanks