PSX controller

Victor Argüelles argux at
Sun Dec 21 13:05:42 PST 2003

Victor Argüelles wrote:
> Ok, about the slowdown, i read in 
> that i should change the value of
> #define GC_PSX_DELAY
> to about 15, and do something with the
> udelay(GC_PSX_DELAY);
> I find in gamecon.c . Wouldn't this cause a low responsiveness? Also, 
> can I recompile only this module without having to recompile the entire 
> kernel tree? I'd hate to reboot just for that.
> About the analog signal sending, I just downloaded the utils, i'm going 
> to compile them and see if I can calibrate or something

So, I'm calibrating the thing, and I discovered what the problem was. 
The right stick is a little loose and doesn't always return to a middle 
point, so if it's calibrated to take the point 127 as the middle, and 
something like, say, a fly lands on it or even flaps past, the stick 
will move to the point 128 and it will start sending signals like crazy. 
That's not what's slowing the machine down, cause the slowdown is there 
even when the stick is on it's place, or when it's off.

So what I have to do is to tell something, maybe the driver, but I don't 
know how to do this, to ignore any signal ranging from like 115 to 135 
on every axis from 0 to 3, or to be less sensitive somehow.

Now, when I'm trying to read drivers/char/joystick/gamecon.c I 
understand almost nothing.

I *think* it has something to do with this part, but I'm not sure it's 
what I'm looking for:

case GC_PSX:
   psx = gc_psx_read_packet(gc, data);
     switch(psx) {
      case GC_PSX_NEGCON:
      case GC_PSX_NORMAL:
      case GC_PSX_ANALOG:
      case GC_PSX_RUMBLE:
        for (j = 0; j < 6; j++) {
          psx = gc_psx_abs[j];
          set_bit(psx, gc->dev[i].absbit);
          if (j < 4) {
             gc->dev[i].absmin[psx] = 4;
             gc->dev[i].absmax[psx] = 252;
             gc->dev[i].absflat[psx] = 2;
          } else {
             gc->dev[i].absmin[psx] = -1;
             gc->dev[i].absmax[psx] = 1;

Could anyone help me here, and tell me how can I make the driver less 
sensitive, or at least ignore that range?

~Victor A.

More information about the lfs-chat mailing list