9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] random moving of cursor arrow
  2003-07-25  8:52 [9fans] random moving of cursor arrow sasa
@ 2003-07-25  8:43 ` Lucio De Re
  2003-07-26 15:59   ` David Presotto
  2003-07-25  9:02 ` boyd, rounin
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 36+ messages in thread
From: Lucio De Re @ 2003-07-25  8:43 UTC (permalink / raw)
  To: 9fans

On Fri, Jul 25, 2003 at 10:52:31AM +0200, sasa wrote:
>
>
> when i copy large amount of data from cd-rom to hard-disk (300 mb)
> and try to move the cursor arrow, then the cursor is randomly
> moving around the screen.

The new serial port device driver seems a bit jangly (Dave, is this
your doing?).

> so, i'm not able to work with mouse while copying from cd to harddrive.
> procesor is amd k6 300 mhz, graphic card is s3virge, 96 mb of ram.
>
	echo i1 > /dev/eia0ctl

usually solves that for me, but naturally it relies on the serial chip
being advanced enough to include the FIFO buffer.  I have wondered
what it is that changed and make the serial driver less responsive,
but I am not (yet) going to delve in there.

++L


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [9fans] random moving of cursor arrow
@ 2003-07-25  8:52 sasa
  2003-07-25  8:43 ` Lucio De Re
                   ` (3 more replies)
  0 siblings, 4 replies; 36+ messages in thread
From: sasa @ 2003-07-25  8:52 UTC (permalink / raw)
  To: 9fans


hi!
i've got a odd problem:
when i copy large amount of data from cd-rom to hard-disk (300 mb)
and try to move the cursor arrow, then the cursor is randomly
moving around the screen.
so, i'm not able to work with mouse while copying from cd to harddrive.
procesor is amd k6 300 mhz, graphic card is s3virge, 96 mb of ram.

thanx for hints.

sasa babic (babic@icpf.cas.cz)




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [9fans] random moving of cursor arrow
  2003-07-25  9:02 ` boyd, rounin
@ 2003-07-25  9:01   ` Lucio De Re
  0 siblings, 0 replies; 36+ messages in thread
From: Lucio De Re @ 2003-07-25  9:01 UTC (permalink / raw)
  To: 9fans

On Fri, Jul 25, 2003 at 11:02:33AM +0200, boyd, rounin wrote:
>
> sounds like mouse 'events' are being dropped 'cos something is
> a bit too busy to handle all the i/o activity.

Hm, yes, I was a bit hasty at blaming the serial device driver.
The cure is right, but something else may be responsible.  I do
note, though, that in my case buttons got pressed as well as mere
random movement being triggered.  This would point to corrupted
input data from the serial port, largely.

Whether PS/2 mice are affected would also help in diagnosing the
problem.  I know I had great difficulty during a recent installation
because I wanted to open an additional window and the mouse was
utterly unusable.  I did catch it a few times, fortunately.

++L


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [9fans] random moving of cursor arrow
  2003-07-25  8:52 [9fans] random moving of cursor arrow sasa
  2003-07-25  8:43 ` Lucio De Re
@ 2003-07-25  9:02 ` boyd, rounin
  2003-07-25  9:01   ` Lucio De Re
  2003-07-25  9:08 ` Fco.J.Ballesteros
  2003-07-25  9:17 ` [9fans] Re: random moving of cursor arrow sasa
  3 siblings, 1 reply; 36+ messages in thread
From: boyd, rounin @ 2003-07-25  9:02 UTC (permalink / raw)
  To: 9fans

> when i copy large amount of data from cd-rom to hard-disk (300 mb)
> and try to move the cursor arrow, then the cursor is randomly
> moving around the screen.

sounds like mouse 'events' are being dropped 'cos something is
a bit too busy to handle all the i/o activity.



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [9fans] random moving of cursor arrow
  2003-07-25  8:52 [9fans] random moving of cursor arrow sasa
  2003-07-25  8:43 ` Lucio De Re
  2003-07-25  9:02 ` boyd, rounin
@ 2003-07-25  9:08 ` Fco.J.Ballesteros
  2003-07-25 14:08   ` Scott Schwartz
  2003-07-25  9:17 ` [9fans] Re: random moving of cursor arrow sasa
  3 siblings, 1 reply; 36+ messages in thread
From: Fco.J.Ballesteros @ 2003-07-25  9:08 UTC (permalink / raw)
  To: 9fans

is it just the cursor, or the rest of system too?


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [9fans] Re: random moving of cursor arrow
  2003-07-25  8:52 [9fans] random moving of cursor arrow sasa
                   ` (2 preceding siblings ...)
  2003-07-25  9:08 ` Fco.J.Ballesteros
@ 2003-07-25  9:17 ` sasa
  2003-07-25  9:24   ` sasa
  3 siblings, 1 reply; 36+ messages in thread
From: sasa @ 2003-07-25  9:17 UTC (permalink / raw)
  To: 9fans


thank you all very much for help.
i'll try 'echo i1 > /dev/eia0ctl'.

alexandr "sasa" babic.


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [9fans] Re: random moving of cursor arrow
  2003-07-25  9:17 ` [9fans] Re: random moving of cursor arrow sasa
@ 2003-07-25  9:24   ` sasa
  2003-07-25  9:25     ` sasa
  0 siblings, 1 reply; 36+ messages in thread
