From 3ef184bdd618bf9f8659bafe6ea3869aded07b01 Mon Sep 17 00:00:00 2001 From: Greg King Date: Tue, 18 Mar 2014 02:41:57 -0400 Subject: [PATCH] Corrected the default upper limits of some mouse drivers' bounding box. The upper limits need to be one less than the screen sizes because the minimum co-ordinate is zero instead of one. --- libsrc/c128/mou/c128-1351.s | 6 +++--- libsrc/c128/mou/c128-joy.s | 6 +++--- libsrc/c128/mou/c128-pot.s | 6 +++--- libsrc/c64/mou/c64-joy.s | 6 +++--- libsrc/c64/mou/c64-pot.s | 11 ++++++----- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/libsrc/c128/mou/c128-1351.s b/libsrc/c128/mou/c128-1351.s index e1a8a5c8a..8aec3b7b7 100644 --- a/libsrc/c128/mou/c128-1351.s +++ b/libsrc/c128/mou/c128-1351.s @@ -3,7 +3,7 @@ ; the Commodore 1351 mouse users guide. ; ; 2009-09-26, Ullrich von Bassewitz -; 2014-03-15, Greg King +; 2014-03-17, Greg King ; .include "zeropage.inc" @@ -97,8 +97,8 @@ INIT_save: .res 1 .word SCREEN_WIDTH/2 ; XPos .word 0 ; XMin .word 0 ; YMin - .word SCREEN_WIDTH ; XMax - .word SCREEN_HEIGHT ; YMax + .word SCREEN_WIDTH - 1 ; XMax + .word SCREEN_HEIGHT - 1 ; YMax .endproc .code diff --git a/libsrc/c128/mou/c128-joy.s b/libsrc/c128/mou/c128-joy.s index 29689305b..be0cf227b 100644 --- a/libsrc/c128/mou/c128-joy.s +++ b/libsrc/c128/mou/c128-joy.s @@ -2,7 +2,7 @@ ; Driver for a "joystick mouse". ; ; 2009-09-26, Ullrich von Bassewitz -; 2014-03-15, Greg King +; 2014-03-17, Greg King ; .include "zeropage.inc" @@ -102,8 +102,8 @@ Temp: .res 1 .word SCREEN_WIDTH/2 ; XPos .word 0 ; XMin .word 0 ; YMin - .word SCREEN_WIDTH ; XMax - .word SCREEN_HEIGHT ; YMax + .word SCREEN_WIDTH - 1 ; XMax + .word SCREEN_HEIGHT - 1 ; YMax .byte 0 ; Buttons .endproc diff --git a/libsrc/c128/mou/c128-pot.s b/libsrc/c128/mou/c128-pot.s index 07058bf79..4e549cc6d 100644 --- a/libsrc/c128/mou/c128-pot.s +++ b/libsrc/c128/mou/c128-pot.s @@ -3,7 +3,7 @@ ; ; 2006-08-20, Stefan Haubenthal ; 2009-09-26, Ullrich von Bassewitz -; 2014-03-15, Greg King +; 2014-03-17, Greg King ; .include "zeropage.inc" @@ -99,8 +99,8 @@ Temp: .res 1 .word SCREEN_WIDTH/2 ; XPos .word 0 ; XMin .word 0 ; YMin - .word SCREEN_WIDTH ; XMax - .word SCREEN_HEIGHT ; YMax + .word SCREEN_WIDTH - 1 ; XMax + .word SCREEN_HEIGHT - 1 ; YMax .byte 0 ; Buttons .endproc diff --git a/libsrc/c64/mou/c64-joy.s b/libsrc/c64/mou/c64-joy.s index 57e5bebf1..431f4d29d 100644 --- a/libsrc/c64/mou/c64-joy.s +++ b/libsrc/c64/mou/c64-joy.s @@ -2,7 +2,7 @@ ; Driver for a "joystick mouse". ; ; Ullrich von Bassewitz, 2004-03-29, 2009-09-26 -; 2010-02-08, Greg King +; 2014-03-17, Greg King ; ; The driver prevents the keyboard from interfering by changing the ; keyboard's output port into an input port while the driver reads its @@ -118,8 +118,8 @@ Temp: .res 1 .word SCREEN_WIDTH/2 ; XPos .word 0 ; XMin .word 0 ; YMin - .word SCREEN_WIDTH ; XMax - .word SCREEN_HEIGHT ; YMax + .word SCREEN_WIDTH - 1 ; XMax + .word SCREEN_HEIGHT - 1 ; YMax .byte 0 ; Buttons .endproc diff --git a/libsrc/c64/mou/c64-pot.s b/libsrc/c64/mou/c64-pot.s index d57feeeae..17308f6ac 100644 --- a/libsrc/c64/mou/c64-pot.s +++ b/libsrc/c64/mou/c64-pot.s @@ -1,8 +1,9 @@ ; -; Driver for a potentiometer "mouse" e.g. Koala Pad +; Driver for a potentiometer "mouse", e.g. Koala Pad ; -; Ullrich von Bassewitz, 2004-03-29, 2009-09-26 -; Stefan Haubenthal, 2006-08-20 +; 2006-08-20, Stefan Haubenthal +; 2009-09-26, Ullrich von Bassewitz +; 2014-03-17, Greg King ; .include "zeropage.inc" @@ -96,8 +97,8 @@ Temp: .res 1 .word SCREEN_WIDTH/2 ; XPos .word 0 ; XMin .word 0 ; YMin - .word SCREEN_WIDTH ; XMax - .word SCREEN_HEIGHT ; YMax + .word SCREEN_WIDTH - 1 ; XMax + .word SCREEN_HEIGHT - 1 ; YMax .byte 0 ; Buttons .endproc -- 2.39.5