Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 50 additions & 3 deletions bsnes/target-bsnes/settings/enhancements.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ auto EnhancementSettings::create() -> void {
if(settings.emulator.runAhead.frames == 4) runAhead4.setChecked();
runAheadSpacer.setColor({192, 192, 192});

overclockingLabel.setText("Overclocking").setFont(Font().setBold());
overclockingLabel.setText("Overclocking (this will break games, cause bugs and reduce performance!)").setFont(Font().setBold());
overclockingLayout.setSize({3, 3});
overclockingLayout.column(0).setAlignment(1.0);
overclockingLayout.column(1).setAlignment(0.5);
Expand Down Expand Up @@ -124,7 +124,6 @@ auto EnhancementSettings::create() -> void {
).onToggle([&] {
settings.emulator.hack.coprocessor.preferHLE = coprocessorPreferHLEOption.checked();
});
coprocessorSpacer.setColor({192, 192, 192});

gameLabel.setText("Game Enhancements").setFont(Font().setBold());
hotfixes.setText("Hotfixes").setToolTip({
Expand All @@ -133,6 +132,54 @@ auto EnhancementSettings::create() -> void {
}).setChecked(settings.emulator.hack.hotfixes).onToggle([&] {
settings.emulator.hack.hotfixes = hotfixes.checked();
});
hotfixesSpacer.setColor({192, 192, 192});

note.setText("Note: some settings do not take effect until after reloading games.");
ppuModeLabel.setText("Mode Presets:").setFont(Font().setBold());
ppuModeRequirements.setText(
"Accuracy Mode: Maximum hardware accuracy, but PPUs timings aren't 100% correct yet.\n"
"Compatibility Mode: Most compatible way to play games paired with good performance. [Recommended]"
);
accuracyMode.setText("Accuracy Mode").onActivate([&] {
runAhead0.setChecked(); settings.emulator.runAhead.frames = 0;
cpuClock.setPosition(0).doChange();
sa1Clock.setPosition(0).doChange();
sfxClock.setPosition(0).doChange();
fastPPU.setChecked(false).doToggle();
fastDSP.setChecked(false).doToggle();
cubicInterpolation.setChecked(false).doToggle();
coprocessorDelayedSyncOption.setChecked(false).doToggle();
coprocessorPreferHLEOption.setChecked(false).doToggle();
hotfixes.setChecked(false).doToggle();

if(!emulator->loaded()) return;
MessageDialog().setAlignment(settingsWindow).setTitle("Success").setText({
"Accuracy Mode applied.\n"
"Reload the game in order for all changes to take effect."
}).information();
});

compatibilityMode.setText("Compatibility Mode").onActivate([&] {
runAhead0.setChecked(); settings.emulator.runAhead.frames = 0;
cpuClock.setPosition(0).doChange();
sa1Clock.setPosition(0).doChange();
sfxClock.setPosition(0).doChange();
fastPPU.setChecked(true).doToggle();
deinterlace.setChecked(true).doToggle();
noSpriteLimit.setChecked(false).doToggle();
mode7Scale.item(0).setSelected(); emulator->configure("Hacks/PPU/Mode7/Scale", settings.emulator.hack.ppu.mode7.scale = 1);
mode7Perspective.setChecked(true).doToggle();
mode7Supersample.setChecked(false).doToggle();
mode7Mosaic.setChecked(true).doToggle();
fastDSP.setChecked(false).doToggle();
cubicInterpolation.setChecked(false).doToggle();
coprocessorDelayedSyncOption.setChecked(false).doToggle();
coprocessorPreferHLEOption.setChecked(false).doToggle();
hotfixes.setChecked(true).doToggle();

if(!emulator->loaded()) return;
MessageDialog().setAlignment(settingsWindow).setTitle("Success").setText({
"Compatibility Mode applied.\n"
"Reload the game in order for all changes to take effect."
}).information();
});
}
11 changes: 7 additions & 4 deletions bsnes/target-bsnes/settings/settings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,13 +382,16 @@ struct EnhancementSettings : VerticalLayout {
HorizontalLayout coprocessorLayout{this, Size{~0, 0}};
CheckLabel coprocessorDelayedSyncOption{&coprocessorLayout, Size{0, 0}};
CheckLabel coprocessorPreferHLEOption{&coprocessorLayout, Size{0, 0}};
Canvas coprocessorSpacer{this, Size{~0, 1}};
//
Label gameLabel{this, Size{~0, 0}, 2};
CheckLabel hotfixes{this, Size{0, 0}};
CheckLabel hotfixes{this, Size{0, 0}};
Canvas hotfixesSpacer{this, Size{~0, 1}};
//
Widget spacer{this, Size{~0, ~0}};
Label note{this, Size{~0, 0}};
Label ppuModeLabel{this, Size{~0, 0}, 0};
Label ppuModeRequirements{this, Size{~0, 0}};
HorizontalLayout modeLayout{this, Size{~0, 0}};
Button accuracyMode{&modeLayout, Size{0, 0}};
Button compatibilityMode{&modeLayout, Size{0, 0}};
};

struct CompatibilitySettings : VerticalLayout {
Expand Down