How to Configure CuteMouse on FreeDOS Without Wasting Conventional Memory
A reversible CuteMouse setup covering PS/2, serial and BIOS USB paths, TSR detection, high loading, exit codes, compatibility testing, and rollback.
CuteMouse (CTMOUSE) is FreeDOS’s resident mouse driver. It implements the conventional DOS mouse service interface so applications do not need to drive every PS/2 or serial device directly. A good setup detects one real input path, consumes little conventional memory, and can be removed from a boot menu when an old application conflicts.
Start from a clean boot
Boot without another mouse driver and check conventional/upper memory:
MEM /C /P
CTMOUSE /?
Another driver may already own interrupt 33h. Loading a second TSR can fail or create inconsistent callbacks. CTMOUSE /B tells CuteMouse to cancel if mouse services already exist, which is useful in shared boot scripts.
Copy the exact installed documentation with the machine’s configuration notes. CuteMouse branches and builds differ; wheel support and options are not identical across every historical release.
Let autodetection work before forcing a bus
For ordinary PS/2 or BIOS-exposed USB mice, try:
CTMOUSE /B
Check its exit code immediately and test in an application:
IF ERRORLEVEL 5 GOTO MOUSEFAIL
FreeDOS documentation lists meanings for return codes, including no mouse/invalid option and successful modes. Because IF ERRORLEVEL n means “n or higher,” branch from highest to lowest when distinguishing codes.
If serial probing touches hardware that should not be scanned, /P forces PS/2 mode. /S selects a serial COM port and optional IRQ, but only use values verified from BIOS/device configuration. COM1/COM3 traditionally share IRQ 4 and COM2/COM4 IRQ 3; simultaneous devices on a shared legacy IRQ may conflict.
The /O BIOS USB wheel-detection option is documented as potentially hanging on some systems. Test it only in a recoverable boot profile, never as the first change to the sole boot configuration.
Load high only after an upper-memory manager works
With HIMEMX and JEMM386/JEMMEX configured and stable, load the TSR into an Upper Memory Block:
LH C:\FREEDOS\BIN\CTMOUSE.EXE /B
MEM /C /P
CuteMouse can move itself into UMB unless /W disables that behavior. Compare MEM before and after instead of assuming LH succeeded. A fragmented UMB may force the TSR low; rearranging large drivers can help, but change one line per boot and preserve a no-UMB option.
Do not sacrifice a stable EMM386 configuration merely to save a few kilobytes. Some games and extenders are more compatible with a simple XMS-only boot and mouse resident in conventional memory.
Choose the minimum necessary options
/3 forces three-button mode on supported Microsoft/PS/2 devices. /L swaps buttons. Resolution options can alter scaling. Keep defaults unless a named application or device requires a change and test across text and graphical programs.
Wheel support depends on the CuteMouse branch and an application using its wheel API; a moving pointer does not prove wheel events are delivered. Likewise, a USB mouse generally works only when firmware presents legacy PS/2-compatible services or a DOS USB stack exposes a compatible path.
Make the boot reversible
Use a FreeDOS multi-configuration menu:
IF "%CONFIG%"=="CLEAN" GOTO NOMOUSE
LH C:\FREEDOS\BIN\CTMOUSE.EXE /B
:NOMOUSE
Exact %CONFIG% support and syntax should match the existing boot menu. Keep a clean profile without mouse, EMS, network, or sound TSRs for diagnosis.
CTMOUSE /U attempts to uninstall the TSR. Unload can fail if another program hooked its interrupts afterward. Exit applications in reverse load order; do not force memory free while vectors still point into the resident block.
Test application behavior, not only pointer movement
Verify text editor, graphical application, a game with mouse support, button mapping, rapid movement, warm reboot, cold boot, VM capture/release, and any wheel-aware program. Record driver hash/version, command line, detected bus, exit code, memory residency, and conflicting application.
The best CuteMouse line is usually the shortest one that detects the intended device and can be bypassed. Every forced probe or memory trick needs a measured reason.
Related:
- How to Test Windows 3.1 on FreeDOS Without Risking a Working Installation
- DPMI on FreeDOS: How Protected-Mode Programs Coexist with Real-Mode DOS
Sources: