Fixed alt-key menu activation on Windows.
Removed 2160p HD mode 7 due to Direct3D limit of 2048x2048 textures.
Reverted to safe ruby drivers when no configuration file is present.
Removed ASIO driver because nobody is interested in improving it.
Added macOS libretro target [rtretiakov]
This commit is contained in:
byuu 2019-09-10 22:32:33 +09:00
parent 29b13083d5
commit 29caf77751
7 changed files with 34 additions and 10 deletions

View File

@ -29,7 +29,7 @@ using namespace nall;
namespace Emulator { namespace Emulator {
static const string Name = "bsnes"; static const string Name = "bsnes";
static const string Version = "109.1"; static const string Version = "109.2";
static const string Author = "byuu"; static const string Author = "byuu";
static const string License = "GPLv3"; static const string License = "GPLv3";
static const string Website = "https://byuu.org"; static const string Website = "https://byuu.org";

View File

@ -206,8 +206,8 @@ auto Presentation::create() -> void {
.show(); .show();
}); });
viewport.setFocusable(); viewport.setFocusable(false); //true would also capture Alt, which breaks keyboard menu navigation
viewport.setDroppable(); viewport.setDroppable(true);
viewport.onDrop([&](vector<string> locations) { viewport.onDrop([&](vector<string> locations) {
if(!locations) return; if(!locations) return;
program.gameQueue = {}; program.gameQueue = {};

View File

@ -62,8 +62,7 @@ auto EnhancementSettings::create() -> void {
mode7Scale.append(ComboButtonItem().setText("1440p").setProperty("multiplier", 6)); mode7Scale.append(ComboButtonItem().setText("1440p").setProperty("multiplier", 6));
mode7Scale.append(ComboButtonItem().setText("1680p").setProperty("multiplier", 7)); mode7Scale.append(ComboButtonItem().setText("1680p").setProperty("multiplier", 7));
mode7Scale.append(ComboButtonItem().setText("1920p").setProperty("multiplier", 8)); mode7Scale.append(ComboButtonItem().setText("1920p").setProperty("multiplier", 8));
mode7Scale.append(ComboButtonItem().setText("2160p").setProperty("multiplier", 9)); for(uint n = 1; n <= 8; n++) {
for(uint n = 1; n <= 9; n++) {
if(settings.emulator.hack.ppu.mode7.scale == n) mode7Scale.item(n - 1).setSelected(); if(settings.emulator.hack.ppu.mode7.scale == n) mode7Scale.item(n - 1).setSelected();
} }
mode7Scale.onChange([&] { mode7Scale.onChange([&] {

View File

@ -35,9 +35,9 @@ auto Settings::save() -> void {
auto Settings::process(bool load) -> void { auto Settings::process(bool load) -> void {
if(load) { if(load) {
//initialize non-static default settings //initialize non-static default settings
video.driver = ruby::Video::optimalDriver(); video.driver = ruby::Video::safestDriver();
audio.driver = ruby::Audio::optimalDriver(); audio.driver = ruby::Audio::safestDriver();
input.driver = ruby::Input::optimalDriver(); input.driver = ruby::Input::safestDriver();
} }
#define bind(type, path, name) \ #define bind(type, path, name) \

View File

@ -1,5 +1,5 @@
name := libretro.so name := libretro.so
flags += -std=c++17 -fpermissive -Wno-narrowing -Wno-multichar -fopenmp -g -fPIC flags += -Wno-narrowing -Wno-multichar -fopenmp -g -fPIC
objects := libretro $(objects) objects := libretro $(objects)
objects := $(patsubst %,obj/%.o,$(objects)) objects := $(patsubst %,obj/%.o,$(objects))
@ -11,4 +11,6 @@ ifeq ($(platform),linux)
$(strip $(compiler) -o out/bsnes_libretro.so -shared $(objects) -Wl,--no-undefined -Wl,--version-script=target-libretro/link.T -Wl,-Bdynamic -lpthread -ldl -lgomp) $(strip $(compiler) -o out/bsnes_libretro.so -shared $(objects) -Wl,--no-undefined -Wl,--version-script=target-libretro/link.T -Wl,-Bdynamic -lpthread -ldl -lgomp)
else ifeq ($(platform),windows) else ifeq ($(platform),windows)
$(strip $(compiler) -o out/bsnes_libretro.dll -shared $(objects) -Wl,--no-undefined -Wl,--version-script=target-libretro/link.T -static-libgcc -static-libstdc++ -Wl,-Bstatic -lws2_32 -lpthread -lgomp -Wl,-Bdynamic) $(strip $(compiler) -o out/bsnes_libretro.dll -shared $(objects) -Wl,--no-undefined -Wl,--version-script=target-libretro/link.T -static-libgcc -static-libstdc++ -Wl,-Bstatic -lws2_32 -lpthread -lgomp -Wl,-Bdynamic)
else ifeq ($(platform),macos)
$(strip $(compiler) -o out/bsnes_libretro.dylib -shared $(objects) -lpthread -ldl)
endif endif

View File

@ -123,6 +123,29 @@ auto Program::open(uint id, string name, vfs::file::mode mode, bool required) ->
auto Program::load() -> void { auto Program::load() -> void {
emulator->unload(); emulator->unload();
emulator->load(); emulator->load();
// per-game hack overrides
auto title = superFamicom.title;
auto region = superFamicom.region;
//relies on mid-scanline rendering techniques
if(title == "AIR STRIKE PATROL" || title == "DESERT FIGHTER") emulator->configure("Hacks/PPU/Fast", false);
//stage 2 uses pseudo-hires in a way that's not compatible with the scanline-based renderer
if(title == "SFC クレヨンシンチャン") emulator->configure("Hacks/PPU/Fast", false);
//relies on cycle-accurate writes to the echo buffer
if(title == "KOUSHIEN_2") emulator->configure("Hacks/DSP/Fast", false);
//will hang immediately
if(title == "RENDERING RANGER R2") emulator->configure("Hacks/DSP/Fast", false);
//will hang sometimes in the "Bach in Time" stage
if(title == "BUBSY II" && region == "PAL") emulator->configure("Hacks/DSP/Fast", false);
//fixes an errant scanline on the title screen due to writing to PPU registers too late
if(title == "ADVENTURES OF FRANKEN" && region == "PAL") emulator->configure("Hacks/PPU/RenderCycle", 32);
emulator->power(); emulator->power();
} }

View File

@ -1,7 +1,7 @@
ifeq ($(ruby),) ifeq ($(ruby),)
ifeq ($(platform),windows) ifeq ($(platform),windows)
ruby += video.wgl video.direct3d video.directdraw video.gdi ruby += video.wgl video.direct3d video.directdraw video.gdi
ruby += audio.asio audio.wasapi audio.xaudio2 audio.directsound audio.waveout ruby += audio.wasapi audio.xaudio2 audio.directsound audio.waveout #audio.alsa
ruby += input.windows ruby += input.windows
else ifeq ($(platform),macos) else ifeq ($(platform),macos)
ruby += video.cgl ruby += video.cgl