* HD mode 7 EXTBG fix
* macOS: embed databases into .app bundle
This commit is contained in:
byuu 2019-07-29 00:59:45 +09:00
parent 296f2c094d
commit ee6498258f
5 changed files with 23 additions and 15 deletions

View File

@ -11,6 +11,7 @@ linux-x86_64-binaries_task:
package_script:
- mkdir bsnes-nightly
- mkdir bsnes-nightly/Database
- mkdir bsnes-nightly/Firmware
- cp -a bsnes/out/bsnes bsnes-nightly/bsnes
- cp -a bsnes/Database/* bsnes-nightly/Database
- cp -a icarus/Database/* bsnes-nightly/Database
@ -32,6 +33,7 @@ freebsd-x86_64-binaries_task:
package_script:
- mkdir bsnes-nightly
- mkdir bsnes-nightly/Database
- mkdir bsnes-nightly/Firmware
- cp -a bsnes/out/bsnes bsnes-nightly/bsnes
- cp -a bsnes/Database/* bsnes-nightly/Database/
- cp -a icarus/Database/* bsnes-nightly/Database/
@ -53,6 +55,7 @@ windows-x86_64-binaries_task:
package_script:
- mkdir bsnes-nightly
- mkdir bsnes-nightly/Database
- mkdir bsnes-nightly/Firmware
- cp -a bsnes/out/bsnes bsnes-nightly/bsnes.exe
- cp -a bsnes/Database/* bsnes-nightly/Database/
- cp -a icarus/Database/* bsnes-nightly/Database/
@ -70,10 +73,7 @@ macOS-x86_64-binaries_task:
package_script:
- mkdir bsnes-nightly
- mkdir bsnes-nightly/Database
- cp -a bsnes/out/bsnes.app bsnes-nightly/
- cp -a bsnes/Database/* bsnes-nightly/Database/
- cp -a icarus/Database/* bsnes-nightly/Database/
- cp -a GPLv3.txt bsnes-nightly/
bsnes-nightly_artifacts:

View File

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

View File

@ -41,11 +41,16 @@ auto PPU::Line::render() -> void {
below[x] = {Source::COL, 0, belowColor};
}
//hack: generally, renderBackground/renderObject ordering do not matter.
//but for HD mode 7, a larger grid of pixels are generated, and so ordering ends up mattering.
//as a hack for Mohawk & Headphone Jack, we reorder things for BG2 to render properly.
//longer-term, we need to devise a better solution that can work for every game.
renderBackground(io.bg1, Source::BG1);
renderBackground(io.bg2, Source::BG2);
if(io.extbg == 0) renderBackground(io.bg2, Source::BG2);
renderBackground(io.bg3, Source::BG3);
renderBackground(io.bg4, Source::BG4);
renderObject(io.obj);
if(io.extbg == 1) renderBackground(io.bg2, Source::BG2);
renderWindow(io.col.window, io.col.window.aboveMask, windowAbove);
renderWindow(io.col.window, io.col.window.belowMask, windowBelow);

View File

@ -25,8 +25,12 @@ all: $(hiro.objects) $(ruby.objects) $(objects)
ifeq ($(platform),macos)
rm -rf out/$(name).app
mkdir -p out/$(name).app/Contents/MacOS/
mkdir -p out/$(name).app/Contents/MacOS/Database/
mkdir -p out/$(name).app/Contents/MacOS/Firmware/
mkdir -p out/$(name).app/Contents/Resources/
mv out/$(name) out/$(name).app/Contents/MacOS/$(name)
cp Database/* out/$(name).app/Contents/MacOS/Database/
cp ../icarus/Database/* out/$(name).app/Contents/MacOS/Database/
cp $(ui)/resource/$(name).plist out/$(name).app/Contents/Info.plist
sips -s format icns $(ui)/resource/$(name).png --out out/$(name).app/Contents/Resources/$(name).icns
endif
@ -40,9 +44,8 @@ else ifeq ($(platform),windows)
else ifeq ($(platform),macos)
mkdir -p ~/Library/Application\ Support/$(name)/
mkdir -p ~/Library/Application\ Support/$(name)/Database/
mkdir -p ~/Library/Application\ Support/$(name)/Firmware/
cp -R out/$(name).app /Applications/$(name).app
cp Database/* ~/Library/Application\ Support/$(name)/Database/
cp ../icarus/Database/* ~/Library/Application\ Support/$(name)/Database/
else ifneq ($(filter $(platform),linux bsd),)
mkdir -p $(prefix)/bin/
mkdir -p $(prefix)/share/applications/

View File

@ -16,7 +16,7 @@ auto Program::openRomSuperFamicom(string name, vfs::file::mode mode) -> vfs::sha
return vfs::memory::file::open(&superFamicom.firmware.data()[0x00000], 0x20000);
}
if(auto memory = superFamicom.document["game/board/memory(type=ROM,content=Program,architecture=ARM6)"]) {
string location = locate({"firmware/", memory["identifier"].text().downcase(), ".program.rom"});
string location = locate({"Firmware/", memory["identifier"].text().downcase(), ".program.rom"});
return vfs::fs::file::open(location, mode);
}
}
@ -26,7 +26,7 @@ auto Program::openRomSuperFamicom(string name, vfs::file::mode mode) -> vfs::sha
return vfs::memory::file::open(&superFamicom.firmware.data()[0x20000], 0x08000);
}
if(auto memory = superFamicom.document["game/board/memory(type=ROM,content=Data,architecture=ARM6)"]) {
string location = locate({"firmware/", memory["identifier"].text().downcase(), ".data.rom"});
string location = locate({"Firmware/", memory["identifier"].text().downcase(), ".data.rom"});
return vfs::fs::file::open(location, mode);
}
}
@ -36,7 +36,7 @@ auto Program::openRomSuperFamicom(string name, vfs::file::mode mode) -> vfs::sha
return vfs::memory::file::open(superFamicom.firmware.data(), superFamicom.firmware.size());
}
if(auto memory = superFamicom.document["game/board/memory(type=ROM,content=Data,architecture=HG51BS169)"]) {
string location = locate({"firmware/", memory["identifier"].text().downcase(), ".data.rom"});
string location = locate({"Firmware/", memory["identifier"].text().downcase(), ".data.rom"});
return vfs::fs::file::open(location, mode);
}
}
@ -46,7 +46,7 @@ auto Program::openRomSuperFamicom(string name, vfs::file::mode mode) -> vfs::sha
return vfs::memory::file::open(superFamicom.firmware.data(), superFamicom.firmware.size());
}
if(auto memory = superFamicom.document["game/board/memory(type=ROM,content=Boot,architecture=LR35902)"]) {
string location = locate({"firmware/", memory["identifier"].text().downcase(), ".boot.rom"});
string location = locate({"Firmware/", memory["identifier"].text().downcase(), ".boot.rom"});
return vfs::fs::file::open(location, mode);
}
}
@ -56,7 +56,7 @@ auto Program::openRomSuperFamicom(string name, vfs::file::mode mode) -> vfs::sha
return vfs::memory::file::open(&superFamicom.firmware.data()[0x0000], 0x1800);
}
if(auto memory = superFamicom.document["game/board/memory(type=ROM,content=Program,architecture=uPD7725)"]) {
string location = locate({"firmware/", memory["identifier"].text().downcase(), ".program.rom"});
string location = locate({"Firmware/", memory["identifier"].text().downcase(), ".program.rom"});
return vfs::fs::file::open(location, mode);
}
}
@ -66,7 +66,7 @@ auto Program::openRomSuperFamicom(string name, vfs::file::mode mode) -> vfs::sha
return vfs::memory::file::open(&superFamicom.firmware.data()[0x1800], 0x0800);
}
if(auto memory = superFamicom.document["game/board/memory(type=ROM,content=Data,architecture=uPD7725)"]) {
string location = locate({"firmware/", memory["identifier"].text().downcase(), ".data.rom"});
string location = locate({"Firmware/", memory["identifier"].text().downcase(), ".data.rom"});
return vfs::fs::file::open(location, mode);
}
}
@ -76,7 +76,7 @@ auto Program::openRomSuperFamicom(string name, vfs::file::mode mode) -> vfs::sha
return vfs::memory::file::open(&superFamicom.firmware.data()[0x0000], 0xc000);
}
if(auto memory = superFamicom.document["game/board/memory(type=ROM,content=Program,architecture=uPD96050)"]) {
string location = locate({"firmware/", memory["identifier"].text().downcase(), ".program.rom"});
string location = locate({"Firmware/", memory["identifier"].text().downcase(), ".program.rom"});
return vfs::fs::file::open(location, mode);
}
}
@ -86,7 +86,7 @@ auto Program::openRomSuperFamicom(string name, vfs::file::mode mode) -> vfs::sha
return vfs::memory::file::open(&superFamicom.firmware.data()[0xc000], 0x1000);
}
if(auto memory = superFamicom.document["game/board/memory(type=ROM,content=Data,architecture=uPD96050)"]) {
string location = locate({"firmware/", memory["identifier"].text().downcase(), ".data.rom"});
string location = locate({"Firmware/", memory["identifier"].text().downcase(), ".data.rom"});
return vfs::fs::file::open(location, mode);
}
}