10 ms·
A note on the USB-to-PS/2 mouse adapter that came with Microsoft mouse devices
- lathiat 2y agoJust reading this title and with only microsoft.com as the URL, I knew with 99% certainty this was going to be oldnewthing (Raymond Chen)
- abrookewood 2y agoI do enjoy his quirky little comments. Nothing ground breaking, but pretty much guaranteed to make me go :Huh! Never knew that"
- throwaway2037 2y agoGood point. I see his current domain is "devblogs.microsoft.com". A few times I have seen @dang (or a teammate?) upgrade the HN software to show more URL details on the homepage. It would be nice to do the same for this one. A good example is fortune.com. Their blogs are utter rubbish, and their URLs now appear on the front page as something like "fortune.com/blogs" instead of just "fortune.com" (reserved for actual articles from the magazine).
- zebo123 2y agoDefinitely one of the top blogs on that website. I wish win32 function articles would link references in blog posts, his explanations and examples helped me out a lot. Larry Osterman was another good blogger when he was still active.
- ndiddy 2y agoKeyboards from the late 90s and early 2000s often did something similar. The controller supported both PS/2 and USB and the keyboard would come with a PS/2 plug and a passive adapter. That's why if you're trying to use a PS/2 keyboard designed prior to the introduction of USB (like a Model M) on a modern computer, you need to make sure to get an active PS/2 to USB adapter that actually translates the protocol.
- berkes 2y agoI would expect that PS/2 to USB could be handled on the computer. I have little experience, but from debugging some early 3D printers on Linux, I've learned that the U in USB really stands for universal: that it'll just pass on serial stuff to/from the OS, drivers or software on the computer to handle.
- actionfromafar 2y agoNot really no, the timing requirements of the USB protocol are very tight and handled by dedicated circuits. The exception is microcontrollers where you can sometimes achieve the timing in software.
- Karliss 2y agoIn addition to electronic singalling being completely different, the serial interface used by many 3d printers is not the same as low level serial interface sent over the wire. There is a low level usb protocol for stuff like data packets ,checksums , metadata negotiation, multiple endpoints in single device, basic transfer types(bulk, isochronous, control, interrupt). All common device types and standard drivers including USB to serial, HID, removable storage is built on top of this layer instead of raw serial sent over the wire. That's why you can have stuff like USB hubs which can forward data to and from multiple devices. And also why you can plug in a USB device, and the OS recognize and lookup driver without user manually configuring what device is plugged into which port.
- pezezin 2y agoHaving done some embedded development, I am pretty sure that those 3D printers had a serial-over-USB converter like the famous FTDI family of chips. Those chips just simulate a plain old RS232 connection over USB.
- dfox 2y agoThere are some motherboards that can switch either PS/2 or RS232 signalling onto USB-A connectors, but this is completely non-standard hack mostly seen on some enterprise stuff few years back that seems to have mostly died away.
- wildzzz 2y agoI always assumed these were active devices doing some quick translation between USB and PS/2 but after dealing with USB controllers, this would have been exceptionally difficult (at the time) to fit inside of a dongle barely larger than the connectors.
- reader9274 2y agoWish the article further explained how the mouse did this internally.
- ytch 2y agoThere is a section about it on Wikipedia PS/2 page: https://en.wikipedia.org/wiki/PS/2_port#Conversion_between_PS/2_and_USB https://en.wikipedia.org/wiki/PS/2_port#Conversion_between_P... And the page it referenced: https://www.nxp.com/docs/en/reference-manual/DRM014.pdf#page=8 https://www.nxp.com/docs/en/reference-manual/DRM014.pdf#page... In Page.11, it show the algorithm to distinguish PS/2 and USB, based on USB D+ and PS/2 clock signal.
- dekuNukem 2y agoAn active converter is needed to use modern USB on retro computers. I made one a few years ago for many different computers. https://github.com/dekuNukem/USB4VC https://github.com/dekuNukem/USB4VC There's also a more recent project called HIDman, but only for PCs. https://github.com/rasteri/HIDman https://github.com/rasteri/HIDman
- jimmaswell 2y agoI once didn't want to wait to get a ps/2 keyboard in the mail to set up an older PC so I made a quick and dirty adapter out of an arduino.
- nvllsvm 2y agoAnother one is ps2x2pico. I've been using it in my retro machines and it works great. For my Logitech G305 mouse (1000hz), I have ps2x2pico configured to force a 100hz mouse polling rate so the cursor is super smooth in Windows 98 without needing to use a program like PS2Rate. For my Keychron S1 keyboard, N-key rollover works flawlessly. https://github.com/No0ne/ps2x2pico https://github.com/No0ne/ps2x2pico
- leohonexus 2y agoThis is similar to how a (cheap) DisplayPort-to-HDMI adapter worked, the adapter itself is completely passive. Many devices with DisplayPort output support multimode, which allows the device to switch from outputting DP packets to outputting TMDS-based HDMI or DVI signals. You'll sometimes see a ++DP logo on these ports. This is also why you don't see a cheap HDMI(source)-to-DisplayPort(sink) adapter, the smarts just aren't built into the source device.
- eigen 2y ago> the adapter itself is completely passive I think it was not completely passive, but simple level conversion; DisplayPort is AC-coupled signal, HDMI is DC-coupled.
- dfox 2y agoThere is a difference between DP+ and DP++. DP+ uses external level shifter, DP++ uses passive adapter and the card switches different transmitter into the path internally.
- kayson 2y agoSignal level and coupling are separate things.
- eigen 2y ago> Signal level and coupling are separate things. sure, but the part is called a level shifter. MAX9406 DisplayPort to DVI™/HDMI Level Shifter https://www.analog.com/en/products/max9406.html https://www.analog.com/en/products/max9406.html
- mikegoelzer 2y ago> I think it was not completely passive, but simple level conversion; DisplayPort is AC-coupled signal, HDMI is DC-coupled. Wait, I don't think that's accurate. I've worked with HDMI/DVI and both are AC-coupled, that is, you put a 10 or 20 nF cap in series on the TMDS lines if you're driving directly from an FPGA's digital IO pins.
- zamalek 2y agoI wonder if you could bit-bang PS2 from the host side - though this is probably one of those things where we need to "consider if we should."
- kragen 2y agoYes, the PS/2 keyboard protocol is the AT keyboard protocol, which is pretty easy to bitbang on processors that aren't extremely slow.
- mjevans 2y agohttps://en.wikipedia.org/wiki/PS/2_port#Conversion_between_PS/2_and_USB https://en.wikipedia.org/wiki/PS/2_port#Conversion_between_P... PS/2 is a flavor of line serial communication (0 and 5V): ground, power, clock, data. "PS/2 mice send interrupts at a default rate of 100 Hz when they have data to send to the computer." Which is how a 'dual mode controller' would drive it's IO pins in a way that work for USB or PS/2. USB uses https://en.wikipedia.org/wiki/Differential_signalling https://en.wikipedia.org/wiki/Differential_signalling , which Wikipedia's article explains have the advantages of greater signal to noise ratio and resistance to some common types of data-channel noise. I don't happen to know what the _data_ voltage level of a USB link is offhand and skimming the article was insufficiently clear (Either of -5V and +5V, OR float is ~2.5V and one pulls up to Vcc the other down to Gnd make some sense.). The initial power pin level is also supposed to be ~5V. -- Also, if you mean from a typical PC... A modern AMD system's block diagram shows most USB ports driven from CPU socket pins or from the primary board chipset directly (E.G. AMD's X870E or whatever). I would be almost amazed if those weren't in house / licensed ASIC blocks with ROM firmware.
- 15155 2y ago> USB link is offhand 3.3V <-> GND
- mjevans 2y agoThe data? I checked and Ground and Power pins are 0 and 5V respectively as I recalled. This StackExchange thread has some good diagrams and useful answers: https://electronics.stackexchange.com/questions/190592/why-does-usb-have-vcc-5v-and-high-3-3v https://electronics.stackexchange.com/questions/190592/why-d... Lower speed links are suppsoed to pull the - data pin slightly negative and, effectively, a safely 'TTL high' (relative to 5V source) of greater than 2.8V. The power difference is 5V to better guard against too much loss over a long cable. Higher speed links are quoted as using even lower voltages (the graph appears 0 and 0.4 v swapped as flipped).
- extraduder_ire 2y agoI wonder if the pin connection is standard across manufacturers that do this. I assume anyone coming after microsoft's mouse release copied them.
- userbinator 2y agoSome more details (and interesting historical perspective) can be found here: https://superuser.com/questions/704920/how-to-determine-if-usb-mouse-supports-ps-2 https://superuser.com/questions/704920/how-to-determine-if-u... Apparently around 2014 the vast majority of mouses and keyboards were dual-protocol, but in 2019 the first reports of them being USB-only started appearing. I suspect a lot of the cheapest mouse SoCs are still dual-protocol as they worked when first designed, and they just kept producing them without any changes. Pinout and explanation of how they detect protocol here: https://retrocomputing.stackexchange.com/questions/28288/how-did-early-green-ps-2-to-usb-mouse-adapters-work https://retrocomputing.stackexchange.com/questions/28288/how...
- jackvalentine 2y agoThis has answered a 25 year old question in my mind.
- aussieguy1234 2y agoSo that's why the adaptor didn't work with other mice
- asteroidburger 2y agoThere's a purple adapter too that came with some keyboards. It looked like it came out of the same molds, so I suspect it's a similar situation.
- usr1106 2y agoSligthly (un)related: The other day the builtin keyboard on my rather new Thinkpad X1C 12th stopped working. I connected a USB keyboard and tried to figure out whether there was an error in Linux kernel ring buffer or anything else explaining the problem. To my surprise the internal keyboard is not even USB, but i8042. Not a hardware guy, but I had silently assumed everything is USB these days. I guess i8042 is the PS/2 protocol TFA is talking about? (No error found, but after a reboot it has been working again.)
- kragen 2y agohttps://wiki.osdev.org/%228042%22_PS/2_Controller https://wiki.osdev.org/%228042%22_PS/2_Controller
- fbrozovic 2y agoTo add to this: the keyboard matrix scan controller on laptops is usually located inside the Super I/O chip and connected to the CPU/southbridge via LPC or eSPI. Since LPC/eSPI peripherals are mapped to I/O ports, implementing an 8042 controller means that the keyboard can work even without setting up a much more complicated USB host stack.
- p_l 2y agoOn laptops it's usually not SuperIO, but EC (Embedded Controller), the same chip that handles battery, power, etc. and is usually connected over LPC to "present" the keyboard as PS/2 compatible input (some new ones are pure USB though, like my current laptop) Some devices have SPI interfaces for HID though
- throwaway2037 2y agoWow, thank you to share this website. It is so cool. I never saw it before. New Wiki rabbit hole to explore!
- yrro 2y agoThat's a great site. Finally I think I understand WTF Lenovo mean by "IPMI over Keyboard Controller Style (KCS) Access"
- jwr 2y agoI have a keyboard from my first 386/33 computer. It can be connected to my current Mac through a sequence of adapters: DIN5 -> PS/2 -> USB-A -> USB-C. I am looking forward to extending my sequence of adapters in the future.
- vesinisa 2y agoI would think the PS/2 -> USB-A adapter in this chain is a smart one.
- johnisgood 2y ago> I am looking forward to extending my sequence of adapters in the future. Keep us updated about how long it gets. :D
- kotaKat 2y agoWindows 11 will happily load sermouse.sys if you hook a serial mouse to a USB serial adapter and plug it in. Even on arm64!
- twoodfin 2y agoNow that’s an old-new-thing post I’d like to read! I assume because serial mouse support ca. 1996 is baked deeply into the USB standard, so you can’t pass connect-a-thon/compliance tests without it?
- wongarsu 2y agoIt might also just be a situation of "it's there, doesn't hurt anyone, doesn't cause much work, removing it could hurt someone". Windows needs (or at least used to need) keyboard support earlier in the boot sequence than mouse support. It's plausible that they load the entire USB stack early on to get keyboards etc working, then sometime later some ancient code iterates all serial ports to check for serial mice. To that driver, USB-Serial bridges and "native" serial ports should look the same through the hardware abstraction layer. The leaked Windows XP code contains a lot of ancient code, some apparently taken from MSDOS. They later removed some of that, but apparently not this part.
- usr1106 2y agoDidn't those adapters exist in both directions? Green in one and violet in the other? I have the feeling if I started to dig in my treasures I should still find some. One way to avoid e-waste is not to throw anything away...
- seba_dos1 2y agoIt's just color coding for mice (green) and keyboard (purple). The connector's the same.
- jaynetics 2y agoThese and some other colors were specified in the PC-99 standard in 1999: https://en.m.wikipedia.org/wiki/PC_System_Design_Guide#Color-coding_scheme_for_connectors_and_ports https://en.m.wikipedia.org/wiki/PC_System_Design_Guide#Color...
- Symbiote 2y agoI knew that, and know most of the colours, but it's only now that I realise plugs on VGA cables are blue to match, plugs on DVI cables are white to match, and even my cheap USB-to-serial adapter has a teal RS232 plug.
- PeterStuer 2y agoThe purple/violet was usually the color to refer to the keyboard, whereas green was code for 'mouse'. As I recall you had the usb to ps/2 adapters for attatching legacy peripherals, but those usually came with two female ps/2 leads, a green one and a purple one, connecting to the one male usb-A.
- actionfromafar 2y agoOne could hack the Linux kernel to connect an extra keyboard in the mouse connector. :)
- alexey-salmin 2y agoOh wow, what a blast from the past. Around the year 2000 or 2001 I got an optical mouse as a present (either birthday or new year, can't remember). I really wanted it for a long time because playing StarCraft with a mechanical one was rather painful. Needless to say it was a USB mouse and I only had ps/2. I purchased an adapter but it never worked despite spending a lot of time trying and testing it with different PCs and mice. Then I took the adapter to an electronics repair shop. They opened it up and explained to me it was fake: it just connected the wires without any circuitry for the real USB support. They had no idea why anyone would manufacturer such a thing. Well, now I know why. I spent quite a long time thinking I was sold a counterfeit adapter.
- spuz 2y agoAfter reading the article I wondered if the adapter would work with other mice and if not wouldn't that cause confusion. So I guess we got an answer to those questions.
- xattt 2y agoI tried with Logitech mice (MX510, in pearly red) and it didn’t work.
- usrusr 2y agoChances are there are other mice that support both protocols on the controller, but use a different USB-PS/2 pin mapping. My memory suggests that Logitech mice at the time had a PS/2 connector "natively" on the cable that plugs into an adapter for USB. Surely they did the same, skip on any active controller in the adapter and do it all on the controller they already have - those adapters where everywhere, and included with every mouse for a long time, which surely would not have happened if they incurred any meaningful cost pressure. Now did they use the same mapping? (assuming my memories are not completely wrong anyways) With one being USB-PS/2 and the other PS/2-USB, a test would be stacking both into a noop-adapter USB-USB or PS/2-PS/2 and see if it works.
- usrusr 2y ago
- rasz 2y agoThe best part about Microsoft mouse USB=PS2 adapters is Microsoft made several mice models with incompatible wired differently adapters that look the same from the outside :)
- squigg 2y agoI have an old Roland S760 sampler from the early 90s. One of the innovations Roland made in this (lower cost) space was to add the ability to hook up a monitor and a mouse, to make chopping samples and programming patches much easier than peering at a tiny screen like on an Akai S1000 of the time (which I also have), or even worse on the S760's tiny two-line display The mouse connector is MSX, which are very difficult to find these days, so mine came with a DIY MSX->PS2 connector. Sadly the PS2 mouse it came with was on it's last legs, so I wanted to replace it with something more modern. All I could find at the time were MS mice that came with a USB-PS2 connector. When I plugged it in, it barely worked and I could never understand why. I did finally manage to track down a NOS PS2 mouse and it worked perfectly again. Until this post, I never understood just WHY it didn't work, so thank you! The S760 is a fantastic sampler. It's kinda like a JD990 but as a sampler and without the full synth engine complexity. Made famous by Daft Punk and a lot of others as the S760 digital multimode filter became one of their signature sounds.
- Minor49er 2y agoYou might have luck finding connectors on Buyee.jp. MSX was huge in Japan, and Roland is a Japanese corporation
- squigg 2y agoI never thought to check the Japanese auction houses - I have a workmate there who can purchase locally as well. There is one for sale, but it's a bit expensive - I'll keep my eyes open thanks
- dietrichepp 2y agoInteresting, I have a Roland S-330 from the late 1980s and my main concern getting it was the floppy drive viability. It didn’t occur to me that the mouse would be difficult.
- Nexxxeh 2y agoYou probably already know this stuff or have decided against it for authenticity or whatever, but just in case, you can use some of the Gotek USB flash drive floppy disk emulators: https://github.com/keirf/FlashFloppy/wiki/Host-Platforms#roland https://github.com/keirf/FlashFloppy/wiki/Host-Platforms#rol... And this may or may not be out of date, but may still be useful: https://llamamusic.com/s50s550/FlashFloppy_GOTEK.html https://llamamusic.com/s50s550/FlashFloppy_GOTEK.html
- InsomniacL 2y agoOnce had a very awkward conversation with a sales person in PC World. I had been given a old retired server from work to take home and learn with... only problem was it had no USB. I was asking for a PS2 keyboard, he said they don't sell them but I could use any USB keyboard, I told him I don't have any USB ports and I needed a PS2 keyboard. After awhile of him going back and forth with his manager, only to return to tell me i can use USB, It turned out he thought I was trying to buy a Play Station 2 keyboard and he'd never heard of PS/2!
- MrGilbert 2y agoI wear a pretty neat shirt which shows PS/2 mouse and keyboard ports and a text saying "I'm this old" at the front. As I will turn 40 next year, it felt adequate.
- account42 2y agoThis would make more sense with a parallel port and/or the DIN connector used by keyboards before PS/2, both of which have been extinct for much longer than PS/2, which is still being added to some main boards. I would have included an RS232 D-Sub serial connector but those are still used if not for mice.
- sorenjan 2y agoOr a gamepad port on a Soundblaster card.
- jajuuka 2y agoI remember being blown away when that changed. "I can just use a USB port and not have to use the gamepad port?!"
- foxglacier 2y agoIt felt like back then everything was a bodge and computers were somehow made without any thought to gaming or mice even after they became common. Wasn't the game port really a MIDI port and gamepads pretended to be MIDI devices?
- Shorel 2y agoI am using an USB-to-PS/2 adapter right now. My mouse is a Logitech MX-500, which is the last model I have with PS/2 support, the next model MX-510 was USB only. The motherboard is an MSI B550 TOMAHAWK, the computer was assembled just a few months ago. The mouse still works and it has proven to be more reliable than modern ones.
- MadnessASAP 2y agoIf I may ask, why? The motherboard has USB, the mouse is USB, why bother with PS/2? Also, and this is just a reflection of my experience, but I haven't had any issues with USB mice for a very long time. From my Logitech MX Master to very very very cheap (even free) optical ones.
- Shorel 2y agoWhy not? There is no “bother” here. The mouse has a cable, the cable goes to the back of the tower with USB or PS/2. And I have one more USB port to plug other stuff.
- xtiansimon 2y agoInteresting. I have a USB IBM TrackPoint Keyboard that I use with a USB to PS/2 mouse and keyboard adapter. I bought the cheapest adapter I could find and I was surprised it worked. Now I know why—the keyboard must have a chip that switches between the two protocols.
- justsid 2y agoThese days it wouldn’t be too hard to make an active adapter with a small microcontroller in it. Not as cheap as just routing some wires though.
- she46BiOmUerPVj 2y agoThis is really good timing because I just naively bought one of those little green adapters for test for three apparently fruitless causes -- a mini disc recorder, a vt520 and a vt525. I now have some hidmans (hidmen?) on the way with some hope that I/we someone can figure out whats missing to get it working with the VT52{0,5}.
- toast0 2y agohidsman
- 1970-01-01 2y agoThe very old Microsoft IntelliMouse are some of the best designed mice in the world. They always just work as designed. (Until you found someone with a glass desk, then it was time for a mousepad.) https://en.wikipedia.org/wiki/IntelliMouse https://en.wikipedia.org/wiki/IntelliMouse
- havblue 2y agoMy intellimouse explorer lasted until someone stole it after ten years, which isn't bad. I do think since then mainstream mouses are less durable (they only last 5 years!) but they didn't have the loose click feeling that the Microsoft mouses did. So Logitech and Razer for me.
- aurumque 2y agoMy whole life has been a lie... And yes I do have a drawer with several of these alongside VGA adapters and anything else I might need during the end times.
- tristor 2y agoYes, this is a common issue for folks who are into vintage mechanical keyboards. Be aware that you almost always need an /active/ USB to PS/2 converter. For the Model M, many keyboard generations had detachable cables that used the SDL standard and there are several options for in-cable conversions based on Blue Cube, TeensyUSB, or similar setups to allow you have a "SDL to USB" cable.
- dehrmann 2y agoI suspected something list this, so these always scared me. Actually, magic always scares me. I was putting together an LTE internet gateway from a Mikrotik device flashed with OpenWRT and was confused about how the SIM card slot on the main board interacts with a mini PCIe LTE modem. I looked at the mini PCIe pinouts and discovered the modem is actually USB (mini PCIe has pins for this) and mini PCIe has pins that are wired to the SIM card. I later ran into an issue where the card wouldn't work, but if I tape over the USB3 pins, it would drop to USB2 (still enough bandwidth for LTE) and work.
- dr-detroit 2y ago[dead]
- buildsjets 2y agoA note about even older AT keyboard connections they should not be hot plugged! Some older motherboards had a fuse soldered in that would blow if the keyboard was hot plugged. Fixed several in the days.
- whiterook6 2y agoI don't understand why so many modern motherboards continue to include ps/2 connections on their rear i/o panels.
- detaro 2y agoa) gamers (supposedly lower latency and better n-key-rollover, realistically not really relevant) b) servers for KVMs/crash carts/... that are still VGA + PS/2
- datanut 2y agoI’ve worked in environments where USB is 100% disabled, including HID. Today, I believe but can’t find an affirmative document, that some motherboards have an option to hijack USB HID mouse & keyboards and present them to the OS as something other than USB.
- rasz 2y ago"Legacy USB support" is exactly this, uses SMM/ring -2 software routine to pass data from USB devices into emulated legacy 8042 keyboard & mouse.
- tracker1 2y agoThe motherboard on my old Intel 4790K would only go into the BIOS with a keypress from a PS/2 keyboard, not from a USB one... That computer is still in service, a friend uses it for general browsing, etc. When I gave it to him, I gave him the 3 purple keyboard adapters I had and an explanation to keep track of them. I couldn't get one anywhere locally, even at Fry's Electronics at the time before they closed (man that place was a ghost town towards the end). I don't know if the keyboard adapters were the same as the mouse adapters, but I do remember that some would work with some devices and not others.
- 486sx33 2y agoFunny enough PS/2 has found its niche and is included on most “gaming” motherboards because - less latency than USB! ps/2 has higher system priority
- VogonPoetry 2y agoThe Atmel AT90USB162 chip multiplexed the USB D+/- pins with an SDATA and SCK PS/2 port. It is possible to build a "serial" to PS/2 or USB bridge device with very few components. The part seems to still be available from Microchip.