From: sasa @ 2003-07-25  9:24 UTC (permalink / raw)
  To: 9fans


second description:
when i touch the mouse, the cursor starts to randomly
fly around the screen and without touching buttons
sometimes the new window appears.

sasa.




^ permalink raw reply	[flat|nested] 36+ messages in thread

* [9fans] Re: random moving of cursor arrow
  2003-07-25  9:24   ` sasa
@ 2003-07-25  9:25     ` sasa
  2003-07-25  9:27       ` boyd, rounin
  2003-07-25 10:27       ` sasa
  0 siblings, 2 replies; 36+ messages in thread
From: sasa @ 2003-07-25  9:25 UTC (permalink / raw)
  To: 9fans


sorry not for telling the mouse type.
it's serial mouse in port 0.

sasa.




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [9fans] Re: random moving of cursor arrow
  2003-07-25  9:25     ` sasa
@ 2003-07-25  9:27       ` boyd, rounin
  2003-07-26  2:22         ` David Presotto
  2003-07-25 10:27       ` sasa
  1 sibling, 1 reply; 36+ messages in thread
From: boyd, rounin @ 2003-07-25  9:27 UTC (permalink / raw)
  To: 9fans

> sorry not for telling the mouse type.
> it's serial mouse in port 0.

that woulda helped a lot.  i'd say the serial port is dropping chars,
which could be a hardware or a driver problem.

the only thing i know about serial ports is that i don't want to know
anything about them -- ghastly, just ghastly ...



^ permalink raw reply	[flat|nested] 36+ messages in thread

* [9fans] Re: random moving of cursor arrow
  2003-07-25  9:25     ` sasa
  2003-07-25  9:27       ` boyd, rounin
@ 2003-07-25 10:27       ` sasa
  1 sibling, 0 replies; 36+ messages in thread
From: sasa @ 2003-07-25 10:27 UTC (permalink / raw)
  To: 9fans

to boyd:
>the only thing i know about serial ports is that i don't to know
>anything about them -- ghastly, just ghastly ...

hahahaha, you made me laugh. you're right about serial ports,
but i have old hardware.

sasa babic.




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [9fans] random moving of cursor arrow
  2003-07-25  9:08 ` Fco.J.Ballesteros
@ 2003-07-25 14:08   ` Scott Schwartz
  2003-07-25 14:35     ` UART device driver (Was: [9fans] random moving of cursor arrow) Lucio De Re
  0 siblings, 1 reply; 36+ messages in thread
From: Scott Schwartz @ 2003-07-25 14:08 UTC (permalink / raw)
  To: 9fans

| is it just the cursor, or the rest of system too?

When doing a pull over ppp, eia1status reports lots of overruns.  Watching
the modem lights it looks like CS is always lit (not so under linux.)
So I think something is not quite right in the uart driver.



^ permalink raw reply	[flat|nested] 36+ messages in thread

* UART device driver (Was: [9fans] random moving of cursor arrow)
  2003-07-25 14:08   ` Scott Schwartz
@ 2003-07-25 14:35     ` Lucio De Re
  2003-07-25 14:56       ` boyd, rounin
  2003-07-26  5:50       ` jmk
  0 siblings, 2 replies; 36+ messages in thread
From: Lucio De Re @ 2003-07-25 14:35 UTC (permalink / raw)
  To: 9fans

On Fri, Jul 25, 2003 at 10:08:08AM -0400, Scott Schwartz wrote:
>
> When doing a pull over ppp, eia1status reports lots of overruns.  Watching
> the modem lights it looks like CS is always lit (not so under linux.)
> So I think something is not quite right in the uart driver.

There's been a rewrite since 3rd Ed (you may recall lack of serial
mouse support when 4th Ed was first released), and I had already
noted bad mouse response on an AMD 586 wanna-be, but recently a
faster CPU started showing signs of stress.  At a glance, the
interupt handler does not seem bloated, but I haven't had a chance
to compare different versions.

I understand this is Presotto territory so we may have to wait for
his return.  I'll have alook around in the meantime, the 8250 is
one chip I understood pretty well in my day.  The FIFO adds a little
complexity I have not yet explored, but I don't think it's excessive.

I have a vested interest, anyway: I have a six-port BOCA card with
the most creative way of mapping its six ports to the I/O and
interrupt space and I'd like some suggestions on representing this
in plan9.ini.

For each port, I can specify one of two addresses, where the first
four may map to the conventional 3F8, 2F8, 3E8 and 2E8 of COM1, 2,
3 and 4 of yore.  3E0 and 2E0 are the options for the last two.
The alternatives are 220, 228, 240, 248, 260, 268 (all hex, of
course).

I think I can disable a port by leaving out the corresponding
jumper, too.

Then for each port I have a choice of IRQ 4, 3, 10, 11, 12 and 15,
respectively, or I can choose SHARED for any or all of them.
Shared, in turn, can be IRQ 4 or 5.

I'm looking for a way to indicate each of these options in plan9.ini,
keeping in mind that I may want to use the default eia0 and eia1
(I don't know how far these stretch, given that on the original PC
COM3 and COM4 uncomfortably shared IRQ$ and IRQ3 with COM1 and
COM2, respectively).

