]> git.sur5r.net Git - cc65/commit - libsrc/gamate/joy/gamate-stdjoy.s
Removed joy_masks array.
authorOliver Schmidt <ol.sc@web.de>
Sat, 19 Aug 2017 17:11:28 +0000 (19:11 +0200)
committerOliver Schmidt <ol.sc@web.de>
Sat, 19 Aug 2017 17:11:28 +0000 (19:11 +0200)
commit7f52a770d9c6a43dde67689032bb3a4848eb6b30
treee4b60989498a70947154366e67f653f75552cfd2
parentf5e9b4012ad25fa3418f4326889ecd6d261fc597
Removed joy_masks array.

So far the joy_masks array allowed several joystick drivers for a single target to each have different joy_read return values. However this meant that every call to joy_read implied an additional joy_masks lookup to post-process the return value.

Given that almost all targets only come with a single joystick driver this seems an inappropriate overhead. Therefore now the target header files contain constants matching the return value of the joy_read of the joystick driver(s) on that target.

If there indeed are several joystick drivers for a single target they must agree on a common return value for joy_read. In some cases this was alredy the case as there's a "natural" return value for joy_read. However a few joystick drivers need to be adjusted. This may cause some overhead inside the driver. But that is for sure smaller than the overhead introduced by the joy_masks lookup before.

!!! ToDo !!!

The following three joystick drivers become broken with this commit and need to be adjusted:
- atrmj8.s
- c64-numpad.s
- vic20-stdjoy.s
44 files changed:
asminc/joy-kernel.inc
include/apple2.h
include/atari.h
include/atari5200.h
include/atmos.h
include/c128.h
include/c64.h
include/cbm.h
include/cbm264.h
include/cbm510.h
include/creativision.h
include/em/em-kernel.h
include/gamate.h
include/geos.h
include/joystick.h
include/joystick/joy-kernel.h
include/lynx.h
include/nes.h
include/pce.h
include/pet.h
include/vic20.h
libsrc/apple2/joy/a2.stdjoy.s
libsrc/atari/joy/atrstd.s
libsrc/atari5200/joy/atr5200std.s
libsrc/atmos/joy/atmos-pase.s
libsrc/c128/joy/c128-ptvjoy.s
libsrc/c128/joy/c128-stdjoy.s
libsrc/c64/joy/c64-hitjoy.s
libsrc/c64/joy/c64-ptvjoy.s
libsrc/c64/joy/c64-stdjoy.s
libsrc/cbm510/joy/cbm510-std.s
libsrc/creativision/joy/creativision-stdjoy.s
libsrc/gamate/joy/gamate-stdjoy.s
libsrc/geos-cbm/joy/geos-stdjoy.s
libsrc/joystick/joy-kernel.s
libsrc/lynx/joy/lynx-stdjoy.s
libsrc/nes/joy/nes-stdjoy.s
libsrc/pce/joy/pce-stdjoy.s
libsrc/pet/joy/pet-ptvjoy.s
libsrc/pet/joy/pet-stdjoy.s
libsrc/plus4/joy/plus4-stdjoy.s
libsrc/vic20/joy/vic20-ptvjoy.s
testcode/lib/joy-test.c
testcode/lib/pce/conio.c