Developer TetrisSQC over on Github has released a ZX Spectrum Emulator built with Delphi Firemonkey. Apparently it works on Android, IOS, OSX, and Windows using a single codebase and single UI. The ZX Spectrum was an 8-bit computer that came out in 1982. There are also different variations in the hardware which were released later and the emulator supports some of those as well (48k, 128k, 2A/3A, Pentagon, and Scorpion). Reviewing the source code it looks like it uses the cross platform SDL library for handling sound. If you want to see how to utilize a cross platform library like this from Firemonkey on Android, IOS, OSX, and Windows this is a great example. Lots of good code here for scanline style drawing too. There is also all kinds of other great code Check out the conditional compilation for loading the library on each platform:
{$IFDEF MACOS} {$IFDEF CPUARM} libsdl = 'libSDL2.a'; {$ELSE} {$IFDEF IOS} libsdl = 'libSDL2.dylib'; {$ELSE} libsdl = 'libSDL.dylib'; {$ENDIF} {$ENDIF} {$ENDIF} {$IFDEF MSWINDOWS} libsdl = 'SDL.dll'; {$ENDIF} {$IFDEF ANDROID} libsdl = 'libSDL2.so'; {$ENDIF}
In any event full source code for the emulator is available over on Github. There are all kinds of games and various other apps that are available for the ZX Spectrum.
Anyone got this working? Under Windows I get the opening screens by loading .z80 files but then it stops working. (Black screen)