1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-23 03:28:58 +00:00
cc65/libsrc/c64/mouseref.s
Greg King e63bf1cde1 Used a library-reference method to calibrate lightpen drivers.
The mouse reference is a pointer.  If it's NULL, the driver uses a default.  If it's non-NULL, then it points to a function that the driver can call.  That function will adjust the driver's calibration value.  It could ask the user to adjust the pen; or, it could read a file that holds a value from a previous calibration.

Application writers can choose how it's done: a function that's provided by the library, a custom function, or nothing.
2013-06-23 03:18:28 -04:00

24 lines
647 B
ArmAsm

;
; Pointer for library references by device drivers.
;
; 2013-06-23, Greg King
;
.export mouse_libref, _mouse_adjuster
.data
mouse_libref: ; generic label for mouse-kernel
; A program optionally can set this pointer to a function that gives
; a calibration value to a driver. If this pointer isn't NULL,
; then a driver that wants a value can call that function.
;
; The function might read a value from a file; or, it might ask the user
; to help calibrate the driver.
;
; void __fastcall__ (*mouse_adjuster)(unsigned char *) = NULL;
;
_mouse_adjuster:
.addr $0000