Update to v088r08 release.
byuu says:
From this WIP, I'm starting on the impossible task of
a declarative-based GUI, which I'm calling Ethos.
base/ becomes emulator/, and we add emulator/interface.hpp, which is
a base API that all emulation cores must implement in full.
(Right now, it's kind of a hybrid to work with the old GUI and the new
GUI at the same time, of course.)
Unlike the old interfaces, the new base class also provides all general
usability hooks: loading and saving files and states, cheat codes, etc.
The new interface also contains information and vector structs to
describe all possible loading methods, controller bindings, etc; and
gives names for them all.
The actual GUI in fact should not include eg <gba/gba.hpp> anymore.
Should speed up GUI compilation.
So the idea going forward is that ethos will build a list of emulators
right when the application starts up.
Once you've appended an emulator to that list, you're done. No more GUI
changes are needed to support that system.
The GUI will have code to parse the emulator interfaces list, and build
all the requisite GUI options dynamically, declarative style.
Ultimately, once the project is finished, the new GUI should look ~99%
identical to the current GUI. But it'll probably be a whole lot smaller.
2012-04-29 06:29:54 +00:00
|
|
|
#ifndef EMULATOR_HPP
|
|
|
|
#define EMULATOR_HPP
|
2012-02-06 12:03:45 +00:00
|
|
|
|
2015-06-18 10:48:53 +00:00
|
|
|
#include <nall/nall.hpp>
|
|
|
|
#include <nall/dsp.hpp>
|
|
|
|
using namespace nall;
|
|
|
|
|
Update to v088r10 release.
byuu says:
ethos is going to be absolutely amazing. You guys are in for a treat :D
I'm impressing the hell out of myself with how well-structured this code
is, it's allowing me to do amazing new things.
Just a small sampling of what's in store (and already implemented):
The file browser will display folders as "[ folder name ]", and
cartridge folders as "Game Name" (no extension, no /) [icons would be
nicer, but well ... phoenix.]
Folders are sorted above cartridge folders.
Cartridge folders for other systems do not show up in the list.
Not only are unique paths stored for each image type, your position in
the list is saved across runs.
Some voodoo was added to GTK+ so that all targets even scroll directly
to that item when you open the list. Load->System->Enter restarts your
last game.
That sounds really simple and obvious, but it makes an -incredible-
difference. Didn't realize it until I tried an implementation of it,
wow.
The input mapping list now lets you bind as many hotkeys as you want to
any given input.
So SFC::Port1::Joypad::B = Keyboard::Z or Joypad::Button1 ... no need to
remap everything to switch between keyboard and joypad. Either one
activates the key.
There is a separate Hotkeys tab now. This should hopefully end the
confusion about how to remap hotkeys that users experience.
Hotkeys are different, too. Instead of OR logic, they use AND logic.
So Fullscreen = Keyboard::Alt and Keyboard::Enter. Both must be pressed
to enter the key. This lets you easily implement "super" modifier keys.
The actual codebase has new features the old UI never had, and has about
~50% of the old functionality (so far, of course), yet is only ~25% as
much code.
The entire GUI no longer needs to pull in all the headers for each
emulated system. It just needs a small interface header file.
Then bind the entire system with exactly **two** lines of code.
Everything is dynamically generated for you after that.
2012-04-30 23:43:23 +00:00
|
|
|
namespace Emulator {
|
2015-06-18 10:48:53 +00:00
|
|
|
static const string Name = "higan";
|
Update to v095r05 release.
byuu says:
Changelog:
- GBA: lots of emulation improvements
- PPU PRAM is 16-bits wide
- DMA masks &~1/Half, &~3/Word
- VRAM OBJ 8-bit writes are ignored
- OAM 8-bit writes are ignored
- BGnCNT unused bits are writable*
- BG(0,1)CNT can't set the d13
- BLDALPHA is readable (fixes Donkey Kong Country, etc)
- SNES: lots of code cleanups
- sfc/chip => sfc/coprocessor
- UI: save most recent controller selection
GBA test scores: 1552/1552, 37/38, 1020/1260
(* forgot to add the value to the read function, so endrift's I/O tests
for them will fail. Fixed locally.)
Note: SNES is the only system with multiple controller/expansion port
options, and as such is the only one with a "None" option. Because it's
shared by the controller and expansion port, it ends up sorted first in
the list. This means that on your first run, you'll need to go to Super
Famicom->Controller Port 1 and select "Gamepad", otherwise input won't
work.
Also note that changing the expansion port device requires loading a new
cart. Unlike controllers, you aren't meant to hotplug expansion port
devices.
2015-11-12 10:15:03 +00:00
|
|
|
static const string Version = "095.05";
|
2015-06-18 10:48:53 +00:00
|
|
|
static const string Author = "byuu";
|
|
|
|
static const string License = "GPLv3";
|
|
|
|
static const string Website = "http://byuu.org/";
|
2013-03-21 12:59:01 +00:00
|
|
|
|
|
|
|
#if defined(PROFILE_ACCURACY)
|
2015-06-18 10:48:53 +00:00
|
|
|
static const string Profile = "Accuracy";
|
2013-03-21 12:59:01 +00:00
|
|
|
#elif defined(PROFILE_BALANCED)
|
2015-06-18 10:48:53 +00:00
|
|
|
static const string Profile = "Balanced";
|
2013-03-21 12:59:01 +00:00
|
|
|
#elif defined(PROFILE_PERFORMANCE)
|
2015-06-18 10:48:53 +00:00
|
|
|
static const string Profile = "Performance";
|
2013-03-21 12:59:01 +00:00
|
|
|
#endif
|
Update to v088r10 release.
byuu says:
ethos is going to be absolutely amazing. You guys are in for a treat :D
I'm impressing the hell out of myself with how well-structured this code
is, it's allowing me to do amazing new things.
Just a small sampling of what's in store (and already implemented):
The file browser will display folders as "[ folder name ]", and
cartridge folders as "Game Name" (no extension, no /) [icons would be
nicer, but well ... phoenix.]
Folders are sorted above cartridge folders.
Cartridge folders for other systems do not show up in the list.
Not only are unique paths stored for each image type, your position in
the list is saved across runs.
Some voodoo was added to GTK+ so that all targets even scroll directly
to that item when you open the list. Load->System->Enter restarts your
last game.
That sounds really simple and obvious, but it makes an -incredible-
difference. Didn't realize it until I tried an implementation of it,
wow.
The input mapping list now lets you bind as many hotkeys as you want to
any given input.
So SFC::Port1::Joypad::B = Keyboard::Z or Joypad::Button1 ... no need to
remap everything to switch between keyboard and joypad. Either one
activates the key.
There is a separate Hotkeys tab now. This should hopefully end the
confusion about how to remap hotkeys that users experience.
Hotkeys are different, too. Instead of OR logic, they use AND logic.
So Fullscreen = Keyboard::Alt and Keyboard::Enter. Both must be pressed
to enter the key. This lets you easily implement "super" modifier keys.
The actual codebase has new features the old UI never had, and has about
~50% of the old functionality (so far, of course), yet is only ~25% as
much code.
The entire GUI no longer needs to pull in all the headers for each
emulated system. It just needs a small interface header file.
Then bind the entire system with exactly **two** lines of code.
Everything is dynamically generated for you after that.
2012-04-30 23:43:23 +00:00
|
|
|
}
|
2012-02-06 12:03:45 +00:00
|
|
|
|
Update to v088r08 release.
byuu says:
From this WIP, I'm starting on the impossible task of
a declarative-based GUI, which I'm calling Ethos.
base/ becomes emulator/, and we add emulator/interface.hpp, which is
a base API that all emulation cores must implement in full.
(Right now, it's kind of a hybrid to work with the old GUI and the new
GUI at the same time, of course.)
Unlike the old interfaces, the new base class also provides all general
usability hooks: loading and saving files and states, cheat codes, etc.
The new interface also contains information and vector structs to
describe all possible loading methods, controller bindings, etc; and
gives names for them all.
The actual GUI in fact should not include eg <gba/gba.hpp> anymore.
Should speed up GUI compilation.
So the idea going forward is that ethos will build a list of emulators
right when the application starts up.
Once you've appended an emulator to that list, you're done. No more GUI
changes are needed to support that system.
The GUI will have code to parse the emulator interfaces list, and build
all the requisite GUI options dynamically, declarative style.
Ultimately, once the project is finished, the new GUI should look ~99%
identical to the current GUI. But it'll probably be a whole lot smaller.
2012-04-29 06:29:54 +00:00
|
|
|
#include "interface.hpp"
|
|
|
|
|
2012-02-06 12:03:45 +00:00
|
|
|
//debugging function hook:
|
|
|
|
//no overhead (and no debugger invocation) if not compiled with -DDEBUGGER
|
|
|
|
//wraps testing of function to allow invocation without a defined callback
|
|
|
|
template<typename T> struct hook;
|
|
|
|
template<typename R, typename... P> struct hook<R (P...)> {
|
|
|
|
function<R (P...)> callback;
|
|
|
|
|
2015-06-15 22:26:47 +00:00
|
|
|
auto operator()(P... p) const -> R {
|
2012-02-06 12:03:45 +00:00
|
|
|
#if defined(DEBUGGER)
|
2015-06-28 08:44:56 +00:00
|
|
|
if(callback) return callback(forward<P>(p)...);
|
2012-02-06 12:03:45 +00:00
|
|
|
#endif
|
|
|
|
return R();
|
|
|
|
}
|
|
|
|
|
|
|
|
hook() {}
|
2013-05-02 11:25:45 +00:00
|
|
|
hook(const hook& hook) { callback = hook.callback; }
|
|
|
|
hook(void* function) { callback = function; }
|
2015-11-08 08:54:42 +00:00
|
|
|
hook(auto (*function)(P...) -> R) { callback = function; }
|
|
|
|
template<typename C> hook(auto (C::*function)(P...) -> R, C* object) { callback = {function, object}; }
|
|
|
|
template<typename C> hook(auto (C::*function)(P...) const -> R, C* object) { callback = {function, object}; }
|
2012-02-06 12:03:45 +00:00
|
|
|
template<typename L> hook(const L& function) { callback = function; }
|
2012-02-09 12:53:55 +00:00
|
|
|
|
2015-06-15 22:26:47 +00:00
|
|
|
auto operator=(const hook& source) -> hook& { callback = source.callback; return *this; }
|
2012-02-06 12:03:45 +00:00
|
|
|
};
|
|
|
|
|
2012-02-09 12:53:55 +00:00
|
|
|
#if defined(DEBUGGER)
|
|
|
|
#define privileged public
|
|
|
|
#else
|
|
|
|
#define privileged private
|
|
|
|
#endif
|
|
|
|
|
2015-11-10 11:02:29 +00:00
|
|
|
using varuint = varuint_t<uint>;
|
2012-02-06 12:03:45 +00:00
|
|
|
|
|
|
|
#endif
|