From 4fb8ce2821b4b364024ba56b52fb5e58db8c7cba Mon Sep 17 00:00:00 2001 From: Tim Allen Date: Wed, 6 Sep 2017 12:38:00 +1000 Subject: [PATCH] Update to v104r12 release. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit byuu says: Changelog: - higan: URLs updated to HTTPS - sfc/ppu/background: use hires/interlace/mosaic-adjusted X/Y coordinates for offset-per-tile mode - sfc/ppu/background: hires mosaic seems to advance pixel counter on subscreen pixels - tomoko: added “Help→Credits” menu option (currently the page does not exist; should before v105) - tomoko: reduced volume slider from {0% - 500%} to {0% - 200%}. Distortion is too intense above 200%. - technically, I've encountered distortion at 200% as well in Prince of Persia for the SNES - nall/run/invoke: use program path for working directory - allows you to choose “Library→Import ROMs” from a different directory on the command-line I don't know how to assign credit for the mosaic stuff. It's been a work-in-progress with me, Cydrak, and hex_usr. The current design should be correct, but very unpleasant. The code desperately needs to be refactored, but my recent attempt at doing so ended in spectacular failure. --- higan/emulator/emulator.hpp | 4 ++-- higan/sfc/ppu/background/background.cpp | 10 +++++----- higan/target-tomoko/presentation/presentation.cpp | 5 ++++- higan/target-tomoko/presentation/presentation.hpp | 1 + higan/target-tomoko/settings/audio.cpp | 2 +- nall/run.hpp | 3 ++- 6 files changed, 15 insertions(+), 10 deletions(-) diff --git a/higan/emulator/emulator.hpp b/higan/emulator/emulator.hpp index 7b4a70d2..23d8304c 100644 --- a/higan/emulator/emulator.hpp +++ b/higan/emulator/emulator.hpp @@ -12,10 +12,10 @@ using namespace nall; namespace Emulator { static const string Name = "higan"; - static const string Version = "104.11"; + static const string Version = "104.12"; static const string Author = "byuu"; static const string License = "GPLv3"; - static const string Website = "http://byuu.org/"; + static const string Website = "https://byuu.org/"; //incremented only when serialization format changes static const string SerializerVersion = "104"; diff --git a/higan/sfc/ppu/background/background.cpp b/higan/sfc/ppu/background/background.cpp index 6bb26633..246541f5 100644 --- a/higan/sfc/ppu/background/background.cpp +++ b/higan/sfc/ppu/background/background.cpp @@ -84,7 +84,7 @@ auto PPU::Background::getTile() -> void { uint voffset = vscroll + py; if(ppu.io.bgMode == 2 || ppu.io.bgMode == 4 || ppu.io.bgMode == 6) { - uint16 offsetX = x + (hscroll & 7); + uint16 offsetX = px + (hscroll & 7); if(offsetX >= 8) { uint hval = ppu.bg3.getTile((offsetX - 8) + (ppu.bg3.hoffset() & ~7), ppu.bg3.voffset() + 0); @@ -96,12 +96,12 @@ auto PPU::Background::getTile() -> void { if((hval & 0x8000) == 0) { hoffset = offsetX + (hval & ~7); } else { - voffset = y + hval; + voffset = py + hval; } } } else { if(hval & validMask) hoffset = offsetX + (hval & ~7); - if(vval & validMask) voffset = y + vval; + if(vval & validMask) voffset = py + vval; } } } @@ -175,9 +175,9 @@ auto PPU::Background::run(bool screen) -> void { pixel.tile = tile; if(x == 0) { - mosaic.hcounter = 1; + mosaic.hcounter = mosaic.size + 1; mosaic.pixel = pixel; - } else if(x >= 1 && screen == Screen::Above && --mosaic.hcounter == 0) { + } else if((!hires() || screen == Screen::Below) && --mosaic.hcounter == 0) { mosaic.hcounter = mosaic.size + 1; mosaic.pixel = pixel; } else if(mosaic.enable) { diff --git a/higan/target-tomoko/presentation/presentation.cpp b/higan/target-tomoko/presentation/presentation.cpp index ef45e03f..21ce0270 100644 --- a/higan/target-tomoko/presentation/presentation.cpp +++ b/higan/target-tomoko/presentation/presentation.cpp @@ -136,7 +136,10 @@ Presentation::Presentation() { helpMenu.setText("Help"); documentation.setText("Documentation ...").onActivate([&] { - invoke("http://doc.byuu.org/higan/"); + invoke("https://doc.byuu.org/higan/"); + }); + credits.setText("Credits ...").onActivate([&] { + invoke("https://doc.byuu.org/higan/credits/"); }); about.setText("About ...").onActivate([&] { aboutWindow->setVisible().setFocused(); diff --git a/higan/target-tomoko/presentation/presentation.hpp b/higan/target-tomoko/presentation/presentation.hpp index f525d57e..943a2bbe 100644 --- a/higan/target-tomoko/presentation/presentation.hpp +++ b/higan/target-tomoko/presentation/presentation.hpp @@ -68,6 +68,7 @@ struct Presentation : Window { MenuItem manifestViewer{&toolsMenu}; Menu helpMenu{&menuBar}; MenuItem documentation{&helpMenu}; + MenuItem credits{&helpMenu}; MenuItem about{&helpMenu}; FixedLayout layout{this}; diff --git a/higan/target-tomoko/settings/audio.cpp b/higan/target-tomoko/settings/audio.cpp index 110a44ef..62461669 100644 --- a/higan/target-tomoko/settings/audio.cpp +++ b/higan/target-tomoko/settings/audio.cpp @@ -42,7 +42,7 @@ AudioSettings::AudioSettings(TabFrame* parent) : TabFrameItem(parent) { volumeLabel.setText("Volume:"); volumeValue.setAlignment(0.5); - volumeSlider.setLength(501).setPosition(settings["Audio/Volume"].natural()).onChange([&] { updateEffects(); }); + volumeSlider.setLength(201).setPosition(settings["Audio/Volume"].natural()).onChange([&] { updateEffects(); }); balanceLabel.setText("Balance:"); balanceValue.setAlignment(0.5); diff --git a/nall/run.hpp b/nall/run.hpp index 7ab5ac1f..ec5e027d 100644 --- a/nall/run.hpp +++ b/nall/run.hpp @@ -192,7 +192,8 @@ template inline auto invoke(const string& name, P&&... p) -> void string_vector argl(forward

(p)...); for(auto& arg : argl) if(arg.find(" ")) arg = {"\"", arg, "\""}; string arguments = argl.merge(" "); - ShellExecute(nullptr, nullptr, utf16_t(name), utf16_t(arguments), nullptr, SW_SHOWNORMAL); + string directory = Path::program().replace("/", "\\"); + ShellExecute(nullptr, nullptr, utf16_t(name), utf16_t(arguments), utf16_t(directory), SW_SHOWNORMAL); } #else