I don't know the keyboard matrix layout of either the Viper or Blue Ram keyboard. Possibly, there is some helpful information about the blue ram keyboard in these documents:

http://www.ballyalley.com/perkins/perkins.html#BlueRamKeyboardDocs

I have a Blue Ram keyboard, but it has somehow become lost in my garage. Either that, or I lent it to someone, but I can't remember who has it now.

Here is a datasheet for the keyboard that I think is used in the Blue Ram keyboard:

http://www.ballyalley.com/documenta...meco_JE_610_ASCII_Keyboard_Datasheet.pdf

A commented disassembly of the Blue Ram keyboard driver is available. Maybe that will have some useful information in it. It's here:

http://www.ballyalley.com/ml/ml_source/ml_source.html#BallyBASICKeyboardDisassembly

The keyboard wiring directions for the Viper keyboard are here:

http://www.ballyalley.com/documenta...ard%20to%20Astrocade%20(Ed%20Larkin).pdf

The software and documentation for the light pen is here:

http://www.ballyalley.com/program_d...rams_i-p.html#Light-PenGraphicsProgramXB

As I mentioned previously, I'm pretty sure that the MAME doesn't currently support the light pen interrupt. Also, I don't know of anyone who has a light pen for the Astrocade.

It's great to see activity happening in the MAME community for the astrocade driver.

Adam