Jump to content
IGNORED

USB Keyboard for A8


TGB1718

Recommended Posts

I've been toying with the idea of using a USB keyboard with my 800 and 130XE, 2 reasons, as they get older, the more use, the more

likely the keyboard will eventually give up the ghost, secondly for me it's a bit awkward to use the real keyboard due to the location (basically

I can't sit at the keyboard), but the USB one can sit on my lap.

 

So I started working on using an Arduino UNO with a USB HAT (I already had one that I use on my USB Joystick).

I modified the Joystick code to read the key codes of a USB keyboard and map those keys to the internal key codes of the A8.

It then sends 3 x 3 bit packets to the A8 Joystick Port 2 (low 3 bits, then mid 3 bits and then SHFT/CNTL bits).

 

It handshakes with the TRIG input to flag a code is ready, the A8 handshakes with bit 7 of PORTA set as an output.

 

On the A8 I wrote a VBI routine that places itself just above LOMEM and adjusts LOMEM to preserve the code area, the code

survives a WARM Start.

 

Obviously you can't use the keyboard with any games due to the VBI code, but for anything else it seems to work fine, I've

given it a test run in BASIC and MAC/65. I can keep it attached and use the normal keyboard if I need it for games. 

 

I think I've managed to map most keys, but still a bit more testing to make sure. The code on the A8 is only 390 bytes, so

uses very little memory.

  • Like 2
Link to comment
Share on other sites

USB keyboard interface is part of simplestereo v3 & v4 boards (you can also use regular PS/2 or even IKBD (Atari ST/TT) keyboards), there will be also stand-alone version provided

there are quite few gotchas when doing this, but this is pretty strainght forward once you have USB host stack ready

 

  • Like 1
Link to comment
Share on other sites

16 minutes ago, foft said:

The next step is to wire it to k0-k5 and kr1/2 on pokey. If you have the usb- key code done then you are most of the way there. Is the arduino fast enough to track the keyboard scan while still polling usb?

Didn't set out to make internal mods, but now you've gone and put an idea in my mind :)

Not sure about the Arduino being fast enough, it's running at 16MHz and has little to do but run my code,

so it may be quick enough, the way I'm using at the moment it's fine.

 

6 minutes ago, candle said:

USB keyboard interface is part of simplestereo v3 & v4 boards (you can also use regular PS/2 or even IKBD (Atari ST/TT) keyboards),

I thought maybe someone else had done a USB interface, but it was just a little project for me 

Link to comment
Share on other sites

  • 4 months later...
On 11/17/2020 at 12:52 PM, TGB1718 said:

I've been toying with the idea of using a USB keyboard with my 800 and 130XE, 2 reasons, as they get older, the more use, the more

likely the keyboard will eventually give up the ghost, secondly for me it's a bit awkward to use the real keyboard due to the location (basically

I can't sit at the keyboard), but the USB one can sit on my lap.

 

So I started working on using an Arduino UNO with a USB HAT (I already had one that I use on my USB Joystick).

I modified the Joystick code to read the key codes of a USB keyboard and map those keys to the internal key codes of the A8.

It then sends 3 x 3 bit packets to the A8 Joystick Port 2 (low 3 bits, then mid 3 bits and then SHFT/CNTL bits).

 

It handshakes with the TRIG input to flag a code is ready, the A8 handshakes with bit 7 of PORTA set as an output.

 

On the A8 I wrote a VBI routine that places itself just above LOMEM and adjusts LOMEM to preserve the code area, the code

survives a WARM Start.

 

Obviously you can't use the keyboard with any games due to the VBI code, but for anything else it seems to work fine, I've

given it a test run in BASIC and MAC/65. I can keep it attached and use the normal keyboard if I need it for games. 

 

I think I've managed to map most keys, but still a bit more testing to make sure. The code on the A8 is only 390 bytes, so

uses very little memory.

When CrazyBonz and I built our first AKI we fouse many software bugs in the scan code for USA keyboards one of the bug that was really bad was when you pressed the "." you would get the comma. The is when I redid the pic software and we now call it the KRH. But here is my point there are several keyboards that will plug right into the pc port of the AKI or KRH and work fine. Some of these keyboards also work in USB mode. I have a Kensington keyboard that hooks right in and work in wireless mode. at the moment there pc keyboard to atari hardware going back to the mid 80's. here is a list of the hardware I know about.

Transkey   made in the mid 1980's

AKI   which is a good upgrade.

KRH   our version of the AKI with fixed US keyboard scancodes.

KRH2

TransKey II

TranskeyII for the Atari Game System.

Mike was nice enough to build me a transkeyII that also has Dual Pokey, and Switch in it.

I was up on Lotharek Web site and I saw he now has some keyboard versions.

I still want to see what you code up with so do not give up. Make it happen.

 

Stephen J. C arden

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...