I'm studying the Atari Mouse for my digital electronics class. I see almost no
relation between which direction you move the mouse and what values it sends to
computer. I know, it's not what the class is about, but I'm still curious.
I also seem to have discovered that the right button isn't even connected. I
didn't realize the Atari world was right-mouse-button-less.
--
Michael Current, Cleveland Free-Net 8-bit Atari SIGOp -->> go atari8 <<--
The Cleveland Free-Net Atari SIG is the Central Atari Information Network
Internet: curr...@carleton.edu / UUCP: ...!umn-cs!ccnfld!currentm
BITNET: currentm%carleton.edu@{interbit} / Cleveland Free-Net: aa700
>Does anyone know how you go about programming for the mouse on the 8-bit?
The Diamond GOS ("Graphic Operating System") used an ST mouse on the 8-bits
and it worked quite well. I presume, of course, they there was some sort
of software m.l interrupt being used to translate the incoming bitstream
from the mouse, but it did work. They had a stand-alone program called
Atari Cookbook which used drop down menus that looked for all the world
like an ST in low-res mode!
>I also seem to have discovered that the right button isn't even connected. I
>didn't realize the Atari world was right-mouse-button-less.
The right mouse button is indeed used on the ST. Very little support exists
for it at the desktop but MANY programs make use of it.
-MOlin "Friends don't let friends use MS-DOS"
>CURR...@CARLETON.EDU (Michael Current) writes:
>
>>Does anyone know how you go about programming for the mouse on the 8-bit?
>
>The Diamond GOS ("Graphic Operating System") used an ST mouse on the 8-bits
>and it worked quite well. I presume, of course, they there was some sort
>of software m.l interrupt being used to translate the incoming bitstream
>from the mouse, but it did work. They had a stand-alone program called
>Atari Cookbook which used drop down menus that looked for all the world
>like an ST in low-res mode!
>
I have Diamond. How would you use the incoming data in, say, BASIC? I
didn't understand the correlation between what values are sent to STICK(0)
and what direction the mouse is moved in.
>>I also seem to have discovered that the right button isn't even connected. I
>>didn't realize the Atari world was right-mouse-button-less.
>
>The right mouse button is indeed used on the ST. Very little support exists
>for it at the desktop but MANY programs make use of it.
>
I find that weird, since I didn't find any outgoing wires from the mouse
that were affected by the right button. Wire #1 (black) looks like it's
supposed to, but it didn'ty seem to work.
>
> -MOlin "Friends don't let friends use MS-DOS"
>
Michael,
Way back when in days of yore, there existed a company called Zobian
controls who were marketing an Atari 8 bit mouse called the RAT.
The original model was black with a Red button and looked a little like
a MAC mouse. I ordered the bugger. Later ads in the magazine
promised a desktop would be soon released. Months passed, and no
RAT appeared by either mail or UPS. I wrote another letter, and
tried to call them. The calls didn't go through. Finally I wrote
them a letter threatening to sick the better business bureau after
them if they didn't either refund my money or send me a mouse.
They sent me one, a nice Grey two button mouse, that looks a lot like
the BEST mouse that Best Electronics markets today.
It shipped with a little page 6 ml code that is callable from basic
that will read the x and y positions and store them somewhere.
It also included a graphics 8 paint program,but it kinda sucks.
The neat thing is, I plugged the mouse into a friend's ST, and it worked
just fine. You are correct, the right button doesn't work on an 8 bit.
I think if the Analog inputs of the joystick port aren't used, the
right button could be modified so that there is a series resistor
connected to the button, connected to +5v and the Analog input. SO that
the right button would be read as a Paddle input.
Later this week I will see if I can't find a disassembler and
disassemble the mouse handler and post it here. If you don't see it,
remind me!
Jeff McWilliams
jjmc...@mtus5.cts.mtu.edu
I hope you are talking about the mouse used for the Atari-ST line.
I know how to use it for the 8-bit Atari, or at least knew it
some months ago. I've even programmed a small routine in assembler
for it. To give you an accurate description I'll have to go home and
find the description somewhere...
Now I can give you only a preliminary description (hope my memory
serves me well) :-)
I think you are right according to the right-mouse-button, as I can
recall there really isn't a connection between Atari and this button.
according to the direction controll: it's a kind of tricky.
The lines 1 and 2 of the joystick port control the movement of the
horizontal direction. The lines 3 & 4 the veritcal directions.
(sorry if it's vice versa)
But the important thing is that when the line 1 is changed this doesn't
mean the mouse is directed to a particular direction. You have always
to consider the lines 1&2 together. Another point you have to consider
is the sequence they change. As you see the process isn't static like
programming with joystics but highly dynamic. Let me give an example,
maybe this makes it clearer:
Say me move the mouse to the left. Then the signal of the lines
will look like this (again, I could be wrong):
-------- --------
| |________| | line 1
-------- ---------
| |________| | line 2
Do you have an idea what I mean?
Line 2 becomes 'low' a little later than line 1. If you drag the mouse
to the right, then the sequence of changes will be of a kind that
always line 1 will become 'low' (0) a little bit later then line 2.
To obtain the directions up & down you have to consider lines 3 & 4
in the same way. But, this change happens extremely fast. To determine
which line goes earlier to low you have to use machine language
(assembler), BASIC is too slow. Writing a mouse-routine you'll
probably have to consider another point: you'll have to synchrinize
with the mouse first. That means first wait until both lines (1&2)
are high (1) and than determine which line goes to low (0) first.
Then you'll know to what direction the mouse has been pulled.
Please note, to write this description I have been using only
my lousy memory not a single written note. Therefore it will be
highly possible that the descriptions of directions the mouse is pulled
to in the above text are not accurate.
I hope you got a vague idea on how it works.
If there is some interset I'll look it up and post a complete
describtion in a week or two (or three :-))
Marek Tomczyk
\ ATARI 8-BIT
----------------------------------------| \ the
Internet: uj...@ibm3090.rz.uni-karlsruhe.de| \ best
BITNET: uj1g@dkauni2 | / equipment
FREENET: bn137 | /
----------------------------------------| / for the 21st century
/
Well, I don't know how this relates to the use of a mouse on the 8-bit, but on
the ST there is "sort of" a right mouse button. The mouse port is cross-
connected to the joystick port, so that pressing the right mouse button
actually activates the joystick button, and vice-versa. I don't think the 8-bit
has this same cross-conenction, so the right button wouldn't work.
--
"Dammit Jim, I'm a free man, not a number!"
----------------------------------------------------------------------
"This is what the K.L.F. is about. Also known as the Justified Ancients
of Mu-Mu. Furthermore known as The Jams!" -- The K.L.F.
I can see that BASIC programming for the mouse is out of the question,
though I would be curious to see the assembler code Marek mentioned.
Next week, I get to try and recreate the circuit diagram of the mouse.
This brings up a good question. Remember "Indy 500" for the 2600. How
did THEY work!? (I MIGHT actually have this info.SOMEWHERE in my
collection of old _Atari_Age_ magazines). Bill
____________9_year_veteran_ ||| __Happy
PhBill: Bill Kendrick / | \ Happy
moon!cyberden!phb...@well.sf.ca.us Joy
__________________________________ Joy!
> CURR...@CARLETON.EDU (Michael Current) writes:
>
> >Does anyone know how you go about programming for the mouse on the 8-bit?
>
> The Diamond GOS ("Graphic Operating System") used an ST mouse on the 8-bits
> and it worked quite well. I presume, of course, they there was some sort
> of software m.l interrupt being used to translate the incoming bitstream
> from the mouse, but it did work. They had a stand-alone program called
> Atari Cookbook which used drop down menus that looked for all the world
> like an ST in low-res mode!
Are you sure? Did the same people who made Diamond GOS have a little
teenee bit to do with GOE? In one of the .TXT's from the GOEDEMO.ARC one
of the major programmers of GOE was stating that the company that
releases his (HIS) Atari Cookbook was GOING to work with him on GOE but
then broke a contract or something...that really pissed him off. I was
just wondering if this IS the same company that made Diamond GOS. Did
you mean GOE when you said that? This is pretty interesting. To bring
up a question I posted earlier (and NEVER GOT A RESPONSE TO! :^[ ..) - is
the FINAL (cartridge version) of GOE out?? How is it? The demo.SUCKS -
but this is only because it does absolutely NOTHING. I think the final
product might be pretty cool. Well? Anyone? Anyone?
> just fine. You are correct, the right button doesn't work on an 8 bit.
> I think if the Analog inputs of the joystick port aren't used, the
> right button could be modified so that there is a series resistor
> connected to the button, connected to +5v and the Analog input. SO that
> the right button would be read as a Paddle input.
This brings into mind that neat idea that Sega came up with... the "C"
button registers as one of the paddle ports. I'm not sure where the "A"
and "Start" ones go, but when I get (IF I get) a Genesis controller, I'll
disect if for ya'll. :) Bill
Here is the mouse handler supplied by zobian controls. I disassembled
it for you. I can't send binaries from the system I am connected to
else I would have sent the object code as well.
If you still need it, let me know and maybe I can mail it or something.
It is only 255 bytes, maybe I could turn it into a basic program
or data numbers that creates the obj file.
At the end of the source listing is a sample basic program showing how
to read the mouse x and y values. I pulled this from their basic
program that is their painting program.
If you have a chance, please post this to comp.sys.atari.8bit
for others that are interested, I am having problems with it right
now.
Jeff McWilliams
****************************************************
;System equates used
POKMSK = $10
VTIMR2 = $0212
AUDF2 = $D202
AUDC2 = $D203
AUDCTL = $D208
STIMER = $D209
IRQEN = $D20E
;End of system equates
;Zero-page equates
;End of zero-page equates
*= $0600
L0009 BRK
L0010 BRK
L0017 BRK
L0004 BRK
L0013 BRK
L0002 BRK
PLA
LDY #$05
LDA #$00
L0001 STA L0009,Y ;$0600
DEY
BPL L0001 ;$060B
STA AUDCTL ;$D208
LDA #$A0
STA AUDC2 ;$D203
LDA #$1E
STA AUDF2 ;$D202
LDA #$44
STA VTIMR2 ;$0212
LDA #$06
STA VTIMR2+1 ;$0213
SEI
LDA POKMSK ;$0010
ORA #$02
STA POKMSK ;$0010
STA IRQEN ;$D20E
STA STIMER ;$D209
CLI
RTS
PLA
SEI
LDA POKMSK ;$0010
AND #$FD
STA POKMSK ;$0010
STA IRQEN ;$D20E
CLI
RTS
INC L0002 ;$0605
BNE L0003 ;$064E
LDA #$FF
STA AUDF2 ;$D202
L0003 LDA L0004 ;$0603
BNE L0005 ;$0694
LDA L0006 ;$D300
AND #$03
BEQ L0007 ;$06A8
STA L0004 ;$0603
CMP #$01
BNE L0008 ;$0678
LDA L0009 ;$0600
ORA L0010 ;$0601
BEQ L0011 ;$069E
DEC L0009 ;$0600
LDA L0009 ;$0600
CMP #$FF
BNE L0011 ;$069E
DEC L0010 ;$0601
BEQ L0011 ;$069E
L0008 CMP #$02
BNE L0011 ;$069E
LDA L0010 ;$0601
BEQ L0012 ;$068A
LDA L0009 ;$0600
CMP #$3F
BCC L0012 ;$068A
BCS L0011 ;$069E
L0012 INC L0009 ;$0600
BNE L0011 ;$069E
INC L0010 ;$0601
BNE L0011 ;$069E
L0005 LDA L0006 ;$D300
AND #$03
BNE L0007 ;$06A8
STA L0004 ;$0603
L0011 LDA #$00
STA L0002 ;$0605
LDA #$1E
STA AUDF2 ;$D202
L0007 LDA L0013 ;$0604
BNE L0014 ;$06D8
LDA L0006 ;$D300
AND #$0C
BEQ L0015 ;$06EC
STA L0013 ;$0604
CMP #$04
BNE L0016 ;$06C6
LDA L0017 ;$0602
BEQ L0018 ;$06E2
DEC L0017 ;$0602
JMP L0018 ;$06E2
L0016 CMP #$08
BNE L0018 ;$06E2
LDA L0017 ;$0602
CMP #$BF
BCC L0019 ;$06D3
BCS L0018 ;$06E2
L0019 INC L0017 ;$0602
BNE L0018 ;$06E2
L0014 LDA L0006 ;$D300
AND #$0C
BNE L0015 ;$06EC
STA L0013 ;$0604
L0018 LDA #$00
STA L0002 ;$0605
LDA #$1E
STA AUDF2 ;$D202
L0015 PLA
RTI
;External reference equates
L0006 = $D300
;End of external references
.END
=================================================================
BASIC LISTING TO USE THE HANDLER.
90 Let On=1542:Off=1591:Cx=1536:Cy=1538
95 A=Usr(On): REM ACTIVATE THE MOUSE READING ROUTINES.
511 X=Peek(Cx)+Peek(Cx+1)*256:Y=Peek(Cy) : READING THE MOUSE
520 REM THE LEFT BUTTON IS READ AS JOYSTICK TRIGGER ZERO
530 REM THE RIGHT BUTTON IS CURRENTLY NOT CONNECTED OR READABLE BY
540 REM AN ATARI 8 BIT.
550 X=USR(OFF) : REM TURN OFF THE MOUSE READING ROUTINES.
Jared
reply to i92...@sheoak.bcae.oz.au
********************************************************************************Could some kind soul please bounce this on to the rest of the world and
delete this part?
There must be some Australian 8-bit owners?
********************************************************************************
The people who wrote the Cookbook were looking to distribute either
the GOE package, or the Diamond. These two packages were written
by two different authors. After they broke off their deal with the GOE
author they made a deal with Allan Reeve for Diamond, but I understand
that didn't last long either. GOE NEVER was released, Diamond was.
I think I answered that question before, maybe you missed it.
> I think I answered that question before, maybe you missed it.
>
Probably! This system's been going nuts lately!!!
____________9_year_veteran_ ||| __
PhBill: Bill Kendrick / | \
moon!cyberden!phb...@well.sf.ca.us
__________________________________