2005-02-21 02:23:57 +00:00
|
|
|
//============================================================================
|
|
|
|
//
|
|
|
|
// SSSS tt lll lll
|
|
|
|
// SS SS tt ll ll
|
|
|
|
// SS tttttt eeee ll ll aaaa
|
|
|
|
// 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
|
|
|
|
//
|
2006-12-08 16:49:42 +00:00
|
|
|
// Copyright (c) 1995-2006 by Bradford W. Mott and the Stella team
|
2005-02-21 02:23:57 +00:00
|
|
|
//
|
|
|
|
// See the file "license" for information on usage and redistribution of
|
|
|
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
|
|
|
//
|
2006-12-08 16:49:42 +00:00
|
|
|
// $Id: OSystem.hxx,v 1.45 2006-12-08 16:49:27 stephena Exp $
|
2005-02-21 02:23:57 +00:00
|
|
|
//============================================================================
|
|
|
|
|
|
|
|
#ifndef OSYSTEM_HXX
|
|
|
|
#define OSYSTEM_HXX
|
|
|
|
|
|
|
|
class PropertiesSet;
|
2005-05-04 19:04:47 +00:00
|
|
|
|
2005-03-10 22:59:40 +00:00
|
|
|
class Menu;
|
2005-08-29 18:36:42 +00:00
|
|
|
class CommandMenu;
|
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
|
|
|
class Launcher;
|
2005-05-27 18:00:49 +00:00
|
|
|
class Debugger;
|
2005-11-11 21:44:19 +00:00
|
|
|
class CheatManager;
|
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
|
|
|
class VideoDialog;
|
2005-02-21 02:23:57 +00:00
|
|
|
|
2005-05-02 19:36:05 +00:00
|
|
|
#include "EventHandler.hxx"
|
|
|
|
#include "FrameBuffer.hxx"
|
|
|
|
#include "Sound.hxx"
|
|
|
|
#include "Settings.hxx"
|
2005-02-21 02:23:57 +00:00
|
|
|
#include "Console.hxx"
|
2005-05-26 18:56:58 +00:00
|
|
|
#include "StringList.hxx"
|
2005-06-08 18:45:09 +00:00
|
|
|
#include "Font.hxx"
|
|
|
|
|
2005-02-21 02:23:57 +00:00
|
|
|
#include "bspf.hxx"
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
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
|
2006-12-08 16:49:42 +00:00
|
|
|
@version $Id: OSystem.hxx,v 1.45 2006-12-08 16:49:27 stephena Exp $
|
2005-02-21 02:23:57 +00:00
|
|
|
*/
|
|
|
|
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;
|
|
|
|
friend class VideoDialog;
|
|
|
|
|
2005-02-21 02:23:57 +00:00
|
|
|
public:
|
|
|
|
/**
|
|
|
|
Create a new OSystem abstract class
|
|
|
|
*/
|
2005-02-21 20:43:53 +00:00
|
|
|
OSystem();
|
2005-02-21 02:23:57 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Destructor
|
|
|
|
*/
|
|
|
|
virtual ~OSystem();
|
|
|
|
|
2006-01-08 13:55:03 +00:00
|
|
|
/**
|
|
|
|
Create all child objects which belong to this OSystem
|
|
|
|
*/
|
|
|
|
virtual bool create();
|
|
|
|
|
2005-02-21 02:23:57 +00:00
|
|
|
public:
|
2005-02-21 20:43:53 +00:00
|
|
|
/**
|
|
|
|
Adds the specified settings object to the system.
|
|
|
|
|
|
|
|
@param settings The settings object to add
|
|
|
|
*/
|
|
|
|
void attach(Settings* settings) { mySettings = settings; }
|
|
|
|
|
2005-02-21 02:23:57 +00:00
|
|
|
/**
|
|
|
|
Get the event handler of the system
|
|
|
|
|
|
|
|
@return The event handler
|
|
|
|
*/
|
2006-03-25 00:34:17 +00:00
|
|
|
inline EventHandler& eventHandler() const { return *myEventHandler; }
|
2005-02-21 02:23:57 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Get the frame buffer of the system
|
|
|
|
|
|
|
|
@return The frame buffer
|
|
|
|
*/
|
2006-03-25 00:34:17 +00:00
|
|
|
inline FrameBuffer& frameBuffer() const { return *myFrameBuffer; }
|
2005-02-21 02:23:57 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Get the sound object of the system
|
|
|
|
|
|
|
|
@return The sound object
|
|
|
|
*/
|
2006-03-25 00:34:17 +00:00
|
|
|
inline Sound& sound() const { return *mySound; }
|
2005-02-21 02:23:57 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Get the settings object of the system
|
|
|
|
|
|
|
|
@return The settings object
|
|
|
|
*/
|
2006-03-25 00:34:17 +00:00
|
|
|
inline Settings& settings() const { return *mySettings; }
|
2005-02-21 02:23:57 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Get the set of game properties for the system
|
|
|
|
|
|
|
|
@return The properties set object
|
|
|
|
*/
|
2006-03-25 00:34:17 +00:00
|
|
|
inline PropertiesSet& propSet() const { return *myPropSet; }
|
2005-02-21 20:43:53 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Get the console of the system.
|
|
|
|
|
|
|
|
@return The console object
|
|
|
|
*/
|
2006-03-25 00:34:17 +00:00
|
|
|
inline Console& console(void) const { return *myConsole; }
|
2005-02-21 02:23:57 +00:00
|
|
|
|
2005-03-10 22:59:40 +00:00
|
|
|
/**
|
|
|
|
Get the settings menu of the system.
|
|
|
|
|
|
|
|
@return The settings menu object
|
|
|
|
*/
|
2006-03-25 00:34:17 +00:00
|
|
|
inline Menu& menu(void) const { return *myMenu; }
|
2005-03-10 22:59:40 +00:00
|
|
|
|
2005-08-29 18:36:42 +00:00
|
|
|
/**
|
|
|
|
Get the command menu of the system.
|
|
|
|
|
|
|
|
@return The command menu object
|
|
|
|
*/
|
2006-03-25 00:34:17 +00:00
|
|
|
inline CommandMenu& commandMenu(void) const { return *myCommandMenu; }
|
2005-08-29 18:36:42 +00:00
|
|
|
|
2005-03-10 22:59:40 +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
|
|
|
Get the ROM launcher of the system.
|
2005-03-10 22:59:40 +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
|
|
|
@return The launcher object
|
2005-03-10 22:59:40 +00:00
|
|
|
*/
|
2006-03-25 00:34:17 +00:00
|
|
|
inline Launcher& launcher(void) const { return *myLauncher; }
|
2005-03-10 22:59:40 +00:00
|
|
|
|
2005-08-24 22:54:30 +00:00
|
|
|
#ifdef DEVELOPER_SUPPORT
|
2005-05-27 18:00:49 +00:00
|
|
|
/**
|
|
|
|
Get the ROM debugger of the system.
|
|
|
|
|
|
|
|
@return The debugger object
|
|
|
|
*/
|
2006-03-25 00:34:17 +00:00
|
|
|
inline Debugger& debugger(void) const { return *myDebugger; }
|
2005-08-24 22:54:30 +00:00
|
|
|
#endif
|
2005-07-07 02:30:48 +00:00
|
|
|
|
2005-11-11 21:44:19 +00:00
|
|
|
#ifdef CHEATCODE_SUPPORT
|
|
|
|
/**
|
|
|
|
Get the cheat manager of the system.
|
|
|
|
|
|
|
|
@return The cheatmanager object
|
|
|
|
*/
|
2006-03-25 00:34:17 +00:00
|
|
|
inline CheatManager& cheat(void) const { return *myCheatManager; }
|
2005-11-11 21:44:19 +00:00
|
|
|
#endif
|
|
|
|
|
2005-06-08 18:45:09 +00:00
|
|
|
/**
|
|
|
|
Get the font object of the system
|
|
|
|
|
|
|
|
@return The font reference
|
|
|
|
*/
|
|
|
|
inline const GUI::Font& font() const { return *myFont; }
|
|
|
|
|
2006-02-22 17:38:04 +00:00
|
|
|
/**
|
|
|
|
Get the launcher font object of the system
|
|
|
|
|
|
|
|
@return The font reference
|
|
|
|
*/
|
|
|
|
inline const GUI::Font& launcherFont() const { return *myLauncherFont; }
|
|
|
|
|
2005-06-08 18:45:09 +00:00
|
|
|
/**
|
|
|
|
Get the console font object of the system
|
|
|
|
|
|
|
|
@return The console font reference
|
|
|
|
*/
|
|
|
|
inline const GUI::Font& consoleFont() const { return *myConsoleFont; }
|
|
|
|
|
2005-05-05 00:10:49 +00:00
|
|
|
/**
|
|
|
|
Set the framerate for the video system. It's placed in this class since
|
|
|
|
the mainLoop() method is defined here.
|
|
|
|
|
|
|
|
@param framerate The video framerate to use
|
|
|
|
*/
|
2005-11-21 13:47:34 +00:00
|
|
|
virtual void setFramerate(uInt32 framerate);
|
2005-05-12 18:45:21 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Get the current framerate for the video system.
|
|
|
|
|
|
|
|
@return The video framerate currently in use
|
|
|
|
*/
|
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
|
|
|
inline uInt32 frameRate() const { return myDisplayFrameRate; }
|
2005-05-05 00:10:49 +00:00
|
|
|
|
2005-02-22 18:41:16 +00:00
|
|
|
/**
|
|
|
|
Return the default directory for storing data.
|
|
|
|
*/
|
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& baseDir() const { return myBaseDir; }
|
2005-02-22 18:41:16 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Return the directory for storing state files.
|
|
|
|
*/
|
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
|
|
|
|
|
|
|
/**
|
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 config file.
|
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
|
|
|
@return String representing the full path of the config filename.
|
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& configFile() const { return myConfigFile; }
|
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
|
|
|
|
properties file (stella.pro).
|
2005-02-22 18:41:16 +00:00
|
|
|
|
|
|
|
@return String representing the full path of the properties filename.
|
|
|
|
*/
|
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& propertiesFile() const { return myPropertiesFile; }
|
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 gamelist
|
|
|
|
cache file (used by the Launcher to show a listing of available games).
|
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
|
|
|
@return String representing the full path of the gamelist cache file.
|
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& cacheFile() const { return myGameListCacheFile; }
|
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
|
|
|
|
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
|
|
|
@return String representing the full path of the ROM file.
|
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
|
|
|
const string& romFile() const { return myRomFile; }
|
2005-02-22 18:41:16 +00:00
|
|
|
|
2005-04-29 19:05:06 +00:00
|
|
|
/**
|
|
|
|
Switches between software and OpenGL framebuffer modes.
|
|
|
|
*/
|
|
|
|
void toggleFrameBuffer();
|
|
|
|
|
2005-05-05 00:10:49 +00:00
|
|
|
/**
|
2005-05-05 19:00:48 +00:00
|
|
|
Creates a new game console from the specified romfile.
|
2005-05-05 00:10:49 +00:00
|
|
|
|
2005-05-05 19:00:48 +00:00
|
|
|
@param romfile The full pathname of the ROM to use
|
|
|
|
@return True on successful creation, otherwise false
|
2005-05-05 00:10:49 +00:00
|
|
|
*/
|
2005-05-05 19:00:48 +00:00
|
|
|
bool createConsole(const string& romfile = "");
|
2005-05-05 00:10:49 +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
|
|
|
/**
|
|
|
|
Creates a new ROM launcher, to select a new ROM to emulate.
|
|
|
|
*/
|
|
|
|
void createLauncher();
|
|
|
|
|
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
|
|
|
|
2005-05-17 18:42:23 +00:00
|
|
|
/**
|
|
|
|
Open the given ROM and return an array containing its contents.
|
|
|
|
|
|
|
|
@param rom The absolute pathname of the ROM file
|
2005-10-19 00:59:51 +00:00
|
|
|
@param md5 The md5 calculated from the ROM file
|
2005-05-17 18:42:23 +00:00
|
|
|
@param image A pointer to store the ROM data
|
|
|
|
Note, the calling method is responsible for deleting this
|
|
|
|
@param size The amount of data read into the image array
|
|
|
|
@return False on any errors, else true
|
|
|
|
*/
|
2005-10-19 00:59:51 +00:00
|
|
|
bool openROM(const string& rom, string& md5, uInt8** image, int* size);
|
2005-05-17 18:42:23 +00:00
|
|
|
|
2006-12-05 22:05:35 +00:00
|
|
|
/**
|
|
|
|
Runs through one iteration of the OSystem loop, which consists of
|
|
|
|
checking for events, rendering the framebuffer, etc.
|
|
|
|
This method isn't meant to be used from mainLoop(), but instead is
|
|
|
|
used as a sort of 'yield' function, whereby other parts of the code
|
|
|
|
may block for a time, and we need to check for cancellation (used
|
|
|
|
to emulate a poor man's threading system).
|
|
|
|
*/
|
|
|
|
void run() const;
|
|
|
|
|
2005-02-21 02:23:57 +00:00
|
|
|
public:
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
// The following methods are system-specific and must be implemented
|
|
|
|
// in derived classes.
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
2005-05-02 19:36:05 +00:00
|
|
|
/**
|
2005-05-05 00:10:49 +00:00
|
|
|
This method runs the main loop. Since different platforms
|
2005-05-02 19:36:05 +00:00
|
|
|
may use different timing methods and/or algorithms, this method has
|
|
|
|
been abstracted to each platform.
|
|
|
|
*/
|
2005-05-05 00:10:49 +00:00
|
|
|
virtual void mainLoop() = 0;
|
2005-05-02 19:36:05 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
This method returns number of ticks in microseconds.
|
|
|
|
|
|
|
|
@return Current time in microseconds.
|
|
|
|
*/
|
|
|
|
virtual uInt32 getTicks() = 0;
|
|
|
|
|
2006-01-08 02:28:04 +00:00
|
|
|
/**
|
|
|
|
This method queries the dimensions of the screen for the given device.
|
|
|
|
*/
|
|
|
|
virtual void getScreenDimensions(int& width, int& height) = 0;
|
|
|
|
|
2006-01-05 18:53:23 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
// The following methods are system-specific and can be overrided in
|
|
|
|
// derived classes. Otherwise, the base methods will be used.
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
/**
|
|
|
|
This method determines the default mapping of joystick buttons to
|
|
|
|
Stella events for a specific system/platform.
|
|
|
|
*/
|
|
|
|
virtual void setDefaultJoymap();
|
|
|
|
|
|
|
|
/**
|
|
|
|
This method determines the default mapping of joystick axis to
|
|
|
|
Stella events for a specific system/platform.
|
|
|
|
*/
|
|
|
|
virtual void setDefaultJoyAxisMap();
|
|
|
|
|
2006-01-09 16:50:01 +00:00
|
|
|
/**
|
|
|
|
This method determines the default mapping of joystick hats to
|
|
|
|
Stella events for a specific system/platform.
|
|
|
|
*/
|
|
|
|
virtual void setDefaultJoyHatMap();
|
|
|
|
|
2006-01-30 01:01:44 +00:00
|
|
|
/**
|
|
|
|
This method creates events from platform-specific hardware.
|
|
|
|
*/
|
|
|
|
virtual void pollEvent();
|
|
|
|
|
2006-03-02 13:10:53 +00:00
|
|
|
/**
|
|
|
|
This method answers whether the given button as already been
|
|
|
|
handled by the pollEvent() method, and as such should be ignored
|
|
|
|
in the main event handler.
|
|
|
|
*/
|
|
|
|
virtual bool joyButtonHandled(int button);
|
|
|
|
|
2006-03-27 12:52:19 +00:00
|
|
|
/**
|
|
|
|
Informs the OSystem of a change in EventHandler state.
|
|
|
|
*/
|
|
|
|
virtual void stateChanged(EventHandler::State state);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Informs the OSystem of a change in pause status.
|
|
|
|
*/
|
|
|
|
virtual void pauseChanged(bool status);
|
|
|
|
|
2005-05-18 22:35:37 +00:00
|
|
|
protected:
|
|
|
|
/**
|
|
|
|
Set the base directory for all Stella files
|
|
|
|
*/
|
|
|
|
void setBaseDir(const string& basedir);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Set the directory where state files are stored
|
|
|
|
*/
|
|
|
|
void setStateDir(const string& statedir);
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
Set the locations of game properties file
|
2005-05-18 22:35:37 +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
|
|
|
void setPropertiesDir(const string& path);
|
2005-05-18 22:35:37 +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
|
|
|
Set the locations of config file
|
2005-05-18 22:35:37 +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
|
|
|
void setConfigFile(const string& file);
|
2005-05-18 22:35:37 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Set the location of the gamelist cache file
|
|
|
|
*/
|
|
|
|
void setCacheFile(const string& cachefile) { myGameListCacheFile = cachefile; }
|
2005-02-22 18:41:16 +00:00
|
|
|
|
2005-02-21 02:23:57 +00:00
|
|
|
protected:
|
|
|
|
// Pointer to the EventHandler object
|
|
|
|
EventHandler* myEventHandler;
|
|
|
|
|
2005-02-21 20:43:53 +00:00
|
|
|
// Pointer to the FrameBuffer object
|
|
|
|
FrameBuffer* myFrameBuffer;
|
2005-02-21 02:23:57 +00:00
|
|
|
|
2005-02-21 20:43:53 +00:00
|
|
|
// Pointer to the Sound object
|
|
|
|
Sound* mySound;
|
2005-02-21 02:23:57 +00:00
|
|
|
|
2005-02-21 20:43:53 +00:00
|
|
|
// Pointer to the Settings object
|
|
|
|
Settings* mySettings;
|
2005-02-21 02:23:57 +00:00
|
|
|
|
2005-02-21 20:43:53 +00:00
|
|
|
// Pointer to the PropertiesSet object
|
|
|
|
PropertiesSet* myPropSet;
|
2005-02-21 02:23:57 +00:00
|
|
|
|
|
|
|
// Pointer to the (currently defined) Console object
|
|
|
|
Console* myConsole;
|
|
|
|
|
2005-03-10 22:59:40 +00:00
|
|
|
// Pointer to the Menu object
|
|
|
|
Menu* myMenu;
|
|
|
|
|
2005-08-29 18:36:42 +00:00
|
|
|
// Pointer to the CommandMenu object
|
|
|
|
CommandMenu* myCommandMenu;
|
|
|
|
|
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
|
|
|
|
Launcher* myLauncher;
|
2005-03-10 22:59:40 +00:00
|
|
|
|
2005-05-27 18:00:49 +00:00
|
|
|
// Pointer to the Debugger object
|
|
|
|
Debugger* myDebugger;
|
|
|
|
|
2005-11-11 21:44:19 +00:00
|
|
|
// Pointer to the CheatManager object
|
|
|
|
CheatManager* myCheatManager;
|
|
|
|
|
2005-05-12 18:45:21 +00:00
|
|
|
// Number of times per second to iterate through the main loop
|
|
|
|
uInt32 myDisplayFrameRate;
|
|
|
|
|
2005-05-05 00:10:49 +00:00
|
|
|
// Time per frame for a video update, based on the current framerate
|
|
|
|
uInt32 myTimePerFrame;
|
|
|
|
|
2005-02-22 18:41:16 +00:00
|
|
|
private:
|
|
|
|
string myBaseDir;
|
|
|
|
string myStateDir;
|
|
|
|
|
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;
|
|
|
|
string myPropertiesFile;
|
2005-02-22 18:41:16 +00:00
|
|
|
|
2005-05-11 19:36:00 +00:00
|
|
|
string myGameListCacheFile;
|
2005-05-05 00:10:49 +00:00
|
|
|
string myRomFile;
|
|
|
|
|
2005-05-16 00:02:32 +00:00
|
|
|
string myFeatures;
|
|
|
|
|
2006-02-22 17:38:04 +00:00
|
|
|
// The font object to use for the normal in-game GUI
|
2005-06-08 18:45:09 +00:00
|
|
|
GUI::Font* myFont;
|
|
|
|
|
2006-02-22 17:38:04 +00:00
|
|
|
// The font object to use for the ROM launcher
|
|
|
|
GUI::Font* myLauncherFont;
|
|
|
|
|
|
|
|
// The font object to use for the console/debugger
|
2005-06-08 18:45:09 +00:00
|
|
|
GUI::Font* myConsoleFont;
|
|
|
|
|
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 framebuffers/renderers available in this system
|
|
|
|
(for now, that means either 'software' or 'opengl').
|
|
|
|
|
|
|
|
@return Success or failure of the framebuffer creation
|
|
|
|
*/
|
|
|
|
bool createFrameBuffer(bool showmessage = false);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Creates the various sound devices available in this system
|
|
|
|
(for now, that means either 'SDL' or 'Null').
|
|
|
|
*/
|
|
|
|
void createSound();
|
|
|
|
|
2005-02-21 02:23:57 +00:00
|
|
|
// Copy constructor isn't supported by this class so make it private
|
|
|
|
OSystem(const OSystem&);
|
|
|
|
|
|
|
|
// Assignment operator isn't supported by this class so make it private
|
|
|
|
OSystem& operator = (const OSystem&);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|