USB keyboard/mouse interface

Troubles with your machine? Just want to speak about the latest improvements? This is the place!

Moderators: Mug UK, Zorro 2, spiny, Greenious, Moderator Team

User avatar
delvis
Captain Atari
Captain Atari
Posts: 153
Joined: Wed Jul 03, 2013 1:49 pm
Location: Leander, Texas, USA
Contact:

Re: USB keyboard/mouse interface

Postby delvis » Fri Sep 30, 2016 8:57 pm

This sounds very cool.
Delvis
Atari User since 1982
400 / 800/ 1200XL / 800XL /65XE / 130XE
520ST / 1040ST / MegaST4

User avatar
Fujiyama
Atari Super Hero
Atari Super Hero
Posts: 638
Joined: Thu Jul 12, 2007 8:21 am
Location: Norway

Re: USB keyboard/mouse interface

Postby Fujiyama » Wed Oct 12, 2016 10:25 am

nobox wrote:PS: Chances are not bad its working with different languages, too.
Its converting scancodes from german layout PC-Keyboard to german layout Atari-Keyboard.
But if you want to use it for an english Atari, you are using an english PC-Keyboard to.
And the scan code for the ";" key on an english Keyboard is the same like the "ö" Key on a german Keyboard
- If I where you, I would give it a test.


Yes, I would like to try it out if this solves my problem of being able to use a standard USB mouse and keyboard with my MegaSTe.
Is this project doing the exact same thing as Joska's Teensy setup, except here the missing code (USB Host Shield library 3) to make it work properly is already here for your particular hardware?

So the setup file is just a matter of checking each scancode and change it if it's different from the German setup?
It appears to be the code in the first posting in this thread.
I read something about compiling, and since I'm not into programming I wouldn't know where to start.
Maybe, if this project becomes popular, Atari users from different countries could each edit their own scan-code keyboard setup file and someone could compile them so they could be ready to use for others.

To summarize: the Raspberry Pi Zero is used together with the downloadable software which should be transferred over to a micro SD card and placed inside the Raspberry's card slot, and a cable goes between the Raspberry and Atari keyboard connector.
The Raspberry has two micro-USB connectors, and micro-USB to standard USB adapters can be bought so that a standard USB keyboard and USB mouse can be connected. When the downloaded software is installed in the Raspberry it automatically loads it whenever power is switched on so that the keyboard/mouse is available when the Atari ST is booting. Correct?
Will there also be software for configuring the mouse (third button, scroll wheel etc.)?
Mega STe | MonSTer (Mega STe) with dual IDE-CF memory card adapter | STe | SM-144 |NEC Multisync 1990SXi | IDE doubler | ST_ESCC | RSVE | ICD Link II | Link '97 | HD floppy drive/AJAX | HD floppy module | Minolta PCMCIA card-drive | Realtime Clock module | Discovery cartridge | Unitor-2 | Export | Combiner | Steady Eye | Human Touch | Unicorn USB

Are you a good person?

User avatar
Fujiyama
Atari Super Hero
Atari Super Hero
Posts: 638
Joined: Thu Jul 12, 2007 8:21 am
Location: Norway

Re: USB keyboard/mouse interface

Postby Fujiyama » Wed Oct 12, 2016 10:26 am

nobox wrote:PS: Chances are not bad its working with different languages, too.
Its converting scancodes from german layout PC-Keyboard to german layout Atari-Keyboard.
But if you want to use it for an english Atari, you are using an english PC-Keyboard to.
And the scan code for the ";" key on an english Keyboard is the same like the "ö" Key on a german Keyboard
- If I where you, I would give it a test.


Yes, I would like to try it out if this solves my problem of being able to use a standard USB mouse and keyboard with my MegaSTe.
Is this project doing the exact same thing as Joska's Teensy setup, except here the missing code (USB Host Shield library 3) to make it work properly is already here because you use Raspberry hardware instead?

So the setup file is just a matter of checking each scancode and change it if it's different from the German setup?
It appears to be the code in the first posting in this thread.
I read something about compiling, and since I'm not into programming I wouldn't know where to start.
Maybe, if this project becomes popular, Atari users from different countries could each edit their own scan-code keyboard setup file and someone could compile them so they could be ready to use for others.

