forked from ares-emulator/ares
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
byuu says: These WIPs are gonna be unstable for a bit, sorry. Large amounts of changes. Right now, higan+bsnes compile, but only with cores="sfc gb". There's a new nall::Settings class, which I really dislike the design of, but as long as the classes that use it remain stable, then ... I'll have to live with it for now. Interface loses both the old get/set/cap interface, plus the configuration interface. It now returns either properties() or options(). Both return a Settings& object. There's also helpers for accessing individual properties and options by string lookup. Properties are immutable traits of the hardware itself: CPU version, PPU VRAM size, boot ROM information, etc. Options are mutable traits that users may change. The idea with nall/settings is to build out a kind of extremely complex configuration object that'll do everything we'd ever want: - allow recursive children settings similar to Markup::Node - access values directly without dynamic_cast (type erasure) or string conversion (Markup::Node style) - serialize to and unserialize from BML - support valid values to guarantee that the settings are never in an invalid state - support latching of values to cache reads without another separate variable (so the GUI can modify any variables at any time safely) Todo: - allow binding callback functions on assignment, so that eg changing video/colorEmulation will regenerate the video palette - provide a hint on whether an option can be changed dynamically at run-time, or only statically at first load - provide descriptions for each setting And then once the class is fully fleshed out, I want to build a tool that will generate a fancy modal hiro Window from a Settings& object. Once that is complete, we'll then have System → Options to configure per-emulator settings (like bsnes PPU stuff) that otherwise doesn't fit into higan's GUI. We will be exposing the extended Super Famicom options to the bsnes GUI, of course. That's the emulator tab there. Next up, higan's systems tab will need to generate blank default property files for each system, and let you configure system properties from this screen. That's going to mean that, by allowing the same system to appear multiple times, that each entry gets its own options file, which will have to be stored somewhere. And to do all of that, we really need to work out how to handle regions first. It may have to be something radical like FitzRoy's idea, or it may be that we can come up with something a little less drastic. But I have no idea right now ... What I'd really like to do is start trying to get bsnes v107 out already. The two things holding it up are: fixing the desync between the settings.bml GUI settings and options.bml SNES properties (I know what's wrong, I just have to fix it), and getting XAudio2 DRC working (I copied BearOso's implementation details, but it just doesn't work for me ...). Then I also have to install Windows, set up a dev environment with msys2, and build it all. Lots and lots of work ...
- Loading branch information
1 parent
631baa4
commit 94c691e
Showing
53 changed files
with
555 additions
and
441 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
struct Options : Setting<> { | ||
struct Video : Setting<> { using Setting::Setting; | ||
Setting<boolean> blurEmulation{this, "blurEmulation", true}; | ||
Setting<boolean> colorEmulation{this, "colorEmulation", true}; | ||
} video{this, "video"}; | ||
|
||
Options() : Setting{"options"} { | ||
} | ||
}; | ||
|
||
extern Options option; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
struct Properties : Setting<string> { | ||
struct Memory : Setting<> { using Setting::Setting; | ||
Setting<string> type{this, "type", "ROM"}; | ||
Setting<natural> size{this, "size"}; | ||
Setting<string> content{this, "content", "Boot"}; | ||
} memory{this, "memory"}; | ||
|
||
Properties() : Setting{"system"} { | ||
} | ||
}; | ||
|
||
extern Properties propertyGameBoy; | ||
extern Properties propertyGameBoyColor; |
Oops, something went wrong.