VOGONS


Mapper? bug

Topic actions

First post, by Casm

User metadata
Rank Newbie
Rank
Newbie

Good day, guys.

First of all I want to thank authors of such a great program - it's very good.

But when a mapper appeared there's some problem raised.
I'm using 0.63 for Windows and found the following:
When we type Right Arrow in Windows DOS Console we get two BIOS keyboard codes - 0 and 77. But when we press Ctrl-Right Arrow we get 0 and 116!
DOSBox gives 0 and 77 in both cases! It is not correct. Extended codes (and usual ones too) for keys differ when they are pressed with Ctrl and Alt modifiers. I suppose it's linked with a mapper, but can be wrong.

Also, there's one more problem. When I press Alt-Enter, this combination changes window size (full screen/windowed) and is not passes to the program! It is possible to allow the program to catch this combination, not to resize window?

Thanks in advance!

SY, Casm[/b]

Reply 1 of 3, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

For me it gets 0x4d (77) on normal and 0x74 (116) on ctrl+right,
only difference seems that dosbox puts the extended key
prefix 0xe0 into the buffer than 0.

What program did you use to check the behaviour?

wd

Reply 2 of 3, by Casm

User metadata
Rank Newbie
Rank
Newbie

0xe0??? How do you determine that???

I use Borland C++ 3.1 and the following:

#include<stdio.h>
#include<conio.h>

int ch;

void main ( void )
{
while ( ( ch = getch () ) != 27 )
printf ( "%i\n", ch );
}

I'm sure that my first message is correct in numbers, and I'm surely know how getch() works.
But I don't know how DOSBox works 😉 So, please tell me at least which OS do you use as host - maybe there's a difference? Maybe there are several parameters in .conf or OS which influence DOSBox keyboard greatly?

Thanks!

SY, Casm

Reply 3 of 3, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

> 0xe0??? How do you determine that???

That's the value that signals an extended character (port60).

> But I don't know how DOSBox works

You can have a look at bios_keyboard.cpp and maybe keyboard.cpp.

I tried your program with TC (in dosbox under XP) which displays
116 on ctrl-right. Shouldn't depend on anything in dosbox.conf.
Maybe you can post your compiled program here so some people
can compare the output.

> and I'm surely know how getch() works.

TC uses int21/ah=7, maybe BC3 uses something different, you
could check that in the dosbox debugger.

wd