BlueMSX 2.4 / 2.5 Keyboard emulation (Emulation Foros MSX)MSX Resource Center            
                       
English Nederlands Espa�ol Portugu�s Russian                  
 Noticias
   Página principal
  Almacén de noticias
  Temas de noticias

 Recursos
   Foros MSX
  Artículos
  Analisis
  Informe de ferias/RUs
  Álbum de fotos
  Ferias y encuentros
  Encuestas
  Enlaces
  Buscar

 Software
   Descargas
  Tienda Online

 MRC
   Quiénes somos
  Únete a nuestro equipo
  Donar
  Políticas
  Contacta con nosotros
  Enlázanos
  Estadísticas

 Buscar
 
  

  

 Login
 

Login

Contraseña




¿Aún no tienes una cuenta? ¡Conviértete en miembro del MSX Resource Center! ¡Únete a nosotros!.


 Estadísticas
 

Hay 53 invitados y 4 miembros en línea

Eres un usuario anónimo.
 

Foros MSX


Foros MSX

Emulation - BlueMSX 2.4 / 2.5 Keyboard emulation

Autor

BlueMSX 2.4 / 2.5 Keyboard emulation

Anvil
msx user
Mensajes: 36
Publicado: Julio 25 2006, 12:59   

Hello

While writing a game I noticed BlueMSX doesn't report all combinations of pressed keys. When I press up/left/right at once for example, I don't see any key press. Up/left/down only reports up/left. Combinations with the space bar are even worse. This behavior is also annoying when playing games. My real msx allows all combinations of key presses.

Is this a known problem, or is there something wrong with the pc keyboard?

jltursan
msx professional
Mensajes: 887
Publicado: Julio 25 2006, 13:04   
Developing "Caverns of Titan" I face the same problem. There're some in-game cheats by pressing several keys, the bigger one using not less than five keys. On the real thing it works flawlessly; but running over emulators it doesn't work; but it's not an emu fault, seems that the PC keyboards aren't able to manage more than three keys at the same time (due its serial data transfer?)

Anvil
msx user
Mensajes: 36
Publicado: Julio 25 2006, 13:12   
The pc keyboard interface is capable of reporting many key presses and releases and Windows can handle the same.

But hey, try this on your pc while you're posting a reply: just press up/left/right at once. It doesn't do any my pc! I'd expect the cursor moves somewhere, but nothing happens.

turbor
msx freak
Mensajes: 181
Publicado: Julio 25 2006, 13:50   
this has to do with key ghosting and blocking.
If you have a real MSX you can eassilie see ghosting at work when pressing multiple keys at once. This is because the keys on the keyboard are layout in a matrix like way.
Basically, ghosting is a problem with scanning matrix keyboard encoders, where pressing three simultaneous keys that from a rectangle in the (row and column) matrix causes an unintended fourth (ghost) key to register.
This can be overcome by using diodes but isn't done in an MSX

To avoid the problems of ghosting, most newer (1993 and up) keyboards employ a technique called Blocking. Blocking is a firmware method where the keyboard prevents a third input from registering if it forms a rectangle on the matrix and could potentially create a ghost input.
This is ofcourse good for typing, but bad for game emulation. Unlike ghosting, blocking CANNOT be overcome by the use of diodes. Also, blocking is more troublesome than ghosting, because while ghosting creates an unintended input (which may or may not affect your game); blocking prevents an intended input from registering, which is the effect you are experiencing.

