mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-02-22 06:02:28 +01:00
byuu says: Changelog: - Emulator::Interface::Medium::bootable removed - Emulator::Interface::load(bool required) argument removed [File::Required makes no sense on a folder] - Super Famicom.sys now has user-configurable properties (CPU,PPU1,PPU2 version; PPU1 VRAM size, Region override) - old nall/property removed completely - volatile flags supported on coprocessor RAM files now (still not in icarus, though) - (hopefully) fixed SNES Multitap support (needs testing) - fixed an OAM tiledata range clipping limit in 128KiB VRAM mode (doesn't fix Yoshi's Island, sadly) - (hopefully, again) fixed the input polling bug hex_usr reported - re-added dialog box for when File::Required files are missing - really cool: if you're missing a boot ROM, BIOS ROM, or IPL ROM, it warns you immediately - you don't have to select a game before seeing the error message anymore - fixed cheats.bml load/save location
70 lines
1.6 KiB
C++
70 lines
1.6 KiB
C++
struct Interface;
|
|
|
|
struct System {
|
|
enum class Region : bool { NTSC = 0, PAL = 1 };
|
|
|
|
inline auto loaded() const -> bool { return information.loaded; }
|
|
inline auto region() const -> Region { return information.region; }
|
|
inline auto cpuFrequency() const -> uint { return information.cpuFrequency; }
|
|
inline auto apuFrequency() const -> uint { return information.apuFrequency; }
|
|
|
|
auto run() -> void;
|
|
auto runToSave() -> void;
|
|
|
|
auto init() -> void;
|
|
auto term() -> void;
|
|
auto load() -> bool;
|
|
auto save() -> void;
|
|
auto unload() -> void;
|
|
auto power() -> void;
|
|
auto reset() -> void;
|
|
|
|
//video.cpp
|
|
auto configureVideoPalette() -> void;
|
|
auto configureVideoEffects() -> void;
|
|
|
|
//serialization.cpp
|
|
auto serialize() -> serializer;
|
|
auto unserialize(serializer&) -> bool;
|
|
|
|
private:
|
|
struct Information {
|
|
string manifest;
|
|
bool loaded = false;
|
|
Region region = Region::NTSC;
|
|
uint cpuFrequency = 0;
|
|
uint apuFrequency = 0;
|
|
} information;
|
|
|
|
uint serializeSize = 0;
|
|
|
|
auto serialize(serializer&) -> void;
|
|
auto serializeAll(serializer&) -> void;
|
|
auto serializeInit() -> void;
|
|
|
|
friend class Cartridge;
|
|
};
|
|
|
|
struct Peripherals {
|
|
auto unload() -> void;
|
|
auto reset() -> void;
|
|
auto connect(uint port, uint device) -> void;
|
|
|
|
Controller* controllerPort1 = nullptr;
|
|
Controller* controllerPort2 = nullptr;
|
|
Expansion* expansionPort = nullptr;
|
|
};
|
|
|
|
struct Random {
|
|
auto seed(uint seed) -> void;
|
|
auto operator()(uint result) -> uint;
|
|
auto serialize(serializer& s) -> void;
|
|
|
|
private:
|
|
uint iter = 0;
|
|
};
|
|
|
|
extern System system;
|
|
extern Peripherals peripherals;
|
|
extern Random random;
|