skeezix
Internal Development
joystick was okay; the keyb was the one throwing it off (surprisingly). Essentially, I really can't get away with _anything_ in pin-response interupts, everything has to be done during vblank (which is a reasonable amount of time, but I had hoped to do back and forth protocol stuff then.)
Just having a pin-change interupt like:
ISR(PCINT2_vect) {
// ps/2 protocol is: http://www.computer-engineering.org/ps2keyboard/
// no delta/state is needed here; we're only triggered on falling edge of clock
// ps/2 protocol has clock only when its sending us data (or when we're sending it data,
// which we don't bother with); as such, when we start getting interupted, we know a
// piece of data is inbound, just need to collect it up.
_g_keyb_int = 1;
} // PCINT2_vect
That alone causes flicker in the display, thats how bad the VGA is...
So maybe doing _Everything_ via IO chip, and then having _that_ do i2c to the VGA during vblank, would be the way to go; avr to avr should be able to martial things a bit better, than banging on the bus all the time. Send the entire IO bus to IO chip, and i2c commands to/from the VGA chip when its available.
(with z80 as the brains, and having no i2c of serial or anything, means we're on the bus for everything, and that means responding to IOREQ when it wants us too; ti does mean we can WAIT or BUSREQ to hang up the z80 but I'd prefer to avoid it.. I imaigne any chance of animation or the like would go to shit if we're constantly holding up the z80 for the VGA chip. So if the z80 wants to send an OUT 0,c to send a character to the display, the VGA would have to get IOREQ and check the data bus immediately, which I think woudl shake the VGA.)
esp if we want useful audio, keyb, or god knows what
hmm.. at my RL work office all day, and no EAgle CAD here to pull up my schematics with. Blast Just want to peek and mull over lunch
Can't think straight until I get this schematic done
Just having a pin-change interupt like:
ISR(PCINT2_vect) {
// ps/2 protocol is: http://www.computer-engineering.org/ps2keyboard/
// no delta/state is needed here; we're only triggered on falling edge of clock
// ps/2 protocol has clock only when its sending us data (or when we're sending it data,
// which we don't bother with); as such, when we start getting interupted, we know a
// piece of data is inbound, just need to collect it up.
_g_keyb_int = 1;
} // PCINT2_vect
That alone causes flicker in the display, thats how bad the VGA is...
So maybe doing _Everything_ via IO chip, and then having _that_ do i2c to the VGA during vblank, would be the way to go; avr to avr should be able to martial things a bit better, than banging on the bus all the time. Send the entire IO bus to IO chip, and i2c commands to/from the VGA chip when its available.
(with z80 as the brains, and having no i2c of serial or anything, means we're on the bus for everything, and that means responding to IOREQ when it wants us too; ti does mean we can WAIT or BUSREQ to hang up the z80 but I'd prefer to avoid it.. I imaigne any chance of animation or the like would go to shit if we're constantly holding up the z80 for the VGA chip. So if the z80 wants to send an OUT 0,c to send a character to the display, the VGA would have to get IOREQ and check the data bus immediately, which I think woudl shake the VGA.)
esp if we want useful audio, keyb, or god knows what
hmm.. at my RL work office all day, and no EAgle CAD here to pull up my schematics with. Blast Just want to peek and mull over lunch
Can't think straight until I get this schematic done