To summarize: the Raspberry Pi Zero is used together with the downloadable software which should be transferred over to a micro SD card and placed inside the Raspberry's card slot, and a cable goes between the Raspberry and Atari keyboard connector.
The Raspberry has two micro-USB connectors, and micro-USB to standard USB adapters can be bought so that a standard USB keyboard and USB mouse can be connected. When the downloaded software is installed in the Raspberry it automatically loads it whenever power is switched on so that the keyboard/mouse is available when the Atari ST is booting. Correct?
Will there also be software for configuring the mouse (third button, scroll wheel etc.)?
Mega STe | MonSTer (Mega STe) with dual IDE-CF memory card adapter | STe | SM-144 |NEC Multisync 1990SXi | IDE doubler | ST_ESCC | RSVE | ICD Link II | Link '97 | HD floppy drive/AJAX | HD floppy module | Minolta PCMCIA card-drive | Realtime Clock module | Discovery cartridge | Unitor-2 | Export | Combiner | Steady Eye | Human Touch | Unicorn USB

Are you a good person?

nobox
Atariator
Atariator
Posts: 28
Joined: Sat Mar 28, 2015 12:42 pm

Re: USB keyboard/mouse interface

Postby nobox » Wed Oct 12, 2016 12:14 pm

Your summary is correct.

Because I use a raspberry setup, I dont have to fiddle around with librarys for different hardware, cause the linux os got all the drivers.
Only thing to program was a listener on usb input events, and translate it to a atari output on the serial device.
Thats what the souce code in my post is for.

There is no "setup file", the translation is hardcoded - no prob, because its open source.

Third mouse button or scroll wheel could be easy to use, should be a ereignis->type 1,

so, its in the first part of the code.

if(ereignis->type == 1
&& ereignis->code < 274) {if (ereignis->code == 272) lb=2*ereignis->value;
if (ereignis->code == 273) rb=ereignis->value;
//printf("Mouse code: %d %d %d\n",248+lb+rb,0,0);
serout[0]=248+lb+rb;
serout[1]=0;serout[2]=0;
write(serdevnr,&serout[0],3);

Only Question ist, how to translate a third mouse button or scroll wheel ? There is no such thing in the IKBD.
One could generate cursor button events from the scroll wheel, but this could conflict with the cursor buttons.

User avatar
frank.lukas
Hardware Guru
Hardware Guru
Posts: 1620
Joined: Tue Jan 29, 2008 5:33 pm
Location: Germany

Re: USB keyboard/mouse interface

Postby frank.lukas » Wed Oct 12, 2016 12:53 pm

fancy Atari Musik anDA Dance "Agare Hinu Harukana" 1998 ATARI http://www.youtube.com/watch?v=JX10fxb5eYE

User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 12463
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: USB keyboard/mouse interface

Postby wongck » Wed Oct 12, 2016 1:29 pm

nobox wrote:Only Question ist, how to translate a third mouse button or scroll wheel ? There is no such thing in the IKBD.
One could generate cursor button events from the scroll wheel, but this could conflict with the cursor buttons.

I think that's what Eiffle does.
Try to look at http://didierm.pagesperso-orange.fr/eiffel-e.htm screen
My Stuff: FB/Falcon CT63/CTPCI+ATI+RTL8139+USB 512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list

nobox
Atariator
Atariator
Posts: 28
Joined: Sat Mar 28, 2015 12:42 pm

Re: USB keyboard/mouse interface

Postby nobox » Wed Oct 12, 2016 1:37 pm

For what eiffel does, there is a special interface and driversoftware on the atari.

The raspberry ikbd emulator connects and has a behavior like a normal Atari/Keyboard mouse.

No driver software on atari side at all. Thats why I only can generate Keyboard/mouse events what can be generated by a normal atari keyboard , too.

nobox
Atariator
Atariator
Posts: 28
Joined: Sat Mar 28, 2015 12:42 pm

Re: USB keyboard/mouse interface

Postby nobox » Wed Oct 12, 2016 1:44 pm

I just read in the eiffel documentation,

scrollwheel is implemented as (non existing) function keys F13- ($59-$5D)
this can I do in my code, too

User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 12463
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: USB keyboard/mouse interface

Postby wongck » Wed Oct 12, 2016 11:01 pm

nobox wrote:For what eiffel does, there is a special interface and driversoftware on the atari.
The raspberry ikbd emulator connects and has a behavior like a normal Atari/Keyboard mouse.
No driver software on atari side at all. Thats why I only can generate Keyboard/mouse events what can be generated by a normal atari keyboard , too.


I know that your cool device does not need any other software on the Atari side as it emulate/behave exactly like a a normal Atari keybrd/mouse.
I meant for you to take a look at how Eiffle does stuff and have some inspiration on how to handle a mouse wheel on your adapter.

I am also interested in this, as it will help with the clutter of my small desk not to mention my TT keyboard is bad.
Having only to solder few wires will work for me as I am not a hardware guy.
I was looking for ways to hook up an USB keybrd & an USB mouse into an Atari.
I think your solution is better as it does not need for a PS/2 type keybrd/mouse like the other solution.

nobox wrote:I just read in the eiffel documentation,
scrollwheel is implemented as (non existing) function keys F13- ($59-$5D)
this can I do in my code, too


Great stuff.... exactly what I meant for you to do... by telling you the URL. :thumbs:
My Stuff: FB/Falcon CT63/CTPCI+ATI+RTL8139+USB 512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list

User avatar
Fujiyama
Atari Super Hero
Atari Super Hero
Posts: 638
Joined: Thu Jul 12, 2007 8:21 am
Location: Norway

Re: USB keyboard/mouse interface

Postby Fujiyama » Thu Oct 13, 2016 11:10 pm

Great stuff indeed!

I'm trying to get an overview of all the details before ordering and going ahead with the project, so I've found out a few things and also have some additional questions:

1) Apparently the Raspberry Pi Zero only comes with one (micro) USB port. There are two ports, but the other one is used only for powering the board as far as I know (I assume this would go directly to the Atari ST power supply's +5V and GND pins).
So for a USB keyboard/USB mouse configuration with the Atari ST you'd need a USB hub.
A list of compatible (and non-working) hubs for the Pi Zero is shown here. Personally I'd prefer one of the hub PCBs which mount on top (stacked) of the Pi Zero board, and the USB Hub Zero (installation instructions/photos here) is one such hub I found which costs around 9 Euros (plus shipping, which wasn't excessive).

