mirror of https://github.com/bsnes-emu/bsnes.git
Update to v092 hotfix release.
byuu says: For higan: - I fixed the data ROM/RAM initialization for the Cx4, which would periodically cause a crash. - I also moved the Satellaview MaskROM vs FlashROM detection into the Satellaview manifests, so Same Game - Character Data works now. - I also re-added the driver filter to the video shaders, so the D3D driver won't show OGL shaders and vice versa. For ananke: - You can now generate the other SGB images by putting sgb.rom in the same folder as the BIOS images. - I fixed the markup in the database and via heuristics for 5MB+ games (DKJM2, ToP) - Sufami Turbo and BS-X Satellaview generate BML now instead of XML when using heuristics.
This commit is contained in:
parent
032e924495
commit
6ac67c260b
|
@ -1,6 +1,6 @@
|
|||
string BsxSatellaview = R"(
|
||||
|
||||
database revision=2013-01-12
|
||||
database revision=2013-01-14
|
||||
|
||||
release
|
||||
cartridge
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
string SufamiTurbo = R"(
|
||||
|
||||
database revision=2013-01-12
|
||||
database revision=2013-01-14
|
||||
|
||||
release
|
||||
cartridge linkable
|
||||
|
|
|
@ -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: テイルズ オブ ファンタジア
|
||||
|
|
|
@ -14,11 +14,8 @@ struct SatellaviewCartridge {
|
|||
SatellaviewCartridge::SatellaviewCartridge(const uint8_t *data, unsigned size) {
|
||||
markup = "";
|
||||
|
||||
markup.append("<?xml version='1.0' encoding='UTF-8'?>\n");
|
||||
markup.append("<cartridge sha256='", sha256(data, size) ,"'>\n");
|
||||
markup.append(" <rom name='program.rom' size='0x", hex(size), "'/>\n");
|
||||
markup.append("</cartridge>\n");
|
||||
markup.transform("'", "\"");
|
||||
markup.append("cartridge\n");
|
||||
markup.append(" rom name=program.rom size=0x", hex(size), " type=FlashROM\n");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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("<?xml version='1.0' encoding='UTF-8'?>\n");
|
||||
markup.append("<cartridge linkable='", linkable, "' sha256='", sha256(data, size) ,"'>\n");
|
||||
markup.append(" <rom name='program.rom' size='0x", hex(romsize), "'/>\n");
|
||||
markup.append(" <ram name='save.ram' size='0x", hex(ramsize), "'/>\n");
|
||||
markup.append("</cartridge>\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");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -75,17 +75,15 @@ string Ananke::createSuperFamicomHeuristic(vector<uint8_t> &buffer) {
|
|||
}
|
||||
|
||||
void Ananke::createSuperFamicomHeuristicFirmware(vector<uint8_t> &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<uint8_t> &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<uint8_t> &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<uint8_t> &buffer) {
|
||||
|
|
|
@ -142,6 +142,8 @@ void Cartridge::load_satellaview(const string &manifest) {
|
|||
unsigned size = numeral(rom["size"].data);
|
||||
bsxflash.memory.map(allocate<uint8>(size, 0xff), size);
|
||||
interface->loadRequest(ID::BsxFlashROM, rom["name"].data);
|
||||
|
||||
bsxflash.readonly = (rom["type"].text() == "MaskROM");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue