2005-02-21 02:23:57 +00:00
|
|
|
//============================================================================
|
|
|
|
//
|
2016-12-30 00:00:30 +00:00
|
|
|
// SSSS tt lll lll
|
|
|
|
// SS SS tt ll ll
|
|
|
|
// SS tttttt eeee ll ll aaaa
|
2005-02-21 02:23:57 +00:00
|
|
|
// SSSS tt ee ee ll ll aa
|
|
|
|
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
|
|
|
|
// SS SS tt ee ll ll aa aa
|
|
|
|
// SSSS ttt eeeee llll llll aaaaa
|
|
|
|
//
|
2019-01-01 15:05:51 +00:00
|
|
|
// Copyright (c) 1995-2019 by Bradford W. Mott, Stephen Anthony
|
2010-04-10 21:37:23 +00:00
|
|
|
// and the Stella Team
|
2005-02-21 02:23:57 +00:00
|
|
|
//
|
2010-01-10 03:23:32 +00:00
|
|
|
// See the file "License.txt" for information on usage and redistribution of
|
2005-02-21 02:23:57 +00:00
|
|
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
|
|
|
//============================================================================
|
|
|
|
|
|
|
|
#ifndef OSYSTEM_HXX
|
|
|
|
#define OSYSTEM_HXX
|
|
|
|
|
2007-09-03 18:37:24 +00:00
|
|
|
class Console;
|
2017-11-16 17:01:20 +00:00
|
|
|
class FrameBuffer;
|
2017-12-21 01:26:22 +00:00
|
|
|
class EventHandler;
|
2007-09-03 18:37:24 +00:00
|
|
|
class Properties;
|
|
|
|
class PropertiesSet;
|
2014-10-26 15:54:02 +00:00
|
|
|
class Random;
|
2007-09-03 18:37:24 +00:00
|
|
|
class Sound;
|
2007-09-23 17:04:17 +00:00
|
|
|
class StateManager;
|
2018-08-23 14:18:24 +00:00
|
|
|
class TimerManager;
|
2018-06-07 21:38:14 +00:00
|
|
|
class EmulationWorker;
|
2018-08-29 11:40:55 +00:00
|
|
|
class AudioSettings;
|
2019-05-03 23:12:16 +00:00
|
|
|
#ifdef CHEATCODE_SUPPORT
|
|
|
|
class CheatManager;
|
|
|
|
#endif
|
|
|
|
#ifdef DEBUGGER_SUPPORT
|
|
|
|
class Debugger;
|
|
|
|
#endif
|
|
|
|
#ifdef GUI_SUPPORT
|
|
|
|
class CommandMenu;
|
|
|
|
class Launcher;
|
|
|
|
class Menu;
|
|
|
|
class TimeMachine;
|
|
|
|
class VideoDialog;
|
|
|
|
#endif
|
2019-05-02 20:28:39 +00:00
|
|
|
#ifdef PNG_SUPPORT
|
|
|
|
class PNGLibrary;
|
|
|
|
#endif
|
2019-05-03 23:12:16 +00:00
|
|
|
#ifdef SQLITE_SUPPORT
|
|
|
|
class SettingsDb;
|
2019-05-02 20:28:39 +00:00
|
|
|
#endif
|
2005-02-21 02:23:57 +00:00
|
|
|
|
2018-07-30 21:19:09 +00:00
|
|
|
#include <chrono>
|
|
|
|
|
2013-02-12 21:57:14 +00:00
|
|
|
#include "FSNode.hxx"
|
2017-11-16 17:01:20 +00:00
|
|
|
#include "FrameBufferConstants.hxx"
|
2017-12-21 01:26:22 +00:00
|
|
|
#include "EventHandlerConstants.hxx"
|
2018-07-30 21:19:09 +00:00
|
|
|
#include "FpsMeter.hxx"
|
2019-02-21 03:13:29 +00:00
|
|
|
#include "Settings.hxx"
|
2005-02-21 02:23:57 +00:00
|
|
|
#include "bspf.hxx"
|
2019-04-25 22:14:21 +00:00
|
|
|
#include "repository/KeyValueRepository.hxx"
|
2005-02-21 02:23:57 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
This class provides an interface for accessing operating system specific
|
|
|
|
functions. It also comprises an overall parent object, to which all the
|
|
|
|
other objects belong.
|
|
|
|
|
|
|
|
@author Stephen Anthony
|
|
|
|
*/
|
|
|
|
class OSystem
|
|
|
|
{
|
Some configure work:
- removed TEXTURES_ARE_DIRTY logic, and just recreate the GL textures
when a screenmode changes
- enable checking for machine type and if nasm is available
- logic to enable scaler mode only when in OpenGL mode (still not complete
and defaults to off)
First pass at adding scaler code to OpenGL. Still much work TODO,
but the C version is working correctly (asm is causing crashes,
haven't figured out why). GL quad coordinates aren't properly
set yet, so the image always appears in the upper left corner, and
is not scaled to the window size. CPU usage is also quite high,
but I'm on a 1GHz laptop with i950 GL, so that may explain it.
Fixed long-standing bug in software rendering, where switching to a
lower-res screen while a message is being displayed would cause a
segfault.
Large refactoring of mainSDL. Specifically, OSystem now owns all
the subsystems except for Settings, taking responsibility for creating
and destroying them.
Properties fixes for 'Tomarc the Barbarian' and 'Gyruss'.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1136 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2006-10-22 18:58:46 +00:00
|
|
|
friend class EventHandler;
|
|
|
|
|
2005-02-21 02:23:57 +00:00
|
|
|
public:
|
2005-02-21 20:43:53 +00:00
|
|
|
OSystem();
|
2005-02-21 02:23:57 +00:00
|
|
|
virtual ~OSystem();
|
|
|
|
|
2006-01-08 13:55:03 +00:00
|
|
|
/**
|
|
|
|
Create all child objects which belong to this OSystem
|
|
|
|
*/
|
|
|
|
virtual bool create();
|
|
|
|
|
2019-05-04 18:21:29 +00:00
|
|
|
/**
|
|
|
|
Creates the various framebuffers/renderers available in this system.
|
|
|
|
Note that it will only create one type per run of Stella.
|
|
|
|
|
|
|
|
@return Success or failure of the framebuffer creation
|
|
|
|
*/
|
|
|
|
FBInitStatus createFrameBuffer();
|
|
|
|
|
2005-02-21 02:23:57 +00:00
|
|
|
public:
|
|
|
|
/**
|
2014-10-18 15:57:03 +00:00
|
|
|
Get the event handler of the system.
|
2005-02-21 02:23:57 +00:00
|
|
|
|
|
|
|
@return The event handler
|
|
|
|
*/
|
2011-05-10 15:04:19 +00:00
|
|
|
EventHandler& eventHandler() const { return *myEventHandler; }
|
2005-02-21 02:23:57 +00:00
|
|
|
|
|
|
|
/**
|
2014-10-18 15:57:03 +00:00
|
|
|
Get the frame buffer of the system.
|
2005-02-21 02:23:57 +00:00
|
|
|
|
|
|
|
@return The frame buffer
|
|
|
|
*/
|
2011-05-10 15:04:19 +00:00
|
|
|
FrameBuffer& frameBuffer() const { return *myFrameBuffer; }
|
2005-02-21 02:23:57 +00:00
|
|
|
|
|
|
|
/**
|
2014-10-18 15:57:03 +00:00
|
|
|
Get the sound object of the system.
|
2005-02-21 02:23:57 +00:00
|
|
|
|
|
|
|
@return The sound object
|
|
|
|
*/
|
2011-05-10 15:04:19 +00:00
|
|
|
Sound& sound() const { return *mySound; }
|
2005-02-21 02:23:57 +00:00
|
|
|
|
|
|
|
/**
|
2014-10-18 15:57:03 +00:00
|
|
|
Get the settings object of the system.
|
2005-02-21 02:23:57 +00:00
|
|
|
|
|
|
|
@return The settings object
|
|
|
|
*/
|
2011-05-10 15:04:19 +00:00
|
|
|
Settings& settings() const { return *mySettings; }
|
2005-02-21 02:23:57 +00:00
|
|
|
|
2014-10-26 15:54:02 +00:00
|
|
|
/**
|
|
|
|
Get the random object of the system.
|
|
|
|
|
|
|
|
@return The random object
|
|
|
|
*/
|
|
|
|
Random& random() const { return *myRandom; }
|
|
|
|
|
2005-02-21 02:23:57 +00:00
|
|
|
/**
|
2014-10-18 15:57:03 +00:00
|
|
|
Get the set of game properties for the system.
|
2005-02-21 02:23:57 +00:00
|
|
|
|
|
|
|
@return The properties set object
|
|
|
|
*/
|
2018-08-17 16:26:08 +00:00
|
|
|
PropertiesSet& propSet() const { return *myPropSet; }
|
2005-02-21 20:43:53 +00:00
|
|
|
|
|
|
|
/**
|
2014-10-18 15:57:03 +00:00
|
|
|
Get the console of the system. The console won't always exist,
|
|
|
|
so we should test if it's available.
|
2005-02-21 20:43:53 +00:00
|
|
|
|
|
|
|
@return The console object
|
|
|
|
*/
|
2011-05-10 15:04:19 +00:00
|
|
|
Console& console() const { return *myConsole; }
|
2016-01-18 16:03:22 +00:00
|
|
|
bool hasConsole() const;
|
2008-03-31 00:59:30 +00:00
|
|
|
|
2018-06-24 22:30:52 +00:00
|
|
|
/**
|
2018-08-29 11:40:55 +00:00
|
|
|
Get the audio settings object of the system.
|
|
|
|
|
|
|
|
@return The audio settings object
|
|
|
|
*/
|
|
|
|
AudioSettings& audioSettings() { return *myAudioSettings; }
|
2018-06-24 22:30:52 +00:00
|
|
|
|
2007-09-23 17:04:17 +00:00
|
|
|
/**
|
|
|
|
Get the state manager of the system.
|
|
|
|
|
|
|
|
@return The statemanager object
|
|
|
|
*/
|
2011-05-10 15:04:19 +00:00
|
|
|
StateManager& state() const { return *myStateManager; }
|
2007-09-23 17:04:17 +00:00
|
|
|
|
2018-08-23 14:18:24 +00:00
|
|
|
/**
|
|
|
|
Get the timer/callback manager of the system.
|
|
|
|
|
|
|
|
@return The timermanager object
|
|
|
|
*/
|
|
|
|
TimerManager& timer() const { return *myTimerManager; }
|
|
|
|
|
2012-05-13 18:06:56 +00:00
|
|
|
/**
|
2019-02-21 03:13:29 +00:00
|
|
|
This method should be called to initiate the process of loading settings
|
|
|
|
from the config file. It takes care of loading settings, applying
|
|
|
|
commandline overrides, and finally validating all settings.
|
2012-05-13 18:06:56 +00:00
|
|
|
*/
|
2019-02-21 03:13:29 +00:00
|
|
|
void loadConfig(const Settings::Options& options);
|
2012-05-13 18:06:56 +00:00
|
|
|
|
|
|
|
/**
|
2019-02-21 03:13:29 +00:00
|
|
|
This method should be called to save the current settings. It first asks
|
|
|
|
each subsystem to update its settings, then it saves all settings to the
|
|
|
|
config file.
|
2012-05-13 18:06:56 +00:00
|
|
|
*/
|
|
|
|
void saveConfig();
|
|
|
|
|
2019-05-02 20:28:39 +00:00
|
|
|
#ifdef DEBUGGER_SUPPORT
|
2005-05-27 18:00:49 +00:00
|
|
|
/**
|
|
|
|
Get the ROM debugger of the system.
|
|
|
|
|
|
|
|
@return The debugger object
|
|
|
|
*/
|
2011-05-10 15:04:19 +00:00
|
|
|
Debugger& debugger() const { return *myDebugger; }
|
2019-05-02 20:28:39 +00:00
|
|
|
#endif
|
2005-07-07 02:30:48 +00:00
|
|
|
|
2019-05-02 20:28:39 +00:00
|
|
|
#ifdef CHEATCODE_SUPPORT
|
2005-11-11 21:44:19 +00:00
|
|
|
/**
|
|
|
|
Get the cheat manager of the system.
|
|
|
|
|
|
|
|
@return The cheatmanager object
|
|
|
|
*/
|
2011-05-10 15:04:19 +00:00
|
|
|
CheatManager& cheat() const { return *myCheatManager; }
|
2019-05-02 20:28:39 +00:00
|
|
|
#endif
|
2005-11-11 21:44:19 +00:00
|
|
|
|
2019-05-02 20:28:39 +00:00
|
|
|
#ifdef PNG_SUPPORT
|
2019-04-21 22:37:56 +00:00
|
|
|
/**
|
|
|
|
Get the PNG handler of the system.
|
|
|
|
|
|
|
|
@return The PNGlib object
|
|
|
|
*/
|
|
|
|
PNGLibrary& png() const { return *myPNGLib; }
|
2019-05-02 20:28:39 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef GUI_SUPPORT
|
|
|
|
/**
|
|
|
|
Get the settings menu of the system.
|
|
|
|
|
|
|
|
@return The settings menu object
|
|
|
|
*/
|
|
|
|
Menu& menu() const { return *myMenu; }
|
|
|
|
|
|
|
|
/**
|
|
|
|
Get the command menu of the system.
|
|
|
|
|
|
|
|
@return The command menu object
|
|
|
|
*/
|
|
|
|
CommandMenu& commandMenu() const { return *myCommandMenu; }
|
|
|
|
|
|
|
|
/**
|
|
|
|
Get the ROM launcher of the system.
|
|
|
|
|
|
|
|
@return The launcher object
|
|
|
|
*/
|
|
|
|
Launcher& launcher() const { return *myLauncher; }
|
|
|
|
|
|
|
|
/**
|
|
|
|
Get the time machine of the system (manages state files).
|
|
|
|
|
|
|
|
@return The time machine object
|
|
|
|
*/
|
|
|
|
TimeMachine& timeMachine() const { return *myTimeMachine; }
|
|
|
|
#endif
|
2019-04-21 22:37:56 +00:00
|
|
|
|
2007-07-19 16:21:39 +00:00
|
|
|
/**
|
|
|
|
Set all config file paths for the OSystem.
|
|
|
|
*/
|
|
|
|
void setConfigPaths();
|
|
|
|
|
2005-02-22 18:41:16 +00:00
|
|
|
/**
|
2009-01-16 16:38:06 +00:00
|
|
|
Return the default full/complete directory name for storing data.
|
2005-02-22 18:41:16 +00:00
|
|
|
*/
|
2009-06-18 17:08:09 +00:00
|
|
|
const string& baseDir() const { return myBaseDir; }
|
2005-02-22 18:41:16 +00:00
|
|
|
|
|
|
|
/**
|
2009-01-16 16:38:06 +00:00
|
|
|
Return the full/complete directory name for storing state files.
|
2005-02-22 18:41:16 +00:00
|
|
|
*/
|
Removed all reference to 'user.pro', in favour of the previous (to v/2.0)
functionality. The new scheme is as follows:
- Per-user properties are stored in stella.pro, which is located in
system-specific directories (homedir for UNIX/POSIX systems, currentdir
for Win32 systems).
- Completely removed concept of a global properties file, since that
functionality is now included in Stella directly.
- Retained the ability to use an alternative properties file, in which
case the per-user one isn't used at all, and any entries in it override
the built-in defaults.
Removed all reference to 'system' vs. 'user' config files, for much the
same reasons as above. As above, config files are stored in
user-specific places depending on platform. There is no longer a
system-wide config file. This made sense when Stella didn't have built-in
defaults and relied on such a file, but that's no longer the case.
Sorry for any confusion this causes, but it was causing even more confusion
for users. And now we can distribute Stella has a single binary which
doesn't depend on any external files (but will still use them if they're
present).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1050 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2006-03-17 19:44:19 +00:00
|
|
|
const string& stateDir() const { return myStateDir; }
|
2005-02-22 18:41:16 +00:00
|
|
|
|
2007-07-19 16:21:39 +00:00
|
|
|
/**
|
2013-02-16 19:56:09 +00:00
|
|
|
Return the full/complete directory name for saving and loading
|
|
|
|
PNG snapshots.
|
2007-07-19 16:21:39 +00:00
|
|
|
*/
|
2013-02-16 19:56:09 +00:00
|
|
|
const string& snapshotSaveDir() const { return mySnapshotSaveDir; }
|
|
|
|
const string& snapshotLoadDir() const { return mySnapshotLoadDir; }
|
2007-07-19 16:21:39 +00:00
|
|
|
|
2009-01-21 12:03:17 +00:00
|
|
|
/**
|
2013-02-17 00:19:14 +00:00
|
|
|
Return the full/complete directory name for storing nvram
|
|
|
|
(flash/EEPROM) files.
|
2009-01-21 12:03:17 +00:00
|
|
|
*/
|
2013-02-17 00:19:14 +00:00
|
|
|
const string& nvramDir() const { return myNVRamDir; }
|
2009-01-21 12:03:17 +00:00
|
|
|
|
2010-09-06 00:17:51 +00:00
|
|
|
/**
|
|
|
|
Return the full/complete directory name for storing Distella cfg files.
|
|
|
|
*/
|
|
|
|
const string& cfgDir() const { return myCfgDir; }
|
|
|
|
|
2007-07-19 16:21:39 +00:00
|
|
|
/**
|
|
|
|
This method should be called to get the full path of the cheat file.
|
|
|
|
|
|
|
|
@return String representing the full path of the cheat filename.
|
|
|
|
*/
|
|
|
|
const string& cheatFile() const { return myCheatFile; }
|
|
|
|
|
2005-02-22 18:41:16 +00:00
|
|
|
/**
|
Removed all reference to 'user.pro', in favour of the previous (to v/2.0)
functionality. The new scheme is as follows:
- Per-user properties are stored in stella.pro, which is located in
system-specific directories (homedir for UNIX/POSIX systems, currentdir
for Win32 systems).
- Completely removed concept of a global properties file, since that
functionality is now included in Stella directly.
- Retained the ability to use an alternative properties file, in which
case the per-user one isn't used at all, and any entries in it override
the built-in defaults.
Removed all reference to 'system' vs. 'user' config files, for much the
same reasons as above. As above, config files are stored in
user-specific places depending on platform. There is no longer a
system-wide config file. This made sense when Stella didn't have built-in
defaults and relied on such a file, but that's no longer the case.
Sorry for any confusion this causes, but it was causing even more confusion
for users. And now we can distribute Stella has a single binary which
doesn't depend on any external files (but will still use them if they're
present).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1050 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2006-03-17 19:44:19 +00:00
|
|
|
This method should be called to get the full path of the
|
2007-07-19 16:21:39 +00:00
|
|
|
(optional) palette file.
|
2005-02-22 18:41:16 +00:00
|
|
|
|
|
|
|
@return String representing the full path of the properties filename.
|
|
|
|
*/
|
2007-07-19 16:21:39 +00:00
|
|
|
const string& paletteFile() const { return myPaletteFile; }
|
2005-02-22 18:41:16 +00:00
|
|
|
|
2005-05-11 19:36:00 +00:00
|
|
|
/**
|
Removed all reference to 'user.pro', in favour of the previous (to v/2.0)
functionality. The new scheme is as follows:
- Per-user properties are stored in stella.pro, which is located in
system-specific directories (homedir for UNIX/POSIX systems, currentdir
for Win32 systems).
- Completely removed concept of a global properties file, since that
functionality is now included in Stella directly.
- Retained the ability to use an alternative properties file, in which
case the per-user one isn't used at all, and any entries in it override
the built-in defaults.
Removed all reference to 'system' vs. 'user' config files, for much the
same reasons as above. As above, config files are stored in
user-specific places depending on platform. There is no longer a
system-wide config file. This made sense when Stella didn't have built-in
defaults and relied on such a file, but that's no longer the case.
Sorry for any confusion this causes, but it was causing even more confusion
for users. And now we can distribute Stella has a single binary which
doesn't depend on any external files (but will still use them if they're
present).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1050 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2006-03-17 19:44:19 +00:00
|
|
|
This method should be called to get the full path of the currently
|
|
|
|
loaded ROM.
|
2005-05-11 19:36:00 +00:00
|
|
|
|
2013-06-21 12:15:32 +00:00
|
|
|
@return FSNode object representing the ROM file.
|
2005-05-11 19:36:00 +00:00
|
|
|
*/
|
2013-06-21 12:15:32 +00:00
|
|
|
const FilesystemNode& romFile() const { return myRomFile; }
|
2005-02-22 18:41:16 +00:00
|
|
|
|
2019-02-24 22:44:55 +00:00
|
|
|
/**
|
|
|
|
The default locations for saving and loading various files that
|
|
|
|
don't already have a specific location.
|
|
|
|
*/
|
|
|
|
const string& defaultSaveDir() const { return myDefaultSaveDir; }
|
|
|
|
const string& defaultLoadDir() const { return myDefaultLoadDir; }
|
|
|
|
|
2019-02-15 21:19:19 +00:00
|
|
|
/**
|
|
|
|
Open the given ROM and return an array containing its contents.
|
|
|
|
Also, the properties database is updated with a valid ROM name
|
|
|
|
for this ROM (if necessary).
|
|
|
|
|
|
|
|
@param rom The file node of the ROM to open (contains path)
|
|
|
|
@param md5 The md5 calculated from the ROM file
|
|
|
|
(will be recalculated if necessary)
|
|
|
|
@param size The amount of data read into the image array
|
|
|
|
|
|
|
|
@return Unique pointer to the array
|
|
|
|
*/
|
2019-04-25 22:14:21 +00:00
|
|
|
ByteBuffer openROM(const FilesystemNode& rom, string& md5, uInt32& size);
|
2019-02-15 21:19:19 +00:00
|
|
|
|
2005-05-05 00:10:49 +00:00
|
|
|
/**
|
2009-01-01 22:44:14 +00:00
|
|
|
Creates a new game console from the specified romfile, and correctly
|
|
|
|
initializes the system state to start emulation of the Console.
|
2005-05-05 00:10:49 +00:00
|
|
|
|
2013-03-07 17:41:19 +00:00
|
|
|
@param rom The FSNode of the ROM to use (contains path, etc)
|
|
|
|
@param md5 The MD5sum of the ROM
|
|
|
|
@param newrom Whether this is a new ROM, or a reload of current one
|
2007-09-01 23:31:18 +00:00
|
|
|
|
2013-05-07 14:44:50 +00:00
|
|
|
@return String indicating any error message (EmptyString for no errors)
|
2005-05-05 00:10:49 +00:00
|
|
|
*/
|
2013-05-07 14:44:50 +00:00
|
|
|
string createConsole(const FilesystemNode& rom, const string& md5 = "",
|
|
|
|
bool newrom = true);
|
2005-05-05 00:10:49 +00:00
|
|
|
|
2013-02-12 21:57:14 +00:00
|
|
|
/**
|
|
|
|
Reloads the current console (essentially deletes and re-creates it).
|
|
|
|
This can be thought of as a real console off/on toggle.
|
|
|
|
|
|
|
|
@return True on successful creation, otherwise false
|
|
|
|
*/
|
|
|
|
bool reloadConsole();
|
|
|
|
|
Added first pass of the ROM launcher. When you press 'Start' in the ROM
launcher, it launches Frostbite. Then pressing 'Escape' goes back to the
launcher, and you're able to then launch Frostbite again! Success !!!
Still TODO is actually get a ROM listing and use the selected game, but
the fact that it works multiple times for some game means that the
infrastructure is working correctly :)
Changed behaviour of the 'Escape' key. Specifically, it now only acts
as a key to enter ROM launcher mode. In the case where the emulation
was started without the launcher, the key will now do nothing. From now
on, the only way to quit Stella is Ctrl-Q (or equivalent for OSX),
close the window, or from the 'Quit' button.
Also, the 'Enter launcher mode' event will eventually be made remappable,
as will the 'Enter menu mode' event (currently the 'Tab' key).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@412 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-05-06 18:39:00 +00:00
|
|
|
/**
|
|
|
|
Creates a new ROM launcher, to select a new ROM to emulate.
|
2008-05-30 19:07:55 +00:00
|
|
|
|
2012-01-04 14:54:21 +00:00
|
|
|
@param startdir The directory to use when opening the launcher;
|
|
|
|
if blank, use 'romdir' setting.
|
|
|
|
|
2008-05-30 19:07:55 +00:00
|
|
|
@return True on successful creation, otherwise false
|
Added first pass of the ROM launcher. When you press 'Start' in the ROM
launcher, it launches Frostbite. Then pressing 'Escape' goes back to the
launcher, and you're able to then launch Frostbite again! Success !!!
Still TODO is actually get a ROM listing and use the selected game, but
the fact that it works multiple times for some game means that the
infrastructure is working correctly :)
Changed behaviour of the 'Escape' key. Specifically, it now only acts
as a key to enter ROM launcher mode. In the case where the emulation
was started without the launcher, the key will now do nothing. From now
on, the only way to quit Stella is Ctrl-Q (or equivalent for OSX),
close the window, or from the 'Quit' button.
Also, the 'Enter launcher mode' event will eventually be made remappable,
as will the 'Enter menu mode' event (currently the 'Tab' key).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@412 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-05-06 18:39:00 +00:00
|
|
|
*/
|
2012-01-04 14:54:21 +00:00
|
|
|
bool createLauncher(const string& startdir = "");
|
Added first pass of the ROM launcher. When you press 'Start' in the ROM
launcher, it launches Frostbite. Then pressing 'Escape' goes back to the
launcher, and you're able to then launch Frostbite again! Success !!!
Still TODO is actually get a ROM listing and use the selected game, but
the fact that it works multiple times for some game means that the
infrastructure is working correctly :)
Changed behaviour of the 'Escape' key. Specifically, it now only acts
as a key to enter ROM launcher mode. In the case where the emulation
was started without the launcher, the key will now do nothing. From now
on, the only way to quit Stella is Ctrl-Q (or equivalent for OSX),
close the window, or from the 'Quit' button.
Also, the 'Enter launcher mode' event will eventually be made remappable,
as will the 'Enter menu mode' event (currently the 'Tab' key).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@412 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-05-06 18:39:00 +00:00
|
|
|
|
2012-04-20 20:47:53 +00:00
|
|
|
/**
|
|
|
|
Answers whether the ROM launcher was actually successfully used
|
|
|
|
at some point since the app started.
|
|
|
|
|
2014-10-21 23:02:20 +00:00
|
|
|
@return True if launcher was ever used, otherwise false
|
2012-04-20 20:47:53 +00:00
|
|
|
*/
|
|
|
|
bool launcherUsed() const { return myLauncherUsed; }
|
|
|
|
|
2006-12-26 00:39:44 +00:00
|
|
|
/**
|
|
|
|
Gets all possible info about the ROM by creating a temporary
|
|
|
|
Console object and querying it.
|
|
|
|
|
2013-02-12 21:57:14 +00:00
|
|
|
@param romfile The file node of the ROM to use
|
2006-12-26 00:39:44 +00:00
|
|
|
@return Some information about this ROM
|
|
|
|
*/
|
2013-02-12 21:57:14 +00:00
|
|
|
string getROMInfo(const FilesystemNode& romfile);
|
2006-12-26 00:39:44 +00:00
|
|
|
|
2005-05-16 00:02:32 +00:00
|
|
|
/**
|
|
|
|
The features which are conditionally compiled into Stella.
|
|
|
|
|
|
|
|
@return The supported features
|
|
|
|
*/
|
Removed all reference to 'user.pro', in favour of the previous (to v/2.0)
functionality. The new scheme is as follows:
- Per-user properties are stored in stella.pro, which is located in
system-specific directories (homedir for UNIX/POSIX systems, currentdir
for Win32 systems).
- Completely removed concept of a global properties file, since that
functionality is now included in Stella directly.
- Retained the ability to use an alternative properties file, in which
case the per-user one isn't used at all, and any entries in it override
the built-in defaults.
Removed all reference to 'system' vs. 'user' config files, for much the
same reasons as above. As above, config files are stored in
user-specific places depending on platform. There is no longer a
system-wide config file. This made sense when Stella didn't have built-in
defaults and relied on such a file, but that's no longer the case.
Sorry for any confusion this causes, but it was causing even more confusion
for users. And now we can distribute Stella has a single binary which
doesn't depend on any external files (but will still use them if they're
present).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1050 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2006-03-17 19:44:19 +00:00
|
|
|
const string& features() const { return myFeatures; }
|
2005-05-16 00:02:32 +00:00
|
|
|
|
2009-10-25 22:34:40 +00:00
|
|
|
/**
|
2014-02-05 22:09:57 +00:00
|
|
|
The build information for Stella (toolkit version, architecture, etc).
|
2009-10-25 22:34:40 +00:00
|
|
|
|
|
|
|
@return The build info
|
|
|
|
*/
|
|
|
|
const string& buildInfo() const { return myBuildInfo; }
|
|
|
|
|
2006-12-28 18:31:27 +00:00
|
|
|
/**
|
|
|
|
Issue a quit event to the OSystem.
|
|
|
|
*/
|
|
|
|
void quit() { myQuitLoop = true; }
|
|
|
|
|
2011-06-02 20:53:01 +00:00
|
|
|
/**
|
|
|
|
Get the system messages logged up to this point.
|
|
|
|
|
|
|
|
@return The list of log messages
|
|
|
|
*/
|
|
|
|
const string& logMessages() const { return myLogMessages; }
|
|
|
|
|
2018-07-30 21:19:09 +00:00
|
|
|
/**
|
|
|
|
Reset FPS measurement.
|
2019-02-21 03:13:29 +00:00
|
|
|
*/
|
2018-07-30 21:19:09 +00:00
|
|
|
void resetFps();
|
|
|
|
|
2019-02-26 22:50:28 +00:00
|
|
|
float frameRate() const;
|
|
|
|
|
2019-02-21 03:13:29 +00:00
|
|
|
/**
|
|
|
|
Attempt to override the base directory that will be used by derived
|
|
|
|
classes, and use this one instead. Note that this is only a hint;
|
|
|
|
derived classes are free to ignore this, as some can't use an
|
|
|
|
alternate base directory.
|
|
|
|
|
2019-02-24 22:44:55 +00:00
|
|
|
Alternatively, attempt to use the application directory directly.
|
|
|
|
Again, this is not supported on all systems, so it may be simply
|
|
|
|
ignored.
|
2019-02-21 03:13:29 +00:00
|
|
|
*/
|
2019-02-24 22:44:55 +00:00
|
|
|
static void overrideBaseDir(const string& path) { ourOverrideBaseDir = path; }
|
|
|
|
static void overrideBaseDirWithApp() { ourOverrideBaseDirWithApp = true; }
|
2019-02-21 03:13:29 +00:00
|
|
|
|
2005-02-21 02:23:57 +00:00
|
|
|
public:
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
2010-06-16 15:40:57 +00:00
|
|
|
// The following methods are system-specific and can be overrided in
|
|
|
|
// derived classes. Otherwise, the base methods will be used.
|
2005-02-21 02:23:57 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////
|
2006-12-28 18:31:27 +00:00
|
|
|
/**
|
|
|
|
This method runs the main loop. Since different platforms
|
|
|
|
may use different timing methods and/or algorithms, this method can
|
|
|
|
be overrided. However, the port then takes all responsibility for
|
|
|
|
running the emulation and taking care of timing.
|
|
|
|
*/
|
|
|
|
virtual void mainLoop();
|
|
|
|
|
2006-03-27 12:52:19 +00:00
|
|
|
/**
|
|
|
|
Informs the OSystem of a change in EventHandler state.
|
|
|
|
*/
|
2017-12-21 01:26:22 +00:00
|
|
|
virtual void stateChanged(EventHandlerState state) { }
|
2006-03-27 12:52:19 +00:00
|
|
|
|
Added 'WINDOWED_SUPPORT' compile-time argument, which can be used for
those systems which don't actually have a windowing environment. When
this is set, toggling from fullscreen will not be possible, and certain
window-related UI functions will not be accessible.
Completely revamped video subsystem. Windowed and fullscreen modes are
now dealt with separately. Windows can be zoomed using the 'zoom_ui'
and 'zoom_tia' arguments. Fullscreen modes are now set by resolution,
not zoom, so you can specify to always use a certain fullscreen
resolution, and the images will be scaled appropriately. This also
fixes the fullscreen issues on widescreen monitors; just select a
widescreen video mode, and the aspect ratio will always be correct.
Removed dirty-rect support for software rendering of the TIA image,
as it ended up being slower than just updating the entire image.
For those resolutions where it will start to slow down (1024x768 or
higher), one should be using OpenGL.
Fixed issue in Windows when returning from fullscreen mode made the
window constantly 'shrink' in size. It was related to auto-detecting
the desktop resolution, which is really the job of SDL. As such, all
further releases of Stella will require SDL 1.2.10, which includes
this auto-detection code internally.
Made ROM launcher resizable, configurable in sizes from 320x240
to 800x600. Updated the UIDialog to change these quantities from the
UI (Stella will need to be restarted for it to take effect).
Removed aspect ratio support, since it was causing problems, and the
new fullscreen mode work has made it obsolete. i *may* consider it
again in the future, if there's sufficient demand.
Added 'fullres' commandline argument, used to set the fullscreen
resolution.
Added 'launcherres' commandline argument, used to set the ROM
launcher resolution. This replaces 'launchersize' argument, which
has been removed.
Changed 'scale_ui' and 'scale_tia' to 'zoom_ui' and 'zoom_tia',
respectively. Their function remains the same.
Changed meaning of 'gl_fsmax' argument to specify what modes to use
fullscreen OpenGL scaling (previously, this was a boolean, and
didn't consider different modes).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1323 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2007-06-20 16:33:23 +00:00
|
|
|
protected:
|
2019-04-25 22:14:21 +00:00
|
|
|
|
|
|
|
virtual shared_ptr<KeyValueRepository> createSettingsRepository();
|
|
|
|
|
2019-05-01 21:13:17 +00:00
|
|
|
/**
|
|
|
|
Append a message to the internal log
|
|
|
|
(a newline is automatically added).
|
|
|
|
|
|
|
|
@param message The message to be appended
|
|
|
|
@param level If 0, always output the message, only append when
|
|
|
|
level is less than or equal to that in 'loglevel'
|
|
|
|
*/
|
|
|
|
void logMessage(const string& message, uInt8 level);
|
|
|
|
|
2019-02-24 22:44:55 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
// The following methods are system-specific and *must* be
|
|
|
|
// implemented in derived classes.
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
2005-05-18 22:35:37 +00:00
|
|
|
/**
|
2019-02-24 22:44:55 +00:00
|
|
|
Determine the base directory and main configuration file from the
|
|
|
|
derived class. It can also use hints, as described below.
|
|
|
|
|
|
|
|
@param basedir The base directory for all configuration files
|
|
|
|
@param cfgfile The fully qualified pathname of the config file
|
|
|
|
(including the base directory)
|
|
|
|
@param savedir The default directory to save various other files
|
|
|
|
@param loaddir The default directory to load various other files
|
|
|
|
@param useappdir A hint that the base dir should be set to the
|
|
|
|
app directory; not all ports can do this, so
|
|
|
|
they are free to ignore it
|
|
|
|
@param usedir A hint that the base dir should be set to this
|
|
|
|
parameter; not all ports can do this, so
|
|
|
|
they are free to ignore it
|
|
|
|
*/
|
|
|
|
virtual void getBaseDirAndConfig(string& basedir, string& cfgfile,
|
|
|
|
string& savedir, string& loaddir,
|
|
|
|
bool useappdir, const string& usedir) = 0;
|
2005-02-22 18:41:16 +00:00
|
|
|
|
2005-02-21 02:23:57 +00:00
|
|
|
protected:
|
|
|
|
// Pointer to the EventHandler object
|
2014-11-02 23:40:20 +00:00
|
|
|
unique_ptr<EventHandler> myEventHandler;
|
2005-02-21 02:23:57 +00:00
|
|
|
|
2005-02-21 20:43:53 +00:00
|
|
|
// Pointer to the FrameBuffer object
|
2014-11-02 23:40:20 +00:00
|
|
|
unique_ptr<FrameBuffer> myFrameBuffer;
|
2005-02-21 02:23:57 +00:00
|
|
|
|
2005-02-21 20:43:53 +00:00
|
|
|
// Pointer to the Sound object
|
2014-11-02 23:40:20 +00:00
|
|
|
unique_ptr<Sound> mySound;
|
2005-02-21 02:23:57 +00:00
|
|
|
|
2005-02-21 20:43:53 +00:00
|
|
|
// Pointer to the Settings object
|
2014-11-02 23:40:20 +00:00
|
|
|
unique_ptr<Settings> mySettings;
|
2005-02-21 02:23:57 +00:00
|
|
|
|
2014-10-26 15:54:02 +00:00
|
|
|
// Pointer to the Random object
|
2014-11-02 23:40:20 +00:00
|
|
|
unique_ptr<Random> myRandom;
|
2014-10-26 15:54:02 +00:00
|
|
|
|
2005-02-21 20:43:53 +00:00
|
|
|
// Pointer to the PropertiesSet object
|
2014-11-02 23:40:20 +00:00
|
|
|
unique_ptr<PropertiesSet> myPropSet;
|
2005-02-21 02:23:57 +00:00
|
|
|
|
|
|
|
// Pointer to the (currently defined) Console object
|
2014-11-09 22:03:50 +00:00
|
|
|
unique_ptr<Console> myConsole;
|
2005-02-21 02:23:57 +00:00
|
|
|
|
2018-08-29 11:40:55 +00:00
|
|
|
// Pointer to audio settings object
|
|
|
|
unique_ptr<AudioSettings> myAudioSettings;
|
|
|
|
|
2019-05-02 20:28:39 +00:00
|
|
|
#ifdef GUI_SUPPORT
|
2005-03-10 22:59:40 +00:00
|
|
|
// Pointer to the Menu object
|
2014-11-02 23:40:20 +00:00
|
|
|
unique_ptr<Menu> myMenu;
|
2005-03-10 22:59:40 +00:00
|
|
|
|
2005-08-29 18:36:42 +00:00
|
|
|
// Pointer to the CommandMenu object
|
2014-11-02 23:40:20 +00:00
|
|
|
unique_ptr<CommandMenu> myCommandMenu;
|
2005-08-29 18:36:42 +00:00
|
|
|
|
Added first pass of the ROM launcher. When you press 'Start' in the ROM
launcher, it launches Frostbite. Then pressing 'Escape' goes back to the
launcher, and you're able to then launch Frostbite again! Success !!!
Still TODO is actually get a ROM listing and use the selected game, but
the fact that it works multiple times for some game means that the
infrastructure is working correctly :)
Changed behaviour of the 'Escape' key. Specifically, it now only acts
as a key to enter ROM launcher mode. In the case where the emulation
was started without the launcher, the key will now do nothing. From now
on, the only way to quit Stella is Ctrl-Q (or equivalent for OSX),
close the window, or from the 'Quit' button.
Also, the 'Enter launcher mode' event will eventually be made remappable,
as will the 'Enter menu mode' event (currently the 'Tab' key).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@412 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-05-06 18:39:00 +00:00
|
|
|
// Pointer to the Launcher object
|
2014-11-02 23:40:20 +00:00
|
|
|
unique_ptr<Launcher> myLauncher;
|
2005-03-10 22:59:40 +00:00
|
|
|
|
2017-12-21 01:26:22 +00:00
|
|
|
// Pointer to the TimeMachine object
|
|
|
|
unique_ptr<TimeMachine> myTimeMachine;
|
2019-05-02 20:28:39 +00:00
|
|
|
#endif
|
2017-12-15 16:49:29 +00:00
|
|
|
|
2016-10-26 12:59:52 +00:00
|
|
|
#ifdef DEBUGGER_SUPPORT
|
2005-05-27 18:00:49 +00:00
|
|
|
// Pointer to the Debugger object
|
2014-11-09 22:03:50 +00:00
|
|
|
unique_ptr<Debugger> myDebugger;
|
2016-10-26 12:59:52 +00:00
|
|
|
#endif
|
2005-05-27 18:00:49 +00:00
|
|
|
|
2017-05-18 03:31:23 +00:00
|
|
|
#ifdef CHEATCODE_SUPPORT
|
2005-11-11 21:44:19 +00:00
|
|
|
// Pointer to the CheatManager object
|
2014-11-02 23:40:20 +00:00
|
|
|
unique_ptr<CheatManager> myCheatManager;
|
2017-05-18 03:31:23 +00:00
|
|
|
#endif
|
2005-11-11 21:44:19 +00:00
|
|
|
|
2019-04-21 22:37:56 +00:00
|
|
|
#ifdef PNG_SUPPORT
|
|
|
|
// PNG object responsible for loading/saving PNG images
|
|
|
|
unique_ptr<PNGLibrary> myPNGLib;
|
|
|
|
#endif
|
|
|
|
|
2007-09-23 17:04:17 +00:00
|
|
|
// Pointer to the StateManager object
|
2014-11-02 23:40:20 +00:00
|
|
|
unique_ptr<StateManager> myStateManager;
|
2007-09-23 17:04:17 +00:00
|
|
|
|
2018-08-23 14:18:24 +00:00
|
|
|
// Pointer to the TimerManager object
|
|
|
|
unique_ptr<TimerManager> myTimerManager;
|
|
|
|
|
2011-06-02 20:53:01 +00:00
|
|
|
// The list of log messages
|
|
|
|
string myLogMessages;
|
|
|
|
|
2019-05-02 20:28:39 +00:00
|
|
|
// Indicates whether ROM launcher was ever opened during this run
|
|
|
|
bool myLauncherUsed;
|
|
|
|
|
2006-12-28 18:31:27 +00:00
|
|
|
// Indicates whether to stop the main loop
|
|
|
|
bool myQuitLoop;
|
|
|
|
|
2005-02-22 18:41:16 +00:00
|
|
|
private:
|
2009-06-18 17:38:42 +00:00
|
|
|
string myBaseDir;
|
2005-02-22 18:41:16 +00:00
|
|
|
string myStateDir;
|
2013-02-16 19:56:09 +00:00
|
|
|
string mySnapshotSaveDir;
|
|
|
|
string mySnapshotLoadDir;
|
2013-02-17 00:19:14 +00:00
|
|
|
string myNVRamDir;
|
2010-09-06 00:17:51 +00:00
|
|
|
string myCfgDir;
|
2019-02-24 22:44:55 +00:00
|
|
|
string myDefaultSaveDir;
|
|
|
|
string myDefaultLoadDir;
|
2005-02-22 18:41:16 +00:00
|
|
|
|
2019-05-04 18:37:14 +00:00
|
|
|
bool mySettingsLoaded;
|
|
|
|
|
2007-07-19 16:21:39 +00:00
|
|
|
string myCheatFile;
|
Removed all reference to 'user.pro', in favour of the previous (to v/2.0)
functionality. The new scheme is as follows:
- Per-user properties are stored in stella.pro, which is located in
system-specific directories (homedir for UNIX/POSIX systems, currentdir
for Win32 systems).
- Completely removed concept of a global properties file, since that
functionality is now included in Stella directly.
- Retained the ability to use an alternative properties file, in which
case the per-user one isn't used at all, and any entries in it override
the built-in defaults.
Removed all reference to 'system' vs. 'user' config files, for much the
same reasons as above. As above, config files are stored in
user-specific places depending on platform. There is no longer a
system-wide config file. This made sense when Stella didn't have built-in
defaults and relied on such a file, but that's no longer the case.
Sorry for any confusion this causes, but it was causing even more confusion
for users. And now we can distribute Stella has a single binary which
doesn't depend on any external files (but will still use them if they're
present).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1050 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2006-03-17 19:44:19 +00:00
|
|
|
string myConfigFile;
|
2007-07-19 16:21:39 +00:00
|
|
|
string myPaletteFile;
|
Removed all reference to 'user.pro', in favour of the previous (to v/2.0)
functionality. The new scheme is as follows:
- Per-user properties are stored in stella.pro, which is located in
system-specific directories (homedir for UNIX/POSIX systems, currentdir
for Win32 systems).
- Completely removed concept of a global properties file, since that
functionality is now included in Stella directly.
- Retained the ability to use an alternative properties file, in which
case the per-user one isn't used at all, and any entries in it override
the built-in defaults.
Removed all reference to 'system' vs. 'user' config files, for much the
same reasons as above. As above, config files are stored in
user-specific places depending on platform. There is no longer a
system-wide config file. This made sense when Stella didn't have built-in
defaults and relied on such a file, but that's no longer the case.
Sorry for any confusion this causes, but it was causing even more confusion
for users. And now we can distribute Stella has a single binary which
doesn't depend on any external files (but will still use them if they're
present).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1050 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2006-03-17 19:44:19 +00:00
|
|
|
string myPropertiesFile;
|
2005-02-22 18:41:16 +00:00
|
|
|
|
2013-02-12 21:57:14 +00:00
|
|
|
FilesystemNode myRomFile;
|
2009-01-01 22:44:14 +00:00
|
|
|
string myRomMD5;
|
2005-05-05 00:10:49 +00:00
|
|
|
|
2005-05-16 00:02:32 +00:00
|
|
|
string myFeatures;
|
2009-10-25 22:34:40 +00:00
|
|
|
string myBuildInfo;
|
2005-05-16 00:02:32 +00:00
|
|
|
|
2018-07-30 21:19:09 +00:00
|
|
|
FpsMeter myFpsMeter;
|
|
|
|
|
2019-02-24 22:44:55 +00:00
|
|
|
// If not empty, a hint for derived classes to use this as the
|
|
|
|
// base directory (where all settings are stored)
|
|
|
|
// Derived classes are free to ignore it and use their own defaults
|
|
|
|
static string ourOverrideBaseDir;
|
|
|
|
static bool ourOverrideBaseDirWithApp;
|
|
|
|
|
2019-05-01 09:41:23 +00:00
|
|
|
#ifdef SQLITE_SUPPORT
|
|
|
|
shared_ptr<SettingsDb> mySettingsDb;
|
|
|
|
#endif
|
|
|
|
|
2005-02-21 02:23:57 +00:00
|
|
|
private:
|
Some configure work:
- removed TEXTURES_ARE_DIRTY logic, and just recreate the GL textures
when a screenmode changes
- enable checking for machine type and if nasm is available
- logic to enable scaler mode only when in OpenGL mode (still not complete
and defaults to off)
First pass at adding scaler code to OpenGL. Still much work TODO,
but the C version is working correctly (asm is causing crashes,
haven't figured out why). GL quad coordinates aren't properly
set yet, so the image always appears in the upper left corner, and
is not scaled to the window size. CPU usage is also quite high,
but I'm on a 1GHz laptop with i950 GL, so that may explain it.
Fixed long-standing bug in software rendering, where switching to a
lower-res screen while a message is being displayed would cause a
segfault.
Large refactoring of mainSDL. Specifically, OSystem now owns all
the subsystems except for Settings, taking responsibility for creating
and destroying them.
Properties fixes for 'Tomarc the Barbarian' and 'Gyruss'.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1136 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2006-10-22 18:58:46 +00:00
|
|
|
/**
|
|
|
|
Creates the various sound devices available in this system
|
|
|
|
*/
|
|
|
|
void createSound();
|
|
|
|
|
2006-12-28 18:31:27 +00:00
|
|
|
/**
|
2009-01-01 22:44:14 +00:00
|
|
|
Creates an actual Console object based on the given info.
|
|
|
|
|
2013-02-12 21:57:14 +00:00
|
|
|
@param romfile The file node of the ROM to use (contains path)
|
2009-01-01 22:44:14 +00:00
|
|
|
@param md5 The MD5sum of the ROM
|
|
|
|
|
2014-11-09 22:03:50 +00:00
|
|
|
@return The actual Console object, otherwise nullptr.
|
2009-01-01 22:44:14 +00:00
|
|
|
*/
|
2017-07-02 21:57:27 +00:00
|
|
|
unique_ptr<Console> openConsole(const FilesystemNode& romfile, string& md5);
|
2009-01-01 22:44:14 +00:00
|
|
|
|
2015-01-01 16:21:30 +00:00
|
|
|
/**
|
|
|
|
Close and finalize any currently open console.
|
|
|
|
*/
|
|
|
|
void closeConsole();
|
|
|
|
|
2009-01-01 22:44:14 +00:00
|
|
|
/**
|
|
|
|
Gets all possible info about the given console.
|
2006-12-28 18:31:27 +00:00
|
|
|
|
2009-01-01 22:44:14 +00:00
|
|
|
@param console The console to use
|
|
|
|
@return Some information about this console
|
2006-12-28 18:31:27 +00:00
|
|
|
*/
|
2014-11-09 22:03:50 +00:00
|
|
|
string getROMInfo(const Console& console);
|
2006-12-28 18:31:27 +00:00
|
|
|
|
2018-06-07 21:38:14 +00:00
|
|
|
double dispatchEmulation(EmulationWorker& emulationWorker);
|
2018-05-23 22:13:43 +00:00
|
|
|
|
2015-04-26 19:02:42 +00:00
|
|
|
// Following constructors and assignment operators not supported
|
|
|
|
OSystem(const OSystem&) = delete;
|
|
|
|
OSystem(OSystem&&) = delete;
|
|
|
|
OSystem& operator=(const OSystem&) = delete;
|
|
|
|
OSystem& operator=(OSystem&&) = delete;
|
2005-02-21 02:23:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|