Clock Signal: now useable under Qt, too

discuss bbc micro and electron emulators (including mame) here!
Post Reply
ThomasHarte
Posts: 536
Joined: Sat Dec 23, 2000 5:56 pm
Contact:

Clock Signal: now useable under Qt, too

Post by ThomasHarte »

Clock Signal is:
  • an emulator of multiple systems, including the Acorn Electron;
  • that tries to be a little more rigorous than the average in audio and video output — raw audio is sampled at the machine's native rate then lowpass filtered and resampled to whatever your machine supports, composite video output is offered via a genuine composite encoding and decoding, etc;
  • which attempts to optimise for user friendliness and emulator invisibility, automatically selecting a hardware configuration, entering appropriate loading commands, etc, when the user selects a piece of media.
It has for a long time had both a native Cocoa port for Mac users and an SDL kiosk mode that works on other UNIX-esque operating systems. It now also has a native Qt port:
MultipleSystems-Ubuntu.png
Potentially also of interest compared to other emulators: windows are freely resizeable and you may use arbitrarily many emulated machines at once. If it needs additional ROM images then it'll ask you to provide them via the GUI.

Interesting file formats supported are, at least: UEF, SSD/DSD, HFE (with HFEv3 support coming soon). Once you've started an Electron it'll actually allow you to insert any disk format the emulator otherwise supports so you can also prove to yourself that a WD1770 really, really can't read Apple GCR if you wish; potentially more useful is inserting things like DMKs, Amstrad CPC-style DSKs, etc, for data exchange.

I'm looking into providing this as a Snap so that it appears directly in the app stores of some Linux distributions but haven't quite hit upon the magic formula yet. If anybody has any experience in that, I'd certainly welcome it.

If you're a Mac user, you'll probably prefer to grab a binary release.
Last edited by ThomasHarte on Mon Jul 13, 2020 5:13 pm, edited 3 times in total.
User avatar
0xC0DE
Posts: 864
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Clock Signal: now useable under Qt, too

Post by 0xC0DE »

Hi Thomas, thanks again for your great talk! I really, really want to experiment with CLK but I can't figure out if it is possible (and easy) to build a Windows version?
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
ThomasHarte
Posts: 536
Joined: Sat Dec 23, 2000 5:56 pm
Contact:

Re: Clock Signal: now useable under Qt, too

Post by ThomasHarte »

0xC0DE wrote:
Mon Jul 13, 2020 3:36 pm
Hi Thomas, thanks again for your great talk! I really, really want to experiment with CLK but I can't figure out if it is possible (and easy) to build a Windows version?
Alas, I don't have a good answer for that question. I haven't used Windows at home for 17 years, or at work for 12. That said, I've pretty much mapped out my development arc for the year: implement an Apple Metal backend so that I don't lose the Mac port upon the switch to ARM, then get on with a Windows port, by hook or by crook.

I dare imagine the Qt version might build for Windows, but you'd need to do a little work to get the keyboard working properly. I found Qt to be pretty deficient in that area and had to use an X11-specific workaround at the last moment, which I'm still annoyed about. Also I don't know how well Qt works under Windows; it's pretty terrible on the Mac but most cross-platform toolkits are. Macs just aren't that important.
Last edited by ThomasHarte on Mon Jul 13, 2020 5:14 pm, edited 2 times in total.
User avatar
0xC0DE
Posts: 864
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Clock Signal: now useable under Qt, too

Post by 0xC0DE »

Thanks for your reply. I guess the fastest route for me at the moment is to fire up a virtual machine with Ubuntu :D
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
0xC0DE
Posts: 864
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Clock Signal: now useable under Qt, too

Post by 0xC0DE »

I've got it working in VMware/Ubuntu! I'm running the Electron emulator part and noticed that the screen is quite wobbly. It doesn't matter if I select RGB, CompositeColour or CompositeMonochrome. Is that a feature of the interlaced PAL signal?
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
ThomasHarte
Posts: 536
Joined: Sat Dec 23, 2000 5:56 pm
Contact:

