Clock Signal — an Oric emulator for macOS and Linux

Comments, problems, suggestions about Oric emulators (Euphoric, Mess, Amoric, etc...) it's the right place to ask. And don't hesitate to give your tips and tricks that help using these emulations in the best possible way on your favorite operating system.
User avatar
iss
Wing Commander
Posts: 1641
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: Clock Signal — an Oric emulator for macOS and Linux

Post by iss »

jbperin wrote: Wed Jul 08, 2020 7:20 pm Is there a chance that it works on Raspberry Pi 3 or 4 ?
Sure! SDL and Qt bindings should compile with no pain.
ThomH
Flying Officer
Posts: 238
Joined: Thu Oct 13, 2016 9:55 pm

Re: Clock Signal — an Oric emulator for macOS and Linux

Post by ThomH »

iss wrote: Wed Jul 08, 2020 5:14 pm @ThomH: Congrats for the incredible work!
I've just tested the new Qt OSBinding and it works like charm. I like the drop-roms feature :).
All in all - simply impressive.
Oh, cool! I was just coming here to mention it but I guess that you got ahead of me. I've also been trying to put together a Snap so that it'll appear directly in the app stores of various Linux distributions. Hopefully I'll crack that shortly. That plus whatever Qt issues turn out to be lurking.

Otherwise I'm about to dedicate some time to Apple's proprietary Metal framework because it's a pretty safe bet that OpenGL isn't going to be available on the ARM-based Macs — it's been deprecated in macOS for a couple of years, after all.
iss wrote: Wed Jul 08, 2020 8:20 pm
jbperin wrote: Wed Jul 08, 2020 7:20 pm Is there a chance that it works on Raspberry Pi 3 or 4 ?
Sure! SDL and Qt bindings should compile with no pain.
I admit I don't really know what modern Pis support, but a potential obstacle is that I'm still targeting OpenGL 3.2+ only. I could probably relax that now; since Apple deprecated OpenGL I've boxed in the permitted input pixel formats for emulated machines and could probably deal with them all in old-fashioned all-floating-point GLSL.
ThomH
Flying Officer
Posts: 238
Joined: Thu Oct 13, 2016 9:55 pm

Re: Clock Signal — an Oric emulator for macOS and Linux

Post by ThomH »

Quick update on this: I think I've cracked the Snapcraft code, so if you use snapd then you should now be able to install a prebuilt Qt version of the emulator. See its listing here.

Or, if you're a Ubuntu user then the following may work:
  • open 'Ubuntu Software';
  • search for 'Clock Signal';
  • hit 'install'.
Also, as I'm really very new to this stuff, keep your fingers crossed during every step.
User avatar
jbperin
Flight Lieutenant
Posts: 480
Joined: Wed Nov 06, 2019 11:00 am
Location: Valence, France

Re: Clock Signal — an Oric emulator for macOS and Linux

Post by jbperin »

Hi TomH,

I've installed Clock Signal on my newly set up Ubuntu 18.04.4 LTS. It starts but when I want to start an Oric, it tells me to drag and drop

• the Oric colour ROM; and
• Oric BASIC 1.1.

I don't know what is the colour ROM so I drag and drop only the basic11.rom and then windows disappears.Looks like a crash.
Is there something I do wrong ?

Is there an other way to provide clocksignal with the required ROM ?
User avatar
iss
Wing Commander
Posts: 1641
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: Clock Signal — an Oric emulator for macOS and Linux

Post by iss »

@jbperin: Attached are all Oric related ROM files for Clock Signal (together with a txt file which explains 'who's'who') ;).

Else, @ThomH: great work! I like the command line options which exclusively set the Oric and periphery type.
BTW, the DSK emulation seams to be broken recently.
clk-roms-pack.zip
(42.83 KiB) Downloaded 280 times
EDIT: Thanks, Dbug! Attachment corrected. :)
Last edited by iss on Sun Jul 26, 2020 3:22 pm, edited 2 times in total.
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Clock Signal — an Oric emulator for macOS and Linux

Post by Dbug »

