BMOW title
Floppy Emu banner

Archive for the 'USB Wombat' Category

Custom Key Mappings for ADB-USB Wombat

 

Here’s an exciting new feature for the ADB-USB Wombat input adapter: custom key mappings.
With firmware version 0.3.0 or later, you can replace the built-in mappings between USB and ADB scan codes, and create your own customized key mapping tables. Change which keys behave as Command and Option, reassign the function keys to new purposes, select a different key to behave as ADB power/wake-up, and design other custom key mappings. Go crazy!

The code framework to support custom mappings has been in place for a while, and it’s little more than a lookup table of USB to ADB scan code equivalents, and a complementary table of ADB to USB equivalents. There are two separate tables, instead of a single bidirectional table, because there’s not always a one-to-one mapping between USB and ADB scan codes (in mathematical terms it’s not a bijection). Use a custom lookup table, and you’ll get custom key assignments.

The harder part was designing a user-friendly interface for viewing and editing the tables. It would be awkward and error-prone to expect people to manually fill in a few hundred numbers in a hex editor. After considering various cross-platform frameworks like Qt, I decided to implement the keymap editor as a web page. All of the logic is implemented in Javascript, so you can see how it works by viewing the page source. I’m not the world’s greatest UI designer, so if you’re a web UI specialist and want to contribute some interface improvements, they would be very welcome.

Because the control, shift, and capslock keys are used to access the Wombat’s help commands, those keys shouldn’t be remapped. A few other mapping details are called out in the editor for ISO keyboards and certain ADB keyboards.

Installing the custom key mappings to your Wombat board is very similar to installing new firmware. Copy a file to a USB flash drive, put the flash drive in the Wombat’s USB port, and hold the board’s power key button while it powers on. Complete instructions are on the keymap editor page. If you accidentally mess up the key mappings so badly that you can’t recover, the keymap editor can also be used to download and reinstall the default keymap.

Be the first to comment! 

Pogo Pin Test Board for ADB-USB Wombat

Here’s a test rig for the ADB-USB Wombat board: my first-ever project whose sole purpose is to facilitate testing of another project. It uses spring-loaded pogo pins to create a bed of nails that fit into test points on the Wombat board. I can drop a new Wombat board onto the tester, clamp it in, and then program and test it with just a few button clicks. This is a huge improvement over my old manual testing method, which involved multiple cable connections and disconnections, and hand-verified keyboard/mouse emulation on two separate computers. That sort of test process is fine for building a few units, but something faster and easier is needed to support higher volume assembly.

Pogo pins contain tiny internal springs. When a Wombat board is pushed down onto the bed of pins, they compress a few millimeters in length. This helps to create a reliable electrical contact for each pin, even if the uncompressed lengths of the pogo pins are slightly different or they’re not perfectly aligned.

The tester has on-board ICs to open and close external loopbacks for the Wombat, so the I/O functions can be verified. It also has a power management IC that can supply the Wombat through two different interfaces, ensuring they both work. But the real value of the tester is that the power cable, PIC programmer, serial cable, ADB peripherals, and USB peripherals can all be permanently connected to the test board instead of plugged/unplugged from the Wombat for each test iteration.

Perfecting the tester took much longer than I’d expected, and it wasn’t until the third generation that it worked reliably enough to be useful. Given the size of that time investment, it’s unclear if I really achieved a net time savings, but I definitely learned a lot. Getting the mechanical aspects working smoothly was a challenge. Thinking about all the ways a Wombat could be broken was also a challenge, since I’m typically thinking about how things work instead of how they don’t work. With those possible failure modes in mind, I then needed to design circuitry to detect each failures.

If the test passes, the Wombat’s LEDs blink with a pulsing glow as shown in the video. If the test fails, the LEDs flash a variable number of times to indicate a two digit failure code. This code can be looked up on a reference sheet to see which sub-test failed, and which components are probably at fault.

Read 1 comment and join the conversation 

Multi-Button Mouse Support

Poor Apple, they never did get on board with having more than a single mouse button. That complicates ADB/USB conversion for USB Wombat. When converting USB to ADB, how should it handle the extra buttons on a USB mouse? What about the mouse wheel? And when converting ADB to USB, how can it generate Windows right-click events from an ADB mouse?

With firmware 0.2.0, I’ve added multi-button mouse support. Here’s how it works:

USB mouse wheel movements send up/down arrow events to the host. This works remarkably well for open file dialogs and document scrolling.

The USB mouse right button can operate in one of two modes:

  1. Macintosh mode (default): right click sends control + left click event to the host. Works for context menus in Mac OS 8 and later.
  2. NeXT mode: right click sends a true right click event to the host.

Toggle between Macintosh and NeXT modes by clicking the USB mouse wheel button (button 3).

For ADB-to-USB conversion with firmware 0.2.0, ADB mice and trackballs with more than one button can now use the extra buttons under Windows, OSX, or Linux. Generic multi-button ADB devices using extended Apple mouse protocol should work. I’ve also added vendor specific support for the 4-button Kensington Turbo Mouse 5 model 64210. Other multi-button devices using proprietary protocols may not work. If you’ve got some multi-button ADB mice from MacAlly, Kensington, Logitech, MicoSpeed, Mouse Systems, or others, please give them a try with firmware 0.2.0 and share your results.

Read 3 comments and join the conversation 

USB Wombat: What’s in a Name?