2) The Raspberry Pi Zero is supposed to cost around US$ 5, but in reality I've found it costing much more most places, and many sellers charge excessively for shipping. Pimoroni sells them for GBP 4 (plus shipping) and The PiHut for the same (plus shipping). There are probably others, but depending on where in the world you live they might charge you quite a lot for shipping.

3) From this posting in the German Atari-home forum I understand that the Atari MegaST(E) 6P6C keyboard connector (pinout diagram) goes to the GPIO connector (pinout diagram) of the Pi Zero as follows:
GPIO pinout.png
(pinout diagram taken from pinout.xyz. Here's a better photo which shows the GPIO connector on the Raspberry Pi Zero board)

GPIO pin 2 - Atari Mega STe keyboard pin 2 (+5V)
GPIO pin 6 - Atari Mega STe keyboard pin 5 (GND)
GPIO pin 8 - Atari Mega STe keyboard pin 4 (Receive (RX) data)

Atari Mega STe 6 pin keyboard connector pinout.png
(pinout diagram taken from old.pinouts.ru)

It's a little confusing though as the last connection says "pin 4 (Receive data or Transmit data)" on the Atari ST, but pin 3 is Transmit data, so I don't get it. Here's the original German text (please correct me if I've misunderstood):

Nun verbindet man das RJ11 Kabel mit dem GPIO des Raspberry, und zwar:
PIN2 der KBD-Schnittstelle mit PIN2 GPIO (5V)
PIN5 der KBD-Schnittstelle mit PIN6 GPIO (GND)
PIN4 der KBD-Schnittstelle mit PIN8 GPIO (RX bzw TX)


For the Atari ST/STF/STFM/STe there's a picture of the internal keyboard connector on the Eiffel page. Based on several different sources I believe the pinout is as follows (please correct me if I'm wrong):
Atari ST internal keyboard connector pinout.png

GPIO pin 2 - Atari ST/STF/STFM/STe keyboard pin 4 (+5V)
GPIO pin 6 - Atari ST/STF/STFM/STe keyboard pin 1 (GND)
GPIO pin 8 - Atari ST/STF/STFM/STe keyboard pin 5 (Receive (RX) data)


... now for my questions:
4) Can the two joystick ports be connected and used? If so, where do these connect?
(the Eiffel board has this ability)

