Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
Daniel Covington 48f67b4c01 init 3 дней назад
..
README.md init 3 дней назад
build-upstream.bat init 3 дней назад
build.bat init 3 дней назад
mouse_driver_demo.c init 3 дней назад
mouse_driver_demo.prg init 3 дней назад
mousedemo-upstream.prg init 3 дней назад
run-vice.bat init 3 дней назад

README.md

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:

build.bat

Run In VICE

run-vice.bat

The demo expects the cc65 tools to be on PATH, and it expects VICE 3.10 at:

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:

-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:

mouse_install(&mouse_def_callbacks, c64_1351_mou);

to:

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.

Powered by TurnKey Linux.