From: | Alastair M. Robinson |
Date: | 27 Apr 2001 at 14:12:46 |
Subject: | Re: SongPlayer |
Hi Paul,
>> It only affects the mousewheel support - all these PC mice adaptors
>> use the analog inputs through the Amiga mouse port to pass
>> mousewheel movements onto the software driver.
Not strictly true - only Punchinello-II uses the analogue input *in analogue
mode*. EZMouse uses multiplexing to re-use digital inputs, so is immune
to the screenmode problems.
> Ah! I see! Paula uses the time of 1 raster to perform analog to
> digital conversion.
Not quite - Analogue-to-digital conversion can take up to a full video
frame, but you're right that it's the varying of the duration of 1 raster
that causes the problem...
> What idiot designed wheel mice with an analog wheel :-)
The wheel is actually digital - the challenge for interface manufacturers is
how to transmit the four signals needed for normal movement, along with up
to four buttons, and up to four wheel directions, plus 5v and ground over a
9-pin port!
The solution Elbox chose was to simulate one axis of an analogue joystick to
carry four wheel signals over one wire. (This is also the way hat-switches
on PC joysticks often work).
As you're no doubt aware, the Amiga's AGA hardware runs most of the computer
without the processor's intervention, and pretty much everything is
synchronised with the screen update - for every scanline of video data, the
graphics data is fetched from memory, sprite data is fetched, up to 2
samples per audio channel (but no more, which is why you can't play audio at
a sample frequency more than twice the horizontal refresh rate), disk DMA
and a few other things.
The Amiga's (and traditional PC's) analogue inputs work like this: a
capacitor is charged through the joystick's variable resistor, and this
operation is timed; the higher the resistance, the longer it takes.
On the PC, the processor generally has to sit there counting how long it
takes the capacitor to charge, but the Amiga has a more elegant solution; a
hardware counter is incremented *once per horizontal scanline*, and once
the capacitor has fully charged, the value in the counter is latched.
This means that all the processor has to do to read analogue controllers
is to read these counters once per frame, and reset them.
The problem is that since the counter is incremented once per scanline, the
counting rate obviously varies with the Amiga's AGA mode, which is why a
change of screenmode screws up the Punchinello-II...
Hope that makes it a little clearer ;^)
All the best,
I typed Format SER: and accidentally killed a telephone operator!
Quote carefully and read all ADMIN:README mails
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/