5) Nobox, since the code for the scroll-wheel is possible to use with this setup, will you update the software with it? Perhaps also including the other special functions (extra mouse buttons etc.) as seen in the Eiffel setup control panel?

6) How do I use the Raspberry IKBD emulator image file download? Is it a matter of just downloading, unzipping and placing the content (ikbdemu.img) on a newly formatted micro-SD memory card, then put it in the Pi Zero card slot? I suppose this is the software which has the German keyboard table scan codes etc. and needs compiling.

Anything else I need to know before proceeding?
You do not have the required permissions to view the files attached to this post.
Mega STe | MonSTer (Mega STe) with dual IDE-CF memory card adapter | STe | SM-144 |NEC Multisync 1990SXi | IDE doubler | ST_ESCC | RSVE | ICD Link II | Link '97 | HD floppy drive/AJAX | HD floppy module | Minolta PCMCIA card-drive | Realtime Clock module | Discovery cartridge | Unitor-2 | Export | Combiner | Steady Eye | Human Touch | Unicorn USB

Are you a good person?

User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 12463
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: USB keyboard/mouse interface

Postby wongck » Thu Oct 13, 2016 11:27 pm

nobox wrote:scrollwheel is implemented as (non existing) function keys F13- ($59-$5D)
this can I do in my code, too


Been thinking a bit.... TOS will probably not understand this, but XaAES will probably do.
So you need a driver in TOS just to understand the non-existing function keys.
My Stuff: FB/Falcon CT63/CTPCI+ATI+RTL8139+USB 512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list

User avatar
Fujiyama
Atari Super Hero
Atari Super Hero
Posts: 638
Joined: Thu Jul 12, 2007 8:21 am
Location: Norway

Re: USB keyboard/mouse interface

Postby Fujiyama » Thu Oct 13, 2016 11:38 pm

That's OK for me at least since this is a special feature and not absolutely necessary to use the computer.
Maybe an Xcontrol module (like Eiffel has -perhaps it can even be modified for this particular use, if the author allows it) or an AUTO program.
Is there any software already available which can work?
Mega STe | MonSTer (Mega STe) with dual IDE-CF memory card adapter | STe | SM-144 |NEC Multisync 1990SXi | IDE doubler | ST_ESCC | RSVE | ICD Link II | Link '97 | HD floppy drive/AJAX | HD floppy module | Minolta PCMCIA card-drive | Realtime Clock module | Discovery cartridge | Unitor-2 | Export | Combiner | Steady Eye | Human Touch | Unicorn USB

Are you a good person?

User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 12463
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: USB keyboard/mouse interface

Postby wongck » Thu Oct 13, 2016 11:50 pm

Fujiyama wrote:2) The Raspberry Pi Zero is supposed to cost around US$ 5, but in reality I've found it costing much more most places, and many sellers charge excessively for shipping. Pimoroni sells them for GBP 4 (plus shipping) and The PiHut for the same (plus shipping). There are probably others, but depending on where in the world you live they might charge you quite a lot for shipping.


