I must say to our office receives a lot of articles about
the connection to the mouse Spectrum. However, published an
article on our opinion, is the best on this topic.
(C) Vladimir stalls, 1996. St. Petersburg.
ZX-SPECTRUM AND MOUSE
On the topic of connecting your mouse to the Spectrum
have said many times in the pages of the computer press. This
article was advertising character of St. Petersburg's producers
and Sellers mouse interfaces. I will not
to argue with any of them, I just want to
who are able to offer a hand-held
Soldering assemble the device yourself.
To begin to answer the question:
why Kempston Mouse Interface?
After all, some craftsmen manage to solder the mouse to the
nest Kempston joystick other uses AY-mouse. What is the Kempston
Mouse Interface is Better?
First of all, it should be noted that any
attempts to connect the mouse to the nest joystick is a mockery
of the mouse. Mouse distinguishes one remarkable quality
- Apart from the direction of movement, it also reacts to the
speed of this very movement, so the screen cursor moves in
proportion to the movement of your hand ie when you move the
mouse slowly, cursor moves as slowly as you
move the mouse quickly, the cursor moves fast. Due to this work
the mouse much more convenient than the joystick. Joystick is
not able to respond to the speed of movement, it takes into
account only the direction.
Therefore, in the case of connecting your mouse to the nest
joystick, regardless of whether a How fast you move the mouse,
the cursor will move at a constant
speed. And to move the cursor from one screen edge to another,
you may not enough square table. Judging by everything, this
deficiency deprived version of AY-mouse. But by AY-mouse
adapted not enough programs.
So why are we so vigorously agitating you for Kempston Mouse
Interface? Reply banal: it is the standard. This
device invented long ago, it
is the same standard as Kempston
Joystick or Sinclair Joystick and maintain proprietary software
such as for example, Art Studio or Artist II. So why invent a
bicycle and produce a lot of their standards, if the simpler
and more logical to use what is already invented, moreover,
that under this option already exists software support.
The most widespread Kempston
Mouse Interface received in St. Petersburg, this
understandable, since it was made in St. Petersburg
his Russian counterpart. Along with the already mentioned Art
Studio and Artist II firm support Kempston Mouse found in
Victory Road, Battle Command, Carrier Command.
Very quickly adapted to
Kempston Mouse Interface Program
F Commander v4.01, Instrument v2.01, DCU
2.32, etc ...
New programs were written with a view
the fact of the birth of Kempston Mouse
Interface and support for the mouse can also be
found in the FUT v2.01, ZXWORD v2.5m,
ZxZip / ZxUnzip v1.02, Instrument v3.01, FPM
v3.5, and others.
Have adapted Kempston Mouse
Interface and games, such as: Hero Quest,
Dragon Spirit, Space Crusade, A New Whole
Ball Game, The A Team 1, 2, Operation
Wolf, Operation Thunderbolt, World Cup
Challenge, Gunsmoke, R-Type, Gemini Wing,
1943 The Battle Begin, Zombi, Armagedon
Man, etc ...
A new electronic journal ZX-Format with
the very first issue of support
Kempston Mouse Interface. Feel about
wishes of friends, Thank Mednonogov put support for mouse in
its new game UFO II, and tried to play it with the mouse was
very pleased.
What I am talking like understandable. Number of mouse
programs has steadily increased, almost all new Piterskie
author's programs are supported mouse. Proprietary software, in
which management mouse would be a logical, well adapted to the
Kempston Mouse Interface.
What other arguments are needed specifically for this
device? It seems to be enough arguments.
Just try it once to sit in a murine Art Studio, then you are
unlikely to to pull back. You'll rave about, looking at how
long the arrow creeps, controlled joystick or buttons. At the
While the mouse all just flutters. AND
You'll be amazed when he realized how much time you spend on
simple movement of menues.
Thus, virtually all Piterskie
programmers support the standard
Kempston Mouse Interface. Therefore, we urge all users to
solder yourself this device, and all the programmers - to
maintain is it to users to not have to
Too often when a soldering iron to heat something such as
Sinclair Joystick Mouse or say ZX Lprint III Mouse ...
At this introductory part is over, go directly to the scheme.
The author of the scheme is Mikhail Kondratiev,
scheme was developed after studying
Driver Programs Art Studio and Artist.
The original version contained 11 buildings, this was due to
the fact that the author has used most of the available chip
those that were at hand. In the future the number of chips was
reduced to eight. For some time the scheme was
commercial product, it was not right
transferred to Sergei Zonov. In the past year
Sergei Zonov allow its distribution,
after which the scheme Kempston Mouse Interface
was published in an electronic network
FidoNet.
As most of the manipulator
commonly used ordinary gray mouse from a passive search. At the
lowest price it works well enough. Although anyone can use and
trade passive mouse.
In the complete absence in sight
passive mice can be used and active, however, have in them a
little fiddle (see notes to the diagram).
Scheme Kempston Mouse Interface:
DD1 DD5
5 June 2, 1918 D0
oCa CT 0 D1 |> 1
Xb 15 Apr. 11, 1916 D1
/ C 1 D2 2
Xa 10 June 14, 1914 D2
U / D 2 D3 3
9 2 August 1912 D3
R 3 D4 4
1 11 9 D4
S D5 5
4 July 13 D5
D6 0 6
12 May 15 D6
A D7 7
1913 March 17 D7
2 D8 8
3 July 1919
3 Co oE2
1
oE1
DD2
May 6 / XCS
oCa CT 0
November 15
/ C 1
October 1914
U / D 2
February 9
R 3
1
S
4
0
12
1
13
2
July 3
3 Co
DD3 DD6
5 June 2, 1918 D0
oCa CT 0 D1 |> 1
Ya 15 Apr. 11, 1916 D1
/ C 1 D2 2
Yb 10 June 14, 1914 D2
U / D 2 D3 3
9 2 August 1912 D3
R 3 D4 4
1 11 9 D4
S D5 5
4 July 13 D5
D6 0 6
12 May 15 D6
A D7 7
1913 March 17 D7
2 D8 8
3 July 1919
3 Co oE2
1
oE1
DD4
May 6 / YCS
oCa CT 0
November 15
/ C 1
October 1914
U / D 2
February 9
R 3
1
S
4
0
12
1
13
2
July 3
3 Co
DD7.2 DD8
RIGHB May 6 D0 A10 January 1915
D |> 1 DC 0o
A8 4 February 1914
oE 2 1o
A7 March 1913
DD7.3 4 2o
LEFTB September 8 D1 / RD May 1912
D |> o '3o
10 June 1911 A0 / BCS
oE 4o
April 1910
DD7.4 oS 5o
MIDLB December 11 D2 9 / XCS
D |> 6o
July 13 / YCS
oE 7o
/ BCS DD7.1
/ IORQ March 2
D |>
DD1 .. DD4 - K561IE11 A5 1
DD5, DD6 - K555AP5 oE
DD7 - K155LP8
DD8 - K555ID7
Notes:
- Thick line denotes the bus Spectrum;
- On the mouse are the following signals: Xa, Xb,
Ya, Yb, RIGHTB, MIDLB, LEFTB, +5 V, GND;
- / BCS, / XCS, / YCS - internal signals
scheme, combined with the same pairs
GOVERNMENTAL in the scheme;
- Diagram is shown for the mouse passive Tee
na (a mouse for the "Search" MMP-9B), for other
elastic is necessary to derive signals Xa, Xb and
Ya, Yb, which are taken from the optocouplers after
chain transistor Schmitt trigger;
- The computer is required to ensure the block
Kirovka port 0DFh;
- Possible replacement scheme decoding (DD7.1,
DD8) PLA-ku type 556RT4 (RT11), wasps
tavshiysya free output can be used
vatsya to block ports.
If you have any suggestions / complaints,
questions / ideas, then you can contact the author of the
scheme, Mikhail Kondratyev.
Michael Kondratyev: 2:5030 / 362.1 @ FidoNet
_ _ _
So now explain how to work with the Kempston Mouse Interface
programmer. Nothing difficult to understand not expected,
because the interface rather simple and straightforward. There
are three ports, that's their Address: # FADF, # FBDF, # FFDF;
bit each - 8 bits, ie, bytes.
# FADF - Port buttons meaningful it
are the lowest three bits:
0 bits - a state the right button;
1 bit - the state of the left button;
2 bits - the state of the middle button.
When the buttons of rest, all the bits in `1 '. When
Pressing the button corresponding bit is set to `0 '.
According to ancient tradition, the left button is used as a
selection (Fire), right - as Cancel (Cancel). Middle button made
used for additional functions.
# FBDF - port X-coordinate;
# FFDF - Port Y-coordinate.
As you move the mouse-arm
values in the port has changed, and yet
cyclically, ie when reaching # FF and
further increases are again zero and grow further, again to #
FF. When moving in the opposite direction a similar pattern,
but changes occur in the opposite direction.
Submit this matter will help here such
Image:
y ^.
.
2
1
012 ..
> X
Therefore, you must read
port values, and the difference between the current and
previous values determined Mixing Capacity direction of the
mouse.
If you need a very precise manipulation of the driver is
written with this in mind, and moving arrows at one point made
when the value read from the port to 2, 3, 5 or more units.
In recent years become fashionable smarter driver, who at
the beginning waits on the button and you press the button on
the mouse becomes (for drivers) left. These things
applies only to the two extreme buttons
Middle button - it is in Africa average.
This is useful for people who keep
a mouse in his left hand, or in case if someone often comes to
your mouse and keyboard one of the buttons it works worse than
others. Such a driver is considered good form. And if you
notice, just so ZX-supplied driver Format'a.
Check the work had just been harvested
interface can operate directly from with the Basic, making
PRINT IN from port: 64479 - X, 65503 - Y -
moving the mouse cursor should change the value cyclically.
When reading from a port 64423 - Fire have to click three
younger bitika by pressing buttons.
And finally - an example of driver
Kempston Mouse, used in
ZX-Format'e:
; MOUSE DRIVER WITH FIRE BUTTON AUTOCONFIG
And (c) Andrey Rachkin'95
JR MDRV
DIRECTZ DEFB 0; FIRE
DEFB 0; UP
DEFB 0; DOWN
DEFB 0; RIGHT
DEFB 0; LEFT
DEFB 0; CANCEL
MCOORD DEFW 0; LAST CURSOR COORDS
; IN PIXELZ
MPORTS DEFW 0; LAST READED MAUSY COORDS
NONDEF AND 3; HERE COMEZ BUTTONZ
; CONTROL IF FIRE BUTON
; NOT DEFINED
JR Z, MDRV4; IF NONE BUTTON
; PUSHED
CP 1
JR Z, NONDEF_
XOR A
LD (MDRV3 +2), A
LD A, 5
LD (MDRV2 +2), A
NONDEF_ LD HL, 0
LD (MDRV1), HL
POP IX
; ***** MAIN PROC OF MOUSEDRIVER *****
MDRV PUSH IX
LD HL, DIRECTZ
PUSH HL
POP IX
XOR A
LD (HL), A; CLEARING
INC HL; OF
LD (HL), A; DIRECTZ
INC HL; BUFER
LD (HL), A
INC HL
LD (HL), A
INC HL
LD (HL), A
INC HL
LD (HL), A
INC HL
LD BC, # FADF; BUTTONZ CONTROL
IN A, (C); READING FROM PORT
; OF BUTTONS
CPL
MDRV1 JR NONDEF; JR UNTIL FIRE
; BUTTON NOT DEFINED
RRA
MDRV2 RL (IX +0); FIRE
RRA
MDRV3 RL (IX +5); CANCEL
; ***** COORDS CONTROL *****
MDRV4 LD HL, (MCOORD); FORM LAST
; CURSOR COORDS
LD DE, (MPORTS); FROM LAST
; READED MOUSE
; COORDS
LD BC, # FBDF
IN A, (C); READING FROM
; PORT X-COORD (0 - # FF)
LD (MPORTS), A
SUB E
JR Z, MDRV9
JP P, MDRV6
LD (IX +4), 1; MOVE LEFT
ADD A, L
JR C, MDRV5
XOR A; MIN X-COORD
MDRV5 LD L, A
JR MDRV9
MDRV6 ADD A, L
LD (IX +3), 1; MOVE RIGHT
JR C, MDRV7
CP # FE; MAX X-COORD
JR C, MDRV8
MDRV7 LD A, # FE; MAX X-COORD
MDRV8 LD L, A
MDRV9 LD B, # FF
IN A, (C); READING FROM
; PORT Y-COORD (0 - # FF)
LD (MPORTS +1), A
SUB D
JR Z, MDRV14
NEG
JP P, MDRV11
LD (IX +1), 1; MOVE UP
ADD A, H
JR C, MDRV10
XOR A; MIN Y-COORD
MDRV10 LD H, A
JR MDRV14
MDRV11 ADD A, H
LD (IX +2), 1; MOVE DOWN
JR C, MDRV12
CP # BF; MAX Y-COORD
JR C, MDRV13
MDRV12 LD A, # BF; MAX Y-COORD
MDRV13 LD H, A
MDRV14 LD (MCOORD), HL; NEW CURSOR
; POSITION
; IN PIXELZ
POP IX
RET
; ***** DRIVER END *****