Re: Clock Signal: now useable under Qt, too

Post by ThomasHarte »

0xC0DE wrote:
Sat Jul 18, 2020 1:59 pm
I've got it working in VMware/Ubuntu! I'm running the Electron emulator part and noticed that the screen is quite wobbly. It doesn't matter if I select RGB, CompositeColour or CompositeMonochrome. Is that a feature of the interlaced PAL signal?
Almost certainly; there's no explicit deinterlacing strategy, but it ends up being a blended bob as a result of obeying syncs properly and the persistence-of-vision stuff. The main problem with it is that it doesn't degrade gracefully if your machine starts to drop frames, which is very possible if you're using a virtual machine. I think I'd need to do a lot more about bucketing things by field and proactively monitoring the output rate to do a better job there.
ThomasHarte
Posts: 536
Joined: Sat Dec 23, 2000 5:56 pm
Contact:

Re: Clock Signal: now useable under Qt, too

Post by ThomasHarte »

Minor update: Clock Signal's Snap listing now possibly works.

Snaps are not Ubuntu-specific but this also means that if you're a Ubuntu user then Clock Signal should now be listed in the 'Ubuntu Software' storefront. Hopefully. I'm not good at this stuff.
ThomasHarte
Posts: 536
Joined: Sat Dec 23, 2000 5:56 pm
Contact:

Re: Clock Signal: now useable under Qt, too

Post by ThomasHarte »

Update again: the first round of Qt and Snap bug reports has thrown light on some extreme flaws but I'm hoping that everything severe is now fixed.

So if you've tried to use the Qt build before via either route to availability, it's definitely worth updating. Binaries via Snap; tagged source from GitHub.

I'm still not quite confident enough to move it out of the 'edge' channel in Snap thereby making it visible by default in Ubuntu Software and related storefronts, so feedback would definitely be welcome. Thanks!
User avatar
Kecske Bak
Posts: 733
Joined: Wed Jul 13, 2005 8:03 am
Location: Treddle's Wharf, Chigley
Contact:

Re: Clock Signal: now useable under Qt, too

Post by Kecske Bak »

I have to use the proprietory drivers for my Radeon card as I need to use GPU rendering in Blender. Sadly, this means Clock Signal, like BBC Basic for SDL, fails to work. I'm using Kubuntu 18.04 with the amdgpu-pro-19.30-855429-ubuntu-18.04 driver.

Code: Select all

/usr/share/libdrm/amdgpu.ids: No such file or directory
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: radeonsi
/usr/share/libdrm/amdgpu.ids: No such file or directory
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: radeonsi
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
QOpenGLWidget: Failed to make context current
QOpenGLWidget: Failed to make context current
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
Could not link shader program:
 ""
Segmentation fault (core dumped)
ThomasHarte
Posts: 536
Joined: Sat Dec 23, 2000 5:56 pm
Contact:

Re: Clock Signal: now useable under Qt, too

Post by ThomasHarte »

I have to admit to having insufficient experience to know how I would do anything more useful than gracefully report the problem there.

I'll have to do some more reading.
User avatar
Kecske Bak
Posts: 733
Joined: Wed Jul 13, 2005 8:03 am
Location: Treddle's Wharf, Chigley
Contact:

Re: Clock Signal: now useable under Qt, too

Post by Kecske Bak »

It's no problem. Richard Russell's BBC Basic for SDL fails for the same reason - I really should rebuild this computer to have a dual boot - close source drivers and open source drivers and then I wouldn't be such a nuisance!
User avatar
daveejhitchins
Posts: 6221
Joined: Wed Jun 13, 2012 6:23 pm
Location: Newton Aycliffe, County Durham
Contact:

Re: Clock Signal: now useable under Qt, too

Post by daveejhitchins »

