Hello again,
Sorry to follow up to my own message... I was doing some more testing and may have
new information. I noticed there was a "Return from vm86() for STI" between the two
port reads and also remember reading in the tech notes, section "8.5 Known bugs &
incompatibilites" that "behaviour wrt. cli/sti is inaccurate, because the PIC code
currently doesn't allow un-requesting if IRQ's." Does this look like the problem?
Here is a more detailed log of pressing the right arrow on the key pad in Prince
of Persia:
KBD: putkey(PRESS, 004d, ' ') called
KBD: writing to queue: bios_key=4d00 shift=0002 scan=0000004d
KBD: read queue: bios_buffer=4d00 shiftstate_buffer=0002 raw=4d
KBD: queuelevel=0
8042: scheduling IRQ1
8042: do_irq1(), VIF = 1
8042: read port 0x60 = 0x4d
8042: read port 0x60 read=0x4d
Return from vm86() for STI
Return for FORCE_PIC
Return for FORCE_PIC
8042: read port 0x60 = 0x4d
8042: read port 0x60 read=0x4d
Return for FORCE_PIC
Return for FORCE_PIC
INT15 0x4f CARRY=1 AX=864d
HELPER: get_bios_key() returned 4d00
Return from vm86() for STI
Return from vm86() for STI
Return for FORCE_PIC
Return from vm86() for STI
Return for SIGNAL
Return for SIGNAL
int 0x1c, ax=0x0000
DEFIVEC: int 0x1c @ 0xf000:0x01c0
Return from vm86() for STI
INT21 (0) at 1c69:0019: AX=0600, BX=0000, CX=004d, DX=77ff, DS=2b44, ES=0040
int 0x21, ax=0x0600
int 0x28, ax=0x0100
Return for FORCE_PIC
Return for FORCE_PIC
Return for FORCE_PIC
Return for FORCE_PIC
INT21 (0) at 1c69:0027: AX=0600, BX=0000, CX=004d, DX=77ff, DS=2b44, ES=0040
int 0x21, ax=0x0600
int 0x28, ax=0x014d
Return from vm86() for STI
Return for FORCE_PIC
Return for FORCE_PIC
Return for FORCE_PIC
Return for FORCE_PIC
Return for FORCE_PIC
Return for FORCE_PIC
Return for FORCE_PIC
Return for FORCE_PIC
Return for FORCE_PIC
Return for FORCE_PIC
Return for FORCE_PIC
Return for FORCE_PIC
Return for FORCE_PIC
Return for FORCE_PIC
INT21 (0) at 1c69:01a5: AX=0c06, BX=064d, CX=004d, DX=77ff, DS=2b44, ES=0040
int 0x21, ax=0x0c06
int 0x28, ax=0x0100
Return from vm86() for STI
Return for FORCE_PIC
Return for FORCE_PIC
Return for SIGNAL
Return for SIGNAL
Return for FORCE_PIC
Return for FORCE_PIC
Return for SIGNAL
Return for SIGNAL
Return for SIGNAL
Return for SIGNAL
Return for SIGNAL
int 0x1c, ax=0x0000
DEFIVEC: int 0x1c @ 0xf000:0x01c0
Return from vm86() for STI
Return for SIGNAL
Return for SIGNAL
Return from vm86() for STI
Return for SIGNAL
Return from vm86() for STI
INT21 (0) at 1c69:0019: AX=0600, BX=0000, CX=004d, DX=77ff, DS=2b44, ES=0040
int 0x21, ax=0x0600
int 0x28, ax=0x0100
Return for FORCE_PIC
Return for FORCE_PIC
Return for SIGNAL
Return for SIGNAL
Return for FORCE_PIC
Return for FORCE_PIC
Return for SIGNAL
Return for SIGNAL
Return for SIGNAL
Return for SIGNAL
Return from vm86() for STI
Return for SIGNAL
Return for SIGNAL
int 0x1c, ax=0x0000
DEFIVEC: int 0x1c @ 0xf000:0x01c0
Return from vm86() for STI
Return for SIGNAL
xkey ff98 released, state=00000000, char='^@'
KBD: putkey(RELEASE, 004d, ' ') called
KBD: writing to queue: bios_key=0000 shift=0002 scan=000000cd
KBD: read queue: bios_buffer=0000 shiftstate_buffer=0002 raw=cd
KBD: queuelevel=0
8042: scheduling IRQ1
8042: do_irq1(), VIF = 1
8042: read port 0x60 = 0xcd
8042: read port 0x60 read=0xcd
Return from vm86() for STI
Return for FORCE_PIC
Return for FORCE_PIC
8042: read port 0x60 = 0xcd
8042: read port 0x60 read=0xcd
Return for FORCE_PIC
Return for FORCE_PIC
INT15 0x4f CARRY=1 AX=86cd
HELPER: get_bios_key() returned 0000
Return from vm86() for STI
Return from vm86() for STI
Return for FORCE_PIC
Return from vm86() for STI
Return from vm86() for STI
Return for SIGNAL
int 0x1c, ax=0x0000
DEFIVEC: int 0x1c @ 0xf000:0x01c0
Return from vm86() for STI
Return from vm86() for STI
INT21 (0) at 1c69:0019: AX=0600, BX=0000, CX=004d, DX=77ff, DS=2b44, ES=0040
int 0x21, ax=0x0600
int 0x28, ax=0x0100
Return from vm86() for STI
Return for FORCE_PIC
Return for FORCE_PIC
Return for SIGNAL
Return for SIGNAL
Return for FORCE_PIC
Return for FORCE_PIC
Return for SIGNAL
Return for SIGNAL
Return for SIGNAL
Return for SIGNAL
int 0x1c, ax=0x0000
DEFIVEC: int 0x1c @ 0xf000:0x01c0
Return from vm86() for STI
Return for SIGNAL
Return from vm86() for STI
Return for SIGNAL
Return for SIGNAL
Return from vm86() for STI
INT21 (0) at 1c69:0019: AX=0600, BX=0000, CX=004d, DX=77ff, DS=2b44, ES=0040
int 0x21, ax=0x0600
int 0x28, ax=0x0100
int 0x1c, ax=0x0000
DEFIVEC: int 0x1c @ 0xf000:0x01c0
Return from vm86() for STI
Return from vm86() for STI
Return for FORCE_PIC
Return for FORCE_PIC
Return for SIGNAL
Return for SIGNAL
Return for FORCE_PIC
Return for FORCE_PIC
On Fri, Mar 05, 1999 at 08:26:42PM -0600, Brian Hirt wrote:
> Hello,
>
> I just downloaded dosemu for the first time this morning and I'm very
> impressed with how well dosemu works. Of course after testing the basics
> I went for the games.....
>
> I've noticed that certain games do not work well with the keyboard in
> dosemu. I'm not sure what is causing the failure, but it may be in
> one of the keyboard/serv_*.c files. One of the programs that I was testing
> a lot is Prince of Persia.
>
> I've tried both dosemu 0.98.5 and 0.99.9 (dos and xdos) with every
> combination of rawkeyboard and keybint:
>
> $_rawkeyboard = (on) and $_keybint = (on)
> $_rawkeyboard = (on) and $_keybint = (off)
> $_rawkeyboard = (off) and $_keybint = (on)
> $_rawkeyboard = (off) and $_keybint = (off)
>
> I've got Linux 2.0.36, and am running MS DOS 6.22 in dosemu
>
> With each test, Prince of Persia had the odd behaviour of partial
> keyboard support. The ESC and SPACE keys worked, but the arrow keys
> did not.
>
> On an encouraging note, I have noticed the keyboard does not work
> with "Alone in the Dark" using dosemu 0.98.5 -- but does work with
> 0.99.9
>
> In Prince of Persia, these are the messages that I get when pressing a single
> right arrow on the key pad. Dosemu was invoked with the following flags
> to get this information:
>
> dos -D+hk# -O 2>&1 | egrep -v "int 0x28|int 0x1c"
>
> [00041579] KBD: putkey(PRESS, 004d, ' ') called
> [00041582] KBD: writing to queue: bios_key=4d00 shift=0002 scan=0000004d
> [00041586] KBD: read queue: bios_buffer=4d00 shiftstate_buffer=0002 raw=4d
> [00041590] KBD: queuelevel=0
> [00041593] 8042: scheduling IRQ1
> [00041598] 8042: do_irq1(), VIF = 1
> [00041602] 8042: read port 0x60 = 0x4d
> [00041605] 8042: read port 0x60 read=0x4d
> [00041614] 8042: read port 0x60 = 0x4d
> [00041617] 8042: read port 0x60 read=0x4d
> [00041621] INT15 0x4f CARRY=1 AX=864d
> [00041624] HELPER: get_bios_key() returned 4d00
> [00041639] KBD: putkey(RELEASE, 004d, ' ') called
> [00041642] KBD: writing to queue: bios_key=0000 shift=0002 scan=000000cd
> [00041646] KBD: read queue: bios_buffer=0000 shiftstate_buffer=0002 raw=cd
> [00041650] KBD: queuelevel=0
> [00041653] 8042: scheduling IRQ1
> [00041656] 8042: do_irq1(), VIF = 1
> [00041660] 8042: read port 0x60 = 0xcd
> [00041663] 8042: read port 0x60 read=0xcd
> [00041667] 8042: read port 0x60 = 0xcd
> [00041670] 8042: read port 0x60 read=0xcd
> [00041674] INT15 0x4f CARRY=1 AX=86cd
> [00041677] HELPER: get_bios_key() returned 0000
>
> One thing that seemed strange to me is that port 0x60 gets read from twice,
> where I've nocticed that other in other programs that work port 0x60
> is read only once.
>
> Can anyone offer any suggestions on how to track down this problem? Is this
> a known problem?
>
> -Brian (Dying to play old DOS games on my Linux box)