2015-03-03 10:14:49 +00:00
|
|
|
#include "../tomoko.hpp"
|
2015-06-15 22:26:47 +00:00
|
|
|
ConfigurationManager* config = nullptr;
|
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
|
|
|
EmulatorSettings* emulatorSettings = nullptr;
|
2015-03-03 10:14:49 +00:00
|
|
|
|
|
|
|
ConfigurationManager::ConfigurationManager() {
|
2015-06-15 22:26:47 +00:00
|
|
|
config = this;
|
2015-03-03 10:14:49 +00:00
|
|
|
|
2015-04-13 11:16:33 +00:00
|
|
|
userInterface.append(userInterface.showStatusBar, "ShowStatusBar");
|
|
|
|
append(userInterface, "UserInterface");
|
|
|
|
|
2015-04-21 11:51:57 +00:00
|
|
|
library.append(library.location, "Location");
|
|
|
|
append(library, "Library");
|
|
|
|
|
2015-03-03 10:14:49 +00:00
|
|
|
video.append(video.driver, "Driver");
|
|
|
|
video.append(video.synchronize, "Synchronize");
|
|
|
|
video.append(video.scale, "Scale");
|
|
|
|
video.append(video.aspectCorrection, "AspectCorrection");
|
Update to v094r13 release.
byuu says:
This version polishes up the input dialogue (reset, erase, disable
button when item not focused, split device ID from mapping name), adds
color emulation toggle, and add dummy menu items for remaining features
(to be filled in later.)
Also, it now compiles cleanly on Windows with GTK.
I didn't test with TDM-GCC-32, because for god knows what reason, the
32-bit version ships with headers from Windows 95 OSR2 only. So I built
with TDM-GCC-64 with arch=x86.
And uh, apparently, moving or resizing a window causes a Visual C++
runtime exception in the GTK+ DLLs. This doesn't happen with trance or
renshuu built with TDM-GCC-32. So, yeah, like I said, don't use -m32.
2015-03-07 10:21:47 +00:00
|
|
|
video.append(video.filter, "Filter");
|
2015-11-08 08:54:42 +00:00
|
|
|
video.append(video.shader, "Shader");
|
Update to v094r13 release.
byuu says:
This version polishes up the input dialogue (reset, erase, disable
button when item not focused, split device ID from mapping name), adds
color emulation toggle, and add dummy menu items for remaining features
(to be filled in later.)
Also, it now compiles cleanly on Windows with GTK.
I didn't test with TDM-GCC-32, because for god knows what reason, the
32-bit version ships with headers from Windows 95 OSR2 only. So I built
with TDM-GCC-64 with arch=x86.
And uh, apparently, moving or resizing a window causes a Visual C++
runtime exception in the GTK+ DLLs. This doesn't happen with trance or
renshuu built with TDM-GCC-32. So, yeah, like I said, don't use -m32.
2015-03-07 10:21:47 +00:00
|
|
|
video.append(video.colorEmulation, "ColorEmulation");
|
2015-06-15 22:26:47 +00:00
|
|
|
video.append(video.saturation, "Saturation");
|
|
|
|
video.append(video.gamma, "Gamma");
|
|
|
|
video.append(video.luminance, "Luminance");
|
2015-04-21 11:58:59 +00:00
|
|
|
video.overscan.append(video.overscan.mask, "Mask");
|
|
|
|
video.overscan.append(video.overscan.horizontal, "Horizontal");
|
|
|
|
video.overscan.append(video.overscan.vertical, "Vertical");
|
|
|
|
video.append(video.overscan, "Overscan");
|
2015-03-03 10:14:49 +00:00
|
|
|
append(video, "Video");
|
|
|
|
|
|
|
|
audio.append(audio.driver, "Driver");
|
Update to v094r22 release.
byuu says:
I fixed the hiro layout enable bug, so when you go to assign joypad
input, the window disables itself so your input doesn't mess with the
controls.
I added "reset" to the hotkeys, in case you feel like clearing all of
them at once.
I added device selection support and the ability to disable audio
synchronization (run > 60fps) to the ruby/OSS driver. This is exposed in
tomoko's configuration file.
I added checks to stringify so that assigning null char* strings to
nall::string won't cause crashes anymore (technically the crash was in
strlen(), which doesn't check for null strings, but whatever ... I'll do
the check myself.)
I hooked up BrowserDialog::folderSelect() to loading slotted media for
now. Tested it by loading a Game Boy game successfully through the Super
Game Boy. Definitely want to write a custom window for this though, that
looks more like the library dialog.
Remaining issues:
- finish slotted cart loader (SGB, BSX, ST)
- add DIP switch selection window (NSS) [I may end up punting this one
to v096]
- add more configuration panels (video, audio, timing)
2015-05-25 12:23:49 +00:00
|
|
|
audio.append(audio.device, "Device");
|
2015-03-03 10:14:49 +00:00
|
|
|
audio.append(audio.synchronize, "Synchronize");
|
|
|
|
audio.append(audio.mute, "Mute");
|
2015-06-15 22:26:47 +00:00
|
|
|
audio.append(audio.volume, "Volume");
|
|
|
|
audio.append(audio.frequency, "Frequency");
|
|
|
|
audio.append(audio.latency, "Latency");
|
|
|
|
audio.append(audio.resampler, "Resampler");
|
2015-03-03 10:14:49 +00:00
|
|
|
append(audio, "Audio");
|
|
|
|
|
|
|
|
input.append(input.driver, "Driver");
|
|
|
|
append(input, "Input");
|
|
|
|
|
2015-06-15 22:26:47 +00:00
|
|
|
timing.append(timing.video, "Video");
|
|
|
|
timing.append(timing.audio, "Audio");
|
|
|
|
append(timing, "Timing");
|
|
|
|
|
2015-07-02 10:22:24 +00:00
|
|
|
load(locate({configpath(), "tomoko/"}, "settings.bml"));
|
2015-04-21 11:51:57 +00:00
|
|
|
if(!library.location) library.location = {userpath(), "Emulation/"};
|
2015-06-20 05:44:05 +00:00
|
|
|
if(!video.driver) video.driver = ruby::Video::safestDriver();
|
|
|
|
if(!audio.driver) audio.driver = ruby::Audio::safestDriver();
|
|
|
|
if(!input.driver) input.driver = ruby::Input::safestDriver();
|
2015-07-02 10:22:24 +00:00
|
|
|
save(locate({configpath(), "tomoko/"}, "settings.bml"));
|
2015-03-03 10:14:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
auto ConfigurationManager::quit() -> void {
|
2015-07-02 10:22:24 +00:00
|
|
|
save(locate({configpath(), "tomoko/"}, "settings.bml"));
|
2015-03-03 10:14:49 +00:00
|
|
|
}
|
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
|
|
|
|
|
|
|
EmulatorSettings::EmulatorSettings() {
|
|
|
|
emulatorSettings = this;
|
|
|
|
(Markup::Node&)*this = BML::unserialize(string::read(locate({configpath(), "tomoko/"}, "emulators.bml")));
|
|
|
|
}
|
|
|
|
|
|
|
|
auto EmulatorSettings::quit() -> void {
|
|
|
|
file::write(locate({configpath(), "tomoko/"}, "emulators.bml"), BML::serialize(*this));
|
|
|
|
}
|
|
|
|
|
|
|
|
auto EmulatorSettings::get(string name) -> string {
|
|
|
|
name.replace(" ", "");
|
|
|
|
return (*this)(name).text();
|
|
|
|
}
|
|
|
|
|
|
|
|
auto EmulatorSettings::set(string name, string value) -> void {
|
|
|
|
name.replace(" ", "");
|
|
|
|
(*this)(name).setValue(value);
|
|
|
|
}
|