diff --git a/ananke/database/bsx-satellaview.hpp b/ananke/database/bsx-satellaview.hpp
index e669fbf5..0b51bdc2 100644
--- a/ananke/database/bsx-satellaview.hpp
+++ b/ananke/database/bsx-satellaview.hpp
@@ -1,6 +1,6 @@
string BsxSatellaview = R"(
-database revision=2013-01-12
+database revision=2013-01-14
release
cartridge
diff --git a/ananke/database/sufami-turbo.hpp b/ananke/database/sufami-turbo.hpp
index 29fc13e9..d3d505e5 100644
--- a/ananke/database/sufami-turbo.hpp
+++ b/ananke/database/sufami-turbo.hpp
@@ -1,6 +1,6 @@
string SufamiTurbo = R"(
-database revision=2013-01-12
+database revision=2013-01-14
release
cartridge linkable
diff --git a/ananke/database/super-famicom.hpp b/ananke/database/super-famicom.hpp
index ebdaeb3c..c6f8b713 100644
--- a/ananke/database/super-famicom.hpp
+++ b/ananke/database/super-famicom.hpp
@@ -1,6 +1,6 @@
string SuperFamicom = R"(
-database revision=2013-01-12
+database revision=2013-01-14
release
cartridge region=NTSC
@@ -210,8 +210,8 @@ release
ram name=save.ram size=0x2000
map id=rom address=00-3f:8000-ffff offset=0x400000
map id=rom address=40-7d:0000-ffff offset=0x400000
- map id=rom address=80-bf:8000-ffff offset=0x000000
- map id=rom address=c0-ff:0000-ffff offset=0x000000
+ map id=rom address=80-bf:8000-ffff offset=0x000000 mask=0xc00000
+ map id=rom address=c0-ff:0000-ffff offset=0x000000 mask=0xc00000
map id=ram address=80-bf:6000-7fff mask=0xe000
information
title: テイルズ オブ ファンタジア
diff --git a/ananke/heuristics/satellaview.hpp b/ananke/heuristics/satellaview.hpp
index ddae080c..7f1df98e 100644
--- a/ananke/heuristics/satellaview.hpp
+++ b/ananke/heuristics/satellaview.hpp
@@ -14,11 +14,8 @@ struct SatellaviewCartridge {
SatellaviewCartridge::SatellaviewCartridge(const uint8_t *data, unsigned size) {
markup = "";
- markup.append("\n");
- markup.append("\n");
- markup.append(" \n");
- markup.append("\n");
- markup.transform("'", "\"");
+ markup.append("cartridge\n");
+ markup.append(" rom name=program.rom size=0x", hex(size), " type=FlashROM\n");
}
}
diff --git a/ananke/heuristics/sufami-turbo.hpp b/ananke/heuristics/sufami-turbo.hpp
index 0256360c..2d14332d 100644
--- a/ananke/heuristics/sufami-turbo.hpp
+++ b/ananke/heuristics/sufami-turbo.hpp
@@ -20,12 +20,10 @@ SufamiTurboCartridge::SufamiTurboCartridge(const uint8_t *data, unsigned size) {
unsigned ramsize = data[0x37] * 0x800; //2KB
bool linkable = data[0x35] != 0x00; //TODO: unconfirmed
- markup.append("\n");
- markup.append("\n");
- markup.append(" \n");
- markup.append(" \n");
- markup.append("\n");
- markup.transform("'", "\"");
+ markup.append("cartridge", linkable ? " linkable" : "", "\n");
+ markup.append(" rom name=program.rom size=0x", hex(romsize), "\n");
+ if(ramsize)
+ markup.append(" ram name=save.ram size=0x", hex(ramsize), "\n");
}
}
diff --git a/ananke/heuristics/super-famicom.hpp b/ananke/heuristics/super-famicom.hpp
index c9a28eae..d5efaabf 100644
--- a/ananke/heuristics/super-famicom.hpp
+++ b/ananke/heuristics/super-famicom.hpp
@@ -130,7 +130,7 @@ SuperFamicomCartridge::SuperFamicomCartridge(const uint8_t *data, unsigned size)
" rom name=program.rom size=0x", hex(rom_size), "\n"
" map id=rom address=00-7f,80-ff:8000-ffff\n"
" icd2 revision=1\n"
- " rom name=boot.rom size=0x100\n"
+ " rom name=sgb.boot.rom size=0x100\n"
" map id=io address=00-3f,80-bf:6000-7fff\n"
);
if((rom_size & 0x7fff) == 0x100) {
@@ -246,8 +246,8 @@ SuperFamicomCartridge::SuperFamicomCartridge(const uint8_t *data, unsigned size)
markup.append(
" map id=rom address=00-3f:8000-ffff offset=0x400000\n"
" map id=rom address=40-7f:0000-ffff offset=0x400000\n"
- " map id=rom address=80-bf:8000-ffff offset=0x000000\n"
- " map id=rom address=c0-ff:0000-ffff offset=0x000000\n"
+ " map id=rom address=80-bf:8000-ffff offset=0x000000 mask=0xc00000\n"
+ " map id=rom address=c0-ff:0000-ffff offset=0x000000 mask=0xc00000\n"
);
if(ram_size > 0) markup.append(
" map id=ram address=20-3f,a0-bf:6000-7fff mask=0xe000\n"
diff --git a/ananke/super-famicom.cpp b/ananke/super-famicom.cpp
index 02a80f29..da991fb8 100644
--- a/ananke/super-famicom.cpp
+++ b/ananke/super-famicom.cpp
@@ -75,17 +75,15 @@ string Ananke::createSuperFamicomHeuristic(vector &buffer) {
}
void Ananke::createSuperFamicomHeuristicFirmware(vector &buffer, const string &pathname, bool firmware_appended) {
- auto copyFirmwareInternal = [&](const string &name, unsigned programSize, unsigned dataSize) {
+ auto copyFirmwareInternal = [&](const string &name, unsigned programSize, unsigned dataSize, unsigned bootSize) {
//firmware appended directly onto .sfc file
- unsigned programOffset = buffer.size() - programSize - dataSize;
- unsigned dataOffset = buffer.size() - dataSize;
-
string basename = nall::basename(name);
- if(programSize) file::write({pathname, basename, ".program.rom"}, buffer.data() + programOffset, programSize);
- if(dataSize) file::write({pathname, basename, ".data.rom"}, buffer.data() + dataOffset, dataSize);
+ if(programSize) file::write({pathname, basename, ".program.rom"}, buffer.data() + buffer.size() - programSize - dataSize - bootSize, programSize);
+ if(dataSize) file::write({pathname, basename, ".data.rom"}, buffer.data() + buffer.size() - dataSize - bootSize, dataSize);
+ if(bootSize) file::write({pathname, basename, ".boot.rom"}, buffer.data() + buffer.size() - bootSize, bootSize);
};
- auto copyFirmwareExternal = [&](const string &name, unsigned programSize, unsigned dataSize) {
+ auto copyFirmwareExternal = [&](const string &name, unsigned programSize, unsigned dataSize, unsigned bootSize) {
//firmware stored in external file
auto buffer = file::read({information.path, name}); //try and read from the containing directory
if(buffer.size() == 0) buffer = extractFile(name); //try and read from the containing archive, if one exists
@@ -100,11 +98,12 @@ void Ananke::createSuperFamicomHeuristicFirmware(vector &buffer, const
string basename = nall::basename(name);
if(programSize) file::write({pathname, basename, ".program.rom"}, buffer.data(), programSize);
if(dataSize) file::write({pathname, basename, ".data.rom"}, buffer.data() + programSize, dataSize);
+ if(bootSize) file::write({pathname, basename, ".boot.rom"}, buffer.data() + programSize + dataSize, bootSize);
};
- auto copyFirmware = [&](const string &name, unsigned programSize, unsigned dataSize) {
- if(firmware_appended == 1) copyFirmwareInternal(name, programSize, dataSize);
- if(firmware_appended == 0) copyFirmwareExternal(name, programSize, dataSize);
+ auto copyFirmware = [&](const string &name, unsigned programSize, unsigned dataSize, unsigned bootSize = 0) {
+ if(firmware_appended == 1) copyFirmwareInternal(name, programSize, dataSize, bootSize);
+ if(firmware_appended == 0) copyFirmwareExternal(name, programSize, dataSize, bootSize);
};
string markup = information.manifest;
@@ -117,6 +116,7 @@ void Ananke::createSuperFamicomHeuristicFirmware(vector &buffer, const
if(markup.position("st011.program.rom")) copyFirmware("st011.rom", 0x00c000, 0x001000);
if(markup.position("st018.program.rom")) copyFirmware("st018.rom", 0x020000, 0x008000);
if(markup.position("cx4.data.rom" )) copyFirmware("cx4.rom", 0x000000, 0x000c00);
+ if(markup.position("sgb.boot.rom" )) copyFirmware("sgb.rom", 0x000000, 0x000000, 0x000100);
}
string Ananke::openSuperFamicom(vector &buffer) {
diff --git a/higan/sfc/cartridge/cartridge.cpp b/higan/sfc/cartridge/cartridge.cpp
index 2db75b89..38014fae 100755
--- a/higan/sfc/cartridge/cartridge.cpp
+++ b/higan/sfc/cartridge/cartridge.cpp
@@ -142,6 +142,8 @@ void Cartridge::load_satellaview(const string &manifest) {
unsigned size = numeral(rom["size"].data);
bsxflash.memory.map(allocate(size, 0xff), size);
interface->loadRequest(ID::BsxFlashROM, rom["name"].data);
+
+ bsxflash.readonly = (rom["type"].text() == "MaskROM");
}
}
diff --git a/higan/sfc/cartridge/markup.cpp b/higan/sfc/cartridge/markup.cpp
index 34638265..6e53b78d 100755
--- a/higan/sfc/cartridge/markup.cpp
+++ b/higan/sfc/cartridge/markup.cpp
@@ -142,8 +142,6 @@ void Cartridge::parse_markup_bsxslot(Markup::Node root) {
mapping.append(m);
}
}
-
- bsxflash.readonly = (root["rom/type"].text() == "MaskROM");
}
void Cartridge::parse_markup_sufamiturbo(Markup::Node root) {
@@ -352,8 +350,8 @@ void Cartridge::parse_markup_hitachidsp(Markup::Node root, unsigned roms) {
parse_markup_memory(hitachidsp.rom, root["rom[0]"], ID::HitachiDSPROM, false);
parse_markup_memory(hitachidsp.ram, root["ram[0]"], ID::HitachiDSPRAM, true);
- for(auto &n : hitachidsp.dataROM) hitachidsp.dataROM[n] = 0x000000;
- for(auto &n : hitachidsp.dataRAM) hitachidsp.dataRAM[n] = 0x00;
+ for(auto &word : hitachidsp.dataROM) word = 0x000000;
+ for(auto &word : hitachidsp.dataRAM) word = 0x00;
hitachidsp.Frequency = numeral(root["frequency"].data);
if(hitachidsp.Frequency == 0) hitachidsp.frequency = 20000000;
@@ -396,9 +394,9 @@ void Cartridge::parse_markup_necdsp(Markup::Node root) {
if(root.exists() == false) return;
has_necdsp = true;
- for(auto &n : necdsp.programROM) n = 0x000000;
- for(auto &n : necdsp.dataROM) n = 0x0000;
- for(auto &n : necdsp.dataRAM) n = 0x0000;
+ for(auto &word : necdsp.programROM) word = 0x000000;
+ for(auto &word : necdsp.dataROM) word = 0x0000;
+ for(auto &word : necdsp.dataRAM) word = 0x0000;
necdsp.frequency = numeral(root["frequency"].data);
if(necdsp.frequency == 0) necdsp.frequency = 8000000;
diff --git a/higan/target-ethos/general/presentation.cpp b/higan/target-ethos/general/presentation.cpp
index 17890aac..956aa975 100755
--- a/higan/target-ethos/general/presentation.cpp
+++ b/higan/target-ethos/general/presentation.cpp
@@ -209,10 +209,12 @@ void Presentation::loadShaders() {
string pathname = application->path("Video Shaders/");
lstring files = directory::files(pathname);
for(auto &filename : files) {
+ lstring name = string{filename}.split(".");
+ //only add shaders that work with current video driver
+ if(name(1) != config->video.driver) continue;
+
auto shader = new RadioItem;
- string name = filename;
- if(auto position = name.position(".")) name[position()] = 0;
- shader->setText(name);
+ shader->setText(name(0));
shader->onActivate = [=] {
config->video.shader = {pathname, filename};
utility->updateShader();