DIY non-ADB NeXT keyboard to USB adapter

NeXT Computer, Inc. -> NeXT Black Hardware

Title: DIY non-ADB NeXT keyboard to USB adapter
Post by: nex on December 08, 2012, 10:59:21 PM
Very cool!

Parts:

Arduino micro w/ headers ~$25
PS/2 connector ~$4
USB cable ~$4

Guide by Ladyada: http://learn.adafruit.com/usb-next-keyboard-with-arduino-micro

PDF version: http://learn.adafruit.com/downloads/pdf/usb-next-keyboard-with-arduino-micro.pdf
Title: DIY non-ADB NeXT keyboard to USB adapter
Post by: gtnicol on December 09, 2012, 11:15:28 AM
Very cool. I've been working on something similar (to/from PS/2) on a PIC. The mouse is multiplexed in as well... there's a keyboard query and a mouse query (1 bit set, 2 bits set), and the mouse data is sent the same way as the keyboard data.
Title: DIY non-ADB NeXT keyboard to USB adapter
Post by: jroark on December 09, 2012, 02:42:08 PM
Nice, this looks promising. Those soundboxes are increasingly hard to come by. I've also been looking into making a mono y-cable db19->db19/vga it would be great to skip the soundbox all together and have the option to use a ps/2 kvm.

I've seen some discussion about the pin-outs for the y-cable on this forum but nothing I've felt was definitive.

gtnicol, do you have the pinouts?
Title: DIY non-ADB NeXT keyboard to USB adapter
Post by: gtnicol on December 09, 2012, 07:53:05 PM
Yes, I had some cables made up that go from mono->via, but you still need the soundbox for the keyboard. My longer term plan was to have a PS/2+VGA adapter for the NeXT box so you could use a normal keyboard and display with them, but the audio, video, power, and mouse+kbd all go down the mono cable, which runs at about 5MHz (from memory). I picked up a propeller and an XMOS to finish off the project, but got really busy afterward.

I will dig up the PS/2 project again... it was pretty close to done using a single PIC.
Title: DIY non-ADB NeXT keyboard to USB adapter
Post by: jroark on December 09, 2012, 09:39:07 PM
I've got a propeller, they used them on the DEFCON badges this year. Two ps/2 ports and vga out as well.

FYI those hard to find DB19 male connectors are available here: http://iec.net/Browse05/MPartDB19.html they told me they have a couple hundred in stock.
Title: Teensy 2.0 version
Post by: jroark on December 31, 2012, 09:26:58 PM
I was inspired by the Arduino tutorial and decided to get this running on my Teensy 2.0. For some reason the Arduino code would not run properly for me even though the two boards are mostly compatible and lots of projects will run on both without modification.

