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
Squad Leader
Posts: 993
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

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

Post by iss » Mon Jan 27, 2020 6:08 pm

Here one more tip for SDL/Linux users - starting clksignal with:

Code: Select all

$ MESA_GL_VERSION_OVERRIDE=4.5 LIBGL_ALWAYS_SOFTWARE=1 ./clksignal <path_to_media_file>
should help on older machines which drivers doesn't support latest versions of OpenGL.
You can try how it runs with only first, only second or both environment variables preceding './clksignal'.
There can be small lags or performance issue but for testing purposes it worked for me!

ThomH
Flying Officer
Posts: 204
Joined: Thu Oct 13, 2016 9:55 pm

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

Post by ThomH » Mon Jan 27, 2020 7:45 pm

On that issue, I have either an OpenGL ES or a pure-software back-end planned for sometime. Specifically I want Raspberry Pi and/or Wasm compatibility. The sole current pixel renderer, which uses full-fat OpenGL, became something you plugged in shortly after Apple deprecated OpenGL as I will also need to adopt Metal for that platform at some point. But since I don't know Metal, that's somewhat far on the back-burner. It probably shouldn't be, because the profiling tools are fantastic, but there it is.

Actually, the blocker with OpenGL ES was that the Raspberry Pi supports only ES 2, which doesn't have bitwise operators. But now that I'm thinking about it, I may have engineered out that need by pure chance. I should probably check.

EDIT: bonus SDL top tip: as of commits made this weekend --speed=[number] should work if you like running your Oric at double speed, half speed, or any other speed. Though you're then stuck with it for the session. It's infrastructure for another feature, as yet incomplete, that I wanted to expose now in order to keep it current and tested.

ThomH
Flying Officer
Posts: 204
Joined: Thu Oct 13, 2016 9:55 pm

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

Post by ThomH » Thu Feb 13, 2020 6:04 am

A new release is out which:
  • resolves a potential undefined memory access at Oric startup, which I hope is responsible for the misbehaviour discussed above; and
  • adds multi-drive support for the Byte Drive 500.
I've also rejigged the way that certain dull timing issues work, but a notable outcome should be that the macOS version can no longer end up with permanently lost audio just because of a transient performance blip.

EDIT: to be explicit: Jasmin changes are yet to come though. Drive selection is still as if a soft switch, not based on D0, and correspondingly you can't select multiple drives simultaneously.

EDIT2: I also fixed a bug in which disk drives that weren't current 'active', whatever that might mean for a particular machine, would be frozen in time. I suspect with very limited consequences, but it could in theory screw up disk loading times — e.g. you've interleaved your sectors on this four-sector example disk as 0, 2, 1, 3, you want to read 0 and 1 and you'll process sector 0 while sector 2 passes by, but as it so happens you temporarily deselect the drive while processing. In real life it'll still rotate and you'll be nicely cued up for sector 1 when you reactivate it, but in the previously-faulty emulation you'll still be near the start of sector 2 and will need to wait for that to pass by after reactivating the drive.

I'm not aware of any concrete examples of that problem having an effect, but it did exist.

User avatar
iss
Squad Leader
Posts: 993
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

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

Post by iss » Fri Feb 14, 2020 11:08 pm

Well done and great progress!

About the BD500 support I found that clksignal fails to boot (and displays color garbage on screen) when you force to use Oric-1 v.1.0 ROM.
No problem with Atmos 1.1b ROM which is automagically selected by more 'votes' in the StaticAnalyser.cpp. Here is a quick fix:
Instead current code in BD500.cpp (lines 60..62) use this 'cases':

Code: Select all

		case 0x311:	disable_basic_rom_ = true;		break;
		case 0x313:	enable_overlay_ram_ = false;		break;
		case 0x314:	enable_overlay_ram_ = true;		break;
		case 0x317:	disable_basic_rom_ = false;		break;
This should fix the problem. I'll post more info in the 'Byte Drive 500' thread - unfortunately all guesses are based mainly on 'astrology' and 'trial-and-error'.

ThomH
Flying Officer
Posts: 204
Joined: Thu Oct 13, 2016 9:55 pm

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

Post by ThomH » Sat Feb 15, 2020 12:16 am

Thanks, I'll give it a shot when I get back to my development machine.

As well as that, and the Jasmin drive select thing, I think I've also found an issue in the relative volumes of my AY channels — the curve I'm modelling isn't quite right with the result that channels at the loud end are too far apart in volume and channels down at the quiet end are too close together. I'm going to look into that.

So another update may be forthcoming sooner rather than later.

ThomH
Flying Officer
Posts: 204
Joined: Thu Oct 13, 2016 9:55 pm

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

Post by ThomH » Mon Feb 17, 2020 5:51 am

Update: there's a new release, which fixes everything other than providing intermingled content if multiple Jasmin drives are selected and contain disks. But, Byte Drive done, Jasmin drive selection is no longer a function of address access order, the AY volume curve is better matched to real hardware, and I fixed a couple of issues that were specific to the last release — a potential crash on macOS, and the new absence of full-screen mode for SDL targets.