I checked some hobbyist online store around my area and no Pi Zero are listed. :(
I then checked Adafruits and checked their shipping over to me and it was a whooping USD$100+ ... 8O
Pihut overseas delivery goes up to GBP12. If I need get a hub all in all will be more expensive as well.
So looks like cheaper just to get a local Pi 1 B+ for me.

My guess is a Pi 1 B+ should be binary compatible with the code.
My Stuff: FB/Falcon CT63/CTPCI+ATI+RTL8139+USB 512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list

nobox
Atariator
Atariator
Posts: 28
Joined: Sat Mar 28, 2015 12:42 pm

Re: USB keyboard/mouse interface

Postby nobox » Fri Oct 14, 2016 9:41 am

I wrote the code on a raspberry 1B, and neogain used it on a raspberry 2. Never tried on a zero, but I think it has to be bin compatible.

About the confusing with RX and TX:

"PIN4 der KBD-Schnittstelle mit PIN8 GPIO (RX bzw TX)"

MEANS:

PIN4 (on the Mega STE) is RX (of the Atari)
Pin 8 GPIO is TX (of the Raspberry)

with serial connection, you have always to connect one sides TX with the other sides RX.

User avatar
Fujiyama
Atari Super Hero
Atari Super Hero
Posts: 638
Joined: Thu Jul 12, 2007 8:21 am
Location: Norway

Re: USB keyboard/mouse interface

Postby Fujiyama » Fri Oct 14, 2016 9:56 am

wongck wrote:Pihut overseas delivery goes up to GBP12. If I need get a hub all in all will be more expensive as well.
So looks like cheaper just to get a local Pi 1 B+ for me.


Did you have a look at the other link I posted (Pimoroni)?
I just checked, and they only charge UKP 5.50 for sending to your area, the total cost for a Pi Zero with postage then being UKP 8.83.
I checked the USB Hub zero as well and the total cost including shipping to you is EUR 13.40.
I haven't looked into prices for other Raspberry computers since the Pi Zero was mentioned in this thread, but if they're all suitable for this project I'll see what they sell for.
Mega STe | MonSTer (Mega STe) with dual IDE-CF memory card adapter | STe | SM-144 |NEC Multisync 1990SXi | IDE doubler | ST_ESCC | RSVE | ICD Link II | Link '97 | HD floppy drive/AJAX | HD floppy module | Minolta PCMCIA card-drive | Realtime Clock module | Discovery cartridge | Unitor-2 | Export | Combiner | Steady Eye | Human Touch | Unicorn USB

Are you a good person?

nobox
Atariator
Atariator
Posts: 28
Joined: Sat Mar 28, 2015 12:42 pm

Re: USB keyboard/mouse interface

Postby nobox » Fri Oct 14, 2016 9:58 am

4) Can the two joystick ports be connected and used? If so, where do these connect?
(the Eiffel board has this ability)


No joystick support yet. Maybe later. See 5)
5) Nobox, since the code for the scroll-wheel is possible to use with this setup, will you update the software with it? Perhaps also including the other special functions (extra mouse buttons etc.) as seen in the Eiffel setup control panel?

I will extend the software in future. Goal is to make it full eiffell compat. But definitively not this year. Im a rather busy porgrammer. Plus, Im make my motobike driver license at the moment. And christmas is not so far, too:

Means: I will develop it further, but: no profit, no hurry. Its just a hobby.

6) How do I use the Raspberry IKBD emulator image file download? Is it a matter of just downloading, unzipping and placing the content (ikbdemu.img) on a newly formatted micro-SD memory card, then put it in the Pi Zero card slot? I suppose this is the software which has the German keyboard table scan codes etc. and needs compiling.


You got it. This is a ready to use disk image. Use Win32DiskImager for example. Ready to use means binary, no source, no compiling.
You only need to compile if you produce the setup yourself, with your own raspian or minibian and if you wish to compile yourself.
But then You need the other steps I described in the german forum, too:

Free the serial port:

http://www.raspberrypi-spy.co.uk/2013/1 ... rial-port/

make it 7812.5 baud instead of 9600,

insert

Code: Select all

init_uart_clock=2441406
init_uart_baud=9600
dtparam=uart0_clkrate=3000000

in your config.txt

User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 12463
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: USB keyboard/mouse interface

Postby wongck » Fri Oct 14, 2016 12:08 pm

Fujiyama wrote:Did you have a look at the other link I posted (Pimoroni)?
I just checked, and they only charge UKP 5.50 for sending to your area, the total cost for a Pi Zero with postage then being UKP 8.83.
I checked the USB Hub zero as well and the total cost including shipping to you is EUR 13.40.
I haven't looked into prices for other Raspberry computers since the Pi Zero was mentioned in this thread, but if they're all suitable for this project I'll see what they sell for.

Thanks Fujiyama... that is cheaper than the local Pi 1B+. :D
My Stuff: FB/Falcon CT63/CTPCI+ATI+RTL8139+USB 512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list

User avatar
Fujiyama
Atari Super Hero
Atari Super Hero
Posts: 638
Joined: Thu Jul 12, 2007 8:21 am
Location: Norway

Re: USB keyboard/mouse interface

Postby Fujiyama » Fri Oct 14, 2016 12:12 pm

Glad to return some of the help you've given me throughout the years :D
The stackable USB hub looks like an elegant solution. Since I'll be recasing my MegaSTe I don't need a case for the Raspberry, so the less mounting screws the better. Will you be mounting it externally with the original Atari casing or recasing it all as well?
Mega STe | MonSTer (Mega STe) with dual IDE-CF memory card adapter | STe | SM-144 |NEC Multisync 1990SXi | IDE doubler | ST_ESCC | RSVE | ICD Link II | Link '97 | HD floppy drive/AJAX | HD floppy module | Minolta PCMCIA card-drive | Realtime Clock module | Discovery cartridge | Unitor-2 | Export | Combiner | Steady Eye | Human Touch | Unicorn USB