The Teensy is only $16 (http://pjrc.com/teensy/index.html).

Code is here:
https://code.google.com/p/teensy-nextkb/

Title: Woot!
Post by: pergamon on January 14, 2013, 12:39:12 PM
I'm typing this post using this project.  Neato.
Title: DIY non-ADB NeXT keyboard to USB adapter
Post by: timu on January 18, 2013, 12:48:37 PM
I've got it working too...

However, behavior is a little odd...
Shift key LEDs do not stay on if you continue holding either key down.

Also, the LED on the arduino micro (13) never goes off... from the code it seems if there are no keypresses it should be off?

It appears the OS (Win7) does not recognize a constant depression of the shift key either, rather a series of presses (?)

Maybe the keyboard is not returning 0x200600 when idle?

Tim
Title: Modifiers
Post by: pergamon on January 18, 2013, 01:03:59 PM
Quote from: "timu"Also, the LED on the arduino micro (13) never goes off... from the code it seems if there are no keypresses it should be off?

It should go off, though I've seen this happen a couple times on mine and I've had to hit the reset which fixed it.

Quote from: "timu"It appears the OS (Win7) does not recognize a constant depression of the shift key either, rather a series of presses (?)

Probably due to the "fix" for the sticky modifier keys.  I'd just made a note in my version to try to make that a little smoother, which I'll probably do tonight or tomorrow.

BTW I mentioned this on another thread, but if anyone wants a version with preliminary (in other words, not working very well yet) mouse support:

https://github.com/mgrdcm/USB-NeXT-Keyboard/tree/mouse
Title: Re: Modifiers
Post by: timu on January 18, 2013, 01:46:33 PM
Quote from: "pergamon"
It should go off, though I've seen this happen a couple times on mine and I've had to hit the reset which fixed it.

No luck, even with multiple resets... It is not full intensity, you can tell it is cycling high/low.

Does your shift LEDs stay on if you hold down the shift key?
Title: DIY non-ADB NeXT keyboard to USB adapter
Post by: timu on January 18, 2013, 02:02:57 PM
I turned on the debug and discovered that my keyboard is returning 0x300600 when idle.

So, I redefined NEXT_KMBUS_IDLE to 0x300600

Now, the LED is off unless there is a keypress, and the shift LEDs stay on.
OS now sees a held down shift as a constant keypress.
Title: DIY non-ADB NeXT keyboard to USB adapter
Post by: pergamon on January 18, 2013, 02:07:15 PM
Quote from: "timu"I turned on the debug and discovered that my keyboard is returning 0x300600 when idle.

So, I redefined NEXT_KMBUS_IDLE to 0x300600

Now, the LED is off unless there is a keypress, and the shift LEDs stay on.
OS now sees a held down shift as a constant keypress.

Fascinating!

I wonder if your KB is especially new or especially old.  Would you be willing to share your serial number (or an approximation of it)?  I know there are at least 2 different layouts of US non-ADB NeXT keyboards.  I need to pull out a sampling of the various models I have and test them...
Title: DIY non-ADB NeXT keyboard to USB adapter
Post by: timu on January 18, 2013, 02:26:44 PM
Quote from: "pergamon"
Fascinating!

I wonder if your KB is especially new or especially old.  Would you be willing to share your serial number (or an approximation of it)?  I know there are at least 2 different layouts of US non-ADB NeXT keyboards.  I need to pull out a sampling of the various models I have and test them...

I am currently using a SN slightly above ABP5102150
I have another keyboard at home, which I will try later.
Title: DIY non-ADB NeXT keyboard to USB adapter
Post by: pergamon on January 18, 2013, 02:34:40 PM
Quote from: "timu"I am currently using a SN slightly above ABP5102150

If memory serves, that's a very late model one.

I wouldn't be surprised if it turns out that the IDLE signal is different to tell the host which version or key layout the keyboard is.
Title: DIY non-ADB NeXT keyboard to USB adapter
Post by: jroark on January 18, 2013, 04:12:04 PM
the AVR internal clock is not super accurate, perhaps the timing is slightly off?

The line is high when idle and the bits come in lsb order, so the difference between 0x200600 and 0x300600 is one bit on the idle high


000000000110000000011 (0x300600)
000000000110000000001 (0x200600)
--_________--_________--
xx01234567890123456789xx
Title: DIY non-ADB NeXT keyboard to USB adapter
Post by: jroark on January 18, 2013, 04:32:29 PM
This makes sense also because the code is using a 32bit int to represent the 22 bit idle msg and shifting the signal left into the 32bit response value, so by the time it gets to the last 9 0 bits the avr is taking longer to shift and or the msb since its registers are only 8 bits
Title: DIY non-ADB NeXT keyboard to USB adapter
Post by: timu on January 21, 2013, 08:28:19 AM
My other keyboard, SN APB2123500 is returning 0x200600.
Title: DIY non-ADB NeXT keyboard to USB adapter
Post by: eagle on August 15, 2017, 10:10:01 AM
Is anybody (still) using one of these?  I see a new project in my future...
Title: DIY non-ADB NeXT keyboard to USB adapter
Post by: Rob Blessin Black Hole on August 15, 2017, 10:28:59 PM
Heck yes , the software tools to do it may be here  https://github.com/tmk Best Regards Rob Blessin  

USB to NeXT https://learn.adafruit.com/usb-next-keyboard-with-arduino-micro/overview     but it would be cool to have a USB keyboard to NeXT adapter

One question I have is it possible to bypass the NeXT sound card ,

I envision an adaptor nonadb or adb keyboard  or USB to DB19 Connector , with the custom video Y cable , I have one end goes to a flatpanel the middle to the cube or mono slab and the other end the sound box , I have lots of NeXT shells so it be easy to mount the DB19 Female connector to it .

I'm wondering if an arduino solution would work here.  

Does a NeXT Keyboard use anything on the sound card ... I guess would be the question or can it be hard wired  directly  to the connector ?  Difference between ADB and NON ADB pin 7
Title: DIY non-ADB NeXT keyboard to USB adapter
Post by: Rob Blessin Black Hole on August 15, 2017, 10:38:10 PM
Heck yes , the software tools to do it may be here  https://github.com/tmk Best Regards Rob Blessin  

USB to NeXT https://learn.adafruit.com/usb-next-keyboard-with-arduino-micro/overview     but it would be cool to have a USB keyboard to NeXT adapter

One question I have is it possible to bypass the NeXT sound card ,

I envision an adaptor nonadb or adb keyboard  or USB to DB19 Connector , with the custom video Y cable , I have one end goes to a flatpanel the middle to the cube or mono slab and the other end the sound box , I have lots of NeXT shells so it be easy to mount the DB19 Female connector to it .

I'm wondering if an arduino solution would work here.  

Does a NeXT Keyboard use anything on the sound card ... I guess would be the question or can it be hard wired  directly  to the connector ?  Difference between ADB and NON ADB pin 7
Pins 3,4,5,6,  7 ADB from Brian' s diagram... may be Archer's tried it!

http://asterontech.com/Asterontech/next_adb_conversion.html
Title: DIY non-ADB NeXT keyboard to USB adapter
Post by: eagle on August 16, 2017, 05:39:25 AM
Cool.  I'm going to make one, maybe more than one.  It would be cool if it enabled the mouse too, but I doubt it does that.
Title: DIY non-ADB NeXT keyboard to USB adapter
Post by: timu on August 16, 2017, 11:53:19 AM
I still use mine occasionally... love the keyboard.

If you skim thru all the comments on this thread, you will see pergamon had posted a link to a version of the sw with preliminary mouse support.

Tim
Title: DIY non-ADB NeXT keyboard to USB adapter
Post by: eagle on August 16, 2017, 12:04:29 PM
Yeah, it looked like that was a PIC solution, not an Arduino one.  But maybe the Arduino is a PIC microcontroller? :)
Title: DIY non-ADB NeXT keyboard to USB adapter
Post by: timu on August 16, 2017, 12:19:36 PM
It is for the arduino micro...

https://github.com/mgrdcm/USB-NeXT-Keyboard/tree/mouse
Title: DIY non-ADB NeXT keyboard to USB adapter
Post by: gtnicol on September 08, 2017, 02:21:13 PM
I spent a fair bit of time on this in the past... mostly working with a PIC.

I forget exactly but the bus is 5MHz or something like that, for video, sound, mike, and keyboard/mouse etc. With some of the more modern microprocessors you could bit-bang the bus and still have cycles for converting the video/sound to something modern computers could handle.

Somewhere or other I have the data sheet for the ASIC that manages the bus.

Go to top  Forum index