A test Disc for the latest version of Clock Signal
Disc8.adl.zip
(306.29 KiB) Downloaded 9 times
Dave H.
ThomasHarte
Posts: 536
Joined: Sat Dec 23, 2000 5:56 pm
Contact:

Re: Clock Signal: now useable under Qt, too

Post by ThomasHarte »

Such as it may help for context:

By complete oversight, CLK just currently doesn't handle ADL files. It also slightly trips over itself if trying automatically to issue a loading command that starts with a modifier, such as *CAT or *RUN (in both of which the modifier is shift), as it starts typing a little too early and makes it look like a shift+break, ctrl+break or whatever is relevant.

I'm also adding the ability to detect when disk images use any of the expansion ROM-type commands that an Electron doesn't usually have, in which case the Advanced Plus 6 RH Plus 1 ROM will be added to the machine automatically, along with some sideways RAM (so that *SRLOAD/etc make sense).

Especially given that I've already invested some work in SCSI drives for Macintosh Plus purposes, I also hope to look at hard disk support. Subject to test media, and such documentation as I can find, naturally.
ThomasHarte
Posts: 536
Joined: Sat Dec 23, 2000 5:56 pm
Contact:

Re: Clock Signal: now useable under Qt, too

Post by ThomasHarte »

On this, and with nowhere else obvious to ask: does anybody know ADFS is trying to say in returning:

Disc error 7F

... when saving to a SCSI drive? That error code seems to be undocumented, and occurs only after the thing I'm trying to save has been written, the relevant catalogue updated, and then the free-space map written. Actually there seems to be a retry mechanism on this so I'm seeing the updated free-space map be written many times over before ADFS gives up and posts that error.

It seems simultaneously to unmount the device, so clearly 7F is a serious one.
ThomasHarte
Posts: 536
Joined: Sat Dec 23, 2000 5:56 pm
Contact:

Re: Clock Signal: now useable under Qt, too

Post by ThomasHarte »

Scratch that question, I managed to resolve the issue; as a result, a new release is going out now.

As promised, changes affecting the Electron are:
  • fixed support for ADL disk images;
  • added support for SCSI hard disks; and
  • added new autodetection criteria potentially to add the Advanced Plus 6 paged ROM to an Electron if the software being loaded appears to utilise the functionality it retroports (e.g. *TYPE, or *SRLOAD).
As always: Mac releases here; Linux/Qt binaries available via Snapcraft; or check out the repository to build either of those, or the SDL version, for yourself.

I'm posting this slightly prematurely because the Snapcraft build is still in-progress, but it should propagate soon.

---

Technical chatter: the bug above was caused by the failure of my implementation of Acorn's SCSI to output to the data bus only when the SCSI IO signal indicates that the target expects to receive data. As a result a logical OR of whatever is latched — i.e. the last-written byte — and the actual status and message bytes was being received by ADFS after completing a write. Which made for a nonsensical status.
User avatar
daveejhitchins
Posts: 6221
Joined: Wed Jun 13, 2012 6:23 pm
Location: Newton Aycliffe, County Durham
Contact:

Re: Clock Signal: now useable under Qt, too

Post by daveejhitchins »

It would be good to be able to specifically have the Plus 1 and ROM loaded e.g. I've just needed to load some ROMs for testing - ended up having to have a one line BASIC program (with *SRLOAD 1234 3) saved onto the disc I was using! Not disastrous - but!

Dave H.
ThomasHarte
Posts: 536
Joined: Sat Dec 23, 2000 5:56 pm
Contact:

Re: Clock Signal: now useable under Qt, too

Post by ThomasHarte »

daveejhitchins wrote:
Sun Feb 21, 2021 7:49 pm
It would be good to be able to specifically have the Plus 1 and ROM loaded e.g. I've just needed to load some ROMs for testing - ended up having to have a one line BASIC program (with *SRLOAD 1234 3) saved onto the disc I was using! Not disastrous - but!