iss wrote: Sun Jul 26, 2020 10:40 am @jbperin: Attached are all Oric related ROM files for Clock Signal (together with a txt file which explains 'who's'who') ;).
Looks like the clk-rompack archive only contains a "Erebus_case_bottom.stl" file.
User avatar
jbperin
Flight Lieutenant
Posts: 480
Joined: Wed Nov 06, 2019 11:00 am
Location: Valence, France

Re: Clock Signal — an Oric emulator for macOS and Linux

Post by jbperin »

iss wrote: Sun Jul 26, 2020 10:40 am @jbperin: Attached are all Oric related ROM files for Clock Signal (together with a txt file which explains 'who's'who') ;).
Thank you Iss .. Unfortunately, it doesn't prevent ClockSignal from crashing when I drag'n'drop the rom ..

I don't know if there's a way to provide Clock Signal with these roms by an other mean than the drag'n'drop ..
ThomH
Flying Officer
Posts: 238
Joined: Thu Oct 13, 2016 9:55 pm

Re: Clock Signal — an Oric emulator for macOS and Linux

Post by ThomH »

jbperin wrote: Sun Jul 26, 2020 8:05 pm
iss wrote: Sun Jul 26, 2020 10:40 am @jbperin: Attached are all Oric related ROM files for Clock Signal (together with a txt file which explains 'who's'who') ;).
Thank you Iss .. Unfortunately, it doesn't prevent ClockSignal from crashing when I drag'n'drop the rom ..

I don't know if there's a way to provide Clock Signal with these roms by an other mean than the drag'n'drop ..
Assuming you installed the Snap, try refreshing it — `snap refresh clock-signal` from the command line, or there’s probably a check-for-updates button somewhere in the app listing if you’re using one of the storefronts.

I had my Snap-specific confinement options selected incorrectly until about three or four hours ago. As a distribution platform it’s all a little disjointed and failure to declare that I want to be able to read files from the user’s home directory meant that even if you dragged and dropped a file as requested, the emulator still couldn’t read it. That should now be fixed.

There may be other issues lurking as the Qt port that is distributed as a Snap is virtually brand new and severely undertested.
User avatar
jbperin
Flight Lieutenant
Posts: 480
Joined: Wed Nov 06, 2019 11:00 am
Location: Valence, France

Re: Clock Signal — an Oric emulator for macOS and Linux

Post by jbperin »

I had installed Clock Signal with Ubuntu Software utility.

Then I uninstalled it and reinstalled it though snap utility.

Code: Select all

jibe@jibe:~$ sudo snap install clock-signal --edge
[sudo] Mot de passe de jibe : 
clock-signal (edge) 20.7.20 from Thomas Harte (tomharte) installed
jibe@jibe:~$ sudo snap refresh clock-signal
le snap "clock-signal" n'a aucune mise à jour disponible
Now Clock Signal does not crash when I drag and drop the roms that Iss gave me.

So I did it (drag and dropped the roms basic11 and colour) and then tried to start an Atmos .. but I only got a black screen showing nothing.
I was expecting a basic prompt.

Code: Select all

jibe@jibe:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.4 LTS
Release:	18.04
Codename:	bionic
I tried to start Clock Signal from command line prompt and realized that there were a warning message displayed that I could get rid of by unsetting the SESSION_MANAGER variable:

Code: Select all

jibe@jibe:~$ clock-signal
Qt: Session management error: None of the authentication protocols specified are supported
jibe@jibe:~$ unset SESSION_MANAGER
jibe@jibe:~$ clock-signal
I though my problem could come from the fact that I made a mistake while drag'n'dropping two files at once. So I tried to redo the operation.
But I didn't manage to get a second opportunity to drag and drop the roms.

Then I told to myself that I could force Clock Signal to give me the drag'n'drop screen back again by specifying a microdisc device before launcing the Atmos.
But instead I got the app closing with the message:

Code: Select all

Cannot make QOpenGLContext current in a different thread
Abandon
I finally managed to get the drag'n'drop screen back by invoking Cock Signal with an option on command line.

I naively typed :

Code: Select all

clock-signal -h
hoping for help .. But I got the start screen .. splitted in two .. with the drag'n'drop part at the bottom.
Then I tried to drag'n'drop the roms again but Clock Signal seems not to accept the drag'n'drop on this splitted screen.

If never it can help, here are the check sum of the roms I gave Clock Sgnal:

