sQLux v1.0 (The Xmas Turkey)

Discussion and advice about emulating the QL on other machines.
User avatar
NormanDunbar
Forum Moderator
Posts: 2274
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: sQLux v1.0 (The Xmas Turkey)

Post by NormanDunbar »

badaman wrote: Sat Feb 10, 2024 2:25 pm «Quae Sunt Caesaris, Caesari...» XD
Oh gods! My childhood Latin at secondary school resurfaces. "Redde caesari quae sunt caesaris" I think is the full quote, but I get your drift. ;)

Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
Exile
ROM Dongle
Posts: 38
Joined: Sat Jan 15, 2022 8:55 pm

Re: sQLux v1.0 (The Xmas Turkey)

Post by Exile »

I've put some code together to support a Spanish keyboard for the MGE Spanish ROM (downloaded from https://dilwyn.qlforum.co.uk/qlrom/index.html)

It is actually quite complicated to do this without a Spanish keyboard, especially as the defines assume a UK QL keyboard, so there are 3 levels of indirection to keep in mind :-)

A Spanish keyboard uses the Alt Gr key, so I added support for that. I also put in a hack to allow for dead keys. I think I've managed to get nearly all of the accents working...

In all I've remapped over 30 key presses. It now needs someone with a real Spanish keyboard to test it. Hopefully if there are things that need changing I've put in enough of the framework, so that it will be easy for someone else with more knowledge of Spanish to complete it.

The code is on a branch named "spanish" on my clone of the sQLux repo at: https://github.com/ikjordan/sQLux/tree/spanish

The best way to get the code is to clone it:

Code: Select all

git clone --recursive https://github.com/ikjordan/sQLux.git
so that the submodules are downloaded. Then checkout the spanish branch and build.

Obviously the correct ROM and keyboard need to be selected. Adding the following lines to sqlux.ini will do that:

Code: Select all

SYSROM = mge.rom
KBD = ES


User avatar
badaman
Over Heated PSU
Posts: 134
Joined: Sun Jan 12, 2020 12:18 pm
Location: Spain
Contact:

Re: sQLux v1.0 (The Xmas Turkey)

Post by badaman »

Hello Exile,

I followed the steps, compiled, and it worked, but with some inconvenience.

Code: Select all

SYSROM = mge.rom
KBD = ES
Even though I have this configuration in sqlux.ini, I get this message when running the emulator.

Code: Select all

Using default keymap. (use KBD=<countrycode> in sqlux.ini to change)
I'm using the mge ROM, in fact, the ROM on Dilwyn's website is the one on my QL computer! which is also shared on my website.

When I run the emulator, the keyboard works, indeed, as an English keyboard, but if I change the settings of my Linux keyboard to English, then yes, the characters that correspond to a Spanish QL keyboard start appearing. Here is a screenshot.

I have not tried all the combinations yet, but I have not been able to access the key with the characters '[' and 'ç', the penultimate one in the first row on the Spanish QL keyboard.

Update. Apparently, in previously compiled versions of sQLux, the keyboard, when the English keyboard is selected, already worked as I described.
Attachments
Captura de pantalla de 2024-02-11 02-13-00.png
Captura de pantalla de 2024-02-11 02-13-00.png (10.19 KiB) Viewed 714 times


Exile
ROM Dongle
Posts: 38
Joined: Sat Jan 15, 2022 8:55 pm

Re: sQLux v1.0 (The Xmas Turkey)

Post by Exile »

Thanks for testing.

You should not need to set your keyboard to English. If it reports that a keyboard is not set, then none of the code I've written will be running.
I've zipped up the two files I have changed and attached them here.
spanish.zip
(12.04 KiB) Downloaded 37 times

Can you check if the code you have matches that please? If not please copy across the two .c files into the src directory and rebuild.

A check to see that the correct code is compiled is to run ./sqlux --help. This will print out the help for all of the command line options. There should be a line that states:

Code: Select all

--kbd [US]                  keyboard language DE, GB, ES, US

The ES text shows that the updated code is running.

I built and tested using Linux (a Raspberry Pi). What operating system are you using? I could then try the build using the same one.
Attachments
screenshot.png


Exile
ROM Dongle
Posts: 38
Joined: Sat Jan 15, 2022 8:55 pm

