# cc65 Mouse Driver Demo This sample lives in its own folder and builds a small C64 program with `cc65`. It is based on the upstream `cc65` sample `samples/mousedemo.c`, but trimmed down to a simple C64-specific example. ## What It Uses - `mouse.h` from `cc65` - the static C64 1351 mouse driver symbol `c64_1351_mou` - the default `cc65` mouse callbacks for drawing the pointer That means the mouse driver is linked into the program at build time, so you do not need to copy a separate `.mou` driver file onto disk just to run it. ## Files - `mouse_driver_demo.c` - the demo program - `build.bat` - builds `mouse_driver_demo.prg` - `run-vice.bat` - builds if needed, then autostarts the program in `x64sc` ## Build From this folder: ```bat build.bat ``` ## Run In VICE ```bat run-vice.bat ``` The demo expects the `cc65` tools to be on `PATH`, and it expects VICE 3.10 at: ```text C:\Program Files\GTK3VICE-3.10-win64\bin\x64sc.exe ``` ## Controls - Move with the host mouse in VICE - `H` hides or shows the cursor - `C` centers the cursor - `Q` quits `run-vice.bat` starts `x64sc` with: ```text -mouse -controlport1device 3 ``` That matches the VICE 3.10 `Mouse (1351)` device with the program's default `c64_1351_mou` driver. ## Using The Joystick-Mouse Driver Instead If you want the joystick-emulated mouse driver instead, change: ```c mouse_install(&mouse_def_callbacks, c64_1351_mou); ``` to: ```c mouse_install(&mouse_def_callbacks, c64_joy_mou); ``` The `cc65` C64 docs say `c64_joy_mou` expects a joystick-emulated mouse in C64 port `#1`, while `c64_1351_mou` expects a standard mouse in C64 port `#0`.