C++ conversion of my C# ZX Spectrum emulator