Commit Graph

14 Commits

Author SHA1 Message Date
mrdudz ffa83c32a4 clean-up of driver return codes 2023-02-26 20:03:41 +01:00
Greg King 9023e975df Stopped the C128 mouse drivers from blocking certain keys such as '1', '2', and 'Q'.
This extra fix is needed because the C128 keyboard scanner works a little differently than the C64 scanner works.
Fixes #696. Fixes #853.
2020-07-14 16:06:21 -04:00
Greg King 74c2415795 Changed literal zeroes of the style "#>0" into the style "#>$0000". 2014-09-10 19:15:07 -04:00
Oliver Schmidt 2c975d3642 Create static drivers directly from source files.
Up to now static drivers were created via co65 from dynamic drivers. However there was an issue with that approach:

The dynamic drivers are "o65 simple files" which obligates that they start with the 'code' segment. However dynamic drivers need to start with the module header - which is written to. For dynamic drivers this isn't more than a conceptual issue because they are always contain a 'data' segment and may therefore only be loaded into writable memory.

However when dynamic drivers are converted to static drivers using co65 then that issue becomes a real problem as then the 'code' segment may end up in non-writable memory - and thus writing to the module header fails.

Instead of changing the way dynamic drivers work I opted to rather make static driver creation totally independent from dynamic drivers. This allows to place the module header in the 'data' segment (see 'module.mac').
2014-06-04 23:50:18 +02:00
Oliver Schmidt 63b5f75a7f Merge pull request #114 from greg-king5/phantom
Added the phantom-key exorcism code to the other C128 mouse drivers.
2014-05-09 19:30:51 +02:00
Greg King a27e7562fd Added comments that explain why some instructions are implied. 2014-05-05 13:55:14 -04:00
Greg King 667f8229c0 Migrated the phantom-key exorcism code to the other C128 mouse drivers. 2014-05-05 05:30:31 -04:00
Oliver Schmidt d6c3bd29ac Renamed JUMPTABLE and cleaned up module.cfg.
This change was suppsed to fix the issue that the former JUMPTABLE is merked as 'ro' while it is actually written to in several scenarios. When drivers are converted using co65 and then compiled into ROMs the JUMPTABLE isn't copied to RAM and therefore the write operations in question fail.

However unfortunately I didn't succeed in changing that :-( Just setting the former JUMPTABLE to 'rw' broke the drivers. So I placed the DATA segment directly after the former JUMPTABLE segment. This made the drivers converted with co65 work again - obviously after changing libsrc/Makefile:235 from '--code-label' to '--data-label'. But the actual dynamic drivers still didn't work as the former JUMPTABLE wasn't placed as the beginning of the loaded file anymore. That effect could be changed by exchanging src/ld65/o65.c:1391 with src/ld65/o65.c:1394 but doing so broke the drivers again :-((
2014-05-01 21:44:39 +02:00
Oliver Schmidt 94eb2a2ed7 Some fine tuning of the mouse driver interface harmonization. 2014-01-17 21:09:15 +01:00
Oliver Schmidt 4065cb1983 Harmonized interface between mouse drivers and callbacks.
The Apple2 doesn't have sprites so the Apple2 mouse callbacks place a special character on the text screen to indicate the mouse position. In order to support the necessary character removing and redrawing the Apple2 mouse driver called the Apple2 mouse callbacks in an "unusual way". So far so (sort of) good.

However the upcoming Atari mouse driver aims to support both "sprite-type" mouse callbacks as well as "text-char-type" mouse callbacks. Therefore the interface between mouse drivers and callbacks needs to be extended to allow the mouse callbacks to hide their different types from the mouse driver.

The nature of this change can be seen best by looking at the Apple2 file modifications. The CBM drivers and callbacks (at least the current ones) don't benefit from this change.
2014-01-15 22:47:59 +01:00
Greg King 078a1df2f6 Look for NULL pointer more efficiently. 2013-07-05 12:32:19 -04:00
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
Greg King 66ca781bb1 Added library reference address to lightpen driver header. 2013-06-03 06:09:22 -04:00
Greg King 051c21726b Added Inkwell lightpen drivers for the C64 and the C128.
They use the mouse driver programming interface.

Added a test program for lightpen drivers.  Now, it knows about only those two drivers; it will need updating when others are added.
2013-05-29 20:02:29 -04:00