I thought of a six-character string like 112200 with 1 for IOP
option 1, 2 for option 2 and 0 for disabled, but it's ugly and
still does not help with shared IRQs.

I won't mind using six description lines, but I don't know the
plan9.ini syntax scanner well enough to implement such a thing
without some advice.

++L

PS: One last question, how would I handle a USB modem?  Will I have
to provide my own support?


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: UART device driver (Was: [9fans] random moving of cursor arrow)
  2003-07-25 14:35     ` UART device driver (Was: [9fans] random moving of cursor arrow) Lucio De Re
@ 2003-07-25 14:56       ` boyd, rounin
  2003-07-26  5:50       ` jmk
  1 sibling, 0 replies; 36+ messages in thread
From: boyd, rounin @ 2003-07-25 14:56 UTC (permalink / raw)
  To: 9fans

> The FIFO adds a little
> complexity I have not yet explored, but I don't think it's excessive.

err, i hope it uses the fifo, and correctly,, otherwise you'll get 'orrible
trouble.

but, i'm not going anywhere near anything resembling an rs-232 port ...



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [9fans] Re: random moving of cursor arrow
  2003-07-25  9:27       ` boyd, rounin
@ 2003-07-26  2:22         ` David Presotto
  2003-07-26  8:37           ` C H Forsyth
                             ` (3 more replies)
  0 siblings, 4 replies; 36+ messages in thread
From: David Presotto @ 2003-07-26  2:22 UTC (permalink / raw)
  To: 9fans

I'll bang at serial ports tomorrow and see if I can figure out what's happening.
With modern machines, I shouldn't get overruns even without the fifo.  I used
to avoid the fifo for mice because it made the mouse jerky.

Everything related has changed of course; uart driver, clock routine, and
scheduler.  Any could be at fault.  I'll plug some machines back to back and
see if I can cause overruns.  A mouse really shouldn't be able to though,
it's only 9600 baud or less.  If we're missing, something is really
screwed up.  We only use ps2 mice these days but I can scrounge up some
serial ones.

It is true that if the mouse is misidentified, it will cause exactly the
behavior babic is seeing, i.e., if it guesses the wrong protocol.


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: UART device driver (Was: [9fans] random moving of cursor arrow)
  2003-07-25 14:35     ` UART device driver (Was: [9fans] random moving of cursor arrow) Lucio De Re
  2003-07-25 14:56       ` boyd, rounin
@ 2003-07-26  5:50       ` jmk
  2003-07-28  5:36         ` Lucio De Re
  1 sibling, 1 reply; 36+ messages in thread
From: jmk @ 2003-07-26  5:50 UTC (permalink / raw)
  To: 9fans


On Fri Jul 25 10:48:34 EDT 2003, lucio@proxima.alt.za wrote:
> ...
> I have a vested interest, anyway: I have a six-port BOCA card with
> the most creative way of mapping its six ports to the I/O and
> interrupt space and I'd like some suggestions on representing this
> in plan9.ini.
> ...

If it's an ISA card then shared interrupts will not work.

Use a line in plan9.ini for each port. Write a new driver (say
uartisa.c) with a pnp function which calls allocates the necessary
data structures and calls uarti8250alloc for each plan9.ini line,
say
	uart0=type=i8250 port=XXX irq=Y

See /sys/src/9/pc/uartpci.c for many clues.


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [9fans] Re: random moving of cursor arrow
  2003-07-26  2:22         ` David Presotto
@ 2003-07-26  8:37           ` C H Forsyth
  2003-07-26  8:51             ` boyd, rounin
  2003-07-26 15:37             ` David Presotto
  2003-07-26  9:59           ` Enache Adrian
                             ` (2 subsequent siblings)
  3 siblings, 2 replies; 36+ messages in thread
From: C H Forsyth @ 2003-07-26  8:37 UTC (permalink / raw)
  To: 9fans

>>I used to avoid the fifo for mice because it made the mouse jerky.

i never really understood that: i switched on the uart fifo at the start on a system
i did and it handled a mouse without fuss.


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [9fans] Re: random moving of cursor arrow
  2003-07-26  8:37           ` C H Forsyth
