How to uQLx on RPi

Discussion and advice about emulating the QL on other machines.
Derek_Stewart
Font of All Knowledge
Posts: 3928
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: How to uQLx on RPi

Post by Derek_Stewart »

Hi,

WHat is your version of Raspberry PI board?, you said a PI Zero?

I have a Pi Zero 1.2, with no camera connector, or WIFI, it uses the same CPU as the PI Zero-W ; ARM6

Sorry about the confusion with the home directory references, if you refer to a good Linux book on Linux basics, it should state that your home directory can be reference by:

/home/<user>/ or ~

the tilde is a sort of shortcut to the current logged in <user> home directory.

So the location of the UQLX configuration file is in the defined home directory. The Dot at the start of the fle makes it hidden from normal directory view.

So the .uqlxrc should be copied to the home directory from the UQLX directory.

There are 2 ways to start the UQLX executable, either edit the configuration file: .uqlxrc and define the romdir label to point to the romdir directory in the UQLX directory:

ROMDIR = /home/<user>/romdir/

replace <user> with the name of the home user

or you can use the command line to define the location of the ROMDIR

./qm_arm6 -o /home/derek/uqlx/romdir/min198.rom

Where my home directory is called derek,which you replace this with yours...

Also I assume you have read the manual, from uqlx2017.zip, if not here it is:
uqlx.pdf
UQLX Manual
(208.48 KiB) Downloaded 134 times


Regards,

Derek
User avatar
Ruptor
Gold Card
Posts: 418
Joined: Fri Dec 20, 2019 2:23 pm
Location: London

Re: How to uQLx on RPi

Post by Ruptor »

Hi derek
Thanks for the extra information about Linux. Although I didn't know how to spell tilde I figured it was the same path because I only put one uqlx directory on the SD card and yet it looked like two when poking around. :roll: Here is the latest state of play.
The one & only SD card has the latest RpiOS. My big Rpi is a P1 & the zero is V1.3. One annoying thing is the HDMI screen is higher resolution & correctly centred on the big RPI but on the zero the top bar is off the screen, it is low resolution and keeps blanking every few seconds. I tried armv6 on the zero this morning that did run on the big RPi last night but reset and it runs but the screen being wrong on the zero makes it impossible to use or go further. The SD Card must be set up correctly and mimic your system since the zero found the ROM image it is just the screen problems to fix now. I appears the armv7 doesn't work on an RPi P1 so either there is something wrong with the board or it is different in some way to an RPi B. The fact the screens work differently using the same software might be the problem for the P1.


Derek_Stewart
Font of All Knowledge
Posts: 3928
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: How to uQLx on RPi

Post by Derek_Stewart »

Hi,

I think your main problem is using the correct emulator on the ARM CPU .

I am not sure if an ARM v7 will run ARM V6 code.

I am not going be using the Raspberry PI for QL emulation, it is too slow, in comparison to a Core i5 PC I have.

But the Q68 out performs all this.


Regards,

Derek
User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: How to uQLx on RPi

Post by NormanDunbar »

So, I thought I would compile the uQLx-2017 source code on my Pi Zero, after all, what could possibly go wrong? Plus, I have the manual (uqlx.pdf) and there are easy to follow instructions.... ;)

Code: Select all

mkdir SourceCode
cd SourceCode
git clone https://github.com/SinclairQL/uqlx-fork.git

...

cd uqlx-fork
git checkout XorA/brutal-cleanup

error: pathspec 'XorA/brutal-cleanup' did not match any file(s) known to git
Bollox! I'm a DBA, I can ignore that error - for now, I think/hope! :D However, if anyone knows what the brutal-cleanup was, I'm all ears!

Code: Select all

make

make: *** No targets specified and no makefile found. Stop.
Hmmm. 

cd uqlx-linux

make
Please do 'make config' first

make config

.. lots of messages here. Gcc 8 not known, cannot determine CPU submodel. Need to (optionally) add DEF_CPU for better performance. Etc.

make

... Errro: gcc doesn't know what -m32 means. Seems this is am Arm problem as -M32 is not an option in the Arm flavour of gcc. Never mind.

A quick edit of the Makefile and a removal of the two occurrences of -m32, followed by a save.

Code: Select all

make
... lots of warnings, but so far so good!

... Error  cannot find file for '#include X11/extensions/XShm.h'.
[/code/

I need to install the X11 Extensions development library:

[code]
sudo apt install libxext-dev
Ready for anpother try:

Code: Select all

make
...qm created!
strip qm
Job done.

In Summary:

Edit the Makefile to remove the two occurrences of -m32 one is in the BUILDFLAGS at line 68 the other is in LINKFLAGS at line 171, and make sure you have the 'libxext-dev' package installed.

I think we need to do some work on the Makefile so that it recognises modern versions of gcc, plus allows Arm to omit the -m32 options. The uqlx.pdf will need an update to bring the build instructions up to date.

I'm happy to do some of the work, but Makefiles are not my favourite hobby, but I'll try! (If someone holds my hand!)


HTH

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.
User avatar
Ruptor
Gold Card
Posts: 418
Joined: Fri Dec 20, 2019 2:23 pm
Location: London

Re: How to uQLx on RPi

Post by Ruptor »

NormanDunbar wrote:So, I thought I would compile the uQLx-2017 source code on my Pi Zero, after all, what could possibly go wrong? Plus,
Everything if I did it. :lol: Why didn't you compile the 2018a version?


User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: How to uQLx on RPi

Post by NormanDunbar »

Hi Rutor,

I compiled the latest sources from the SinclairQL Github repo, as per the instructions (in the 2017 uqlx.pdf). I don't (currently) know of a 2018a version to be honest. I do all my QLing in QPC2 on Linux, uqlx was a pleasant distraction on the Raspberry Pi zero.

It's actually reasonably fast at compiling, all things considered, when running in pure text mode. It slows dramatically in GUI mode though. Having said that, I don't fancy compiling a Linux Kernel, or even GCC itself, on a pi Zero! :)


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.
swensont
Forum Moderator
Posts: 252
Joined: Tue Dec 06, 2011 3:30 am
Location: SF Bay Area
Contact:

Re: How to uQLx on RPi

Post by swensont »

The most recent version of uQLx is sQLux (https://github.com/SinclairQL/sQLux). The most recent update was about 3 months ago. It does require SDL2 so I don't know if that is an issue on the Pi. I'm running sQLux on my main laptop and on a netbook and it runs just fine. If you want to run QLirc2, then you will need sQLux as it has the fixes QLirc2 needs.

Tim


User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: How to uQLx on RPi

Post by NormanDunbar »

Thanks Tim. I might have a look see later. If I get some "playtime". ;)


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.
User avatar
XorA
Site Admin
Posts: 1358
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

Re: How to uQLx on RPi

Post by XorA »

Bollox! I'm a DBA, I can ignore that error - for now, I think/hope! :D However, if anyone knows what the brutal-cleanup was, I'm all ears!
It was renamed to XorA/working-tree-64bit

The master branch is basically the same as the tofro release with bare minimal fixes to get it to run, the XorA/working-tree-64bit has more extensive fixes and is what swensont used for 2017/2018 releases. Which I seem to recall tagging in git so they are easy to get the source code for.


User avatar
XorA
Site Admin
Posts: 1358
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

Re: How to uQLx on RPi

Post by XorA »

Pi0 is armv6 and needs the armv6 version.

armv6 is an abomination that should not have ever been release, 99.99% of ARM SBC's available now are armv7+ (armv8 runs armv7 32bit code as long as CPU as 32bit mode enabled in hardware).


Post Reply