2002-12-20 21:02:35 +00:00
|
|
|
|
;/*****************************************************************************/
|
|
|
|
|
;/* */
|
|
|
|
|
;/* joy-kernel.inc */
|
|
|
|
|
;/* */
|
|
|
|
|
;/* Internally used joystick functions */
|
|
|
|
|
;/* */
|
|
|
|
|
;/* */
|
|
|
|
|
;/* */
|
2006-06-04 10:15:18 +00:00
|
|
|
|
;/* (C) 2002-2006, Ullrich von Bassewitz */
|
|
|
|
|
;/* R<>merstra<72>e 52 */
|
|
|
|
|
;/* D-70794 Filderstadt */
|
|
|
|
|
;/* EMail: uz@cc65.org */
|
2002-12-20 21:02:35 +00:00
|
|
|
|
;/* */
|
|
|
|
|
;/* */
|
|
|
|
|
;/* This software is provided 'as-is', without any expressed or implied */
|
|
|
|
|
;/* warranty. In no event will the authors be held liable for any damages */
|
|
|
|
|
;/* arising from the use of this software. */
|
|
|
|
|
;/* */
|
|
|
|
|
;/* Permission is granted to anyone to use this software for any purpose, */
|
|
|
|
|
;/* including commercial applications, and to alter it and redistribute it */
|
|
|
|
|
;/* freely, subject to the following restrictions: */
|
|
|
|
|
;/* */
|
|
|
|
|
;/* 1. The origin of this software must not be misrepresented; you must not */
|
|
|
|
|
;/* claim that you wrote the original software. If you use this software */
|
|
|
|
|
;/* in a product, an acknowledgment in the product documentation would be */
|
|
|
|
|
;/* appreciated but is not required. */
|
|
|
|
|
;/* 2. Altered source versions must be plainly marked as such, and must not */
|
|
|
|
|
;/* be misrepresented as being the original software. */
|
|
|
|
|
;/* 3. This notice may not be removed or altered from any source */
|
|
|
|
|
;/* distribution. */
|
|
|
|
|
;/* */
|
|
|
|
|
;/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
; Driver header stuff
|
|
|
|
|
|
2003-12-16 22:38:28 +00:00
|
|
|
|
.struct JOY_HDR
|
2013-05-09 11:56:54 +00:00
|
|
|
|
ID .byte 3 ; $6A, $6F, $79 ("joy")
|
|
|
|
|
VERSION .byte 1 ; Interface version
|
|
|
|
|
MASKS .byte 8 ; Joystick state mask array
|
|
|
|
|
JUMPTAB .struct
|
|
|
|
|
INSTALL .word ; INSTALL routine
|
|
|
|
|
UNINSTALL .word ; UNINSTALL routine
|
|
|
|
|
COUNT .word ; COUNT routine
|
|
|
|
|
READ .word ; READ routine
|
2004-11-06 13:01:15 +00:00
|
|
|
|
IRQ .word ; IRQ routine
|
2013-05-09 11:56:54 +00:00
|
|
|
|
.endstruct
|
2003-12-16 22:38:28 +00:00
|
|
|
|
.endstruct
|
2002-12-20 21:02:35 +00:00
|
|
|
|
|
2003-12-16 22:38:28 +00:00
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
; The JOY API version, stored in JOY_HDR::VERSION
|
2002-12-20 21:02:35 +00:00
|
|
|
|
|
2004-11-06 13:01:15 +00:00
|
|
|
|
JOY_API_VERSION = $01
|
2002-12-20 21:02:35 +00:00
|
|
|
|
|
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
; Variables
|
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
|
.global _joy_drv ; Pointer to driver
|
2004-11-06 13:09:17 +00:00
|
|
|
|
.global _joy_masks
|
2002-12-20 21:02:35 +00:00
|
|
|
|
|
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
; Driver entry points
|
|
|
|
|
|
|
|
|
|
.global joy_install
|
2003-02-10 22:11:12 +00:00
|
|
|
|
.global joy_uninstall
|
2002-12-20 21:02:35 +00:00
|
|
|
|
.global joy_count
|
|
|
|
|
.global joy_read
|
|
|
|
|
|
|
|
|
|
;------------------------------------------------------------------------------
|
2004-11-06 13:09:17 +00:00
|
|
|
|
; C callable functions
|
2002-12-20 21:02:35 +00:00
|
|
|
|
|
2008-03-16 09:37:22 +00:00
|
|
|
|
.global _joy_load_driver
|
2004-04-08 17:48:55 +00:00
|
|
|
|
.global _joy_unload
|
2013-05-09 11:56:54 +00:00
|
|
|
|
.global _joy_install
|
|
|
|
|
.global _joy_uninstall
|
|
|
|
|
.global _joy_count
|
|
|
|
|
.global _joy_read
|
2002-12-20 21:02:35 +00:00
|
|
|
|
|
2006-06-04 10:15:18 +00:00
|
|
|
|
.global _joy_clear_ptr
|
2003-12-16 22:38:28 +00:00
|
|
|
|
|