@ 2003-07-26  8:51             ` boyd, rounin
  2003-07-28  8:47               ` Douglas A. Gwyn
  2003-07-26 15:37             ` David Presotto
  1 sibling, 1 reply; 36+ messages in thread
From: boyd, rounin @ 2003-07-26  8:51 UTC (permalink / raw)
  To: 9fans

> >>I used to avoid the fifo for mice because it made the mouse jerky.
>
> i never really understood that: i switched on the uart fifo at the start on a
system
> i did and it handled a mouse without fuss.

no, it makes perfect sense [some random floyd/waters quote] 'cos if you don't
fill/empty it right all sorts of 'orrible stuff can happen.

iirc, from the dz-kmc days you needed to manage the 'fifo' so it wouldn't
overrun, but at the same time you needed a timer to empty it [stick on the rawq]
so stuff just didn't get 'stuck'.

how much time have i wasted with rs-232 junk?  too much.



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [9fans] Re: random moving of cursor arrow
  2003-07-26  2:22         ` David Presotto
  2003-07-26  8:37           ` C H Forsyth
@ 2003-07-26  9:59           ` Enache Adrian
  2003-08-07 13:52             ` David Presotto
  2003-07-26 19:01           ` Richard Miller
  2003-07-28  5:26           ` Lucio De Re
  3 siblings, 1 reply; 36+ messages in thread
From: Enache Adrian @ 2003-07-26  9:59 UTC (permalink / raw)
  To: 9fans

A question about mouse support:

Have the new changes to the serial ports & mice code added support for scroll
serial mice (aka microsoft intellimice with 5 buttons) and for shift-button3
button2 emulation ?

I'm using a rather old 4th edition plan9 (Tue Sep  3 00:36:58 2002),
and there I hacked some code in the kernel so it works fine for me now
(but no code for pnp identification in aux/mouse.c - that would be simple,
though).

It looks like this:
src/9/port/devmouse.c:
/*
 * microsoft intellimouse 3 buttons + scroll
 * 	byte 0 -	1  L  R Y7 Y6 X7 X6
 *	byte 1 -	0 X5 X4 X3 X2 X1 X0
 *	byte 2 -	0 Y5 Y4 Y3 Y2 Y1 Y0
 *	byte 3 -	0  0  M  %  %  %  %
 *
 *	%: 0xf => U , 0x1 => D
 *
 *	L: left
 *	R: right
 *	U: up
 *	D: down
 */

int
m5mouseputc(Queue*, int c)
{
	static uchar msg[3];
	static int nb;
	msg[nb++] = c & 0x7f;
	if (nb == 4) {
		schar dx,dy,newbuttons;
		dx = msg[1] | (msg[0] & 0x3) << 6;
		dy = msg[2] | (msg[0] & 0xc) << 4;
		newbuttons =
			(msg[0] & 0x10) >> (shiftpressed ? 3:2)
			| (msg[0] & 0x20) >> 5
			| ( msg[3] == 0x10 ? 0x02 :
			    msg[3] == 0x0f ? 0x08 :
			    msg[3] == 0x01 ? 0x10 : 0 );
		mousetrack(dx, dy, newbuttons, TK2MS(MACHP(0)->ticks));
		nb = 0;
	}
	return 0;
}

(I also changed 'shift' in i8042intr() to 'shiftpressed' and made it global,
 and removed 'mouseshifted' which was never set).

Thanks & Regards,
Adi


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [9fans] Re: random moving of cursor arrow
  2003-07-26  8:37           ` C H Forsyth
  2003-07-26  8:51             ` boyd, rounin
@ 2003-07-26 15:37             ` David Presotto
  1 sibling, 0 replies; 36+ messages in thread
From: David Presotto @ 2003-07-26 15:37 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 1124 bytes --]

We had a long history of 16[54]xx chips with buggy fifos
and/or unchangeable length fifos.  At 1200 baud, these
guys used to delay mouse actions 1/7 of a second during
a sweep and as much as 1/4 second at the end of the sweep.
The sweep delay was barely perceptible but the mouse movement
just as you were taking your hand off the mouse bothered
people.  We had similar problems with uarts on MIPS/SGI
machines.  All those machines should have died years ago,
but since I don't normally use a serial port mouse (all ours are
PS/2) I just haven't bothered.  I'll make fifo on the default
for serial mice.

However, that really doesn't explain what's going on.  Unless the
people seeing these problems are on sub 100 megahz machines, we're
really screwing up if we can't keep up with 120 or 240 interrupts
per second.  Something must have broken when we changed to a common
model for all the uarts (or changed the scheduler).  I'll go into
work today and bang at some machines and see if I can recreate/fix
the problem.  I'm back for a way or two to rest up and serial
ports are about as restful as it gets.

[-- Attachment #2: Type: message/rfc822, Size: 1921 bytes --]

From: C H Forsyth <forsyth@vitanuova.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Re: random moving of cursor arrow
Date: Sat, 26 Jul 2003 09:37:12 +0100
Message-ID: <29ce300d69819f673d96bbd7d9ae9302@vitanuova.com>

>>I used to avoid the fifo for mice because it made the mouse jerky.

i never really understood that: i switched on the uart fifo at the start on a system
i did and it handled a mouse without fuss.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [9fans] random moving of cursor arrow
  2003-07-25  8:43 ` Lucio De Re
@ 2003-07-26 15:59   ` David Presotto
  2003-07-26 16:40     ` Dan Cross
                       ` (2 more replies)
  0 siblings, 3 replies; 36+ messages in thread
From: David Presotto @ 2003-07-26 15:59 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 31 bytes --]

What does the word jangly mean?

[-- Attachment #2: Type: message/rfc822, Size: 3158 bytes --]

From: Lucio De Re <lucio@proxima.alt.za>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] random moving of cursor arrow
Date: Fri, 25 Jul 2003 10:43:03 +0200
Message-ID: <20030725104302.O28024@cackle.proxima.alt.za>

On Fri, Jul 25, 2003 at 10:52:31AM +0200, sasa wrote:
>
>
> when i copy large amount of data from cd-rom to hard-disk (300 mb)
> and try to move the cursor arrow, then the cursor is randomly
> moving around the screen.

The new serial port device driver seems a bit jangly (Dave, is this
your doing?).

> so, i'm not able to work with mouse while copying from cd to harddrive.
> procesor is amd k6 300 mhz, graphic card is s3virge, 96 mb of ram.
>
	echo i1 > /dev/eia0ctl

