2011-09-27 11:55:02 +00:00
|
|
|
struct Interface;
|
2010-08-09 13:28:56 +00:00
|
|
|
|
2015-11-10 11:02:29 +00:00
|
|
|
#include "device.hpp"
|
|
|
|
|
2016-01-23 07:29:34 +00:00
|
|
|
struct System {
|
|
|
|
enum class Region : bool { NTSC = 0, PAL = 1 };
|
2015-11-10 11:02:29 +00:00
|
|
|
|
2016-01-23 07:29:34 +00:00
|
|
|
auto region() const -> Region;
|
|
|
|
auto expansionPort() const -> Device::ID;
|
|
|
|
auto cpuFrequency() const -> uint;
|
|
|
|
auto apuFrequency() const -> uint;
|
2010-08-09 13:28:56 +00:00
|
|
|
|
2015-11-10 11:02:29 +00:00
|
|
|
auto run() -> void;
|
|
|
|
auto runToSave() -> void;
|
2010-08-09 13:28:56 +00:00
|
|
|
|
2015-11-10 11:02:29 +00:00
|
|
|
auto init() -> void;
|
|
|
|
auto term() -> void;
|
|
|
|
auto load() -> void;
|
|
|
|
auto unload() -> void;
|
|
|
|
auto power() -> void;
|
|
|
|
auto reset() -> void;
|
2010-08-09 13:28:56 +00:00
|
|
|
|
2015-11-10 11:02:29 +00:00
|
|
|
auto serialize() -> serializer;
|
|
|
|
auto unserialize(serializer&) -> bool;
|
2010-08-09 13:28:56 +00:00
|
|
|
|
Update to v094r39 release.
byuu says:
Changelog:
- SNES mid-scanline BGMODE fixes finally merged (can run
atx2.zip{mode7.smc}+mtest(2).sfc properly now)
- Makefile now discards all built-in rules and variables
- switch on bool warning disabled for GCC now as well (was already
disabled for Clang)
- when loading a game, if any required files are missing, display
a warning message box (manifest.bml, program.rom, bios.rom, etc)
- when loading a game (or a game slot), if manifest.bml is missing, it
will invoke icarus to try and generate it
- if that fails (icarus is missing or the folder is bad), you will get
a warning telling you that the manifest can't be loaded
The warning prompt on missing files work for both games and the .sys
folders and their files. For some reason, failing to load the DMG/CGB
BIOS is causing a crash before I can display the modal dialog. I have no
idea why, and the stack frame backtrace is junk.
I also can't seem to abort the failed loading process. If I call
Program::unloadMedia(), I get a nasty segfault. Again with a really
nasty stack trace. So for now, it'll just end up sitting there emulating
an empty ROM (solid black screen.) In time, I'd like to fix that too.
Lastly, I need a better method than popen for Windows. popen is kind of
ugly and flashes a console window for a brief second even if the
application launched is linked with -mwindows. Not sure if there even is
one (I need to read the stdout result, so CreateProcess may not work
unless I do something nasty like "> %tmp%/temp") I'm also using the
regular popen instead of _wpopen, so for this WIP, it won't work if your
game folder has non-English letters in the path.
2015-08-04 09:00:55 +00:00
|
|
|
struct Information {
|
|
|
|
string manifest;
|
|
|
|
} information;
|
|
|
|
|
2010-08-09 13:28:56 +00:00
|
|
|
private:
|
2015-11-10 11:02:29 +00:00
|
|
|
auto runThreadToSave() -> void;
|
2010-08-09 13:28:56 +00:00
|
|
|
|
2015-11-10 11:02:29 +00:00
|
|
|
auto serialize(serializer&) -> void;
|
|
|
|
auto serializeAll(serializer&) -> void;
|
|
|
|
auto serializeInit() -> void;
|
2010-08-09 13:28:56 +00:00
|
|
|
|
2016-01-23 07:29:34 +00:00
|
|
|
Region _region = Region::NTSC;
|
|
|
|
Device::ID _expansionPort = Device::ID::None;
|
|
|
|
uint _cpuFrequency = 0;
|
|
|
|
uint _apuFrequency = 0;
|
|
|
|
uint _serializeSize = 0;
|
|
|
|
|
2010-08-09 13:28:56 +00:00
|
|
|
friend class Cartridge;
|
2015-11-10 11:02:29 +00:00
|
|
|
friend class Device;
|
2010-08-09 13:28:56 +00:00
|
|
|
};
|
|
|
|
|
Update to v093r02 release.
byuu says:
Changelog:
- nall: fixed major memory leak in string class
- ruby: video shaders support #define-based settings now
- phoenix/GTK+: support > 256x256 icons for window / task bar / alt-tab
- sfc: remove random/ and config/, merge into system/
- ethos: delete higan.png (48x48), replace with higan512.png (512x512)
as new higan.png
- ethos: default gamma to 100% (no color adjustment)
- ethos: use "Video Shaders/Display Emulation/" instead of "Video
Shaders/Emulation/"
- use g++ instead of g++-4.7 (g++ -v must be >= 4.7)
- use -std=c++11 instead of -std=gnu++11
- applied a few patches from Debian upstream to make their packaging job
easier
So because colors are normalized in GLSL, I won't be able to offer video
shaders absolute color literals. We will have to perform basic color
conversion inside the core.
As such, the current plan is to create some sort of Emulator::Settings
interface. With that, I'll connect an option for color correction, which
will be on by default. For FC/SFC, that will mean gamma correction
(darker / stronger colors), and for GB/GBC/GBA, it will mean simulating
the weird brightness levels of the displays. I am undecided on whether
to use pea soup green for the GB or not. By not doing so, it'll be
easier for the display emulation shader to do it.
2013-11-09 11:45:54 +00:00
|
|
|
extern System system;
|
|
|
|
|
2012-04-29 06:16:44 +00:00
|
|
|
#include <sfc/scheduler/scheduler.hpp>
|
2010-08-09 13:28:56 +00:00
|
|
|
|
Update to v093r02 release.
byuu says:
Changelog:
- nall: fixed major memory leak in string class
- ruby: video shaders support #define-based settings now
- phoenix/GTK+: support > 256x256 icons for window / task bar / alt-tab
- sfc: remove random/ and config/, merge into system/
- ethos: delete higan.png (48x48), replace with higan512.png (512x512)
as new higan.png
- ethos: default gamma to 100% (no color adjustment)
- ethos: use "Video Shaders/Display Emulation/" instead of "Video
Shaders/Emulation/"
- use g++ instead of g++-4.7 (g++ -v must be >= 4.7)
- use -std=c++11 instead of -std=gnu++11
- applied a few patches from Debian upstream to make their packaging job
easier
So because colors are normalized in GLSL, I won't be able to offer video
shaders absolute color literals. We will have to perform basic color
conversion inside the core.
As such, the current plan is to create some sort of Emulator::Settings
interface. With that, I'll connect an option for color correction, which
will be on by default. For FC/SFC, that will mean gamma correction
(darker / stronger colors), and for GB/GBC/GBA, it will mean simulating
the weird brightness levels of the displays. I am undecided on whether
to use pea soup green for the GB or not. By not doing so, it'll be
easier for the display emulation shader to do it.
2013-11-09 11:45:54 +00:00
|
|
|
struct Random {
|
2016-01-23 07:29:34 +00:00
|
|
|
auto seed(uint seed) -> void;
|
|
|
|
auto operator()(uint result) -> uint;
|
|
|
|
auto serialize(serializer& s) -> void;
|
Update to v093r02 release.
byuu says:
Changelog:
- nall: fixed major memory leak in string class
- ruby: video shaders support #define-based settings now
- phoenix/GTK+: support > 256x256 icons for window / task bar / alt-tab
- sfc: remove random/ and config/, merge into system/
- ethos: delete higan.png (48x48), replace with higan512.png (512x512)
as new higan.png
- ethos: default gamma to 100% (no color adjustment)
- ethos: use "Video Shaders/Display Emulation/" instead of "Video
Shaders/Emulation/"
- use g++ instead of g++-4.7 (g++ -v must be >= 4.7)
- use -std=c++11 instead of -std=gnu++11
- applied a few patches from Debian upstream to make their packaging job
easier
So because colors are normalized in GLSL, I won't be able to offer video
shaders absolute color literals. We will have to perform basic color
conversion inside the core.
As such, the current plan is to create some sort of Emulator::Settings
interface. With that, I'll connect an option for color correction, which
will be on by default. For FC/SFC, that will mean gamma correction
(darker / stronger colors), and for GB/GBC/GBA, it will mean simulating
the weird brightness levels of the displays. I am undecided on whether
to use pea soup green for the GB or not. By not doing so, it'll be
easier for the display emulation shader to do it.
2013-11-09 11:45:54 +00:00
|
|
|
|
|
|
|
private:
|
2015-11-10 11:02:29 +00:00
|
|
|
uint iter = 0;
|
Update to v093r02 release.
byuu says:
Changelog:
- nall: fixed major memory leak in string class
- ruby: video shaders support #define-based settings now
- phoenix/GTK+: support > 256x256 icons for window / task bar / alt-tab
- sfc: remove random/ and config/, merge into system/
- ethos: delete higan.png (48x48), replace with higan512.png (512x512)
as new higan.png
- ethos: default gamma to 100% (no color adjustment)
- ethos: use "Video Shaders/Display Emulation/" instead of "Video
Shaders/Emulation/"
- use g++ instead of g++-4.7 (g++ -v must be >= 4.7)
- use -std=c++11 instead of -std=gnu++11
- applied a few patches from Debian upstream to make their packaging job
easier
So because colors are normalized in GLSL, I won't be able to offer video
shaders absolute color literals. We will have to perform basic color
conversion inside the core.
As such, the current plan is to create some sort of Emulator::Settings
interface. With that, I'll connect an option for color correction, which
will be on by default. For FC/SFC, that will mean gamma correction
(darker / stronger colors), and for GB/GBC/GBA, it will mean simulating
the weird brightness levels of the displays. I am undecided on whether
to use pea soup green for the GB or not. By not doing so, it'll be
easier for the display emulation shader to do it.
2013-11-09 11:45:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern Random random;
|