Outside Context Problem
ZXE - Cross Platform

So, now Microsoft is embracing cross-platform development, I thought I'd try and get my emulator running under macOS.

This was surprisingly easy in the end. All my emulation code is basically a load of class libraries. These use no platform specific features and are written in net7.0, so compiled under Rider on macOS no problem.

Unfortunately the emulator host wouldn't compile even though I'd used MonoGame which is itself cross-platform.

Turns out MonoGame has two NuGet libraries with the same (as far as I can tell) APIs.

I'd chosen WindowsDX, which given it's name, is Windows-specific funnily enough.

I created a new project, ZXE.Desktop.Host using the DesktopGL framework and copied across most of the code from ZXE.Windows.Host.

Hey presto, a working cross-platform emulator host!

Mostly.

I had to edit any code dealing with paths to use forward slashes (Windows these days is happy with either).

Also, I was using the built-in OpenFileDialog to allow the user to browse for Z80/Sna images. This is very Windows-specific.

I ended up deciding to modify my menu system to include a rudimentary file browser.

There we go, a cross-platform implementation of my ZX Spectrum/Z80 emulator.

I've been kicking the can down the road a bit... I might have to tackle sound emulation next as there's not much else (major) to do. Apart from maybe re-factor using the lessons learned, but that's another can I'm currently kicking down the road.

All in all though, I'm happy with the state of things given I only started it about 3 months ago (writing this 24/04/2023).

Here's a video of the emulator and new menu system in action.