usually solves that for me, but naturally it relies on the serial chip
being advanced enough to include the FIFO buffer.  I have wondered
what it is that changed and make the serial driver less responsive,
but I am not (yet) going to delve in there.

++L

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [9fans] random moving of cursor arrow
  2003-07-26 15:59   ` David Presotto
@ 2003-07-26 16:40     ` Dan Cross
  2003-07-26 16:44       ` David Presotto
  2003-07-26 17:10     ` boyd, rounin
  2003-07-28  5:48     ` Lucio De Re
  2 siblings, 1 reply; 36+ messages in thread
From: Dan Cross @ 2003-07-26 16:40 UTC (permalink / raw)
  To: 9fans

> What does the word jangly mean?

I thought it meant, ``like a bell''.  I suppose I'm wrong.

Btw- I've seen this behavior on my Thinkpad, which has a built in PS/2
mouse.  I don't think it's in the serial driver.

	- Dan C.



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [9fans] random moving of cursor arrow
  2003-07-26 16:40     ` Dan Cross
@ 2003-07-26 16:44       ` David Presotto
  2003-07-26 17:10         ` Skip Tavakkolian
                           ` (2 more replies)
  0 siblings, 3 replies; 36+ messages in thread
From: David Presotto @ 2003-07-26 16:44 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 161 bytes --]

I'm still confused.  What does it mean for a mouse to be harsh-sounding,
inharmonious, and discordant?  Well, I guess in acme, discordant might
have a meaning.

[-- Attachment #2: Type: message/rfc822, Size: 2311 bytes --]

From: Dan Cross <cross@math.psu.edu>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] random moving of cursor arrow
Date: Sat, 26 Jul 2003 12:40:27 -0400
Message-ID: <200307261640.h6QGeR710595@augusta.math.psu.edu>

> What does the word jangly mean?

I thought it meant, ``like a bell''.  I suppose I'm wrong.

Btw- I've seen this behavior on my Thinkpad, which has a built in PS/2
mouse.  I don't think it's in the serial driver.

	- Dan C.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [9fans] random moving of cursor arrow
  2003-07-26 15:59   ` David Presotto
  2003-07-26 16:40     ` Dan Cross
@ 2003-07-26 17:10     ` boyd, rounin
  2003-07-28  5:48     ` Lucio De Re
  2 siblings, 0 replies; 36+ messages in thread
From: boyd, rounin @ 2003-07-26 17:10 UTC (permalink / raw)
  To: 9fans

> What does the word jangly mean?

in the guitar world it means multiple sounds/frequencies generated
by one chord.  i guess, the context it was used, it means jittery.



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [9fans] random moving of cursor arrow
  2003-07-26 16:44       ` David Presotto
@ 2003-07-26 17:10         ` Skip Tavakkolian
  2003-07-26 17:14         ` Dan Cross
  2003-07-28  9:00         ` matt
  2 siblings, 0 replies; 36+ messages in thread
From: Skip Tavakkolian @ 2003-07-26 17:10 UTC (permalink / raw)
  To: 9fans

>> What does the word jangly mean?

Perhaps it is the effect rather than the cause, as in "the mouse is
jangling as I bang it on the desk when it is nonresponsive and
jerky". ☺



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [9fans] random moving of cursor arrow
  2003-07-26 16:44       ` David Presotto
  2003-07-26 17:10         ` Skip Tavakkolian
@ 2003-07-26 17:14         ` Dan Cross
  2003-07-26 17:19           ` rob pike, esq.
  2003-07-26 17:23           ` boyd, rounin
  2003-07-28  9:00         ` matt
  2 siblings, 2 replies; 36+ messages in thread
From: Dan Cross @ 2003-07-26 17:14 UTC (permalink / raw)
  To: 9fans

> I'm still confused.  What does it mean for a mouse to be harsh-sounding,
> inharmonious, and discordant?

That it's fallen off the side of the desk and is banging against a metal
filing cabinet?

Or maybe Lucio is just applying an aural term to the visual domain to
describe the movement of the mouse cursor on the screen.  The movement
is harsh, jerky, and discordant with respect to the motion of the hand.
Action and reaction are inharmonious.

> Well, I guess in acme, discordant might have a meaning.

Oh yeah, that too.

	- Dan C.



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [9fans] random moving of cursor arrow
  2003-07-26 17:14         ` Dan Cross
@ 2003-07-26 17:19           ` rob pike, esq.
  2003-07-26 17:23           ` boyd, rounin
  1 sibling, 0 replies; 36+ messages in thread
From: rob pike, esq. @ 2003-07-26 17:19 UTC (permalink / raw)
  To: 9fans

i think he meant the mouse jangled like a bad simile.

-rob



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [9fans] random moving of cursor arrow
  2003-07-26 17:14         ` Dan Cross
  2003-07-26 17:19           ` rob pike, esq.
@ 2003-07-26 17:23           ` boyd, rounin
  1 sibling, 0 replies; 36+ messages in thread
From: boyd, rounin @ 2003-07-26 17:23 UTC (permalink / raw)
  To: 9fans

> The movement
> is harsh, jerky, and discordant with respect to the motion of the hand.
> Action and reaction are inharmonious.

like the french verb to tune (or be in tune): accorder [it has other meanings
too]

so it's not in sync with your inputs, much like the Microsoft Knife (tm).




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [9fans] Re: random moving of cursor arrow
  2003-07-26  2:22         ` David Presotto
  2003-07-26  8:37           ` C H Forsyth
  2003-07-26  9:59           ` Enache Adrian
