Jump to content
IGNORED

Hatari with ST Keyboard on RPI


asprinwizard

Recommended Posts

HI there,

 

I'm sorry, I'm sure this has been answered before but my searches weren't conclusive. I am building a Hatari based ST emulator on the Raspberry Pi. For this I wish to use the original keyboard and joysticks so I have bought a Tynemouth (TS) USB adapter (it hasn't arrived yet). However I notice the ST keyboard does not have an F12 key for bringing up the Hatari config menu. It also does not have an Alt GR key either so I'm not sure if I'll be able to access this menu out of the box. For the Arduino based solution I think the Help key maps to F12 but I'm lead to believe on the TS it maps to the Windows key. I understand I can use keymaps.txt to remap these keys but I'm unfamiliar with this process. Can anyone help me with the following:

1) Where is the keymap.txt file located for Hatari? Or where does it need to be located

2) Do I need to run a command to load the keymap at bootup?

3) Where can I get the list of key codes so I can map F12 to, say, the Help key?

 

Thanks in advance.

Link to comment
Share on other sites

3 hours ago, asprinwizard said:

3) Where can I get the list of key codes so I can map F12 to, say, the Help key?

I think you would first need to know what scancode (if any) is detected when you press the help key on an rpi?     There's probably a utility somewhere that will report the scancode when you press a key.   I can't recall if hatari uses SDL to read the keyboard or something else.

Link to comment
Share on other sites

Thanks for your reply. Hatari uses SDL but I'm still pretty unsure as to how to do this. Hatari does allow you to set a keymap file in the config but as far as I know this is for mapping keys from a USB keyboard to the emulated ST keyboard within Hatari. But what I want is to map a system key that is not emulated (f12) so essentially outside the emulator. I guess therefore this would need to be a Linux remapping of keys not Hatari. 

 

Essentially either setting the Windows/Application key to bring up the Hatari menu or somehow mapping the Windows/Application key to F12 on order to bring the menu up. Does anyone know if this can be done? 

Link to comment
Share on other sites

It looks like you can Map the F12 key to something else in the keyboard UI of hatari,  so you might be able to do this without needing to create a keymap file.   The question is whether SDL will recognize the Help key.   I do see that SDL has a keycode for Help, so maybe, or maybe it maps to a different code.

 

What you might need to do is hook up both a PC and ST keyboard to hatari the first time,  use F12 on the PC keyboard to get into the menu, then remap F12 and see if it takes the ST help key as the alternative.   If it works, save the config.

 

Hatari manual, see "Keyboard Dialog" section

https://hatari.tuxfamily.org/doc/manual.html#Emulated_Atari_ST_keyboard

 

SDL scancodes for reference if you do end up needing to create a keymap file,  you can load a keymap file into the keyboard dialog

https://wiki.libsdl.org/SDL_Keycode

https://wiki.libsdl.org/SDLKeycodeLookup

Link to comment
Share on other sites

Thanks very much for your response. I had been through the documentation several times (it is quite substantial) and not seen this. I think this will be fine then. According the Tynemouth guy the Help is mapped to the Windows Key in firmware so If I can map the Windows key to the Hatari Menu function that will work perfectly. If that's not possible I'll map it to something else on the Atari Keyword, no worries.

 

Thanks again.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...