Re: [ES40-developers] 8042 translation is faulty
Status: Alpha
Brought to you by:
iamcamiel
|
From: Brian W. <bdw...@in...> - 2008-02-07 21:03:13
|
Nope, that didn't seem to do it. Here's the debugging output of me
hitting 'b' on the keyboard in SRM (where it works) and netbsd debug
(where it doesn't)
--- in srm --
gen_scancode(): 21 pressed
keyboard: gen_scancode with scancode_translate cleared
gen_scancode(): writing raw 32
kbd_enQ(0x32)kbd_enQ: putting scancode 0x32 in internal buffer
service_keyboard: key in internal buffer waiting
READ(60) = 32
service_keyboard(): no keys waiting
gen_scancode(): 21 released
keyboard: gen_scancode with scancode_translate cleared
gen_scancode(): writing raw f0
kbd_enQ(0xf0)kbd_enQ: putting scancode 0xf0 in internal buffer
gen_scancode(): writing raw 32
kbd_enQ(0x32)kbd_enQ: putting scancode 0x32 in internal buffer
service_keyboard: key in internal buffer waiting
READ(60) = f0
service_keyboard: key in internal buffer waiting
READ(60) = 32
service_keyboard(): no keys waiting
--- traffic from the netbsd kernel ---
write command byte
set_aux_clock_enable(1)
allow_irq12 set to 0
keyboard: scan convert turned off
Scancodes_translate set to 0
service_keyboard(): no keys waiting
write command byte
set_aux_clock_enable(1)
allow_irq12 set to 0
Scancodes_translate set to 1
get keyboard command byte
kbd_controller_enQ(44) source=00
READ(60) = 44
controller passed byte f0h to keyboard
Expecting scancode set info...
kbd_enQ(0xfa)kbd_enQ: putting scancode 0xfa in internal buffer
service_keyboard: key in internal buffer waiting
READ(60) = fa
controller passed byte 02h to keyboard
Switched to scancode set 2
kbd_enQ(0xfa)kbd_enQ: putting scancode 0xfa in internal buffer
service_keyboard: key in internal buffer waiting
READ(60) = fa
controller passed byte f4h to keyboard
kbd_enQ(0xfa)kbd_enQ: putting scancode 0xfa in internal buffer
service_keyboard: key in internal buffer waiting
READ(60) = fa
service_keyboard(): no keys waiting
--- in debugger ---
gen_scancode(): 21 pressed
gen_scancode(): writing translated 30
kbd_enQ(0x30)kbd_enQ: putting scancode 0x30 in internal buffer
service_keyboard: key in internal buffer waiting
READ(60) = 30
service_keyboard(): no keys waiting
gen_scancode(): 21 released
Brian
On Thu, 2008-02-07 at 21:53 +0100, Camiel Vanderhoeven wrote:
> Hi Brian,
>
> I think disabling the translation altogether isn't the right solution.
> There is indeed a bug in the translation code. Could you try adding
> the following line around line 619? If this solves the problem, I'll
> commit it to CVS, with some comments added about how the different
> scancode sets and translations (should) work.
>
> if (scancode[i] == 0xF0)
> {
> escaped=0x80;
> i++; <==== ADD THIS LINE
> }
> else
>
> On Feb 7, 2008 7:39 PM, Brian Wheeler <bdw...@in...> wrote:
> > Actually, skip the line 1850 stuff, it doesn't seem to work. However,
> >
> > if (state.kbd_controller.scancodes_translate && 0)
> >
> > on line 609 (or thereabouts) does fix the problem.
> >
> > Brian
> >
> >
> >
> > On Thu, 2008-02-07 at 13:17 -0500, Brian Wheeler wrote:
> > > It looks like the 8042 keyboard translation is faulty. SRM turns it off
> > > during the bootup sequence, and netbsd turns it off (again), and then on
> > > right before it goes to the debugger. I've forced it to 0 on
> > > AliM1543C.cpp around line 1850:
> > >
> > > state.kbd_controller.scancodes_translate = 0;
> > >
> > > and the netbsd debugger is working as expected.
> > >
> > > I also commented out the XWarpPointer call in gui/gui_x11.cpp and it
> > > doesn't keep moving the mouse to the center of the window.
> > >
> > >
> > > Brian
> > >
> > >
> > > -------------------------------------------------------------------------
> > > This SF.net email is sponsored by: Microsoft
> > > Defy all challenges. Microsoft(R) Visual Studio 2008.
> > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> > > _______________________________________________
> > > Es40-developers mailing list
> > > Es4...@li...
> > > https://lists.sourceforge.net/lists/listinfo/es40-developers
> >
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Microsoft
> > Defy all challenges. Microsoft(R) Visual Studio 2008.
> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> > _______________________________________________
> > Es40-developers mailing list
> > Es4...@li...
> > https://lists.sourceforge.net/lists/listinfo/es40-developers
> >
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Es40-developers mailing list
> Es4...@li...
> https://lists.sourceforge.net/lists/listinfo/es40-developers
|