Been looking at the minimig code to get this happening.
The CIA'A code in the CIA8520.v file mimics the operation of the serial register only as far as getting the 8 bits of keyboard data.
It relys (basically) on the ps2keyboard module to present 8bits of data, and the keystrobe from the ps/2 keyboard to set the SP register full bit in the interrupt register.
On the real miggy:
The keyboard data is clocked in CIA'A and shifted by the actions of KBDAT and KBCLK.
When 8bits have been read, the CIA saves the 8bits, sets the SP bit in the ICR register.
Software then sets the serial register in CIA'A to output mode and sends and ACK strobe to the amiga keyboard on the KBDAT line.
Tied in with Timer A in continuous mode(?)
So to get the Amiga keyboard working:
1. Remove the ps2keyboard module.
2. Implement the input Serial shift register mechanism
3. Have the CIA set the SP bit in ICR itself when 8 bits received.
4. Implement the output mode of the serial register
Will start tinkering....
Using an Altera DE1 to run minimig this end, but the code will be the same.