presents:
DuoDriver
This software is for 8-bit machines known as C64 and C128. No, it doesn't run on your Windoze PeeCee - unless you use an emulator...
DuoDriver is a relatively small program that handles a proportional
mouse (like the original CBM 1351) in port one and a joystick in port
two.
The mouse driver has many advantages over the original 1531 driver,
the joystick driver even has acceleration routines.
The pointer is restricted to the screen area and consists of overlay
sprites (a sprite on top of another), so it can be seen against all
backgrounds.
You can either use the binary from your own BASIC programs or
incorporate the source into your own machine language programs.
Both the binaries and the source code are released in the Public
Domain.
But please give credit if you use it in your own code... :)
This is release 4.02 of the source code. The resulting binaries, however, are identical to those of release 4.00, which were included on the cover disc of issue 8/1999 of GO64 magazine.
Download the C128 binary.
Download the C64 binary.
Download the source code (a text file in
ACME syntax). Release 4.02 includes
sprite definitions in the source code, so there's no longer any need
to download a separate sprites file.
Changes from release 4.01 to release 4.02:
Changes from release 3.01 to release 4.01:
Changes from release 3.00 to release 3.01:
Changes from release 2.20 to release 3.00:
Here's how to use the driver in your BASIC programs:
C64 version:
Put this at the start of your program to load and install the driver:
if a=0 then a=1:load"ddrv64",8,1:rem must be *one* line sys 49152:poke 53287, INNER_COLOR:poke 53288, OUTER_COLORReplace "INNER_COLOR" and "OUTER_COLOR" by the desired VIC-II color values, for example "1" and "0" for a white pointer with a black border.
if peek(164) then ACTION:rem left mouse button / joystick button pressed if peek(165) then ACTION:rem right mouse button pressed VARIABLE=peek(179):rem gives x position in characters (0-39) VARIABLE=peek(180):rem gives y position in characters (0-24) VARIABLE=peek(251)+256*peek(252):rem gives x position in pixels (0-319) VARIABLE=peek(253):rem gives y position in pixels (0-199)
C128 version:
Put this at the start of your program to load and install the driver:
boot "ddrv128":sprite 1, 1, INNER_COLOR:sprite 2, 1, OUTER_COLORReplace "INNER_COLOR" and "OUTER_COLOR" by the desired BASIC V7.0 color values, for example "2" and "1" for a white pointer with a black border.
if peek(250) then ACTION:rem left mouse button / joystick button pressed if peek(255) then ACTION:rem right mouse button pressed VARIABLE=peek(155):rem gives x position in characters (0-39) VARIABLE=peek(156):rem gives y position in characters (0-24) VARIABLE=peek(251)+256*peek(252):rem gives x position in pixels (0-319) VARIABLE=peek(253):rem gives y position in pixels (0-199)
Please bear in mind that both C64 and C128 versions of the driver use
locations in zero page that are allocated to tape functions. The C64
version also uses the tape buffer to store the pointer sprites. So
these drivers cannot be used in conjunction with the tape.
I do not own JiffyDOS, so I couldn't test the drivers for
compatibility. As far as I know, they should be compatible.
Special thanks to Leif Bloomquist for realizing (and then actually telling me) I had confused the C64/C128 zeropage locations in the two BASIC fragments above.
Have fun !