This Old Mouse: Building A USB Adapter For A Vintage Depraz Mouse

When [John Floren] obtained a vintage Depraz mouse, he started out being content to just have such a great piece of history in his possession. But if you’re like him, you know it’s not enough to just have something. What would it be like to use it?

To find out, [John] embarked on a mission to build a USB adapter for his not so new peripheral.
Originally used in very early terminals with a Unix GUI, the Depraz mouse utilizes an unusual male DE9 connector rather than the more familiar female DB9 used in RS232 serial mice. Further deviating from the norm, he found that the quadrature encoders were connected directly to the DE9 connector.

Armed with an Arduino Pro Mini Micro and some buggy sample code, he got to work. The aforementioned buggy code was scrapped and a fresh sketch for the Arduino Pro Mini Micro gave the Depraz mouse the USB interface it lacked. [John] also found that he wasn’t the first hardware hacker to have modified the mouse for their use. Be sure to read to the end the article to find out about the vintage surprise lurking in the mouse shell itself! A demonstration of the mouse in action can be seen in the video below the break.

Looking for a fun mouse hack? Perhaps you’d like to use your more modern USB mouse on a retro computer, or try your hand at recreating an early Apple mouse for use in modern computers.

Continue reading “This Old Mouse: Building A USB Adapter For A Vintage Depraz Mouse”

Streaming Video From A Mouse

The first optical mice had to be used on a specially printed mousepad with a printed grid that the four-quadrant infrared sensor could detect. Later, mice swapped the infrared sensor for an optoelectric module (essentially a tiny, very low-resolution camera) and a powerful image processing. [8051enthusiast] was lying in bed one day when they decided to crack the firmware in their gaming mouse and eventually start streaming frames from the camera inside.

Step one was to analyze the protocol between the mouse and the host machine. Booting up a Windows VM and Wireshark allowed him to capture all the control transfers to the USB controller. Since it was a “programmable” gaming mouse that allowed a user to set macros, [8051enthusiast] could use the control transfers that would normally query that macro that had been set to return the memory at an arbitrary location. A little bit of tinkering later, and he now had a dump of the firmware. Looking at the most abundant bytes, it seems to match a profile similar to the Intel 8051. In a fascinating blur of reverse engineering, he traced the main structure of the program back from the function that sets the LED colors for the scroll wheel (which is dependent on the current DPI setting). Unfortunately, the firmware prevented the same macro mechanism from writing to arbitrary locations.

Looking through the code, a good old buffer overflow exploit seemed possible, but it caused the system to reset via watchdog. So he took another approach, invoking recovery mode and loading an entirely new firmware on the device, which a set_report control transfer can invoke.

Next, he moved onto the ADNS-9800 optical sensor (pictured in the top image provided by JACK Enterprises), which had a large encrypted blob in the firmware. Some poking around and deduction lead to a guess that the optical sensor was another 8051 system. With some clever reasoning and sheer determination, [8051enthusiast] was able to crack the XOR stream cipher encryption with a program that showed him versions of the disassembled assembly and allowed him to pick the one that was the most likely. With the firmware decrypted, he was able to see the encryption code and confirm his deducted algorithm.

With the sensor now cracked open, it was onto the 30 x 30 240 fps video stream. The sensor communicates over SPI, and the USB controller has to bit-bang the connection as it doesn’t have the hardware. Putting two custom firmware images on with a few extra functions was easy enough, but the 7 fps was somewhat lacking. The first optimization was loop unrolling and removing some sleeps in the firmware, which bought it up to 34 fps. By measuring the cycle counts of individual instructions, he was able to find some alternatives such as a mov instead of a setb that took one less cycle. Going from a 17 cycle loop to an 11 cycle loop and some other optimizations gave him 54 fps. Not content to stop there, he modified the ADNS-9800 firmware to continuously sample rather than waiting for the USB controller to finish processing. While this yielded 100 fps, there was still more to do: image compression. At a whopping 230 fps, [8051enthusiast] decided to call it done.

However, there was one last thing he wanted to do: control the mouse with the video stream. Writing some image processing into his Python-based program that received the image files allowed him to use the mouse, however impractically.

All in all, it’s an incredible journey by [8051enthusiast], and we would highly recommend reading the whole journey yourself. This isn’t the first time he’s modified the firmware of 8051-based devices, such as modifying the firmware of the WiFi chipset in his laptop.

[Thanks to JACK Enterprises over at Tindie for the use of the image of an ADNS9000].

 

MIDI Mouse Makes Marvelous Music

It’s an old misconception that digital musicians just use a mouse and keyboard for their art. This is often far from the truth, as many computer music artists have a wide variety of keyboards/synths, MIDI controllers, and “analog” instruments that all get used in their creative process. But what if one of those instruments was just a mouse?

Well, that must have been what was going through [kzra]’s mind when he turned an old ps/2 roller ball mouse into an electronic instrument. Born out of a love for music and a hate for waste, the mouse is a fully functional MIDI controller. Note pitch is mapped to the x-coordinate of the pointer, and volume (known as velocity, in MIDI-speak) is mapped to the y-coordinate. The scroll wheel can be used as a mod wheel, user-configurable but most often used to vary the note’s pitch. The mouse buttons are used to play notes, and can behave slightly differently depending on the mode the instrument is set to.

Not satisfied with simply outputting MIDI notes, [kzra] also designed an intuitive user interface to go along with the mouse. A nice little OLED displays the mode, volume, note, and mouse coordinates, and an 8×8 LED matrix also indicates the note and volume. It’s a fantastic and versatile little instrument, and you’ve gotta check out the video after the break to see it for yourself. We’ve seen some awesome retro-tech MIDI controllers before, and this fits right in.

