VOGONS

Common searches


First post, by anacletojimenez

User metadata
Rank Newbie
Rank
Newbie

My English is bad, almost nil. Sorry (I more than anyone). Using a translator,

I'm using dosbox for old running a program. I work all property, except the accent on the vowel "O" in capital letters, on the other members well. So are the vowels with accents: Á É Í Ó Ú áéíóú

Two keys are used the tilde and the corresponding vowel.

I know that pressing Alt & 224 works, but would be nice if he should make a correct way.

In the file dosbox-0.74.conf: keyboardlayout = sp
If I type keyb: 858 Has Been Codepage layout loaded for sp

thanks

Estoy usando el dosbox para la ejecución de un antiguo programa. Me funciona todo de lujo, excepto la tilde en la vocal "O" en mayúculas, en el resto de vocales bien. Así son las vocales con tilde: Á É Í Ó Ú áéíóú

Se usan dos teclas la tilde y la vocal correspondiente.

Ya se que pulsando Alt&224 funciona, pero sería bonito que lo hiciese de una manera correcta.

En el fichero dosbox-0.74.conf: keyboardlayout=sp
Si tecleo keyb: Codepage 858 has been loaded for layout sp

Gracias

Reply 1 of 18, by bloodbat

User metadata
Rank Oldbie
Rank
Oldbie

Hmm...it is true, the accent doesn't work for "O" using either keyb la or keyb sp, not even using the DosBox promt
-------------
Hmm...Es cierto, no funciona la tilde para la "O" ni con keyb la ni con keyb sp, ni siquiera en el indicador de DosBox

Reply 2 of 18, by Zup

User metadata
Rank Oldbie
Rank
Oldbie

It does the same thing when using CP 850.

-----------------------

Yo juraría que la página de códigos de España era la 850... pero da lo mismo, tampoco funciona.

I have traveled across the universe and through the years to find Her.
Sometimes going all the way is just a start...

I'm selling some stuff!

Reply 3 of 18, by robertmo

User metadata
Rank l33t++
Rank
l33t++

same problem with layout pl214
it is not a problem of codepage as it works with pl457 with the same codepage.
It looks to be a problem of how Ó is being generated.
pl214 generates Ó this way: altgr+9 shift+o (doesn't work)
pl457 generates Ó this way: altgr+shift+o (works)
alt 224 also excludes codepage problem
I guess this problem should happen in all keyboard layouts in dosbox

Reply 4 of 18, by robertmo

User metadata
Rank l33t++
Rank
l33t++

it looks it is definitely some bug as there should either a one composed character appear (for example Ó) or two characters when composed is not possible (for example sth like this`O). But here nothing appears as if backspace was pressed instead of O.

Reply 5 of 18, by eL_PuSHeR

User metadata
Rank l33t++
Rank
l33t++

You mean capital O, right?

It doesn't work for me either using codepage 437

=================================================

Quieres decir O mayúscula, ¿verdad?

Tampoco me funciona usando la página de códigos 437

Reply 6 of 18, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

ASCII character 224 (0xE0) is being mistaken as an extended key signal. After setting up a Spanish keyboard in MS-DOS 5, I can see that the diacritic keys placed in the BIOS key buffer do not have scan codes, and apparently an 0xE0 in the buffer with no scan code does not signal an extended key. Implementing this in dos_keyboard_layout.cpp appears to solve the problem, but maybe the solution is not really this simple...

                 // search scancode
for (Bit16u i=0; i<diacritics_length; i++) {
if (diacritics[diacritics_start+i*2]==(layouted_key&0xff)) {
// add diacritics to keybuf
- BIOS_AddKeyToBuffer((Bit16u)(key<<8) | diacritics[diacritics_start+i*2+1]);
+ BIOS_AddKeyToBuffer((Bit16u)diacritics[diacritics_start+i*2+1]);
return true;
}
}

Reply 7 of 18, by robertmo

User metadata
Rank l33t++
Rank
l33t++

testing with kbd i see two strange things:
1. why arrows, pgdn,up,home,end,del,ins also produces E0
2. why with keyb pl alt+shift+o produces 00E0, cause it looks that 00xx only appears when "alt xxx" is used for generating character.

Attachments

  • Filename
    kbd.rar
    File size
    8.62 KiB
    Downloads
    279 downloads
    File license
    Fair use/fair dealing exception

Reply 8 of 18, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

why arrows, pgdn,up,home,end,del,ins also produces E0

Because they're extended keys.

Normal keys are written into the keyboard buffer as a scancode byte and a character byte, but extended keys need two scancode bytes, so the first pair has a character of 0xE0 to signify that the key is extended and that another pair follows. However, it appears that 0xE0 with a scan code of zero does not signify an extended key, which makes sense given that two scancodes are needed.

Reply 12 of 18, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

why with keyb pl alt+shift+o doesn't generate a scancode?

It's processed differently than the diacritic keys. The comments in the code refer to it as a "remapped" key, and the scancode (zero in this case) appears to come from the kl data:

        // add remapped key to keybuf
if (is_keypair) BIOS_AddKeyToBuffer(layouted_key);

Reply 13 of 18, by robertmo

User metadata
Rank l33t++
Rank
l33t++

yeah i know it is generated differently but i was more interested why there is a difference in the same method of generation:

for example
alt+shift+n which makes Ń
alt+shift+c which makes Ć
alt+shift+s which makes Ś
generate scancodes
while
alt+shift+o which makes Ó
doesn't generate a scancode
Even though all of them are generated same way. It looks alt+shift+o is treated in some special way compared to for example alt+shift+n

Reply 14 of 18, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

It looks like the kl makes a special case for the key, because is_keypair is true for altgr+shift+o but not for the others. So it seems with remapped keys that the kl is forcing a scancode of zero with character 0xE0 for the purpose of preventing it from being seen as extended key. Dunno if there is a similar kl mechanism for diacritic keys.

I haven't tried setting up any other country keyboard types in real DOS, but for Spanish I could see that *all* diacritic keys have a scancode of zero, not just 0xE0.

Reply 16 of 18, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

A word of thanks to Ripsaw8080 for his patch. It solved a problem reported by a Spanish-speaking user of my WordPerfect application. This was a very frustrating problem, and Ripsaw's patch solved it instantly.

Reply 17 of 18, by robertmo

User metadata
Rank l33t++
Rank
l33t++
ripsaw8080 wrote:

It looks like the kl makes a special case for the key, because is_keypair is true for altgr+shift+o but not for the others. So it seems with remapped keys that the kl is forcing a scancode of zero with character 0xE0 for the purpose of preventing it from being seen as extended key. Dunno if there is a similar kl mechanism for diacritic keys.

I haven't tried setting up any other country keyboard types in real DOS, but for Spanish I could see that *all* diacritic keys have a scancode of zero, not just 0xE0.

I have tried msdos 6.2 with both polish layouts (had to take keybrd4.sys from win98se to enable the layout that allows alt-o).
And all diacritic keys:ąężźóńśćĄĘŻŹÓŃŚĆ have zero scancode in both layouts.
So it looks someone fixed in dosbox Ó made with alt-shift-o but didn't fixed the method of creating it with dead key.

Reply 18 of 18, by robertmo

User metadata
Rank l33t++
Rank
l33t++

Ó works ok here too with the diff.
I noticed you made 00 scancode to all characters made with dead keys, not only Ó. Although diacritic characters made with without deadkey still have scancode different from 00. Are there any disadvantages of making it 00 too (to match real hardware)?