mirror of https://github.com/bsnes-emu/bsnes.git
48 lines
1.1 KiB
C++
48 lines
1.1 KiB
C++
|
#pragma once
|
||
|
|
||
|
//license: GPLv3
|
||
|
//started: ...
|
||
|
|
||
|
#include <emulator/emulator.hpp>
|
||
|
#include <emulator/thread.hpp>
|
||
|
#include <emulator/scheduler.hpp>
|
||
|
#include <emulator/cheat.hpp>
|
||
|
|
||
|
#include <processor/z80/z80.hpp>
|
||
|
|
||
|
namespace MSX {
|
||
|
#define platform Emulator::platform
|
||
|
namespace File = Emulator::File;
|
||
|
using Scheduler = Emulator::Scheduler;
|
||
|
using Cheat = Emulator::Cheat;
|
||
|
extern Scheduler scheduler;
|
||
|
extern Cheat cheat;
|
||
|
|
||
|
struct Thread : Emulator::Thread {
|
||
|
auto create(auto (*entrypoint)() -> void, double frequency) -> void {
|
||
|
Emulator::Thread::create(entrypoint, frequency);
|
||
|
scheduler.append(*this);
|
||
|
}
|
||
|
|
||
|
inline auto synchronize(Thread& thread) -> void {
|
||
|
if(clock() >= thread.clock()) scheduler.resume(thread);
|
||
|
}
|
||
|
};
|
||
|
|
||
|
struct Model {
|
||
|
inline static auto MSX() -> bool;
|
||
|
inline static auto MSX2() -> bool;
|
||
|
inline static auto MSX2Plus() -> bool;
|
||
|
inline static auto MSXTurboR() -> bool;
|
||
|
};
|
||
|
|
||
|
struct Region {
|
||
|
inline static auto NTSC() -> bool;
|
||
|
inline static auto PAL() -> bool;
|
||
|
};
|
||
|
|
||
|
#include <msx/system/system.hpp>
|
||
|
}
|
||
|
|
||
|
#include <msx/interface/interface.hpp>
|