Re: sQLux v1.0 (The Xmas Turkey)

Post by Exile »

To do the build I needed to check out my own repo on Windows, as I'd previously been working with Linux. When doing this I realised that my previous instructions were not explicit. To check out the correct branch on the repo the following is needed:

Code: Select all

git clone --recursive https://github.com/ikjordan/sQLux.git
cd sQLux
git checkout spanish
mkdir build
cd build
Then cmake and make from the build directory, using the command described in the Readme for the OS that you are using.
Last edited by Exile on Mon Feb 26, 2024 7:13 pm, edited 1 time in total.


User avatar
badaman
Over Heated PSU
Posts: 134
Joined: Sun Jan 12, 2020 12:18 pm
Location: Spain
Contact:

Re: sQLux v1.0 (The Xmas Turkey)

Post by badaman »

Hello. I'm using Linux Mint 64 bit, Intel.

I have made a git clone of your repository again. The steps followed are the ones I had already done, clone the repo with recursive, enter sQLux, change to the spanish branch, and then

Code: Select all

cmake -B build/
make
If I follow the instructions to do:

Code: Select all

mkdir build
build cd
Obviously it gives me an error, because the directory already exists. And if I go into the directory, I can't use cmake.

So I compiled from the sQLux directory, and...

Good news!!

It's almost there. It has worked. Now the keyboard works like a PC with the Spanish configuration.

But... there is a key that doesn't work well. This is the accent key '´' '¨'. When pressed, it works like the '4' key, with shift it shows '$', just what the number 4 key does. The rest of the keys work fine.

I haven't tried key combinations with CTRL and ALT yet.

It's a breakthrough!

P.S. I don't have Windows, but I have tried the executable with Wine, and the keyboard didn't work well. Possibly not a good way to test it.


Exile
ROM Dongle
Posts: 38
Joined: Sat Jan 15, 2022 8:55 pm

Re: sQLux v1.0 (The Xmas Turkey)

Post by Exile »

Thanks, that is good news. We are most of the way there :-)

I agree we should stay on Linux and avoid Wine for now.

Is the key that has the issue the one that is to the right of the Ñ key? If so I did struggle with that one. On the modern Spanish keyboard does that correspond to a key that adds the ´ " and ¨ accent to the next key pressed? Currently that seems to be generating a dead key id plus the code for 4, but I should be able to do something about that.

How should that key behave on a Spanish BBQL keyboard please?

I guess it might take us a little while to work through this, so to avoid taking up to much space in this thread, it might be easier if we switch to private messages to talk it through.


User avatar
badaman
Over Heated PSU
Posts: 134
Joined: Sun Jan 12, 2020 12:18 pm
Location: Spain
Contact:

Re: sQLux v1.0 (The Xmas Turkey)

Post by badaman »

Exile wrote: Sun Feb 11, 2024 5:22 pm I guess it might take us a little while to work through this, so to avoid taking up to much space in this thread, it might be easier if we switch to private messages to talk it through.
Yeah. We work privately. We are very close to achieving it!


User avatar
badaman
Over Heated PSU
Posts: 134
Joined: Sun Jan 12, 2020 12:18 pm
Location: Spain
Contact:

Re: sQLux v1.0 (The Xmas Turkey)

Post by badaman »

Support material. My Spanish keyboard on Linux.
Attachments
keyboard-es_ES.png


Exile
ROM Dongle
Posts: 38
Joined: Sat Jan 15, 2022 8:55 pm

Re: sQLux v1.0 (The Xmas Turkey)

Post by Exile »

After a great deal of support and testing from @badaman the code changes needed for the Spanish keyboard have now been merged back into the sQLux master branch.

The changes have been tested under X11 (Mint Linux, Ubuntu Linux and Pi Os) and MS Windows. There is support for dead keys, and a selection of Alt Gr key combinations.

By default Pi OS bookworm uses X11 for SDL, so these changes will currently work "out of the box" for Raspberry Pis. The changes do not work on Pi OS bookworm when SDL is configured to use Wayland, as the version of Wayland currently used in Pi OS does not report dead key key presses.

I've edited my earlier post, where I uploaded an early Windows version, to remove the attachment, as that was an experimental version. To get the finished Windows or Linux version please build it from the main sQLux sources at: https://github.com/SinclairQL/sQLux


Post Reply