Code: Select all

jibe@jibe:~$ sum clk-roms-pack/basic11.rom
64837    16
jibe@jibe:~$ sum clk-roms-pack/basic10.rom
49049    16
jibe@jibe:~$ sum clk-roms-pack/colour.rom 
31501     1
And I think i did no mistake when drag'n'dropping them because I can find them in the snap directory:

Code: Select all

jibe@jibe:~$ ls /home/jibe/snap/clock-signal/49/.local/share/ClockSignal/ROMImages/Oric/
basic10.rom  basic11.rom  colour.rom  microdisc.rom

ThomH, I don't want you to loose your time with my struggling with Clock Signal.
I would be very glad to help you by testing things on my ubuntu and give you feed back.
So tell me if you want me to do some more test for you.
But don't loose your time to help me if it works fine for other users.
We can just conclude that I'm a piece of S..T and it's ok.

I want to reiterate my congratulation for this great achievement that is ClockSignal .. and I propose to help for testing because I find it is a great soft.
ThomH
Flying Officer
Posts: 238
Joined: Thu Oct 13, 2016 9:55 pm

Re: Clock Signal — an Oric emulator for macOS and Linux

Post by ThomH »

jbperin wrote: Mon Jul 27, 2020 1:22 pm I had installed Clock Signal with Ubuntu Software utility.

Then I uninstalled it and reinstalled it though snap utility.
If it helps at all, Ubuntu Software and direct snap installs are identical — the former uses the latter underneath. But the two distributions I tested with access to the Snap store provided completely different storefronts so giving you the command line was easier.
jbperin wrote: Mon Jul 27, 2020 1:22 pmSo I did it (drag and dropped the roms basic11 and colour) and then tried to start an Atmos .. but I only got a black screen showing nothing.
I was expecting a basic prompt.
I suspect there may be a bug here in a workaround I put in place for Qt's method of vsync handling*. What happens if you resize the window? Does it draw in once, then stop until you resize again?
jbperin wrote: Mon Jul 27, 2020 1:22 pmI though my problem could come from the fact that I made a mistake while drag'n'dropping two files at once. So I tried to redo the operation.
It should handle arbitrarily many files dragged at once, and it identifies them by their CRC32 so you can call them whatever you want. Though it will store them on disk with their normative names.

I couldn't tell you exactly where they are on disk — they're wherever Qt reports that the app should store user configuration data on this machine. Though hopefully it doesn't matter, I think you did this bit correctly.
jbperin wrote: Mon Jul 27, 2020 1:22 pm

Code: Select all

Cannot make QOpenGLContext current in a different thread
Abandon
I saw that myself for the first time yesterday, and have exactly one working theory on it, formulated long after I'd turned the computer off for the day — I think it's whenever one of the activity indicator lights changes, and I've accidentally relied upon something that happened to work in one version of Qt but isn't portable.

So the difference with the Microdisc is that the window should have a bar at the bottom with drive activity lights in it, and drive activity heads over from the emulation thread but then affects a Qt widget. I think I need to do an extra thread hop. I'll check out that theory this evening and push an update if I make any headway.
jbperin wrote: Mon Jul 27, 2020 1:22 pm I finally managed to get the drag'n'drop screen back by invoking Cock Signal with an option on command line.

I naively typed :

Code: Select all

clock-signal -h
hoping for help .. But I got the start screen .. splitted in two .. with the drag'n'drop part at the bottom.
Then I tried to drag'n'drop the roms again but Clock Signal seems not to accept the drag'n'drop on this splitted screen.
Oh, no, that's officially a brand new bug! The Qt version has a really simple command line parser that accepts a file name only. But you've now made me aware that it doesn't properly validate that a file is available.

You're seeing the split-in-two because there's not that much UI so I threw both parts together into a single window and just enable or disable the part that's needed. Clearly in this case the emulator is: (i) expecting to load a file, so doesn't select either part of the UI; but (ii) then doesn't manage to load a file, so also doesn't disable the front-page parts of the UI.

