mirror of https://github.com/bsnes-emu/bsnes.git
73 lines
1.6 KiB
C++
73 lines
1.6 KiB
C++
namespace GameBoy {
|
|
|
|
struct ID {
|
|
enum : uint {
|
|
System,
|
|
GameBoy,
|
|
SuperGameBoy,
|
|
GameBoyColor,
|
|
};
|
|
|
|
struct Port { enum : uint {
|
|
Hardware,
|
|
};};
|
|
|
|
struct Device { enum : uint {
|
|
Controls,
|
|
};};
|
|
};
|
|
|
|
struct Interface : Emulator::Interface {
|
|
using Emulator::Interface::load;
|
|
|
|
Interface();
|
|
|
|
auto manifest() -> string override;
|
|
auto title() -> string override;
|
|
auto videoFrequency() -> double override;
|
|
auto videoColors() -> uint32 override;
|
|
auto videoColor(uint32 color) -> uint64 override;
|
|
auto audioFrequency() -> double override;
|
|
|
|
auto loaded() -> bool override;
|
|
auto sha256() -> string override;
|
|
auto load(uint id) -> bool override;
|
|
auto save() -> void override;
|
|
auto unload() -> void override;
|
|
|
|
auto power() -> void override;
|
|
auto reset() -> void override;
|
|
auto run() -> void override;
|
|
|
|
auto serialize() -> serializer override;
|
|
auto unserialize(serializer&) -> bool override;
|
|
|
|
auto cheatSet(const string_vector&) -> void override;
|
|
|
|
auto cap(const string& name) -> bool override;
|
|
auto get(const string& name) -> any override;
|
|
auto set(const string& name, const any& value) -> bool override;
|
|
|
|
//Super Game Boy bindings
|
|
struct Hook {
|
|
virtual auto lcdScanline() -> void {}
|
|
virtual auto lcdOutput(uint2 color) -> void {}
|
|
virtual auto joypWrite(bool p15, bool p14) -> void {}
|
|
};
|
|
Hook* hook = nullptr;
|
|
|
|
auto lcdScanline() -> void;
|
|
auto lcdOutput(uint2 color) -> void;
|
|
auto joypWrite(bool p15, bool p14) -> void;
|
|
};
|
|
|
|
struct Settings {
|
|
bool blurEmulation = true;
|
|
bool colorEmulation = true;
|
|
};
|
|
|
|
extern Interface* interface;
|
|
extern Settings settings;
|
|
|
|
}
|