Re: [cc65] drivers...

Date view Thread view Subject view

From: Piotr Fusik (P.Fusik_at_elka.pw.edu.pl)
Date: 2003-09-29 22:26:49


On Mon, 29 Sep 2003, Ullrich von Bassewitz wrote:

> > Well, I see some mistakes in this topic. As I implemented all mouse-like
> > devices in the Atari800 emulator, here's some explaination of what can
> > be directly plugged to Atari joystick ports besides joysticks:
> [...]
>
> Any chance to map all this stuff into a generic controller API?
>
I think yes.

In Atari800 the interface between port-specific code (for Windows, DOS,
etc.) and emulation core is simple:
int mouse_mode;     // MOUSE_PAD, MOUSE_KOALA, etc.
int mouse_port;     // 0-3 for 400/800 that have 4 joystick ports, 0-1 for
                    // XL/XE
int mouse_delta_x;  // position change since last frame
int mouse_delta_y;
int mouse_buttons;  // bit 0 for left button, bit 1 for right button
// (plus some calibration settings, which are of little importance,
// see input.[ch] at http://atari800.sf.net)

So, port-specific code simply sets all these variables (mouse_mode and
mouse_port are user's selection, the other are updated every 1/50s or
1/60s).

The controller API for Atari code must be somewhat more complicated:
- Light Pen and Light Gun are screen-related (on Atari the resolution
  for reading them is 160x120)
- mice and track ball have unlimited range, while other devices have their
  "position" (for paddles and tablets the range is 1-228)

Piotr

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-09-29 22:29:11 CEST