@ 2003-07-26 19:01           ` Richard Miller
  2003-07-28  5:26           ` Lucio De Re
  3 siblings, 0 replies; 36+ messages in thread
From: Richard Miller @ 2003-07-26 19:01 UTC (permalink / raw)
  To: 9fans

> It is true that if the mouse is misidentified, it will cause exactly the
> behavior babic is seeing, i.e., if it guesses the wrong protocol.

... for example, if you happen to move the mouse during boot-up just as the
aux/mouse command is executed.  Eventually I've learned to keep my hand off
until the rio screen appears.

-- Richard



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [9fans] Re: random moving of cursor arrow
  2003-07-26  2:22         ` David Presotto
                             ` (2 preceding siblings ...)
  2003-07-26 19:01           ` Richard Miller
@ 2003-07-28  5:26           ` Lucio De Re
  2003-07-28  6:18             ` Lucio De Re
  2003-07-29  3:11             ` David Presotto
  3 siblings, 2 replies; 36+ messages in thread
From: Lucio De Re @ 2003-07-28  5:26 UTC (permalink / raw)
  To: 9fans

On Fri, Jul 25, 2003 at 10:22:10PM -0400, David Presotto wrote:
>
> I'll bang at serial ports tomorrow and see if I can figure out what's happening.
> With modern machines, I shouldn't get overruns even without the fifo.  I used
> to avoid the fifo for mice because it made the mouse jerky.
>
Note that (in my recollection) the problem is more recent than the
switch to the new driver.  I have only recently migrated to an
Intellimouse and then only on my workstation and the impression I
get is that there has been a slowdown in the very recent past.  It
would be difficult for me to test this, but if we come up with no
other option, I can set up a test bench.

> Everything related has changed of course; uart driver, clock routine, and
> scheduler.  Any could be at fault.  I'll plug some machines back to back and
> see if I can cause overruns.  A mouse really shouldn't be able to though,
> it's only 9600 baud or less.  If we're missing, something is really
> screwed up.  We only use ps2 mice these days but I can scrounge up some
> serial ones.
>
I have only examined the actual driver.  I couldn't see anything
clearly suspicious in it.

> It is true that if the mouse is misidentified, it will cause exactly the
> behavior babic is seeing, i.e., if it guesses the wrong protocol.

Yes, but then echo i1 > /dev/eia0ctl wouldn't have any ameliorating
effect on it.

++L


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: UART device driver (Was: [9fans] random moving of cursor arrow)
  2003-07-26  5:50       ` jmk
@ 2003-07-28  5:36         ` Lucio De Re
  0 siblings, 0 replies; 36+ messages in thread
From: Lucio De Re @ 2003-07-28  5:36 UTC (permalink / raw)
  To: 9fans

On Sat, Jul 26, 2003 at 01:50:56AM -0400, jmk@plan9.bell-labs.com wrote:
>
> If it's an ISA card then shared interrupts will not work.
>
It's engineered with a shared interrupt line and a status port (I
did neglect to mention these earlier).  I had it working very nicely
under NetBSD but couldn't persuade the core team to let me put a
null vector in the kernel interrupt table so that I could detect
disabled ports.  Since then, they have changed the I/O acccess so
much I have no idea whether I could port the driver to it.

> Use a line in plan9.ini for each port. Write a new driver (say
> uartisa.c) with a pnp function which calls allocates the necessary
> data structures and calls uarti8250alloc for each plan9.ini line,
> say
> 	uart0=type=i8250 port=XXX irq=Y
>
It seemed like the right idea as soon as I considered it.  I can't
quite figure out how the eia0=disabled line works in plan9.ini,
but I need to look into this in more detail anyway.

> See /sys/src/9/pc/uartpci.c for many clues.

I will take a good look, I am quite curious about PCI-based serial
devices.  I haven't given them any attention yet.

++L


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [9fans] random moving of cursor arrow
  2003-07-26 15:59   ` David Presotto
  2003-07-26 16:40     ` Dan Cross
  2003-07-26 17:10     ` boyd, rounin
@ 2003-07-28  5:48     ` Lucio De Re
  2 siblings, 0 replies; 36+ messages in thread
From: Lucio De Re @ 2003-07-28  5:48 UTC (permalink / raw)
  To: 9fans

On Sat, Jul 26, 2003 at 11:59:30AM -0400, David Presotto wrote:
>
> What does the word jangly mean?
>
> The new serial port device driver seems a bit jangly (Dave, is this
> your doing?).
>
That it jangles?  :-)  :-)

Sorry, I was referring to its behaviour rather than the code and,
I hope I recall correctly, I also suggested later that the driver
need not be solely responsible.

Whatever slang I really ought to have used, I certainly did not intend
any offense or implied any poor programming.