Oops. I belatedly discovered there’s already a Nintendo emulator called Retro USB, which means I need a new name for my USB/ADB input converter. After an exhaustive 5-minute naming process, I’ve decided to continue Floppy Emu’s Australian animal theme and call it USB Wombat. The Australians sure do have plenty of oddball animals to choose from. Coming soon: WiFi Wallaby and Video Platypus?

I’ll update the web site and documentation with the new name soon, but the hardware will keep the Retro USB logo until I exhaust the current supply of boards. The prototype enclosure will need to be updated too. It’s a time-consuming hassle when I’d rather focus on other work, but if a name change is required, it’s surely better to do it sooner rather than later.

Read 9 comments and join the conversation 

Retro USB Improvements

Some good news for Retro USB this week: new hardware, international keyboard improvements, and an enclosure prototype! Everything is maturing nicely, thanks to feedback and assistance from some helpful early adopters. More hardware is available, if you haven’t yet gotten yours. Forward ho!

For anybody who’s newly tuning in, Retro USB is an input converter for USB and ADB keyboards and mice. It works in two directions, connecting modern USB peripherals to a classic ADB-based Macintosh or Apple IIgs computer, or ADB peripherals to a USB-based computer running Windows, OSX, or Linux.

 
Board Version 1.2

After a slightly bumpy start, I’ve finally perfected the PCB design with version 1.2. This is the first version whose assembly won’t require me to apply manual fix-ups for my design mistakes, so the assembly process can be simpler and faster. It doesn’t make any difference to the final product, but hand-soldering patch wires and extra resistors is tiresome work. I’m very glad to be rid of that job.

The most significant change in board version 1.2 is the addition of a 1000 uF bulk capacitor for the USB power supply. This enables Retro USB to handle brief spikes in power demand from attached devices, such as the spikes from an Apple A1243 keyboard during its initialization. With this capacitor, there are no problems with “spiky” USB devices like the A1243. The built-in hub on the A1243 works too, and is a convenient spot to attach the mouse.

A bulk capacitor can be retrofit to board versions 1.0 and 1.1, if you’re comfortable with some basic soldering. You’ll need a capacitor of 680 uF or more, with a voltage rating of 6.0 volts or more, like this example. Solder the capacitor’s negative terminal to the board’s GND and the capacitor’s positive terminal to the board’s VUSB. See the photos for the board locations to use.

 
International Keyboards

Firmware version 0.1.15 resolves a few remaining issues for non-US keyboards, and layouts from French to Danish to Estonian and everything in between should now be working, in both USB-to-ADB and ADB-to-USB directions. Please see the International Keyboards section on the main Retro USB page for important details.

For correct key mapping with non-US keyboards:

  • Choose the appropriate keyboard type in your operating system’s keyboard control panel or language preferences
  • Set Retro USB to ISO mode (automatic for many keyboard models)

For many countries outside the USA, the USB keyboards designed for Windows PCs have a different layout than Apple keyboards. These PC-type USB keyboards may be used, but key mappings for some symbols will be incorrect where differences exist between the Apple and PC-type layouts. Best results will be obtained with Apple-brand non-US keyboards, or any brand US-layout keyboards.

 
Other Firmware Improvements

See the change notes included with the latest firmware for a complete list of what’s new. Here are the highlights:

  • Right mouse button now works on NeXT computers
  • Resolved an issue that prevented ADB keyboard capslock from functioning with macOS Sierra
  • Fixed the output from help commands to appear correctly when using a non-QWERTY keyboard
  • Fixed missed ADB keyboard events if the mouse is moved while typing
  • Fixed device initialization when using multiple cascaded USB hubs
  • Added new help command Control-Shift-Capslock-G to show the current keymap type

 
Enclosure Prototype

I’m working on a simple enclosure to protect the Retro USB board and add a touch of style. It’s gloss black 1.5 mm acrylic with an engraved logo, and cut to the same shape as the PCB. Add a few spacers and screws, and it makes a nice little package that’s easy to assemble. Initially I’d planned to make a fully-enclosed 6-sided box, but I would have needed to lose the rounded corners, and my experience with the Floppy Emu enclosure has taught me that 6-sided laser-cut enclosures can be awkward to put together. I quite like the appearance and simplicity of this enclosure, and it will probably show up in the store soon.

 
What’s Next?

Although the start was a little chaotic, Retro USB’s software and hardware now are both looking good, and the device can truly deliver on its plug-and-go promise for ADB and USB conversion. On the software side I’ll be looking at multi-button mouse support soon, so stay tuned for that. For the hardware, most of the effort will go into improving the assembly and testing process, and transitioning away from hand assembly. After that, we will see what else takes shape!

Read 1 comment and join the conversation 

Retro USB 1.1 Fail

I received a large number of new Retro USB PCBs today, which include a few small component changes from the 1.0 design. Bad news: I blundered by reversing the gate and drain connections on the MOSFETs used for level conversion. DOH!! Always read the datasheet carefully, boys and girls. On a 3-pin device, I must have assumed the gate would be the pin on the side by itself, with drain and source paired up on the other side, just like the canonical drawing of a transistor. Unfortunately that’s not true here. Hopefully I can find another brand of SOT-23 N-channel MOSFET whose pins are organized the way I thought they should be, or else this whole pile of PCBs is going into the trash. For a moment I thought maybe I could rotate the MOSFET 120 degrees, or even mount it upside down, but I don’t think any soldering tricks can save me.

Read 5 comments and join the conversation 

Older Posts »