Hello,
if one attempts to use the Gujin bootloader inside qemu (even today's
snapshot), one gets a message about unknown key being pressed.
The easiest way to reproduce the issue is to download install-2.2.tar.gz
from http://sourceforge.net/project/showfiles.php?group_id=15465, unpack
the tarball, and run "qemu -fda boot.144". The bottom of the screen will
flash with the message about unknown command. This message does not show
up in Bochs and on real hardware.
I also recompiled Gujin from source (gujin-2.2.tar.gz) and added code to
print information about each call to the 0x16 BIOS interrupt to the
parallel port. According to this log, Gujin does the following:
# prints:
Debug active!
sizeof MOUSE: 512, sizeof UI: 384, Initial VESA name check: Video card
changed, reset VGA parameter.
# Get shift flags
AH=0x02 => result: AL=0x00 (i.e., no shift flags)
# keyb.com keyboard capabilities check
AH=0x92 => AH=0x80 (i.e., enhanced keyboard functions are supported)
# keyb.com keyboard capabilities check
AH=0xa2 => AH=0xa2 (i.e., 122-key keyboard functions are not supported)
# prints:
sizeof struct UTIL_str 640, sizeof struct memalloc_str 408.
max_IDE_found 10, max_freelist 64, max_disk 15, max_partition 64
sizeof struct diskparam_str 256, sizeof struct partition_str 64, sizeof
struct freelist_str 16, sizeof struct IDE_found_str 8.
Reset all BIOS disks for BIOS to acknowledge changes:returns 0x0, status
0x0
sizeof struct desc_str: 64, sizeof struct BOOTWAY_str: 16
{FAT12 on disk 0 part 5 with type 0x4!} {strange: PhysicaldriveNb = 0x0
instead of 0x80} {FAT12 on disk 2 part 5 with type 0x4!}
# check for enhanced keystroke
AH=0x11 => AH=0x11, AL set to 0 by the setnz instruction (i.e., no key)
# Then the check is repeated many times with the same "no key" result
(because I press no keys). So far so good.
# .....
# Then, for some strange reason, the same call returns that a key is
pressed:
# check for enhanced keystroke
AH=0x11 => AH=0x43, AL set to 1 by the setnz instruction that
immediately follows int 0x16 in the Gujin source
# get enhanced keycode
AH=0x10 => AH=0x43, AL=0x00 (here is a problem - I pressed nothing!)
# goes to graphical mode
# prints:
best_max_width: found mode index 3 (maxwidth 640) out of UI.nbmode = 16
[get_refresh_freq: timeout after 49999]
# Then it begins to loop the following two calls:
# check for enhanced keystroke
AH=0x11 => AH=0x43, AL set to 1 by the setnz instruction that
immediately follows int 0x16 in the Gujin source
# get enhanced keycode
AH=0x10 => AH=0x43, AL=0x00 (here is a problem - I pressed nothing!)
I.e., this looks like a "garbage in, garbage out" problem, not a Gujin
bug - BIOS reports non-existing keypress to Gujin in qemu. Could you
please fix qemu, or at least tell me how to debug further?
--
Alexander E. Patrakov