Are you a good person?

User avatar
Fujiyama
Atari Super Hero
Atari Super Hero
Posts: 638
Joined: Thu Jul 12, 2007 8:21 am
Location: Norway

Re: USB keyboard/mouse interface

Postby Fujiyama » Fri Oct 14, 2016 12:41 pm

nobox wrote:I will extend the software in future. Goal is to make it full eiffell compat. But definitively not this year. Im a rather busy porgrammer. Plus, Im make my motobike driver license at the moment. And christmas is not so far, too:

Means: I will develop it further, but: no profit, no hurry. Its just a hobby.


I fully understand. Good things come to those who wait, so I'll be patient :wink:
Full Eiffel compatibility sounds fantastic! I understand that assigning the mouse scroll wheel/additional buttons is a software development issue, but for adding the two Atari joystick ports -will this need some extra circuit board to be designed, or is it just a matter of attaching two DB9 connectors to the Raspberry GPIO pins and have this supported in software?

Good luck with your motorbike license!

6) How do I use the Raspberry IKBD emulator image file download?


You got it. This is a ready to use disk image. Use Win32DiskImager for example. Ready to use means binary, no source, no compiling.
You only need to compile if you produce the setup yourself, with your own raspian or minibian and if you wish to compile yourself.
But then You need the other steps I described in the german forum, too:


I use a Mac but found info on how to install it using the OSX terminal, and also with a free GUI app called PiWriter. And here's a short video showing how to use it.

I'm afraid compiling and things like that is over my head, so better leave that to those who know about these things :wink:
But reassigning the keyboard scan codes is probably something anyone with a text editor can do, right? And from there on a new disk image can be made I guess.

By the way, I see the "ikbdemu.img" file is just under 1 GB. Will a 2 GB micro SD card be enough, even with the additional Eiffel compatibility code in the future or will a 4 GB card be better?
Is the SD speed "class" important and will make a difference (waiting for the USB keyboard/mouse to boot before the Atari ST)? I've found some low cost class 2 and class 4 cards (I always go for quality brands such as Sandisk though, and never through eBay etc. as there are a lot of fake rebranded cards around).
Last edited by Fujiyama on Sat Oct 15, 2016 3:51 pm, edited 1 time in total.
Mega STe | MonSTer (Mega STe) with dual IDE-CF memory card adapter | STe | SM-144 |NEC Multisync 1990SXi | IDE doubler | ST_ESCC | RSVE | ICD Link II | Link '97 | HD floppy drive/AJAX | HD floppy module | Minolta PCMCIA card-drive | Realtime Clock module | Discovery cartridge | Unitor-2 | Export | Combiner | Steady Eye | Human Touch | Unicorn USB

Are you a good person?

User avatar
Fujiyama
Atari Super Hero
Atari Super Hero
Posts: 638
Joined: Thu Jul 12, 2007 8:21 am
Location: Norway

Re: USB keyboard/mouse interface

Postby Fujiyama » Fri Oct 14, 2016 1:01 pm

nobox wrote:I wrote the code on a raspberry 1B, and neogain used it on a raspberry 2. Never tried on a zero, but I think it has to be bin compatible.


Are all the Raspberry boards usable for this project? So then it's just a matter of finding the cheapest solution which includes two USB ports (type A). So far, it looks like the suggestion I presented to Wongck (Pi Zero/USB Hub Zero) is the cheapest one.


About the confusing with RX and TX:

"PIN4 der KBD-Schnittstelle mit PIN8 GPIO (RX bzw TX)"

MEANS:

PIN4 (on the Mega STE) is RX (of the Atari)
Pin 8 GPIO is TX (of the Raspberry)

with serial connection, you have always to connect one sides TX with the other sides RX.


Ah! Yes, that makes sense.
So the connection is correct, but for a better description, here's an update:

Raspberry to Atari Mega STe connection
Raspberry GPIO (+5V) pin 2 - pin 2 Atari Mega STe keyboard (+5V)
Raspberry GPIO (GND) pin 6 - pin 5 Atari Mega STe keyboard (GND)
Raspberry GPIO (Transmit (TX) data) pin 8 - pin 4 Atari Mega STe keyboard (Receive (RX) data)