++L


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [9fans] Re: random moving of cursor arrow
  2003-07-28  5:26           ` Lucio De Re
@ 2003-07-28  6:18             ` Lucio De Re
  2003-07-29  3:11             ` David Presotto
  1 sibling, 0 replies; 36+ messages in thread
From: Lucio De Re @ 2003-07-28  6:18 UTC (permalink / raw)
  To: 9fans

On Mon, Jul 28, 2003 at 07:26:59AM +0200, Lucio De Re wrote:
> >
> Note that (in my recollection) the problem is more recent than the
> switch to the new driver.  I have only recently migrated to an
> Intellimouse and then only on my workstation and the impression I
> get is that there has been a slowdown in the very recent past.  It
> would be difficult for me to test this, but if we come up with no
> other option, I can set up a test bench.
>
Oops, what I meant(and left out!) was that mostly I use serial mice, I
only have one PS/2 mouse.  In fact, I can even compare the two on the
same hardware.

++L


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [9fans] Re: random moving of cursor arrow
  2003-07-26  8:51             ` boyd, rounin
@ 2003-07-28  8:47               ` Douglas A. Gwyn
  0 siblings, 0 replies; 36+ messages in thread
From: Douglas A. Gwyn @ 2003-07-28  8:47 UTC (permalink / raw)
  To: 9fans

boyd, rounin wrote:
> iirc, from the dz-kmc days you needed to manage the 'fifo' so it wouldn't
> overrun, but at the same time you needed a timer to empty it [stick on the rawq]
> so stuff just didn't get 'stuck'.

No, the problem arises when people try to set the input alarm
threshold at more than 1 character.  In the case of the DZ11
the right thing to do was to interrupt on any incoming
character and after processing (putting in the queue) wait a
tiny bit for the FIFO to trickle down then test for another
ready character, and if found don't return (context switch)
but instead go back to the start of the intr function and
process the character.  My driver did that, and on a PDP-11/34
we had a couple of dozen concurrent users of 9600bpi terminals
with great response.

I have a KMC11B sitting around, and some day I'll look into
whatever problems there might have been.  The idea of a front-
end processor was right, even if the implementation wasn't.

> how much time have i wasted with rs-232 junk?  too much.

However, it's as near to universal as one can get, even today.
I have a paper tape reader and an Apple IIGS attached to my
PCs via RS-232-C.  (The magtape is on SCSI.)


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [9fans] random moving of cursor arrow
  2003-07-26 16:44       ` David Presotto
  2003-07-26 17:10         ` Skip Tavakkolian
  2003-07-26 17:14         ` Dan Cross
@ 2003-07-28  9:00         ` matt
  2 siblings, 0 replies; 36+ messages in thread
From: matt @ 2003-07-28  9:00 UTC (permalink / raw)
  To: 9fans

David Presotto wrote:

>I'm still confused.  What does it mean for a mouse to be harsh-sounding,
>inharmonious, and discordant?  Well, I guess in acme, discordant might
>have a meaning.
>
inharmonious - you move it left, cursor goes right




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [9fans] Re: random moving of cursor arrow
  2003-07-28  5:26           ` Lucio De Re
  2003-07-28  6:18             ` Lucio De Re
@ 2003-07-29  3:11             ` David Presotto
  1 sibling, 0 replies; 36+ messages in thread
From: David Presotto @ 2003-07-29  3:11 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 1439 bytes --]

I tried a bundh of scenarios on some computers I had at work.  Nothing I
did would keep my 400 MHz system from losing characters on the serial
driver if I ran my cdrom full tilt and used > 38400 buad.  At or under
38400, turning on the fifo was enough, though I still saw one or two
overruns over the course of 15 minutes.  There's clearly something about
the cdrom driver that's staying at splhi way too long or causing back to
back interrupts that keep the serial interrupts from sneaking in.  At 9600
baud down (which is where the mouse should live), turning on the fifo
worked 100% of the time.

The serial driver (at least from interrupt to mouse stream interpretation)
is not  fundamentally different now than in the 3rd edition.  If the same
mouse hardware works with the 3rd edition and loses chars with the 4th I'm
moderately flabergasted.

For straight (non-mouse) serial ports, there is one difference: the 3rd ed
had much smaller queues and turned off RTS fairly often, effectively reducing
the port throughput to a fraction of what it was really set to.  It might be
that this was avoiding overruns.  I need to figure out a way to do the same
thing when the computer really can't keep up.  That should get rid of the
overruns for things like PPP.  Won't effect mice since I believe that they
ignore hardware flow control, at least the ones I have do.

The current aux/mouse on sources turns on the fifo.

[-- Attachment #2: Type: message/rfc822, Size: 3862 bytes --]

From: Lucio De Re <lucio@proxima.alt.za>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Re: random moving of cursor arrow
Date: Mon, 28 Jul 2003 07:26:59 +0200
Message-ID: <20030728072659.B1666@cackle.proxima.alt.za>

On Fri, Jul 25, 2003 at 10:22:10PM -0400, David Presotto wrote:
>
> I'll bang at serial ports tomorrow and see if I can figure out what's happening.
> With modern machines, I shouldn't get overruns even without the fifo.  I used
> to avoid the fifo for mice because it made the mouse jerky.
>
Note that (in my recollection) the problem is more recent than the
switch to the new driver.  I have only recently migrated to an
Intellimouse and then only on my workstation and the impression I
get is that there has been a slowdown in the very recent past.  It
would be difficult for me to test this, but if we come up with no
other option, I can set up a test bench.

> Everything related has changed of course; uart driver, clock routine, and
> scheduler.  Any could be at fault.  I'll plug some machines back to back and
> see if I can cause overruns.  A mouse really shouldn't be able to though,
> it's only 9600 baud or less.  If we're missing, something is really
> screwed up.  We only use ps2 mice these days but I can scrounge up some
> serial ones.
>
I have only examined the actual driver.  I couldn't see anything
clearly suspicious in it.

> It is true that if the mouse is misidentified, it will cause exactly the
> behavior babic is seeing, i.e., if it guesses the wrong protocol.

Yes, but then echo i1 > /dev/eia0ctl wouldn't have any ameliorating
effect on it.

++L

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [9fans] Re: random moving of cursor arrow
  2003-07-26  9:59           ` Enache Adrian
@ 2003-08-07 13:52             ` David Presotto
  0 siblings, 0 replies; 36+ messages in thread
From: David Presotto @ 2003-08-07 13:52 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 268 bytes --]