Real amateur hour stuff. I'll try to fix it.
jbperin wrote: Mon Jul 27, 2020 1:22 pmThomH, I don't want you to loose your time with my struggling with Clock Signal.
I would be very glad to help you by testing things on my ubuntu and give you feed back.
So tell me if you want me to do some more test for you.
But don't loose your time to help me if it works fine for other users.
We can just conclude that I'm a piece of S..T and it's ok.

I want to reiterate my congratulation for this great achievement that is ClockSignal .. and I propose to help for testing because I find it is a great soft.
No, no, this is fantastic stuff. I really want to get it working properly as a Snap so that I can move it from the 'edge' channel it is currently in and therefore have a natural Ubuntu Software presence. But the world of Linux is such a wide diversity of targets that it's really hard for me to test any substantial subset of them.

If you have the chance to check whether resizing the window causes a single frame of output, that'd help me to figure out what's possibly afoot there.

* tech footnote, for the curious: Qt offers only the classic post-a-frame-and-block approach to vertical synchronisation. For an emulator I don't like that because it means that as your computer gets faster, latency gets worse — as your computer approaches being infinitely fast then every Oric frame approaches an entire host frame of buffering, giving average output latency heading towards 1.5 output frames.

I've decided to build runtime metrics on how long a frame takes to draw, what the scheduling jitter is, etc, to try to predict the last moment it is safe to start to draw in order to finish just ahead of vsync. So that as your computer gets faster output latency decreases rather than increases, heading towards 0.5 output frames.

There's supposed to be a fallback of "if numbers look incorrect, use standard post-and-block until they make sense again", but I suspect there is an error in that. But, if so, an error as yet undiagnosed.
ThomH
Flying Officer
Posts: 238
Joined: Thu Oct 13, 2016 9:55 pm

Re: Clock Signal — an Oric emulator for macOS and Linux

Post by ThomH »

Update on this!

I'm confident I've fixed the reported crash and the route to a window crammed with all the interface elements at once.

It is also likely that I've fixed the failure to display a screen.

So please once again refresh your snap — either via the command line or through the Ubuntu Software update list — and hopefully things will all look a lot better.

Aside observation though: I booted into a Kubuntu virtual machine that I've been using just to test installing and running as a snap, and it seemed somehow silently to have picked up the update even before I could get to the terminal and ask for it. Which is spooky. If you keep being told that no updates are available then check the version number: I just use the date so the current as of now is 20.7.27. `snap info clock-signal` will do it from the command line if that's easier.

In case anybody joins the conversation now:
  • source and macOS binaries are available from GitHub; and
  • a prebuilt Linux desktop version is available as a Snap.
User avatar
jbperin
Flight Lieutenant
Posts: 480
Joined: Wed Nov 06, 2019 11:00 am
Location: Valence, France

Re: Clock Signal — an Oric emulator for macOS and Linux

Post by jbperin »

I've just refreshed my clock signal snap and I still have a black screen .. :(
Even when I resize the windows.

Code: Select all

jibe@jibe:~$ sudo snap refresh clock-signal
[sudo] Mot de passe de jibe : 
clock-signal (edge) 20.7.27 from Thomas Harte (tomharte) refreshed
jibe@jibe:~$ sudo snap info clock-signal 
name:    clock-signal

....
...
....

snap-id:      hAhWy92W0iaSsdrDfufklSnk0AGAr9QS
tracking:     latest/edge
refresh-date: today at 07:11 CEST
channels:
  latest/stable:    –                            
  latest/candidate: –                            
  latest/beta:      –                            
  latest/edge:      20.7.27 2020-07-28 (57) 97MB -
installed:          20.7.27            (57) 97MB -
I uninstalled and reinstalled it .. Same problem.

Here are the log I've got in dmesg when I start Clock Signal:

Code: Select all

