mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-02-24 15:12:23 +01:00
byuu says: Changelog: - added higan/emulator/platform.hpp (moved out Emulator::Platform from emulator/interface.hpp) - moved gmake build paramter to nall/GNUmakefile; both higan and icarus use it now - added build=profile mode - MD: added the region select I/O register - MD: started to add region selection support internally (still no external select or PAL support) - PCE: added cycle stealing when reading/writing to the VDC or VCE; and when using ST# instructions - PCE: cleaned up PSG to match the behavior of Mednafen (doesn't improve sound at all ;_;) - note: need to remove loadWaveSample, loadWavePeriod - HuC6280: ADC/SBC decimal mode consumes an extra cycle; does not set V flag - HuC6280: block transfer instructions were taking one cycle too many - icarus: added code to strip out PC Engine ROM headers - hiro: added options support to BrowserDialog The last one sure ended in failure. The plan was to put a region dropdown directly onto hiro::BrowserDialog, and I had all the code for it working. But I forgot one important detail: the system loads cartridges AFTER powering on, so even though I could technically change the system region post-boot, I'd rather not do so. So that means we have to know what region we want before we even select a game. Shit.
20 lines
832 B
C++
20 lines
832 B
C++
#pragma once
|
|
|
|
namespace Emulator {
|
|
|
|
struct Platform {
|
|
virtual auto path(uint id) -> string { return ""; }
|
|
virtual auto open(uint id, string name, vfs::file::mode mode, bool required = false) -> vfs::shared::file { return {}; }
|
|
virtual auto load(uint id, string name, string type) -> maybe<uint> { return nothing; }
|
|
virtual auto videoRefresh(const uint32* data, uint pitch, uint width, uint height) -> void {}
|
|
virtual auto audioSample(const double* samples, uint channels) -> void {}
|
|
virtual auto inputPoll(uint port, uint device, uint input) -> int16 { return 0; }
|
|
virtual auto inputRumble(uint port, uint device, uint input, bool enable) -> void {}
|
|
virtual auto dipSettings(Markup::Node node) -> uint { return 0; }
|
|
virtual auto notify(string text) -> void { print(text, "\n"); }
|
|
};
|
|
|
|
extern Platform* platform;
|
|
|
|
}
|