It all depends on the keyboard matrix and the controller used in your keyboard, and this can only be overcome by
a) using a joystick
b) creating your own keyboard encoder (or buy an I-PAC http://www.ultimarc.com/ ) and recable your keyboard.

for more info read this pages:
http://www.dribin.org/dave/keyboard/one_html/

and maybe this one
http://www.mameworld.net/emuadvice/keyhack2.html

mars2000you
msx master
Mensajes: 1723
Publicado: Julio 25 2006, 16:51   
By the way, the keyboards problems are also explained in the blueMSX manual, but no-one seems to read the manual !!!!

Excerpts from the manual :

Why my keyboard doesn't seem to respond or gets wrong output when I press some keys ?
First thing first, the routine procedure is to check your keyboard configuration on your Windows OS. Be sure that you have a correct keyboard (driver) configuration that matches your locale. This means that you should not use a certain language keyboard that doesn't match your OS language. (i.e. english layout keyboard on japanese OS). Such use can cause unpredictable result when using blueMSX.

Beware that MSX bios chooses which keyboard layout are being used. So if you boot an European MSX machine, then you will have English keyboard layout which matches the MSX keys accordingly. You will most likely to get different output if a Japanese MSX bios is used on an English keyboard. This is how blueMSX is designed and that's a normal behavior.

It can happen that some keyboards have problems with specific keys (like the Kana key on a Japanese keyboard). You can solve this kind of problems by using the Controllers / Keyboard Editor.

Why my keyboard seems to hang when I press many keys at the same time ?
This is not a blueMSX bug, but a problem with some PC keyboards, that act very strange when many keys are pressed at the same time. The maximum keys that can be pressed together can vary from keyboard to keyboard, and this problem can also only happen with some combinations of keys like Right + Left + End or Down + Left + Spacebar.

You can find a solution in most cases by using the keys of the numpad :
- Use the Controllers / Keyboard Editor to change the mapping of the 4 arrows;
- Think as 8,4,6,2 keys as arrows and you should be able to use some combinations that don't work with the arrows.
By using this trick, the above examples become 6+4+End and 2+4+Spacebar.
turbor
msx freak
Mensajes: 181
Publicado: Julio 25 2006, 17:15   
Also IIRC if you use a USB keyboard, the USB HID specification states that only 6 keys can be pressed(codes send) simultaneously.
Huey
msx professional
Mensajes: 671
Publicado: Mayo 28 2008, 22:00   
If only i had read this thread 2 days ago
I just wasted my precious time debugging something that isn't a bug

[space]+[left]+[up] just doesnt detect the [space]
DemonSeed
msx master
Mensajes: 1061
Publicado: Mayo 28 2008, 22:43   
Hey... I could've told you that...
Huey
msx professional
Mensajes: 671
Publicado: Mayo 28 2008, 22:47   
So why didn't you? I mentioned it in yesterdays mail.

manuel
msx guru
Mensajes: 3634
Publicado: Mayo 28 2008, 23:52   
Yep, PC keyboards suck.
Samor
msx professional
Mensajes: 847
Publicado: Mayo 29 2008, 03:06   
Most MS keyboards don't have the issue, many Logitech ones do, but the more expensive ones usually have a different key layout and don't (such as the G15, but that might be a bit overkill to some).

A cheaper solution is mapping the arrow keys to the numpad.

[D-Tail]

msx guru
Mensajes: 3026
Publicado: Mayo 29 2008, 08:51   
Quote:

Yep, PC keyboards suck.

IRQ crap! Polling and magic KB matrices, that's how it should be done! Press three buttons on the keyboard and the matrix will 'assume' a fourth!
ARTRAG
msx master
Mensajes: 1801
Publicado: Mayo 29 2008, 09:01   

from wiki (http://en.wikipedia.org/wiki/Computer_keyboard)

Quote:


Rollover problems

Some low-quality keyboards suffer problems with rollover (that is, when multiple keys are pressed in quick succession); some types of keyboard circuitry will register a maximum number of keys at one time. This is undesirable for games (designed for multiple keypresses, e.g. casting a spell while holding down keys to run) and undesirable for extremely fast typing (hitting new keys before the fingers can release previous keys). A common side effect of this shortcoming is called "phantom key blocking": on some keyboards, pressing three keys simultaneously sometimes resulted in a 4th keypress being registered. Modern keyboards prevent this from happening by blocking the 3rd key in certain key combinations, but while this prevents phantom input, it also means that when two keys are depressed simultaneously, many of the other keys on the keyboard will not respond until one of the two depressed keys is lifted. With better keyboards designs, this seldom happens in office programs, but it remains a problem in games even on expensive keyboards, due to wildly different and/or configurable key/command layouts in different games.



Huey
msx professional
Mensajes: 671
Publicado: Mayo 29 2008, 09:44   
The strange thing is that [space]+[up]+[right] (attack while jumping right) does work. But [space]+[left]+[up] just doesn't detect the [space] (attack).

Now that I discovered this 'bug' it is anoying me more and more
Guess that the only thing to do now is to buy a decent gamepad............ or remap the attack to another key (bleh )

[offtopic]
Hurraaaayyy! Just became a professional. My 513th post
[/offtopic]
Samor
msx professional
Mensajes: 847
Publicado: Mayo 29 2008, 19:43   
gamepad? hm.. I can't stomach playing msx games with pad... too used to the keyboard. I have one that's better than an msx one, though (personal opinion )

 
 







(c) 1994 - 2009 Fundación MSX Resource Center. MSX es una marca registrada de MSX Licensing Corporation