[ 1206.475959] audit: type=1400 audit(1595914045.134:146): apparmor="DENIED" operation="capable" profile="/snap/core/9665/usr/lib/snapd/snap-confine" pid=3375 comm="snap-confine" capability=4  capname="fsetid"
[ 1206.504252] audit: type=1400 audit(1595914045.162:147): apparmor="DENIED" operation="open" profile="snap.clock-signal.clock-signal" name="/snap/core/9665/usr/share/locale/fr/LC_MESSAGES/snappy.mo" pid=3375 comm="snap-exec" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 1250.270940] audit: type=1326 audit(1595914088.933:149): auid=1000 uid=1000 gid=1000 ses=2 pid=3375 comm="ClockSignal" exe="/snap/clock-signal/57/opt/ClockSignal/bin/ClockSignal" sig=0 arch=c000003e syscall=203 compat=0 ip=0x7f24ed40bb9f code=0x50000
[ 1250.270948] audit: type=1326 audit(1595914088.933:148): auid=1000 uid=1000 gid=1000 ses=2 pid=3375 comm="ClockSignal" exe="/snap/clock-signal/57/opt/ClockSignal/bin/ClockSignal" sig=0 arch=c000003e syscall=203 compat=0 ip=0x7f24ed40bb9f code=0x50000
[ 1250.270981] audit: type=1326 audit(1595914088.933:150): auid=1000 uid=1000 gid=1000 ses=2 pid=3375 comm="ClockSignal" exe="/snap/clock-signal/57/opt/ClockSignal/bin/ClockSignal" sig=0 arch=c000003e syscall=203 compat=0 ip=0x7f24ed40bb9f code=0x50000
[ 1250.284063] audit: type=1326 audit(1595914088.945:151): auid=1000 uid=1000 gid=1000 ses=2 pid=3375 comm="ClockSignal" exe="/snap/clock-signal/57/opt/ClockSignal/bin/ClockSignal" sig=0 arch=c000003e syscall=203 compat=0 ip=0x7f24ed40bb9f code=0x50000

Perhaps It doesn't like my french version of Ubuntu .. LOCALE stuff
User avatar
jbperin
Flight Lieutenant
Posts: 480
Joined: Wed Nov 06, 2019 11:00 am
Location: Valence, France

Re: Clock Signal — an Oric emulator for macOS and Linux

Post by jbperin »

OK !! It works !!

The message about the LOCALE made me think of a trick that Iss gave me.

I changed the LOCALE to en_US.utf8 and then I got the wonderful usual basic screen

Code: Select all

jibe@jibe:~$ export LANG=en_US.utf8
jibe@jibe:~$ clock-signal
But I have the qwerty keyboard .. and I got no sound on ZAP ..

But It works far better . :-)
ThomH
Flying Officer
Posts: 238
Joined: Thu Oct 13, 2016 9:55 pm

Re: Clock Signal — an Oric emulator for macOS and Linux

Post by ThomH »

Thanks for giving it a second chance!

Now you mention it, I've had no audio from the emulator in a couple of my Linux virtual machines but I didn't think much of it since virtual machines often have issues like that. But I should check. No doubt there's some sort of error in there.

To clarify on the locale issue: you get a completely blank screen when launching the emulator rather than any sort of GUI, or once you start a machine it then fails to display anything? Regardless, I'll try it in another language tonight and see whether I can reproduce.

Also, I appreciate I'm starting to sound obsessed, but I'm still not happy with the output latency for the Qt version so I want to look further into that. How does it feel on your machine — responsive to every keypress, or sort of like there's a resistance to action that you have to overcome by typing very deliberately?
User avatar
jbperin
Flight Lieutenant
Posts: 480
Joined: Wed Nov 06, 2019 11:00 am
Location: Valence, France

Re: Clock Signal — an Oric emulator for macOS and Linux

Post by jbperin »

ThomH wrote: Tue Jul 28, 2020 7:12 pm To clarify on the locale issue: you get a completely blank screen when launching the emulator rather than any sort of GUI, or once you start a machine it then fails to display anything? Regardless, I'll try it in another language tonight and see whether I can reproduce.
The blank screen happens only when I press the Start Machine button. The rest of the interface works because I could drag and drop the rom. and select Atmos. I even tried to setup a microdisc.

ThomH wrote: Tue Jul 28, 2020 7:12 pm Also, I appreciate I'm starting to sound obsessed, but I'm still not happy with the output latency for the Qt version so I want to look further into that. How does it feel on your machine — responsive to every keypress, or sort of like there's a resistance to action that you have to overcome by typing very deliberately?
It looked responsive but I should have tried an arcade game to really feel how it responds. I'm going to be somewhat busy over the next few days (travelling for vacation). But I'll try to give a try asap.
Post Reply