nesdev.com
http://forums.nesdev.com/

NES to USB Keyboard interface?
http://forums.nesdev.com/viewtopic.php?f=9&t=16363
Page 3 of 3

Author:  emerson [ Tue Jan 02, 2018 1:18 pm ]
Post subject:  Re: NES to USB Keyboard interface?

As promised, here is my approach to interfacing a ps/2 keyboard (and ps/2 mouse) to an NES. A dip switch is used to configure the adapter to either emulate the Family Basic keyboard, or provide full enahnced keyboard and mouse support. More details are in the ReadMe. I have a few more ideas I would like to implement in this design, so if I continue with this project Ill start a new development thread.

I currently can't test the Family Basic keyboard emulation with anything but the test rom I wrote, so if someone else builds this, could you please let me know if it works or not?

A brief description taken from the ReadMe:
-Support for all 3 keyboard scan codes
-Automatic scroll wheel detection for mouse
-Power led error blink codes
-Serial debug data available
-Adapter is automatically reset when console reset is pressed
-Save/Load functionality with PC compatibility

Attachments:
nes_keyboard_adapter.7z [321.28 KiB]
Downloaded 34 times

Author:  bazza [ Tue Jan 02, 2018 2:34 pm ]
Post subject:  Re: NES to USB Keyboard interface?

emerson wrote:
As promised, here is my approach to interfacing a ps/2 keyboard (and ps/2 mouse) to an NES. A dip switch is used to configure the adapter to either emulate the Family Basic keyboard, or provide full enahnced keyboard and mouse support. More details are in the ReadMe. I have a few more ideas I would like to implement in this design, so if I continue with this project Ill start a new development thread.

I currently can't test the Family Basic keyboard emulation with anything but the test rom I wrote, so if someone else builds this, could you please let me know if it works or not?

A brief description taken from the ReadMe:
-Support for all 3 keyboard scan codes
-Automatic scroll wheel detection for mouse
-Power led error blink codes
-Serial debug data available
-Adapter is automatically reset when console reset is pressed
-Save/Load functionality with PC compatibility


Is posible run in arduino?

Author:  emerson [ Tue Jan 02, 2018 2:49 pm ]
Post subject:  Re: NES to USB Keyboard interface?

Unfortunately it's not arduino compatible. You would have to start from scratch to make it work.

Author:  rainwarrior [ Tue Jan 02, 2018 3:10 pm ]
Post subject:  Re: NES to USB Keyboard interface?

I don't have the hardware to try it out but that's pretty cool! So it's a PIC based PS/2 to Family Basic converter? + some extra protocol to pass through some mouse data and the original PS/2 key stream?

Author:  emerson [ Tue Jan 02, 2018 4:36 pm ]
Post subject:  Re: NES to USB Keyboard interface?

rainwarrior wrote:
I don't have the hardware to try it out but that's pretty cool! So it's a PIC based PS/2 to Family Basic converter? + some extra protocol to pass through some mouse data and the original PS/2 key stream?


Basically yes... It has two modes of operation. Mode 1 is strictly a Family Basic converter. Mode 2 passes through the ps/2 keyboard scan codes along with the ps/2 mouse values.

Somehow I forgot to include some crucial information in the ReadMe about how the "Mode 2" function actually works. Sorry about that... Off the top of my head, you should know that when in "Mode 2", the PIC will convert all scan codes, regardless of config switch settings, to scan code 3 before sending the key values to the NES. This is because of its simple byte structure. If keyboard is forced to scan code 3 via the config switches, typematic repeat is disabled. If the mouse is enabled via the config switch, the mouse is set to report mode, and responds with the changes in xy position relative to its last read.

Page 3 of 3 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/