Continue reading “MIDI Mouse Makes Marvelous Music”

USB Comes To The ESP32

Since the ESP8266 came on the scene a few years ago and revolutionized the way microcontrollers communicate with other devices, incremental progress on this chip has occurred at a relatively even pace. First there was the realization that code could be run on the chip itself. Next the ESP32 was released which built more on that foundation. The next step in that process of improvement may be here now as well, with this project which turns the ESP32 into a USB host.

USB is not a native feature on all microcontrollers or even Arduino-compatible boards. While some do have it built in like those based on the 32u4 for example, most either don’t have it at all or rely on a separate on-board chip to do some form of translating. The ESP32 is lacking this advanced feature so the USB needs to be cobbled together from scratch if you want this specific board to be able to interface directly with peripherals. This project does just that, allowing for four USB 1.1 devices to be connected directly to the ESP32 without a separate dedicated chip.

If you’ve been waiting for USB on this tiny, capable microcontroller this might be your chance to try it out. All of the project’s code is available on the project page. And, while it is limited in scope, it’s easily able to handle a keyboard or mouse. This might be a more cost-effective way of doing something like a KVM switch rather than doing it with three Arduinos.

 

MouSTer Brings USB To Retro Computers

Folks who like the take the old Amiga out for the occasional Sunday drive usually do it because they have wistful memories of the simpler times. Back when you could edit documents or view spreadsheets on a machine that had RAM measured in kilobytes instead of gigabytes. But even the most ardent retro computer aficionado usually allows for a bit of modern convenience.

Enter the mouSTer. This tiny device converts a common USB HID mouse into something older computers can understand. It even supports using Sony’s PlayStation 4 controller as a generic game pad. While the firmware is still getting tweaked, the team has confirmed its working on several classic machines and believe it should work on many more. Considering the prices that some of these old peripherals command on the second hand market, using a USB mouse or controller on your vintage computer isn’t just more convenient, but will likely be a lot cheaper.

Confirmed retrocomputing superfan [Drygol] is a member of the team working on mouSTer, and in a recent post to his retrohax blog, he talks a bit about what’s happened since his last update over the summer. He also talks a bit about the challenges they’ve faced to get it into production. Even if you’re not into poking around on vintage computers, there are lessons to be learned here about what it takes to move from a handful of prototypes to something you can actually sell to the public.

We especially liked the details about the mouSTer enclosure, or lack thereof. Originally [Drygol] says they were going to have the cases injection molded, but despite initial interest from a few companies they talked to, nobody ended up biting because it needed to be done with relatively uncommon low pressure injection. While 3D printing is still an option, the team ended up using clear heatshrink tubing to create a simple conformal protective shell over the electronics. Personally we think it looks great like this, but it sounds like this is only a temporary solution until something a bit more robust can be implemented.

As you might imagine we’ve seen DIY projects that aimed to bring modern input devices to vintage computers like the Atari ST, but the diminutive proportions of the mouSTer and the fact that it’s a turn-key product is sure to appeal to those who want to minimize headaches when working with their classic gear.

Continue reading “MouSTer Brings USB To Retro Computers”

Mouse-Controller Hybrid Aims To Dominate In First-Person Shooters

The first person shooter genre found its feet in the PC world, relying on the holy combination of the keyboard and mouse for input. Over time, consoles have refined their own version of the experience, and the gamepad has become familiar territory for many FPS fans. [Tech Yesterday] was a die hard controller player, but after trying out  a mouse, didn’t want to go back. Instead, he built a truly impressive hybrid device.

The build begins with a standard Xbox 360 wired controller, somewhat of a defacto standard for PC gamepads. The left analog stick and triggers remain untouched, however the face buttons are all relocated using mechanical keyboard switches. The D-pad has been relocated to the left hand side with tactile switches, and the right analog stick removed entirely. In its place, a cut-down optical mouse is used on a flat 4″x4″ mousepad attached to the controller, strapped to the player’s thumb.

The resulting controller combines the benefit of analog stick movement and the precision aiming of a mouse. We’re amazed at how comfortable the controller looks to use, particularly in the improved second revision. While currently only used on PC, we can imagine such controllers shaking up the console FPS scene in a serious way.

We see some great controller hacks around these parts; the force-feedback mouse is a particularly amusing example. Video after the break.

Continue reading “Mouse-Controller Hybrid Aims To Dominate In First-Person Shooters”

Mouse-Controlled Mouse Controller Is Silly, But Could Be Useful

Useless machines are generally built as a fun pastime, as they do nothing of value by their very definition. The most popular type generally involves a self-cancelling switch. However, there’s plenty of other useless machines to build, and we think [Jeffery’s] build is particularly creative.

The build consists of an XY gantry that moves a standard computer mouse. To control the gantry, a Raspberry Pi feeds the system G-Code relative to the motion of a second mouse plugged into the single-board computer. It’s pretty standard fare overall, with the Pi sending commands to an Arduino that runs the various stepper motors via a CNC controller shield.

Yes, it’s a mouse that moves a mouse – and on the surface, this appears to be a very useless machine. However, we could imagine it being useful for remote control of a very old system that uses a non-standard mouse that is otherwise difficult to emulate. Additionally, it wouldn’t take much extra work to turn the XY gantry into a competent pen-plotter – of which we’ve seen many. Video after the break.

Continue reading “Mouse-Controlled Mouse Controller Is Silly, But Could Be Useful”