when you're installing a mouse driver into your DOS installation, do you do the lazy thing and stick MOUSE.EXE/CTMOUSE.EXE into C:\DOS? or do you keep things "clean" by putting it in C:\MOUSE and adjusting the PATH?
Conversation
Notices
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Tuesday, 26-Sep-2023 00:06:35 JST Foone🏳️⚧️ -
Foone🏳️⚧️ (foone@digipres.club)'s status on Tuesday, 26-Sep-2023 00:08:40 JST Foone🏳️⚧️ or put it in C:\, I don't know how you live
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Tuesday, 26-Sep-2023 00:11:22 JST Foone🏳️⚧️ sorry I'm posting from 1993 Mastodon again.
I don't know what's happening in 2023. It probably involves a lot less MS-DOS -
Foone🏳️⚧️ (foone@digipres.club)'s status on Tuesday, 26-Sep-2023 01:06:04 JST Foone🏳️⚧️ for the people going "MOUSE DRIVERS?!":
DOS didn't come with native support for mice. The original PC didn't natively support them anyway. So when you bought a mouse, it'd come with a disk containing a TSR (terminate-and-stay-resident program, basically a background task (on a single-tasking OS)) that would listen for the mouse to send commands, and provided a new API for programs to query for mouse movement/position/clicks
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Tuesday, 26-Sep-2023 01:10:37 JST Foone🏳️⚧️ I'm frankly astonished that this was standardized without being part of the PC hardware/DOS, honestly. That really didn't happen in the PC era.
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Tuesday, 26-Sep-2023 01:13:04 JST Foone🏳️⚧️ anyway the driver could (in theory) talk to the mouse in any way it wanted, it just needed to provide the same API (through interrupts, because this is DOS) so it would work with all mouse programs
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Tuesday, 26-Sep-2023 01:14:52 JST Foone🏳️⚧️ there were at least 4 mouse protocols in wide use on the PC (Bus, MS, Logitech, and PS/2), but either you loaded the right driver or you used a driver that supported multiple protocols, so your software didn't need to know about this
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Tuesday, 26-Sep-2023 01:17:15 JST Foone🏳️⚧️ I know this sounds boring, like this is just how drivers work, but you have to understand this is implemented completely differently. There's no OS-level code that's providing a translation between the hardware and the userspace.
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Tuesday, 26-Sep-2023 01:19:06 JST Foone🏳️⚧️ the MOUSE.EXE program is just that, a program: it is reading the PS/2 port or the serial port or the bus port. It uses a trick where it sets up DOS to lie about how much ram is available, copies itself into that new hidden hole of non-RAM, then it exits. it quits, returning execution to the OS, and then later whatever program you run.
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Tuesday, 26-Sep-2023 01:20:28 JST Foone🏳️⚧️ but since it's lying about how much RAM is available, DOS never erases or reuses that now-missing memory. So the program continues to live in that hidden RAM hole.
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Tuesday, 26-Sep-2023 01:21:57 JST Foone🏳️⚧️ there's no preemptive multitasking here, like the program isn't getting any shared part of the execution time. DOS or whatever program you load is using 100% of the CPU.
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Tuesday, 26-Sep-2023 01:27:24 JST Foone🏳️⚧️ BUT the program set up some interrupt handlers: So when data comes in on the PS/2 port or serial port or bus port, the interrupt handler ports to that hidden bit of RAM. So suddenly the program that quit is running again, in an interrupt context. It sets some local variables, and either returns or continues the interrupt chain, having saved what the previous interrupt was
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Tuesday, 26-Sep-2023 01:28:52 JST Foone🏳️⚧️ then when a program is running that needs mouse support, it calls the mouse API: which is also an interrupt, and that interrupt vector was pointed to the memory-hole the driver hid itself in.
So suddenly the program that wanted mouse services isn't running anymore, and the mouse driver is, it uses those saved local variables to determine how the mouse moved, and returns that info. -
Foone🏳️⚧️ (foone@digipres.club)'s status on Tuesday, 26-Sep-2023 01:30:16 JST Foone🏳️⚧️ now at a very high level you can look at this and say "this is how a modern OS works! you use an API, the library's code does a system call, which switches into the kernel's protection ring (ring 0), etc etc etc"
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Tuesday, 26-Sep-2023 01:33:14 JST Foone🏳️⚧️ it's just that on DOS there is no protection rings, everything is running in ring 0, the kernel is... not a thing. There's a DOS API that's resident and you're not supposed to erase it, and a bunch of zombified programs that are pretending your memory is smaller than they are, so they can periodically run in interrupt context and do some random-ass thing.
It's all completely exposed and there's not really any API to "be a driver", you just have to trick the OS into kinda acting like there is
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Tuesday, 26-Sep-2023 01:35:08 JST Foone🏳️⚧️ frankly it's amazing DOS works at all. It's only barely an OS: it's basically just a single program that's designed to load other programs, and it leaves some zombified code around in RAM to act as a filesystem layer.
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Tuesday, 26-Sep-2023 01:39:33 JST Foone🏳️⚧️ for the record, Bus mice: Early on, PCs didn't have any standard ports that could be used to connect a mouse. You could add a serial port card, but what if you already did for something else, and also those are expensive? So why not build a custom Mouse Card? Microsoft and Logitech did.
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Tuesday, 26-Sep-2023 01:41:06 JST Foone🏳️⚧️ This was also cheaper because it meant you didn't need to put enough smarts in the mouse to speak serial or PS/2.
Bus mice are hilariously minimalist inside: there's nearly no electronics. There's just the LEDs, Photointerrupters to detect movement of the mouse ball, and the buttons.
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Tuesday, 26-Sep-2023 01:44:33 JST Foone🏳️⚧️ The quadrature encoding that's normally in every single ball mouse ever made? It's not in there! They just wire the two X and two Y signals down the cable! The decoding is done on the card.
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Tuesday, 26-Sep-2023 01:48:53 JST Foone🏳️⚧️ from a 2023 perspective, it's kinda amazing what technical decisions were made in 1983 because it was "too expensive" to put an 8-bit microcontroller inside a mouse.
The price of an 8-bit microcontroller in bulk is currently somewhere south of a single cent.
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Tuesday, 26-Sep-2023 02:39:44 JST Foone🏳️⚧️ @blp partially, but it's also the lack of a serial protocol.
If all the smarts are in the card, the card can just decode the signals.If you put some smarts in the mouse, you ALSO need smarts in the card to decode the protocol coming down the line.
And there's overhead, so one big chip was cheaper than two smaller chips
-
Ben Pfaff (blp@framapiaf.org)'s status on Tuesday, 26-Sep-2023 02:39:45 JST Ben Pfaff @foone The electronics have to go somewhere. Do you have an idea of why it was cheaper to put them in an add-on card rather than in the mouse? Is it because of size constraints?
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Tuesday, 26-Sep-2023 02:53:59 JST Foone🏳️⚧️ @reconbot fun fact: I googled some stuff about mouse protocols while writing this thread and your blog posts are what came up!
-
Francis 🏴☠️ Gulotta (reconbot@toot.cafe)'s status on Tuesday, 26-Sep-2023 02:54:00 JST Francis 🏴☠️ Gulotta @foone the 7-bit serial was quite a shocker to me when I went to write my own serial mouse driver
-
emily, emitter of spooky noise (emily@sparkly.uni.horse)'s status on Tuesday, 26-Sep-2023 02:58:23 JST emily, emitter of spooky noise @foone @blp there's an alternate timeline where mice speak ISA and the card is just a bunch of plain traces coming out of some cursed connector, turning 90 degrees, and going directly into the slot
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Tuesday, 26-Sep-2023 02:58:23 JST Foone🏳️⚧️ @emily @blp yeah that's a terrible idea.
especially because ISA is not supposed to run over long ranges. you'd completely fuck your bus!
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Tuesday, 26-Sep-2023 03:37:48 JST Foone🏳️⚧️ @clairely_undaunted I was thinking the same thing!
-
niche witch with a 🐝 (clairely_undaunted@mastodon.triggerphra.se)'s status on Tuesday, 26-Sep-2023 03:37:49 JST niche witch with a 🐝 @foone looking back on it I am surprised there wasn’t a PC mouse that reused the keyboard interface with a passthrough plug. would be fun to try making that happen now.
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Tuesday, 26-Sep-2023 05:26:35 JST Foone🏳️⚧️ @danieldurrans @resuna there's plenty of gaming mice that have ARM chips in them, so... yeah
-
Daniel Durrans (danieldurrans@mastodon.me.uk)'s status on Tuesday, 26-Sep-2023 05:26:41 JST Daniel Durrans @resuna @foone so what you are saying is that you could run Doom on a mouse?
-
Resuna (resuna@ohai.social)'s status on Tuesday, 26-Sep-2023 05:26:42 JST Resuna @foone A modern optical mouse has a USB controller that runs at least 12 MHz and a DSP that's the equivalent of 50 MHz or better. That's far more CPU power than a PC/XT running DOS or even my old 128k Mac M000001.
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Tuesday, 26-Sep-2023 07:25:10 JST Foone🏳️⚧️ @clairely_undaunted sensibility and standards ruin so many of my bad ideas!
-
niche witch with a 🐝 (clairely_undaunted@mastodon.triggerphra.se)'s status on Tuesday, 26-Sep-2023 07:25:11 JST niche witch with a 🐝 @foone but looking into it this probably wouldn't make it past the KB Controller in PC/AT and later which is trying to do scan code translation and would probably reject stuff it doesn't know; so it would only kind of work on the original PC.
-
niche witch with a 🐝 (clairely_undaunted@mastodon.triggerphra.se)'s status on Tuesday, 26-Sep-2023 07:25:12 JST niche witch with a 🐝 @foone seems like scan codes up above 0x90..DF would be usable. 0x9x - up to four button states, sent when changed. 0xAx - X value relative motion high 4 bits signed. 0xBx - Y value relative motion high 4 bits signed. 0xCx - Low bits for prior code. OxDx 4 Scroll bits (they didn’t have scroll then but why not)
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Tuesday, 26-Sep-2023 09:37:31 JST Foone🏳️⚧️ @papermanu yeah. all the drivers did. although your adlibs and (original) soundblasters didn't need any drivers, they were just hardware the games talked to directly. "drivers" usually did things like handle plug-n-play and add emulation for other soundcard types
-
paperManu (papermanu@mamot.fr)'s status on Tuesday, 26-Sep-2023 09:37:32 JST paperManu @foone I lived this era, spending so much time playing DOS games. And I did not know how these drivers worked. Thanks a lot for this short and sweet explanation.
Now I wonder : the soundcard drivers used the same kind of tricks right?
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 15-Oct-2023 11:34:35 JST Foone🏳️⚧️ @1000millimeter interesting! I've not seen mice that do that.
I do have one serial mouse that takes a separate power supply, but it has a wall wart -
1000millimeter (1000millimeter@chaos.social)'s status on Sunday, 15-Oct-2023 11:34:36 JST 1000millimeter @foone Fun fact. Our first PC, 286, had a mouse with such an extra card. But it didn't connect to the bus, it basically just used power from the bus. It then externally connected to a serial port. (Using an audio RCA connector on the card.)
-