and

Raspberry to Atari ST/STF/STFM/STe connection
Raspberry GPIO (+5V) pin 2 - pin 4 Atari ST/STF/STFM/STe keyboard (+5V)
Raspberry GPIO (GND) pin 6 - pin 1 Atari ST/STF/STFM/STe keyboard (GND)
Raspberry GPIO (Transmit (TX) data) pin 8 - pin 5 Atari ST/STF/STFM/STe keyboard (Receive (RX) data)
Mega STe | MonSTer (Mega STe) with dual IDE-CF memory card adapter | STe | SM-144 |NEC Multisync 1990SXi | IDE doubler | ST_ESCC | RSVE | ICD Link II | Link '97 | HD floppy drive/AJAX | HD floppy module | Minolta PCMCIA card-drive | Realtime Clock module | Discovery cartridge | Unitor-2 | Export | Combiner | Steady Eye | Human Touch | Unicorn USB

Are you a good person?

nobox
Atariator
Atariator
Posts: 28
Joined: Sat Mar 28, 2015 12:42 pm

Re: USB keyboard/mouse interface

Postby nobox » Fri Oct 14, 2016 2:21 pm

Fully Eiffel compatibility means the software side. If I add joystick support one day, it will be definitely USB Joysticks (or Pads).
Goal of my project is to connect NEW! Input Hardware to the Atari. But hey, maybe you can use an DB9 tu USB Adapter then ;-)

2GB should be enough, even with the future code. Being a IKBD interface is not a very hard task for a powerhorse like the Raspberry.
Thats also why every Raspberry SHOULD do the trick. But never tried myself, so - no warranties.

The use of different SD classes may affect the boot time - so may be you have to wait a little longer after switching on.
In my own setup, the raspberry needs 12 seconds to boot - thats 6 minus sign on my Mega STE till space press.

Reassigning the key codes is a matter of editing the C sourcecode and recompiling at the moment - because its all hard coded.
But chances are, you wont have to - give it a try.

to make the scancode assignment editable by a textfile will be my next job - prior to eiffel, scroll wheel and joysticks.

nobox
Atariator
Atariator
Posts: 28
Joined: Sat Mar 28, 2015 12:42 pm

Re: USB keyboard/mouse interface

Postby nobox » Fri Oct 14, 2016 5:50 pm

One thing to mention: I told you to make a connection between the raspberrys TX and the Ataris Rx. But dont try the opposite ! Connecting the ataris TX direct to the raspberrys Rx would surely destroy your raspberry.
The Reason: Raspberry is working with 3.3 V, Atari TTL uses 5V.

3V from rhe raspi is enough to trigger the serial of the atari, but 5V from the atari would be to much for the input of the Pi

User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 12463
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: USB keyboard/mouse interface

Postby wongck » Sat Oct 15, 2016 12:38 am

nobox wrote:2GB should be enough, even with the future code. Being a IKBD interface is not a very hard task for a powerhorse like the Raspberry.

Yes.. I think I will go with the bigger model of the Pi as I am also thinking may be we can add other stuff to it like networking etc.
I mean it is not a CosmoSEXy replacement. Just that it is a waste for a 300MHz Pentium equivalent to do serial bytes translation.
I am not a hardwre guy so less soldering is better for me, so the networking stuff will probably just be for serial/MIDI interface (ie not fast).
My Stuff: FB/Falcon CT63/CTPCI+ATI+RTL8139+USB 512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list

User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 12463
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: USB keyboard/mouse interface

Postby wongck » Sat Oct 15, 2016 11:26 am

wow... turns out the local RS components can do a Pi 1B+ that's just 1 GBP more than he Pi Zero/USB hub combo.
( because of free local delivery )
My Stuff: FB/Falcon CT63/CTPCI+ATI+RTL8139+USB 512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list

nobox
Atariator
Atariator
Posts: 28
Joined: Sat Mar 28, 2015 12:42 pm

Re: USB keyboard/mouse interface

Postby nobox » Sat Oct 15, 2016 12:24 pm

probably cheapest option is to get a used raspberry 1. many people sell it cause of the faster raspberry 2 & 3


Social Media

     

Return to “Hardware”

Who is online

Users browsing this forum: No registered users and 7 guests