I'm adding the serial intellimouse support.  What mousectl were you
using to set it?  Right now
	serial port#	- sets up a normal (?) serial mouse
	serial port# M	- sets up a microsoft serial mouse
I could add
	serial port# MI	- for a microsoft serial intellimouse

[-- Attachment #2: Type: message/rfc822, Size: 3548 bytes --]

From: Enache Adrian <enache@rdslink.ro>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Re: random moving of cursor arrow
Date: Sat, 26 Jul 2003 12:59:40 +0300
Message-ID: <20030726095940.GA2481@ratsnest.hole>

A question about mouse support:

Have the new changes to the serial ports & mice code added support for scroll
serial mice (aka microsoft intellimice with 5 buttons) and for shift-button3
button2 emulation ?

I'm using a rather old 4th edition plan9 (Tue Sep  3 00:36:58 2002),
and there I hacked some code in the kernel so it works fine for me now
(but no code for pnp identification in aux/mouse.c - that would be simple,
though).

It looks like this:
src/9/port/devmouse.c:
/*
 * microsoft intellimouse 3 buttons + scroll
 * 	byte 0 -	1  L  R Y7 Y6 X7 X6
 *	byte 1 -	0 X5 X4 X3 X2 X1 X0
 *	byte 2 -	0 Y5 Y4 Y3 Y2 Y1 Y0
 *	byte 3 -	0  0  M  %  %  %  %
 *
 *	%: 0xf => U , 0x1 => D
 *
 *	L: left
 *	R: right
 *	U: up
 *	D: down
 */

int
m5mouseputc(Queue*, int c)
{
	static uchar msg[3];
	static int nb;
	msg[nb++] = c & 0x7f;
	if (nb == 4) {
		schar dx,dy,newbuttons;
		dx = msg[1] | (msg[0] & 0x3) << 6;
		dy = msg[2] | (msg[0] & 0xc) << 4;
		newbuttons =
			(msg[0] & 0x10) >> (shiftpressed ? 3:2)
			| (msg[0] & 0x20) >> 5
			| ( msg[3] == 0x10 ? 0x02 :
			    msg[3] == 0x0f ? 0x08 :
			    msg[3] == 0x01 ? 0x10 : 0 );
		mousetrack(dx, dy, newbuttons, TK2MS(MACHP(0)->ticks));
		nb = 0;
	}
	return 0;
}

(I also changed 'shift' in i8042intr() to 'shiftpressed' and made it global,
 and removed 'mouseshifted' which was never set).

Thanks & Regards,
Adi

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2003-08-07 13:52 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-25  8:52 [9fans] random moving of cursor arrow sasa
2003-07-25  8:43 ` Lucio De Re
2003-07-26 15:59   ` David Presotto
2003-07-26 16:40     ` Dan Cross
2003-07-26 16:44       ` David Presotto
2003-07-26 17:10         ` Skip Tavakkolian
2003-07-26 17:14         ` Dan Cross
2003-07-26 17:19           ` rob pike, esq.
2003-07-26 17:23           ` boyd, rounin
2003-07-28  9:00         ` matt
2003-07-26 17:10     ` boyd, rounin
2003-07-28  5:48     ` Lucio De Re
2003-07-25  9:02 ` boyd, rounin
2003-07-25  9:01   ` Lucio De Re
2003-07-25  9:08 ` Fco.J.Ballesteros
2003-07-25 14:08   ` Scott Schwartz
2003-07-25 14:35     ` UART device driver (Was: [9fans] random moving of cursor arrow) Lucio De Re
2003-07-25 14:56       ` boyd, rounin
2003-07-26  5:50       ` jmk
2003-07-28  5:36         ` Lucio De Re
2003-07-25  9:17 ` [9fans] Re: random moving of cursor arrow sasa
2003-07-25  9:24   ` sasa
2003-07-25  9:25     ` sasa
2003-07-25  9:27       ` boyd, rounin
2003-07-26  2:22         ` David Presotto
2003-07-26  8:37           ` C H Forsyth
2003-07-26  8:51             ` boyd, rounin
2003-07-28  8:47               ` Douglas A. Gwyn
2003-07-26 15:37             ` David Presotto
2003-07-26  9:59           ` Enache Adrian
2003-08-07 13:52             ` David Presotto
2003-07-26 19:01           ` Richard Miller
2003-07-28  5:26           ` Lucio De Re
2003-07-28  6:18             ` Lucio De Re
2003-07-29  3:11             ` David Presotto
2003-07-25 10:27       ` sasa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).