System: Scaffolding for multi-system/multi-bios

This commit is contained in:
Connor McLaughlin
2019-11-16 15:27:57 +10:00
parent d6209937fb
commit 246c97ccb3
19 changed files with 576 additions and 268 deletions

View File

@ -2,6 +2,8 @@
#include "types.h"
#include "settings.h"
#include <memory>
#include <optional>
#include <vector>
class AudioStream;
class HostDisplay;
@ -23,20 +25,26 @@ public:
/// Returns a settings object which can be modified.
Settings& GetSettings() { return m_settings; }
bool CreateSystem();
bool BootSystem(const char* filename, const char* state_filename);
void DestroySystem();
bool InitializeSystem(const char* filename, const char* exp1_filename);
void ShutdownSystem();
virtual void ReportMessage(const char* message) = 0;
virtual void ReportError(const char* message);
virtual void ReportMessage(const char* message);
// Adds OSD messages, duration is in seconds.
virtual void AddOSDMessage(const char* message, float duration = 2.0f) = 0;
/// Loads the BIOS image for the specified region.
virtual std::optional<std::vector<u8>> GetBIOSImage(ConsoleRegion region);
bool LoadState(const char* filename);
bool SaveState(const char* filename);
protected:
/// Connects controllers. TODO: Clean this up later...
virtual void ConnectControllers();
void UpdateAudioVisualSync();
std::unique_ptr<HostDisplay> m_display;