Basilisk II on Raspberry Pi : no keycodes file?

About BasiliskII, a 68k Mac emulator for Windows, MacOSX, and Linux that can run System 7.x through MacOS 8.1.

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
yserra
Student Driver
Posts: 11
Joined: Sun Mar 15, 2020 8:14 am

Basilisk II on Raspberry Pi : no keycodes file?

Post by yserra »

Hi all,
Would you, please, tell me how I could use my Azerty keyboard with BasiliskII on the Raspberry Pi, under the RetroPie distribution?

Compared to other releases, the BasiliskII for RetroPie/Raspberry Pi doesn't seem to support the famous 'keycodes' file we use on other platforms to recognize international keyboard layouts.

I exported the keycodes file included with my BasiliskII Mac-installation to the Raspberry Pi- into the usual '/home/pi/RetroPie/roms/macintosh/' folder.
Then, I modified the BasiliskII-config file provided with RetroPie ('/opt/retropie/configs/macintosh/basiliskii.cfg') with the following two lines:

Code: Select all

keycodes true
keycodefile /home/pi/RetroPie/roms/macintosh/keycodes
But it doesn't work, as if these parameters were simply ignored.

By the way, I'm pretty sure this config file is the one really used for the emulator, since the System7'screen resolution changed when I added the 'screen win/1024/768' parameter to this file.

Obviously, I asked first the same question on the RetroPie forum, but nobody answered it at the moment (see: https://retropie.org.uk/forum/topic/280 ... 2634240629 ).

Many thanks for your help.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Basilisk II on Raspberry Pi : no keycodes file?

Post by Ronald P. Regensburg »

I trust that you did set your keyboard setting in BasiliskII to your azerty keyboard.

There are several keycodes files around. In the newer keycodes files I added scancode to keycode translations for SDL2 builds of BasiliskII and SheepShaver for Windows and macOS, but not yet for Linux.

If your BasiliskII build does not use SDL2, I would expect it to work with these settings.
If your BasiliskII build does use SDL2, no keycodes file will work (yet).

- Did you compile BasiliskII yourself? If so, from which source?
- Does your BasiliskII build use SDL2?
- Do you get an error message or warning when you launch BasiliskII?
yserra
Student Driver
Posts: 11
Joined: Sun Mar 15, 2020 8:14 am

Re: Basilisk II on Raspberry Pi : no keycodes file?

Post by yserra »

Many thanks for your reply Ronald,
I set my keyboard layout to French/Azerty under the emulated System7, yes.
And the host system - so the RetroPie 4.6 distribution based on the Raspbian Buster Linux - is configured for my Azerty layout too (and it works perfectly, for instance in the terminal)

The keycodes file I copied to my RetroPie installation came from your latest release of BasilliskII for Mac.

I must say I only installed the default binary of BasiliskII that comes, I guess, from the RetroPie repositories. I have no idea if it's a SDL2 build or not, but, since it runs directly without any X server, I would say it should be the case, shouldn't it?

So... If I understand correctly, my only option would be to wait for the next release with a scan code compatible with Linux. Ok, it makes sense. And I thank you in advance for this future work.

By the way, I get no error message, nor any warning when I launch BasiliskII. I checked in the log, and I didn't see any message related to, for instance, a keycodes file that would be not found, or impossible to read.

Thanks.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Basilisk II on Raspberry Pi : no keycodes file?

Post by Ronald P. Regensburg »

There are several BasiliskII development forks. I do not know which source code was used to compile the BasiliskII that you probably got from the RetroPie repositories, nor how old it is. I would expect most older builds, regardless the source, to work with the keycodes file you use. Translations for X11, X.org, and Linux are there.

If the build was created with SDL2, certainly if the build was created from kanjitalk755/macemu fork, I would expect an error message about the missing driver string for SDL2/Linux that BasiliskII will expect in the keycodes file. Simply adding the driver string would suffice to make the keycodes file useable as the translations from SDL2 scancodes to mac keycodes are already there.

My experience with Linux distros is too limited to help you with compiling BasiliskII yourself from kanjitalk755 source, which needs SDL2 library to be installed for building. https://github.com/kanjitalk755/macemu
yserra
Student Driver
Posts: 11
Joined: Sun Mar 15, 2020 8:14 am

Re: Basilisk II on Raspberry Pi : no keycodes file?

Post by yserra »

Thanks a lot Ronald.

First, please accept my apologies ; I realized only afterward that the basiliskII build I was asking about has nothing to do with the forks that are discussing here, on Emaculation.

But I am grateful to you because you gave me all the clues to understand - and to solve - the situation.

So, just to conclude this thread, I investigated a bit. The BasiliskII binary delivered with the RetroPie Linux distribution has not been built for SDL2 ; it has been built for the regular Linux Frame buffer. And It appears that its binary is in someway broken, because it doesn't execute correctly all the options written in its config file. For instance the 'keycodes true' and the 'keycode <path/to/file>' are, there, simply ignored, for an unknown reason. Maybe the RetroPie community should get closer to your work.

The fact is everything works as expected with BasiliskII on Retropie when I directly mention the '--keycodes true --keycodefile <path/to/keycodes file>' arguments at the command line. Under these conditions, I could successfully run a copy of the emulated System 7.6 environnement that I previously built up on my real Mac, with an AZERTY keyboard, thanks to your perfectly functional BasiliskII macOS release.

Best.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Basilisk II on Raspberry Pi : no keycodes file?

Post by Ronald P. Regensburg »

Great!

Yes, indeed, the RetroPie community should have a better look at the BasiliskII source code that is used and at the way BasiliskII is compiled and build. All BasiliskII forks that I am aware of, read the keycodes entries in the configuration (prefs) file since at least 1996.
Post Reply