ThomH
Flying Officer
Posts: 204
Joined: Thu Oct 13, 2016 9:55 pm

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

Post by ThomH » Thu Mar 26, 2020 8:00 pm

It's probably not worth trickle-announcing what's going on with Clock Signal, but in case it's of interest to anyone:
  • SDL/kiosk-mode users can now instantiate a new machine without providing a piece of media, can override any of the emulator's default hardware picks if supplying a piece of media, and can supply arbitrarily many pieces of media at once; and
  • if you were to pull/build from master rather than the most recent tagged release you'd gain control over volume, and a potential crash in NIB handling has been rectified for 8DOS users.
Point one is a result of deciding to try to force myself into settling on a form of sort-of reflection that is a manageable amount of work in C++ so I have the vague intention of following that chain of thought potentially to implement save states, debuggers, etc, but that'll rumble on for a while before showing any results as they're both big-ticket items and I still prefer to fix user-reported issues over inventing work for myself so they're highly interruptible. But the main hurdle for my emulator has always been how you do those things without having fully to redo them every time I add a new machine, so doing something reflection-esque has always been hurdle 1.

But to be explicit, my most-preferred form of using this emulator is still: double click any supported piece of software in your file manager. That piece of software launches and runs. So the emulator is always going to be heavily tilted towards making selections for you and minimising UI.

Releases are where they've always been. That's a link to the releases section of a Github repository, so navigate from there if you want to avoid the tagged releases and just grab the latest. I try to merge back to master only once something appears to work but I could be more rigorous.

User avatar
Dbug
Site Admin
Posts: 3211
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 » Thu Mar 26, 2020 8:39 pm

I don't think there's a lack of interest in your emulator, I don't know for other people, but for me all that stop me from trying it is the lack of a Windows executable ready to use.

User avatar
ibisum
Wing Commander
Posts: 1218
Joined: Fri Apr 03, 2009 8:56 am
Location: Vienna, Austria
Contact:

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

Post by ibisum » Thu Mar 26, 2020 8:47 pm

Yeah I've started to use Clock Signal more and more - its often interesting to see the differences between it and Oricutron for some things ..

ThomH
Flying Officer
Posts: 204
Joined: Thu Oct 13, 2016 9:55 pm

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

Post by ThomH » Thu Mar 26, 2020 9:10 pm

Sorry, yes, that was phrased in an unduly downbeat manner. What I meant was: developments are small, and incremental, and each one may therefore be fairly uninteresting. Especially as a lot of them are fairly standard emulator features that few authors would defer until almost the emulator's fifth (!) birthday.

Re: Windows, that is increasingly embarrassing. Well, that plus the lack of an explicit GUI option for Linux users. C++/WinRT looks highly tractable subject to some minor OpenGL adjustments to fit within ANGLE, but Windows 10 is essentially unusable on my hardware so that's the current blocker. I've never considered it too high a priority because I don't think I bring that much to the table given the huge diversity of emulators for Windows. Conversely there are very few emulators that act like ordinary native applications for macOS, and weirdly few open source Linux emulators at all for some of the other machines I cover such as the Amstrad CPC.

User avatar
Dbug
Site Admin
Posts: 3211
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 » Thu Mar 26, 2020 9:28 pm

Well, my interest is that I wanted to make an Oriclopedia video presenting the various emulators, what they are good at, limitations, etc... and it would be a shame to skip over yours simply because I don't have any Apple hardware around :)

User avatar
iss
Squad Leader
Posts: 993
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

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

Post by iss » Thu Mar 26, 2020 10:21 pm

Incredible work, @ThomH!
As I already said I follow you permanently and do Oric tests on every new commit.
Here is small detail which can be useful for users which want to compile CLK from source under XCode: recently I have to change the signing to be able to build the executable:
xcode-signing.png
xcode-signing.png (252.56 KiB) Viewed 255 times
This is not an issue but for not so experienced user of XCode (like me ;)) it can be pain.

ThomH
Flying Officer
Posts: 204
Joined: Thu Oct 13, 2016 9:55 pm

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

Post by ThomH » Sun Mar 29, 2020 10:08 pm

Dbug wrote:
Thu Mar 26, 2020 9:28 pm
Well, my interest is that I wanted to make an Oriclopedia video presenting the various emulators, what they are good at, limitations, etc... and it would be a shame to skip over yours simply because I don't have any Apple hardware around :)
If there's any footage I can supply for any purpose — a throwaway mention that you couldn't use this emulator, but it exists, for example — let me know.
iss wrote:
Thu Mar 26, 2020 10:21 pm
Here is small detail which can be useful for users which want to compile CLK from source under XCode: recently I have to change the signing to be able to build the executable:
xcode-signing.png
This is not an issue but for not so experienced user of XCode (like me ;)) it can be pain.
Must be leftover from a failed attempt to obtain a developer account, the backstory to which is a very boring tale of iTunes Match international portability and the countries in which I still have credit or debit cards. I'll fix it. Thanks for pointing it out!

Post Reply