On Tue, 26 Sep 2000, Gerrit van den Berg wrote:

> Hi,
> 
> I want to include the PS2 mouse with the PC keyboard. I have the SW
> for the mouse in digital data style. What are the pulses in Forward,
> Back, Left & Right pins 1, 2, 3, & 4 of the MSX analogic mouse? With
> this info I can finish the analogic emulation (*) and then the new PC
> Keyboard can include : Mouse Analog/Digital connection, one/two
> joystick ports and PSG with stereo power amplifier with digital volume
> and input for Audio CD... (see LPE-PSGM-V1).

Are you actually talking about analog MSX mice? I don't know about their
existance (and I can't think of how they could be implemented, given the
MSX hardware). So I shall stick to the digital MSX mice.

The mouse is always in one of 4 states, which are degenerate in pairs
(undistinguishable, or at least allmost). The mouse has 4 bytes of
internal memory, 2 of which keep the X and Y movement since the last
readout and 2 which are needed for output buffering.

When the mouse is in state 0, the strobe is 0. This is the state it should
be in when interrupts are enabled, and the mouse is not currently read
out.

Flipping the strobe to 1 sets the mouse in state 1. This causes the 2
bytes of memory to be copied into the output buffers. After a little time,
the low nibble of the X movement can be read out on pins 1-4 (up, down,
left, right).

Flipping the strobe back to 0 sets the mouse in state 2. This state is
degenerate with state 0, because the MSX can only see the state of the
strobe. While being in state 2, the pins 1-4 contain the high nibble of
the X movement.

The same thing can be done twice more. Flipping the strobe sets the mouse
to state 3 and the pins 1-4 to the low Y movement nibble. Flipping it
again returns the mouse in state 0 and leaves the pins 1-4 to the high Y
nibble movement.

A nibble is put on the pins 1-4 with MSb on pin 4 and LSb on pin 1, so it
is in the correct order when read out by the MSX.

I hope this helped you. If I didn't answer the question you meant to be
asking, please rephrase it and I'll try again.

Bye,

 main(){int  c[4]   ,x=4  ,l=getpid()  ,i;;   for(  srand(l);c[  x]=-   rand
()%6         ,x--   ;);;  for(         ;44>   x;){  char         a[9] ,*p=
 "%.1f\n",   b[9];x=i=0;  gets(a);for   (l=4 ;l--   ;)x+=-(a[l]  -=48)==
       (b[l  ]=c[   l]);  ;for           (l=0;16    >i;l         =++i %4)x
+=(b[i/4]+   a[l]   ?0:(  a[l]=b[i/4]     =10))     ;printf(p,x  *.1)   ;};}



****
Problems? contact [EMAIL PROTECTED] See also http://www.faq.msxnet.org/
****

Reply via email to