Dave H.
If you use File -> New... under either macOS or Qt then just tick the 'With Advanced Plus 6 Utility ROM' box. If using SDL, check out the `has_ap6_rom` command-line option.

Unless I've made an error somewhere, your dialogue selections under File -> New... are preserved within that dialogue between launches, so from then on it's just [Command/Control]+N, Enter to get into the Electron of your selection.

EDIT: but, otherwise, on the much wider topic of being a development tool versus taking all possible decisions on a user's behalf, obviously that I eventually let somebody* talk me into adding 'File -> New...' means that I'm no longer at the extreme I once was but I doubt I'm ever going to do anything to move away from 'File -> Open...' (and equivalent) being the no-further-input-necessary route to running software for any supported machine.

* actually, the standard macOS document classes talked me into it, because it kind of stops being optional if users are grouping your windows by tabbing as you can't disable the '+' button they then see if you've declared yourself to be an 'editor' for any file format rather than merely a 'viewer'. So it was all about my other obsession of using a fully normative UI on every supported platform.

That all being said, my long trek towards adding a debugger continues slowly. There's stuff in there for fully-reflective enums and structs, and that's what SDL actually uses for command-line parsing so it's maintained. The main three processors† can all be mapped to and from a suitable piece of reflective state. I've just yet to do the legwork for everything that isn't a processor.

Getting that done should allow me to offer a basic gdb-type experience almost for free, which I have the vague intention initially to sneak in mostly unmentioned as a telnet destination.

That is, if I'm not stuck on this darned Apple IIgs for the entire rest of my life.
User avatar
daveejhitchins
Posts: 6221
Joined: Wed Jun 13, 2012 6:23 pm
Location: Newton Aycliffe, County Durham
Contact:

Re: Clock Signal: now useable under Qt, too

Post by daveejhitchins »

ThomasHarte wrote:
Tue Feb 23, 2021 2:48 pm
daveejhitchins wrote:
Sun Feb 21, 2021 7:49 pm
It would be good to be able to specifically have the Plus 1 and ROM loaded e.g. I've just needed to load some ROMs for testing - ended up having to have a one line BASIC program (with *SRLOAD 1234 3) saved onto the disc I was using! Not disastrous - but!

Dave H.
If you use File -> New... under either macOS or Qt then just tick the 'With Advanced Plus 6 Utility ROM' box. If using SDL, check out the `has_ap6_rom` command-line option.

Unless I've made an error somewhere, your dialogue selections under File -> New... are preserved within that dialogue between launches, so from then on it's just [Command/Control]+N, Enter to get into the Electron of your selection.

Brilliant - thanks for the pointer

EDIT: but, otherwise, on the much wider topic of being a development tool versus taking all possible decisions on a user's behalf, obviously that I eventually let somebody* talk me into adding 'File -> New...' means that I'm no longer at the extreme I once was but I doubt I'm ever going to do anything to move away from 'File -> Open...' (and equivalent) being the no-further-input-necessary route to running software for any supported machine.

* actually, the standard macOS document classes talked me into it, because it kind of stops being optional if users are grouping your windows by tabbing as you can't disable the '+' button they then see if you've declared yourself to be an 'editor' for any file format rather than merely a 'viewer'. So it was all about my other obsession of using a fully normative UI on every supported platform.

That all being said, my long trek towards adding a debugger continues slowly. There's stuff in there for fully-reflective enums and structs, and that's what SDL actually uses for command-line parsing so it's maintained. The main three processors† can all be mapped to and from a suitable piece of reflective state. I've just yet to do the legwork for everything that isn't a processor.

Getting that done should allow me to offer a basic gdb-type experience almost for free, which I have the vague intention initially to sneak in mostly unmentioned as a telnet destination.

That is, if I'm not stuck on this darned Apple IIgs for the entire rest of my life.
Post Reply

Return to “8-bit acorn emulators”