#pragma once //license: GPLv3 //started: 2016-07-08 #include #include #include #include #include namespace MegaDrive { #define platform Emulator::platform namespace File = Emulator::File; using Scheduler = Emulator::Scheduler; extern Scheduler scheduler; struct Wait { enum : uint { VDP_DMA = 1 << 0, }; }; struct Thread : Emulator::Thread { auto create(auto (*entrypoint)() -> void, double frequency) -> void { Emulator::Thread::create(entrypoint, frequency); scheduler.append(*this); wait = 0; } inline auto synchronize(Thread& thread) -> void { if(clock() >= thread.clock()) scheduler.resume(thread); } uint wait = 0; }; struct Region { inline static auto NTSCJ() -> bool; inline static auto NTSCU() -> bool; inline static auto PAL() -> bool; }; #include #include #include #include #include #include #include #include #include } #include