1351 mouse - had anyone experiences with a Vic-20?

From: Levente Hársfalvi (Levente_at_terrasoft.hu)
Date: 1999-09-24 20:11:58

Hi all!


I've recently been working on my longtime favourite stuff: a serial to
Commodore mouse interface board. (In fact it was my master's thesis
theme last year at my college.). This is a small PIC16c84
microcontroller based circuit that connects to the joystick port and
handles a true PC serial mouse.

The circuit and the program can currently handle a Microsoft or a Mouse
systems mode PC mouse (autodetected...) and emulates a joystick as a
1350 mouse would work (...or rather, it does it better since I use a
dynamic difference --> delay conversion algorithm instead of generating
fixed length pulses). Also the describing document is ready at about
70-80% (that I started to write last month), both with theory and
construction notes. The whole thing is going to be free (GPL), as will
all my other similar designs (if any).

Last month when I've been writing the document I was just describing why
true 1351 mouse emulation is _not possible with my hardware (without
major hardware modifications and a lot of extra TTL chips that I feelt
better to avoid), ...when I realised - point from point - why this
_could be possible, even if someway just theoretically at the first
view. I couldn't prevent myself from fiddling with the micro and after
some experiments I see that it's quite easier to make - with a good code
- than I thought :-). Now I can transmit certain values to the POTX and
POTY registers just by software on the micro, and can _still keep sync
with the RS-232 data timing. Heh, ...big deal.

Since I think the stuff should be compatible with as much computers as
possible, I looked around for data on the original 1351 mouse. And I
found some strange oddities. I have a printed document from my SID-card
for the Plus/4. The SID on the card is clocked at the single clock frq
of the Plus/4 (888.6khz), slightly slower than the C64's approximately
1Mhz. The card has a fully featured joystick port including POT lines
from the SID. I thought somebody had experiences with it and a 1351.
...Bingo. Solder (the designer of the card) had. The SID card document
mentions some words about the proportional mouse.

The problem with such a SID is the different clock. The 1351 works by
tricking the POT inputs and generating appropriately long pulses. The
whole process depends on the clocks of both the sending and the
receiving side. Theoretically, it would work best if both sides were
clocked at the same rate. The 1351 is clocked at a multiple of 1Mhz,
while the C64 is not, but they're just off by a few percents so this
doesn't cause major differences (...just one, that is noticeable: one
can't sync to such clocks, so it has an uncertainity of 0 or 1 - this is
mentioned as 'noise bit' in the 1351 document :-) ). With a very offly
clocked SID, as the SID card's SID is, the difference becomes
significant.

My thoughts would say, that - because of some synchs and others - the
value that appears in the card's SID should be less a lot than the true
values sent by the 1351 and read from a real C64 SID. It's because this
SID counts slower than the original and should start its detecting cycle
later than the 1351 started its sending cycle (that would mean a
0...x1...127 to 0...0...max translation, where max is much less than
127, and x1 corresponds to the value that is _still read by 0 on the
receiving side).

...But it acts different. The doc states that when connecting a
proportional mouse to the card, one can get values ranging from 38 to
148. ...This is really strange as I have no thoughts about this
behaviour.

After having no clue about this I'm just asking if anyone has
experiences with the 1351 and / or has ideas on the 1351 inners and the
reason of this behaviour.

Seems like the behaviour is because of either:

1.: different synchronising mechanism I supposed (I thought it should
work by detecting the first cycle of the SID's capacitor discharging
phase, then waiting for 256 + x cycles where x (in the 1351, coord*2) is
the value to be sent, pulling up the POT line, then restarting the
process). But then I don't know what algorithm the chip inside the 1351
uses.

2.: The caps on the SID card are 3900pF instead of 2200 that is supposed
for a 8580. Could it cause an additional delay so much (say, the 1351
can't immediately pull the line up because of the higher capacitance)?
That would be a very brutal effect anyway: the delay should depend then
on the caps, and thus also the temperature and so on (...ceramic caps of
course). But evil knows.

3... 4... I don't know.

Since I personally have no 1351 I'd also ask if anybody has both a
Vic-20 and a 1351. If so, please try connecting them together and check
the range of the appearing values in the VIC-I POT registers (...this
would be someway the same case: the PAL VIC-20 is clocked at about
1.1Mhz; this is about the same percents off from 1Mhz that the 885Khz
is). It should help clearing up this question.


With thanks, and regards...


L.


-
This message was sent through the cbm-hackers mailing list.
To unsubscribe: echo unsubscribe | mail cbm-hackers-request@dot.tcm.hut.fi.

Archive generated by hypermail 2.1.1.