VOGONS


First post, by Srecko

User metadata
Rank Member
Rank
Member

Digitrakker 3.2 doesn't run with current version of Dosbox.

problematic part of code does following:

0xF3 is written to port 60. (this should add 0xfa scancode to keyboard buffer)
Shortly after, it reads from port 60 and expects to get scancode 0xfa.
but dosbox doesn't return same code, it returns code from buffer position
keyb.buf.pos (scancode was written to keyb.buf.pos+keyb.buf.used).

If returned code is not 0xfa, code will execute OR instruction and jump over
the POP AX, directly to RETF instruction. Of course, returns to wrong cs:ip and gets data to execute.

I think that reading from port 60 should return last added key, not current in keyboard buffer.
Here's the patch that enables digitrakker to run.
Btw. it doesn't detect SB, but works with GUS.

Attachments

  • Filename
    keydiff.txt
    File size
    561 Bytes
    Downloads
    202 downloads
    File comment
    patch for read_p60 function in keyboard.cpp
    File license
    Fair use/fair dealing exception

Reply 1 of 2, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I think the keyboard buffer is always later then the controller buffer.
We merged those 2. I think controller messages will go before keyboard buffer data.

Water flows down the stream
How to ask questions the smart way!

Reply 2 of 2, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

it was a bit different. But fixed it anyway.

There should be less and less keyboard errors:)

Especially errors with controls being stuck 😀

Water flows down the stream
How to ask questions the smart way!