posted to bochs-developers on Wed, 29 Aug 2001 00:08:45 +0100
David Haslam wrote:
> I have been looking at the keyboard problem with Minix, which for
> those that haven't tried Minix results in every key press giving the
> response: ^@
>
> I am aware of the comments in the changelog that suggest removing 2
> keyboard ACKs in iodev/keyboard.cc, but this is a bit of a hack,
> (which is presumably why it was never incorporated).
>
> The problem seems to be that the Minix keyboard driver doesn't obey
> the rules, and Bochs doesn't model the 8042 accurately. When issuing
> commands to set the LEDs, Minix polls the 8042 output data register
> waiting for an ACK even though the OBF flag isn't set.
>
> Bochs returns zero under these circumstances, which seems to
> trigger obscure behaviour that messes up the Minix internal
> keyboard queue. I don't fully understand why Minix breaks, but I
> think the fact that the ACK generates an interrupt, and Minix treats
> it as a scan code also has something to do with it.
>
> In any case, I believe, the fix is for Bochs to return the output
> buffer contents, regardless of whether the OBF flag (called outb in
> Bochs) is set.
>
> I expect the real hardware allows the register to be read at anytime,
> and with this fix we are modelling the behaviour of the hardware more
> accurately.
>
> I have tested it with Minix 2.0.0. Also DOS 6.22 still works after this fix.
> Does anyone think this will break anything else?
>
> This diff is against the latest CVS of iodev/keyboard.cc, version 1.29
> The last part of the diff is a minor fix to an unrelated debug print.
Fixed a "feature" in pc_system.cc with setting timers to small values
that can cause bochs to hang.
Significantly improved the performance of the new PIT.
It's probably ready to become the default now.
Added a preliminary implementation of the slowdown timer
that Bryce and I had talked about.
--with-amigaos is allowed and sets up the makefiles correctly. It
defines a symbol called BX_WITH_AMIGAOS, which should be used in
#if..#endif constructs that are specific to amigaos.
- if --enable-cdrom is used with --with-amigaos, the cdrom_amigaos.o
object file will be added to CDROM_OBJS in the iodev makefile.