Thread: [ES40-developers] 8042 translation is faulty
Status: Alpha
Brought to you by:
iamcamiel
From: Brian W. <bdw...@in...> - 2008-02-07 18:17:17
|
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 |
From: Brian W. <bdw...@in...> - 2008-02-07 18:39:38
|
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 |
From: Camiel V. <iam...@gm...> - 2008-02-07 20:53:56
|
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 > |
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 |
From: Camiel V. <iam...@gm...> - 2008-02-07 21:31:19
|
Hi Brian, Forget the change I suggested; it's wrong. The behaviour seems to be correct as it was: For a "b", the untranslated set-2 scancode is 0x32 (make) 0xf0 0x32 (break). The translated set-2 scancode is 0x30 (make) 0xb0 (break). So, I guess the question is why translation is being enabled... Camiel. On Feb 7, 2008 10:03 PM, Brian Wheeler <bdw...@in...> wrote: > 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 > > > ------------------------------------------------------------------------- > 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 > |
From: Camiel V. <iam...@gm...> - 2008-02-08 07:57:56
|
Hi Brian, Could you try again with the changes I made to the keyboard implementation this morning in response to David Hittner's issue? Camiel. On Feb 7, 2008 10:31 PM, Camiel Vanderhoeven <iam...@gm...> wrote: > Hi Brian, > > Forget the change I suggested; it's wrong. The behaviour seems to be > correct as it was: > > For a "b", the untranslated set-2 scancode is 0x32 (make) 0xf0 0x32 (break). > The translated set-2 scancode is 0x30 (make) 0xb0 (break). > > So, I guess the question is why translation is being enabled... > > Camiel. > > > On Feb 7, 2008 10:03 PM, Brian Wheeler <bdw...@in...> wrote: > > 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 > > > > > > ------------------------------------------------------------------------- > > 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 > > > |
From: Brian W. <bdw...@in...> - 2008-02-08 15:12:12
|
Unfortunately, it acts the same :( On Fri, 2008-02-08 at 08:57 +0100, Camiel Vanderhoeven wrote: > Hi Brian, > > Could you try again with the changes I made to the keyboard > implementation this morning in response to David Hittner's issue? > > Camiel. > > On Feb 7, 2008 10:31 PM, Camiel Vanderhoeven <iam...@gm...> wrote: > > Hi Brian, > > > > Forget the change I suggested; it's wrong. The behaviour seems to be > > correct as it was: > > > > For a "b", the untranslated set-2 scancode is 0x32 (make) 0xf0 0x32 (break). > > The translated set-2 scancode is 0x30 (make) 0xb0 (break). > > > > So, I guess the question is why translation is being enabled... > > > > Camiel. > > > > > > On Feb 7, 2008 10:03 PM, Brian Wheeler <bdw...@in...> wrote: > > > 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 > > > > > > > > > ------------------------------------------------------------------------- > > > 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 |
From: Camiel V. <iam...@gm...> - 2008-02-08 16:34:33
|
Hi Brian, As you may have seen, I've added more debugging messages (and a few comments); could you send me a file with the complete output of the emulator (compiled with DEBUG_KBD)? Perhaps I can fiund out what is going wrong... Camiel. On Feb 8, 2008 4:12 PM, Brian Wheeler <bdw...@in...> wrote: > Unfortunately, it acts the same :( > > > > On Fri, 2008-02-08 at 08:57 +0100, Camiel Vanderhoeven wrote: > > Hi Brian, > > > > Could you try again with the changes I made to the keyboard > > implementation this morning in response to David Hittner's issue? > > > > Camiel. > > > > On Feb 7, 2008 10:31 PM, Camiel Vanderhoeven <iam...@gm...> wrote: > > > Hi Brian, > > > > > > Forget the change I suggested; it's wrong. The behaviour seems to be > > > correct as it was: > > > > > > For a "b", the untranslated set-2 scancode is 0x32 (make) 0xf0 0x32 (break). > > > The translated set-2 scancode is 0x30 (make) 0xb0 (break). > > > > > > So, I guess the question is why translation is being enabled... > > > > > > Camiel. > > > > > > > > > On Feb 7, 2008 10:03 PM, Brian Wheeler <bdw...@in...> wrote: > > > > 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 > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > 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 > |
From: Brian W. <bdw...@in...> - 2008-02-08 19:58:38
Attachments:
keyboard.out.new
|
On Fri, 2008-02-08 at 17:34 +0100, Camiel Vanderhoeven wrote: > Hi Brian, > > As you may have seen, I've added more debugging messages (and a few > comments); could you send me a file with the complete output of the > emulator (compiled with DEBUG_KBD)? Perhaps I can fiund out what is > going wrong... > Here's the output from a run. I ran the debugging through "uniq" so repeated lines were dropped (reduced the file size from 12M to 29k :) I typed 'boot dqb0' on the srm line, and 'boot dqb0' in the debugger (just so there'd be a fair comparison). Brian > Camiel. > > On Feb 8, 2008 4:12 PM, Brian Wheeler <bdw...@in...> wrote: > > Unfortunately, it acts the same :( > > > > > > > > On Fri, 2008-02-08 at 08:57 +0100, Camiel Vanderhoeven wrote: > > > Hi Brian, > > > > > > Could you try again with the changes I made to the keyboard > > > implementation this morning in response to David Hittner's issue? > > > > > > Camiel. > > > > > > On Feb 7, 2008 10:31 PM, Camiel Vanderhoeven <iam...@gm...> wrote: > > > > Hi Brian, > > > > > > > > Forget the change I suggested; it's wrong. The behaviour seems to be > > > > correct as it was: > > > > > > > > For a "b", the untranslated set-2 scancode is 0x32 (make) 0xf0 0x32 (break). > > > > The translated set-2 scancode is 0x30 (make) 0xb0 (break). > > > > > > > > So, I guess the question is why translation is being enabled... > > > > > > > > Camiel. > > > > > > > > > > > > On Feb 7, 2008 10:03 PM, Brian Wheeler <bdw...@in...> wrote: > > > > > 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 > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > > 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 > > > > ------------------------------------------------------------------------- > 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 |