VOGONS


Dosbox 0.65 on OS/2

Topic actions

First post, by josch

User metadata
Rank Newbie
Rank
Newbie

With the release of v0.65, I'm updating the OS/2 port.
But there seems to be a major screwup, since the keyboard mapping is reproducibly wrong.
It seems that the whole mapping is shifted some keys to the right and one row down.
Since the release notes talks about "improved keyboard [..] support", what was changed? (CVS doesn't work for me, the server always EOF).

Bye JoSch

Reply 1 of 21, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

the major difference is that the dosbox.conf variable usescancodes is set to true.
if you set it to false it might work better for you.

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

Reply 3 of 21, by josch

User metadata
Rank Newbie
Rank
Newbie

Ok, I think that's it. I can imagine that there is a

#ifdef WIN32
..
#else // Linux
..
#endif

and so OS/2 falls through to the Linux implementation.

Ok. When I come home I will try this.

JoSch

PS: What's wrong with the repository? I cannot update or even login to the cvs server.

Reply 4 of 21, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

dunno.
I will file a bug report with sourceforge.
It's been out for over a week now.

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

Reply 5 of 21, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

hmm seems to be know issue.
anonon cvs isn't updated anymore until they have fixed things
http://sourceforge.net/docs/A04/

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

Reply 7 of 21, by josch

User metadata
Rank Newbie
Rank
Newbie

Since anonymous CVS is dead on SF.net, could someone of the core developers append the following to line 329 in sdlmapper:

&& !defined(OS2)

Thanks.

Reply 10 of 21, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Could you please have a look at MAPPER_StartUp (at the bottom
of sdl_mapper.cpp), i assume the defines there have to be
updated as well (either the linux/windows defaults already
work for os2, or a few modifications are necessary).
Those are for the cursor keys/num block pad, thus easy to test.

Reply 12 of 21, by josch

User metadata
Rank Newbie
Rank
Newbie

Ok, I had look at that code, and made it compile with the Win maps, but the whole right side of the keyboard doesn't work.
I have to make further investications for that.

Bye JoSch

Reply 14 of 21, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Have a look at static SDLKey sdlkey_map, this array has a translation
from a host-OS scancode (which sadly isn't a hardware scancode) to
SDL symkeys, so if we get scancode==1 it'll be translated into
sdlkey_map[1]==SDLK_ESCAPE.
Windows/Linux have almost the same scancode translation (linux has
an offset +8 which is removed in Bitu GetKeyCode()), and those keys
that have different scancodes require a change of sdlkey_map in
void MAPPER_StartUp(). Most likely this is enough for os2 as well.

To get a scancode for a key, search sdl_mapper.cpp for LOG_MSG("key type
and remove the comment before this line. Then hit those keys that don't
work yet, the last entry displayed by LOG_MSG is the scancode, then
you can add a custom translation in void MAPPER_StartUp().

Reply 19 of 21, by josch

User metadata
Rank Newbie
Rank
Newbie

Hi.

I just came around to packaging everything up.
I have attached my changes in sdlmapper.cpp to this post.
Please can anybody add it to CVS?

bye Jochen

Attachments

  • Filename
    diff.txt
    File size
    1.56 KiB
    Downloads
    188 downloads
    File comment
    Source code changes
    File license
    Fair use/fair dealing exception