bsnes/higan/ws/system/system.hpp
Tim Allen bf90bdfcc8 Update to v101r31 release.
byuu says:

Changelog:

  - converted Emulator::Interface::Bind to Emulator::Platform
  - temporarily disabled SGB hooks
  - SMS: emulated Game Gear palette (latching word-write behavior not
    implemented yet)
  - SMS: emulated Master System 'Reset' button, Game Gear 'Start' button
  - SMS: removed reset() functionality, driven by the mappable input now
    instead
  - SMS: split interface class in two: one for Master System, one for
    Game Gear
  - SMS: emulated Game Gear video cropping to 160x144
  - PCE: started on HuC6280 CPU core—so far only registers, NOP
    instruction has been implemented

Errata:

  - Super Game Boy support is broken and thus disabled
  - if you switch between Master System and Game Gear without
    restarting, bad things happen:
      - SMS→GG, no video output on the GG
      - GG→SMS, no input on the SMS

I'm not sure what's causing the SMS\<-\>GG switch bug, having a hard
time debugging it. Help would be very much appreciated, if anyone's up
for it. Otherwise I'll keep trying to track it down on my end.
2017-01-13 12:15:45 +11:00

66 lines
1.6 KiB
C++

struct System : IO {
auto loaded() const -> bool { return _loaded; }
auto model() const -> Model { return _model; }
auto orientation() const -> bool { return _orientation; }
auto color() const -> bool { return r.color; }
auto planar() const -> bool { return r.format == 0; }
auto packed() const -> bool { return r.format == 1; }
auto depth() const -> bool { return r.color && r.depth == 1; }
auto init() -> void;
auto term() -> void;
auto load(Emulator::Interface*, Model) -> bool;
auto save() -> void;
auto unload() -> void;
auto power() -> void;
auto run() -> void;
auto runToSave() -> void;
auto pollKeypad() -> void;
//io.cpp
auto portRead(uint16 addr) -> uint8 override;
auto portWrite(uint16 addr, uint8 data) -> void override;
//video.cpp
auto configureVideoPalette() -> void;
auto configureVideoEffects() -> void;
//serialization.cpp
auto serializeInit() -> void;
auto serialize() -> serializer;
auto unserialize(serializer&) -> bool;
auto serializeAll(serializer&) -> void;
auto serialize(serializer&) -> void;
struct Information {
string manifest;
} information;
EEPROM eeprom;
struct Keypad {
bool y1, y2, y3, y4;
bool x1, x2, x3, x4;
bool b, a, start;
bool rotate;
} keypad;
private:
Emulator::Interface* interface = nullptr;
struct Registers {
//$0060 DISP_MODE
uint5 unknown;
uint1 format;
uint1 depth;
uint1 color;
} r;
bool _loaded = false;
Model _model = Model::WonderSwan;
bool _orientation = 0; //0 = horizontal, 1 = vertical
uint _serializeSize = 0;
};
extern System system;