mamedev / mame

MAME
https://www.mamedev.org/
Other
7.95k stars 1.98k forks source link

jupace autoboot_command wont type certain characters in CAPS #7690

Open mcfilmmakers opened 3 years ago

mcfilmmakers commented 3 years ago

I have been trying to get autoboot commands to work in Jupiter Ace and came across an interesting bug:

-autoboot_command "load GR\n" results in typing load R and enter instead of the expected load GR and enter.

However, -autoboot_command "load gr\n" outputs the correct load gr and enter.

The issue is that the GR is case sensitive for some, but not all games. Example: Ace invaders (Forth Dimension) aka invader1

In kkong, -autoboot_command "load CHARACTERS\n" results in output of load HRCES.

Secondly, the platform is heavily reliant on typing a command, play the tape a bit, pause the tape, type 2nd command, play more tape, etc, etc.... is there a way of doing this in mame?

Third, how does one type a character that requires holding shift? ex: shift+2 = @ instead of 2.

cuavas commented 3 years ago

You might need to use an autoboot Lua script if it’s any more complex than just waiting a certain amount of time and then typing something.

mcfilmmakers commented 3 years ago

In regards to my 2nd and 3rd issues, you're probably right. However the MAME wiki doesn't explain how to do this at all. I would very much appreciate a working example of such a script.

That said, the main issue is that autoboot_command should be typing the characters I tell it to type, and it isn't.

Bob-Z commented 3 years ago

For what is worth I have written some autoboot LUA scripts here: https://github.com/Bob-Z/RandoMame/tree/main/autoboot_script

They are "just working" level scripts, I am LUA newbie and they are certainly not the best LUA code you can imagine. But they mostly work (to be honest, I have not tested all of them with MAME 227, which changed the LUA API, so they may not all work actually...)

Anyway, I hope this helps. And, if you manage to write a working script for jupace, I will be thankfull if you can share it.

angelosa commented 3 years ago
emu.keypost('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ')

0000

Most likely down to a jupace driver issue rather than LUA, cfr. same snippet in mame x1turbo40 hubasic1 -console

0024

cuavas commented 3 years ago

Yeah, the issue is that the fixed keypress duration used by the natural keyboard manager isn’t enough for the Jupiter Ace. Natural keyboard mode is decidedly flaky.

mcfilmmakers commented 3 years ago

Except that the issue is unique to those missing characters and not the keyboard as a whole.