From b69909be8db843716a20fb6726ec9f2c5a57cc4d Mon Sep 17 00:00:00 2001 From: Tim Allen Date: Wed, 9 May 2018 12:12:06 +1000 Subject: [PATCH] Update to v106r18 release. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit byuu says: Changelog: - major restructuring of board manifests - cleanup of generic board names - Super Famicom: updates to SA1, SuperFX, Cx4, SPC7110, EpsonRTC, SharpRTC load/save code - Super Famicom: added experimental SuperFX plot dithering fix [qwertymodo] - higan, icarus: rename shared folders to lowercase names; put .sys folders into new subfolder - Video Shaders/ → shaders/ - Database/ → database/ - Firmware/ → firmware/ - \*.sys/ → systems/\*.sys/ So right now, only standard SNES games, SA-1, SuperFX, and Cx4 games load. I have not tested SPC7110 or RTC support, because icarus import seems to be completely broken? It's creating blank folders when I try it now. I'll have to fix that ... Since we are now up to thirteen systems, I've put the .sys folders into a subfolder. This should declutter the main higan-windows release folder a good deal. Linux users will need to re-run make install, or manually move things into a new systems/ subfolder. Same goes for icarus: lowercase the database/ and firmware/ folders or re-run make install. I don't know if qwertymodo's SuperFX fix is exactly correct or not. Hopefully it is, but I didn't write a test ROM or anything to be certain. Since SuperFX games should run, if people could please play through some of them and look for any regressions, that'd be very much appreciated. --- higan/emulator/emulator.hpp | 2 +- higan/sfc/cartridge/load.cpp | 193 +++++++--- higan/sfc/cartridge/save.cpp | 79 ++-- higan/sfc/coprocessor/superfx/core.cpp | 19 +- higan/systems/Super Famicom.sys/boards.bml | 348 +++++++++--------- higan/target-tomoko/GNUmakefile | 3 +- .../presentation/presentation.cpp | 2 +- higan/target-tomoko/program/medium.cpp | 2 +- icarus/GNUmakefile | 9 +- icarus/core/core.cpp | 30 +- icarus/core/super-famicom.cpp | 2 +- icarus/{Database => database}/BS Memory.bml | 2 +- .../{Database => database}/Sufami Turbo.bml | 2 +- .../{Database => database}/Super Famicom.bml | 14 +- icarus/{Firmware => firmware}/cx4.data.rom | Bin icarus/{Firmware => firmware}/sgb1.boot.rom | Bin icarus/{Firmware => firmware}/sgb2.boot.rom | Bin icarus/heuristics/super-famicom.cpp | 133 +++---- 18 files changed, 484 insertions(+), 356 deletions(-) rename icarus/{Database => database}/BS Memory.bml (97%) rename icarus/{Database => database}/Sufami Turbo.bml (99%) rename icarus/{Database => database}/Super Famicom.bml (99%) rename icarus/{Firmware => firmware}/cx4.data.rom (100%) rename icarus/{Firmware => firmware}/sgb1.boot.rom (100%) rename icarus/{Firmware => firmware}/sgb2.boot.rom (100%) diff --git a/higan/emulator/emulator.hpp b/higan/emulator/emulator.hpp index 8266a662..9798a558 100644 --- a/higan/emulator/emulator.hpp +++ b/higan/emulator/emulator.hpp @@ -12,7 +12,7 @@ using namespace nall; namespace Emulator { static const string Name = "higan"; - static const string Version = "106.17"; + static const string Version = "106.18"; static const string Author = "byuu"; static const string License = "GPLv3"; static const string Website = "https://byuu.org/"; diff --git a/higan/sfc/cartridge/load.cpp b/higan/sfc/cartridge/load.cpp index e525ed5e..1f3944ed 100644 --- a/higan/sfc/cartridge/load.cpp +++ b/higan/sfc/cartridge/load.cpp @@ -59,8 +59,8 @@ auto Cartridge::loadCartridge(Markup::Node node) -> void { } } - if(auto node = board["memory(type=ROM)"]) loadROM(node); - if(auto node = board["memory(type=RAM)"]) loadRAM(node); + if(auto node = board["memory(type=ROM,content=Program)"]) loadROM(node); + if(auto node = board["memory(type=RAM,content=Save)"]) loadRAM(node); if(auto node = board["icd"]) loadICD(node); if(auto node = board["mcc"]) loadMCC(node); if(auto node = board["bsmemory"]) loadBSMemoryPack(node); @@ -68,14 +68,14 @@ auto Cartridge::loadCartridge(Markup::Node node) -> void { if(auto node = board.find("sufamiturbo")) if(node(1)) loadSufamiTurbo(node(1), 1); if(auto node = board["nss"]) loadNSS(node); if(auto node = board["event"]) loadEvent(node); - if(auto node = board["sa1"]) loadSA1(node); - if(auto node = board["superfx"]) loadSuperFX(node); + if(auto node = board["processor(architecture=W65C816S)"]) loadSA1(node); + if(auto node = board["processor(architecture=GSU)"]) loadSuperFX(node); if(auto node = board["armdsp"]) loadARMDSP(node); - if(auto node = board["hitachidsp"]) loadHitachiDSP(node, node["information/board"].text().match("2DC*") ? 2 : 1); + if(auto node = board["processor(architecture=HG51BS169)"]) loadHitachiDSP(node, game.board.match("2DC*") ? 2 : 1); if(auto node = board["necdsp"]) loadNECDSP(node); - if(auto node = board["epsonrtc"]) loadEpsonRTC(node); - if(auto node = board["sharprtc"]) loadSharpRTC(node); - if(auto node = board["spc7110"]) loadSPC7110(node); + if(auto node = board["rtc(manufacturer=Epson)"]) loadEpsonRTC(node); + if(auto node = board["rtc(manufacturer=Sharp)"]) loadSharpRTC(node); + if(auto node = board["processor(identifier=SPC7110)"]) loadSPC7110(node); if(auto node = board["sdd1"]) loadSDD1(node); if(auto node = board["obc1"]) loadOBC1(node); if(auto node = board["msu1"]) loadMSU1(node); @@ -196,28 +196,59 @@ auto Cartridge::loadEvent(Markup::Node node) -> void { for(auto leaf : node["ram"].find("map")) loadMap(leaf, event.ram); } +//processor(architecture=W65C816S) auto Cartridge::loadSA1(Markup::Node node) -> void { has.SA1 = true; - loadMemory(sa1.rom, node["rom"], File::Required); - loadMemory(sa1.bwram, node["bwram"], File::Optional); - loadMemory(sa1.iram, node["iram"], File::Optional); + for(auto map : node.find("map")) { + loadMap(map, {&SA1::readIO, &sa1}, {&SA1::writeIO, &sa1}); + } - for(auto leaf : node.find("map")) loadMap(leaf, {&SA1::readIO, &sa1}, {&SA1::writeIO, &sa1}); - for(auto leaf : node["rom"].find("map")) loadMap(leaf, {&SA1::mmcromRead, &sa1}, {&SA1::mmcromWrite, &sa1}); - for(auto leaf : node["bwram"].find("map")) loadMap(leaf, {&SA1::mmcbwramRead, &sa1}, {&SA1::mmcbwramWrite, &sa1}); - for(auto leaf : node["iram"].find("map")) loadMap(leaf, sa1.cpuiram); + if(auto mcu = node["mcu"]) { + for(auto map : mcu.find("map")) { + loadMap(map, {&SA1::mmcromRead, &sa1}, {&SA1::mmcromWrite, &sa1}); + } + if(auto memory = mcu["memory(type=ROM,content=Program)"]) { + loadMemory(sa1.rom, memory, File::Required); + } + } + + if(auto memory = node["memory(type=RAM,content=Save)"]) { + loadMemory(sa1.bwram, memory, File::Optional); + for(auto map : memory.find("map")) { + loadMap(map, {&SA1::mmcbwramRead, &sa1}, {&SA1::mmcbwramWrite, &sa1}); + } + } + + if(auto memory = node["memory(type=RAM,content=Internal)"]) { + loadMemory(sa1.iram, memory, File::Optional); + for(auto map : memory.find("map")) { + loadMap(map, sa1.cpuiram); + } + } } +//processor(architecture=GSU) auto Cartridge::loadSuperFX(Markup::Node node) -> void { has.SuperFX = true; - loadMemory(superfx.rom, node["rom"], File::Required); - loadMemory(superfx.ram, node["ram"], File::Optional); + for(auto map : node.find("map")) { + loadMap(map, {&SuperFX::readIO, &superfx}, {&SuperFX::writeIO, &superfx}); + } - for(auto leaf : node.find("map")) loadMap(leaf, {&SuperFX::readIO, &superfx}, {&SuperFX::writeIO, &superfx}); - for(auto leaf : node["rom"].find("map")) loadMap(leaf, superfx.cpurom); - for(auto leaf : node["ram"].find("map")) loadMap(leaf, superfx.cpuram); + if(auto memory = node["memory(type=ROM,content=Program)"]) { + loadMemory(superfx.rom, memory, File::Required); + for(auto map : memory.find("map")) { + loadMap(map, superfx.cpurom); + } + } + + if(auto memory = node["memory(type=RAM,content=Save)"]) { + loadMemory(superfx.ram, memory, File::Optional); + for(auto map : memory.find("map")) { + loadMap(map, superfx.cpuram); + } + } } auto Cartridge::loadARMDSP(Markup::Node node) -> void { @@ -248,9 +279,13 @@ auto Cartridge::loadARMDSP(Markup::Node node) -> void { for(auto leaf : node.find("map")) loadMap(leaf, {&ArmDSP::read, &armdsp}, {&ArmDSP::write, &armdsp}); } +//processor(architecture=HG51BS169) auto Cartridge::loadHitachiDSP(Markup::Node node, uint roms) -> void { has.HitachiDSP = true; + for(auto& word : hitachidsp.dataROM) word = 0x000000; + for(auto& word : hitachidsp.dataRAM) word = 0x00; + if(auto oscillator = game.oscillator()) { hitachidsp.Frequency = oscillator->frequency; } else { @@ -258,27 +293,42 @@ auto Cartridge::loadHitachiDSP(Markup::Node node, uint roms) -> void { } hitachidsp.Roms = roms; //1 or 2 - loadMemory(hitachidsp.rom, node["rom"], File::Required); - loadMemory(hitachidsp.ram, node["ram"], File::Optional); - - for(auto& word : hitachidsp.dataROM) word = 0x000000; - for(auto& word : hitachidsp.dataRAM) word = 0x00; - - if(auto memory = game.memory(node["memory(type=ROM,content=Data)"])) { - if(auto fp = platform->open(ID::SuperFamicom, memory->name(), File::Read, File::Required)) { - for(auto n : range(1 * 1024)) hitachidsp.dataROM[n] = fp->readl(3); - } + for(auto map : node.find("map")) { + loadMap(map, {&HitachiDSP::dspRead, &hitachidsp}, {&HitachiDSP::dspWrite, &hitachidsp}); } - if(auto memory = game.memory(node["memory(type=RAM,content=Data)"])) { - if(auto fp = platform->open(ID::SuperFamicom, memory->name(), File::Read)) { - for(auto n : range(3 * 1024)) hitachidsp.dataRAM[n] = fp->readl(1); + + if(auto memory = node["memory(type=ROM,content=Program)"]) { + loadMemory(hitachidsp.rom, memory, File::Required); + for(auto map : memory.find("map")) { + loadMap(map, {&HitachiDSP::romRead, &hitachidsp}, {&HitachiDSP::romWrite, &hitachidsp}); } } - for(auto leaf : node.find("map")) loadMap(leaf, {&HitachiDSP::dspRead, &hitachidsp}, {&HitachiDSP::dspWrite, &hitachidsp}); - for(auto leaf : node["rom"].find("map")) loadMap(leaf, {&HitachiDSP::romRead, &hitachidsp}, {&HitachiDSP::romWrite, &hitachidsp}); - for(auto leaf : node["ram"].find("map")) loadMap(leaf, {&HitachiDSP::ramRead, &hitachidsp}, {&HitachiDSP::ramWrite, &hitachidsp}); - for(auto leaf : node["dram"].find("map")) loadMap(leaf, {&HitachiDSP::dramRead, &hitachidsp}, {&HitachiDSP::dramWrite, &hitachidsp}); + if(auto memory = node["memory(type=RAM,content=Save)"]) { + loadMemory(hitachidsp.ram, memory, File::Optional); + for(auto map : memory.find("map")) { + loadMap(map, {&HitachiDSP::ramRead, &hitachidsp}, {&HitachiDSP::ramWrite, &hitachidsp}); + } + } + + if(auto memory = node["memory(type=ROM,content=Data,architecture=HG51BS169)"]) { + if(auto file = game.memory(memory)) { + if(auto fp = platform->open(ID::SuperFamicom, file->name(), File::Read, File::Required)) { + for(auto n : range(1 * 1024)) hitachidsp.dataROM[n] = fp->readl(3); + } + } + } + + if(auto memory = node["memory(type=RAM,content=Data,architecture=HG51BS169)"]) { + if(auto file = game.memory(memory)) { + if(auto fp = platform->open(ID::SuperFamicom, file->name(), File::Read)) { + for(auto n : range(3 * 1024)) hitachidsp.dataRAM[n] = fp->readl(1); + } + } + for(auto map : memory.find("map")) { + loadMap(map, {&HitachiDSP::dramRead, &hitachidsp}, {&HitachiDSP::dramWrite, &hitachidsp}); + } + } } auto Cartridge::loadNECDSP(Markup::Node node) -> void { @@ -323,47 +373,74 @@ auto Cartridge::loadNECDSP(Markup::Node node) -> void { for(auto leaf : node["dram"].find("map")) loadMap(leaf, {&NECDSP::readRAM, &necdsp}, {&NECDSP::writeRAM, &necdsp}); } +//rtc(manufacturer=Epson) auto Cartridge::loadEpsonRTC(Markup::Node node) -> void { has.EpsonRTC = true; epsonrtc.initialize(); - if(auto memory = game.memory(node["memory(type=RTC,content=Time)"])) { - if(auto fp = platform->open(ID::SuperFamicom, memory->name(), File::Read)) { - uint8 data[16] = {0}; - for(auto& byte : data) byte = fp->read(); - epsonrtc.load(data); - } + + for(auto map : node.find("map")) { + loadMap(map, {&EpsonRTC::read, &epsonrtc}, {&EpsonRTC::write, &epsonrtc}); } - for(auto leaf : node.find("map")) loadMap(leaf, {&EpsonRTC::read, &epsonrtc}, {&EpsonRTC::write, &epsonrtc}); + if(auto memory = node["memory(type=RTC,content=Time,manufacturer=Epson)"]) { + if(auto file = game.memory(memory)) { + if(auto fp = platform->open(ID::SuperFamicom, file->name(), File::Read)) { + uint8 data[16] = {0}; + for(auto& byte : data) byte = fp->read(); + epsonrtc.load(data); + } + } + } } +//rtc(manufacturer=Sharp) auto Cartridge::loadSharpRTC(Markup::Node node) -> void { has.SharpRTC = true; sharprtc.initialize(); - if(auto memory = game.memory(node["memory(type=RTC,content=Time)"])) { - if(auto fp = platform->open(ID::SuperFamicom, memory->name(), File::Read)) { - uint8 data[16] = {0}; - for(auto& byte : data) byte = fp->read(); - sharprtc.load(data); - } + + for(auto map : node.find("map")) { + loadMap(map, {&SharpRTC::read, &sharprtc}, {&SharpRTC::write, &sharprtc}); } - for(auto leaf : node.find("map")) loadMap(leaf, {&SharpRTC::read, &sharprtc}, {&SharpRTC::write, &sharprtc}); + if(auto memory = node["memory(type=RTC,content=Time,manufacturer=Sharp)"]) { + if(auto file = game.memory(memory)) { + if(auto fp = platform->open(ID::SuperFamicom, file->name(), File::Read)) { + uint8 data[16] = {0}; + for(auto& byte : data) byte = fp->read(); + sharprtc.load(data); + } + } + } } +//processor(identifier=SPC7110) auto Cartridge::loadSPC7110(Markup::Node node) -> void { has.SPC7110 = true; - loadMemory(spc7110.prom, node["prom"], File::Required); - loadMemory(spc7110.drom, node["drom"], File::Required); - loadMemory(spc7110.ram, node["ram"], File::Optional); + for(auto map : node.find("map")) { + loadMap(map, {&SPC7110::read, &spc7110}, {&SPC7110::write, &spc7110}); + } - for(auto leaf : node.find("map")) leaf.text() == "mcu" - ? loadMap(leaf, {&SPC7110::mcuromRead, &spc7110}, {&SPC7110::mcuromWrite, &spc7110}) - : loadMap(leaf, {&SPC7110::read, &spc7110}, {&SPC7110::write, &spc7110}); - for(auto leaf : node["ram"].find("map")) loadMap(leaf, {&SPC7110::mcuramRead, &spc7110}, {&SPC7110::mcuramWrite, &spc7110}); + if(auto mcu = node["mcu"]) { + for(auto map : mcu.find("map")) { + loadMap(map, {&SPC7110::mcuromRead, &spc7110}, {&SPC7110::mcuromWrite, &spc7110}); + } + if(auto memory = mcu["memory(type=ROM,content=Program)"]) { + loadMemory(spc7110.prom, memory, File::Required); + } + if(auto memory = mcu["memory(type=ROM,content=Data)"]) { + loadMemory(spc7110.drom, memory, File::Required); + } + } + + if(auto memory = node["memory(type=RAM,content=Save)"]) { + loadMemory(spc7110.ram, memory, File::Optional); + for(auto map : memory.find("map")) { + loadMap(map, {&SPC7110::mcuramRead, &spc7110}, {&SPC7110::mcuramWrite, &spc7110}); + } + } } auto Cartridge::loadSDD1(Markup::Node node) -> void { diff --git a/higan/sfc/cartridge/save.cpp b/higan/sfc/cartridge/save.cpp index 41970feb..020f3f89 100644 --- a/higan/sfc/cartridge/save.cpp +++ b/higan/sfc/cartridge/save.cpp @@ -1,15 +1,15 @@ auto Cartridge::saveCartridge(Markup::Node node) -> void { - if(auto node = board["memory(type=RAM)"]) saveRAM(node); + if(auto node = board["memory(type=RAM,content=Save)"]) saveRAM(node); if(auto node = board["mcc"]) saveMCC(node); if(auto node = board["event"]) saveEvent(node); - if(auto node = board["sa1"]) saveSA1(node); - if(auto node = board["superfx"]) saveSuperFX(node); + if(auto node = board["processor(architecture=W65C816S)"]) saveSA1(node); + if(auto node = board["processor(architecture=GSU)"]) saveSuperFX(node); if(auto node = board["armdsp"]) saveARMDSP(node); - if(auto node = board["hitachidsp"]) saveHitachiDSP(node); + if(auto node = board["processor(architecture=HG51BS169)"]) saveHitachiDSP(node); if(auto node = board["necdsp"]) saveNECDSP(node); - if(auto node = board["epsonrtc"]) saveEpsonRTC(node); - if(auto node = board["sharprtc"]) saveSharpRTC(node); - if(auto node = board["spc7110"]) saveSPC7110(node); + if(auto node = board["rtc(manufacturer=Epson)"]) saveEpsonRTC(node); + if(auto node = board["rtc(manufacturer=Sharp)"]) saveSharpRTC(node); + if(auto node = board["processor(identifier=SPC7110)"]) saveSPC7110(node); if(auto node = board["sdd1"]) saveSDD1(node); if(auto node = board["obc1"]) saveOBC1(node); } @@ -42,13 +42,22 @@ auto Cartridge::saveEvent(Markup::Node node) -> void { saveMemory(event.ram, node["ram"]); } +//processor(architecture=W65C816S) auto Cartridge::saveSA1(Markup::Node node) -> void { - saveMemory(sa1.bwram, node["bwram"]); - saveMemory(sa1.iram, node["iram"]); + if(auto memory = node["memory(type=RAM,content=Save)"]) { + saveMemory(sa1.bwram, memory); + } + + if(auto memory = node["memory(type=RAM,content=Internal)"]) { + saveMemory(sa1.iram, memory); + } } +//processor(architecture=GSU) auto Cartridge::saveSuperFX(Markup::Node node) -> void { - saveMemory(superfx.ram, node["ram"]); + if(auto memory = node["memory(type=RAM,content=Save)"]) { + saveMemory(superfx.ram, memory); + } } auto Cartridge::saveARMDSP(Markup::Node node) -> void { @@ -61,13 +70,20 @@ auto Cartridge::saveARMDSP(Markup::Node node) -> void { } } +//processor(architecture=HG51BS169) auto Cartridge::saveHitachiDSP(Markup::Node node) -> void { saveMemory(hitachidsp.ram, node["ram"]); - if(auto memory = game.memory(node["memory(type=RAM,content=Data)"])) { - if(memory->nonVolatile) { - if(auto fp = platform->open(ID::SuperFamicom, memory->name(), File::Write)) { - for(auto n : range(3 * 1024)) fp->write(hitachidsp.dataRAM[n]); + if(auto memory = node["memory(type=RAM,content=Save)"]) { + saveMemory(hitachidsp.ram, memory); + } + + if(auto memory = node["memory(type=RAM,content=Data,architecture=HG51BS169)"]) { + if(auto file = game.memory(memory)) { + if(file->nonVolatile) { + if(auto fp = platform->open(ID::SuperFamicom, file->name(), File::Write)) { + for(auto n : range(3 * 1024)) fp->write(hitachidsp.dataRAM[n]); + } } } } @@ -84,32 +100,41 @@ auto Cartridge::saveNECDSP(Markup::Node node) -> void { } } +//rtc(manufacturer=Epson) auto Cartridge::saveEpsonRTC(Markup::Node node) -> void { - if(auto memory = game.memory(node["memory(type=RTC,content=Time)"])) { - if(memory->nonVolatile) { - if(auto fp = platform->open(ID::SuperFamicom, memory->name(), File::Write)) { - uint8 data[16] = {0}; - epsonrtc.save(data); - fp->write(data, 16); + if(auto memory = node["memory(type=RTC,content=Time,manufacturer=Epson)"]) { + if(auto file = game.memory(memory)) { + if(file->nonVolatile) { + if(auto fp = platform->open(ID::SuperFamicom, file->name(), File::Write)) { + uint8 data[16] = {0}; + epsonrtc.save(data); + fp->write(data, 16); + } } } } } +//rtc(manufacturer=Sharp) auto Cartridge::saveSharpRTC(Markup::Node node) -> void { - if(auto memory = game.memory(node["memory(type=RTC,content=Time)"])) { - if(memory->nonVolatile) { - if(auto fp = platform->open(ID::SuperFamicom, memory->name(), File::Write)) { - uint8 data[16] = {0}; - sharprtc.save(data); - fp->write(data, 16); + if(auto memory = node["memory(type=RTC,content=Time,manufacturer=Sharp)"]) { + if(auto file = game.memory(memory)) { + if(file->nonVolatile) { + if(auto fp = platform->open(ID::SuperFamicom, file->name(), File::Write)) { + uint8 data[16] = {0}; + sharprtc.save(data); + fp->write(data, 16); + } } } } } +//processor(identifier=SPC7110) auto Cartridge::saveSPC7110(Markup::Node node) -> void { - saveMemory(spc7110.ram, node["ram"]); + if(auto memory = node["memory(type=RAM,content=Save)"]) { + saveMemory(spc7110.ram, memory); + } } auto Cartridge::saveSDD1(Markup::Node node) -> void { diff --git a/higan/sfc/coprocessor/superfx/core.cpp b/higan/sfc/coprocessor/superfx/core.cpp index 9c2b241a..d92f5f0c 100644 --- a/higan/sfc/coprocessor/superfx/core.cpp +++ b/higan/sfc/coprocessor/superfx/core.cpp @@ -9,25 +9,24 @@ auto SuperFX::color(uint8 source) -> uint8 { } auto SuperFX::plot(uint8 x, uint8 y) -> void { - uint8 color = regs.colr; - - if(regs.por.dither && regs.scmr.md != 3) { - if((x ^ y) & 1) color >>= 4; - color &= 0x0f; - } - if(!regs.por.transparent) { if(regs.scmr.md == 3) { if(regs.por.freezehigh) { - if((color & 0x0f) == 0) return; + if((regs.colr & 0x0f) == 0) return; } else { - if(color == 0) return; + if(regs.colr == 0) return; } } else { - if((color & 0x0f) == 0) return; + if((regs.colr & 0x0f) == 0) return; } } + uint8 color = regs.colr; + if(regs.por.dither && regs.scmr.md != 3) { + if((x ^ y) & 1) color >>= 4; + color &= 0x0f; + } + uint16 offset = (y << 5) + (x >> 3); if(offset != pixelcache[0].offset) { flushPixelCache(pixelcache[1]); diff --git a/higan/systems/Super Famicom.sys/boards.bml b/higan/systems/Super Famicom.sys/boards.bml index ecf42662..cd41e0d7 100644 --- a/higan/systems/Super Famicom.sys/boards.bml +++ b/higan/systems/Super Famicom.sys/boards.bml @@ -1,10 +1,10 @@ database - revision: 2018-04-15 + revision: 2018-05-08 //Boards (Production) database - revision: 2018-04-10 + revision: 2018-05-08 board: BANDAI-PT-923 memory type=ROM content=Program @@ -63,36 +63,38 @@ board: BSC-1J5M-01 map address=60-7d,e0-ff:0000-ffff board: BSC-1L3B-01 - sa1 + processor architecture=W65C816S map address=00-3f,80-bf:2200-23ff - memory type=ROM content=Program + mcu map address=00-3f,80-bf:8000-ffff mask=0x408000 map address=c0-ff:0000-ffff + memory type=ROM content=Program + slot type=BSMemory memory type=RAM content=Save map address=00-3f,80-bf:6000-7fff size=0x2000 map address=40-4f:0000-ffff memory type=RAM content=Internal map address=00-3f,80-bf:3000-37ff size=0x800 - slot type=BSMemory board: BSC-1L5B-01 - sa1 + processor architecture=W65C816S map address=00-3f,80-bf:2200-23ff - memory type=ROM content=Program + mcu map address=00-3f,80-bf:8000-ffff mask=0x408000 map address=c0-ff:0000-ffff + memory type=ROM content=Program + slot type=BSMemory memory type=RAM content=Save map address=00-3f,80-bf:6000-7fff size=0x2000 map address=40-4f:0000-ffff memory type=RAM content=Internal map address=00-3f,80-bf:3000-37ff size=0x800 - slot type=BSMemory board: SGB-R-10 memory type=ROM content=Program map address=00-7d,80-ff:8000-ffff mask=0x8000 map address=40-7d,c0-ff:0000-7fff mask=0x8000 - icd revision=2 + processor identifier=ICD revision=2 map address=00-3f,80-bf:6000-67ff,7000-7fff memory type=ROM content=Boot architecture=LR35902 slot type=GameBoy @@ -147,7 +149,7 @@ board: SHVC-1A5M-(01,11,20) board: SHVC-1B0N-(02,03,10) memory type=ROM content=Program map address=00-1f,80-9f:8000-ffff mask=0x8000 - necdsp model=uPD7725 + processor architecture=uPD7725 map address=30-3f,b0-bf:8000-ffff mask=0x3fff memory type=ROM content=Program architecture=uPD7725 memory type=ROM content=Data architecture=uPD7725 @@ -159,7 +161,7 @@ board: SHVC-1B5B-02 map address=00-1f,80-9f:8000-ffff mask=0x8000 memory type=RAM content=Save map address=70-7d,f0-ff:0000-ffff - necdsp model=uPD7725 + processor architecture=uPD7725 map address=20-3f,a0-bf:8000-ffff mask=0x3fff memory type=ROM content=Program architecture=uPD7725 memory type=ROM content=Data architecture=uPD7725 @@ -167,7 +169,7 @@ board: SHVC-1B5B-02 oscillator board: SHVC-1C0N - superfx + processor architecture=GSU map address=00-3f,80-bf:3000-34ff memory type=ROM content=Program map address=00-1f,80-9f:8000-ffff mask=0x8000 @@ -175,7 +177,7 @@ board: SHVC-1C0N map address=60-7d,e0-ff:0000-ffff board: SHVC-1C0N5S-01 - superfx + processor architecture=GSU map address=00-3f,80-bf:3000-34ff memory type=ROM content=Program map address=00-1f,80-9f:8000-ffff mask=0x8000 @@ -183,7 +185,7 @@ board: SHVC-1C0N5S-01 map address=60-7d,e0-ff:0000-ffff board: SHVC-1CA0N5S-01 - superfx + processor architecture=GSU map address=00-3f,80-bf:3000-34ff memory type=ROM content=Program map address=00-3f,80-bf:8000-ffff mask=0x8000 @@ -193,7 +195,7 @@ board: SHVC-1CA0N5S-01 map address=70-71,f0-f1:0000-ffff board: SHVC-1CA0N6S-01 - superfx + processor architecture=GSU map address=00-3f,80-bf:3000-34ff memory type=ROM content=Program map address=00-3f,80-bf:8000-ffff mask=0x8000 @@ -203,7 +205,7 @@ board: SHVC-1CA0N6S-01 map address=70-71,f0-f1:0000-ffff board: SHVC-1CA6B-01 - superfx + processor architecture=GSU map address=00-3f,80-bf:3000-34ff memory type=ROM content=Program map address=00-3f,80-bf:8000-ffff mask=0x8000 @@ -213,7 +215,7 @@ board: SHVC-1CA6B-01 map address=70-71,f0-f1:0000-ffff board: SHVC-1CB0N7S-01 - superfx + processor architecture=GSU map address=00-3f,80-bf:3000-34ff memory type=ROM content=Program map address=00-3f:8000-ffff mask=0x8000 @@ -223,7 +225,7 @@ board: SHVC-1CB0N7S-01 map address=70-71:0000-ffff board: SHVC-1CB5B-20 - superfx + processor architecture=GSU map address=00-3f,80-bf:3000-34ff memory type=ROM content=Program map address=00-3f:8000-ffff mask=0x8000 @@ -233,7 +235,7 @@ board: SHVC-1CB5B-20 map address=70-71:0000-ffff board: SHVC-1CB7B-01 - superfx + processor architecture=GSU map address=00-3f,80-bf:3000-34ff memory type=ROM content=Program map address=00-3f:8000-ffff mask=0x8000 @@ -243,11 +245,12 @@ board: SHVC-1CB7B-01 map address=70-71:0000-ffff board: SHVC-1DC0N-01 - hitachidsp model=HG51BS169 + processor architecture=HG51BS169 map address=00-3f,80-bf:6c00-6fff,7c00-7fff - map address=70-77:0000-7fff memory type=ROM content=Program map address=00-3f,80-bf:8000-ffff mask=0x8000 + memory type=RAM content=Save + map address=70-77:0000-7fff memory type=ROM content=Data architecture=HG51BS169 memory type=RAM content=Data architecture=HG51BS169 map address=00-3f,80-bf:6000-6bff,7000-7bff mask=0xf000 @@ -256,7 +259,7 @@ board: SHVC-1DC0N-01 board: SHVC-1DS0B-20 memory type=ROM content=Program map address=00-7d,80-ff:8000-ffff mask=0x8000 - necdsp model=uPD96050 + processor architecture=uPD96050 map address=60-67,e0-e7:0000-3fff memory type=ROM content=Program architecture=uPD96050 memory type=ROM content=Data architecture=uPD96050 @@ -301,7 +304,7 @@ board: SHVC-1K0N-01 memory type=ROM content=Program map address=00-3f,80-bf:8000-ffff map address=40-7d,c0-ff:0000-ffff - necdsp model=uPD7725 + processor architecture=uPD7725 map address=00-1f,80-9f:6000-7fff mask=0xfff memory type=ROM content=Program architecture=uPD7725 memory type=ROM content=Data architecture=uPD7725 @@ -314,7 +317,7 @@ board: SHVC-1K1B-01 map address=40-7d,c0-ff:0000-ffff memory type=RAM content=Save map address=20-3f,a0-bf:6000-7fff mask=0xe000 - necdsp model=uPD7725 + processor architecture=uPD7725 map address=00-1f,80-9f:6000-7fff mask=0xfff memory type=ROM content=Program architecture=uPD7725 memory type=ROM content=Data architecture=uPD7725 @@ -322,11 +325,12 @@ board: SHVC-1K1B-01 oscillator board: SHVC-1L0N3S-01 - sa1 + processor architecture=W65C816S map address=00-3f,80-bf:2200-23ff - memory type=ROM content=Program + mcu map address=00-3f,80-bf:8000-ffff mask=0x408000 map address=c0-ff:0000-ffff + memory type=ROM content=Program memory type=RAM content=Save map address=00-3f,80-bf:6000-7fff size=0x2000 map address=40-4f:0000-ffff @@ -334,11 +338,12 @@ board: SHVC-1L0N3S-01 map address=00-3f,80-bf:3000-37ff size=0x800 board: SHVC-1L3B-(02,11) - sa1 + processor architecture=W65C816S map address=00-3f,80-bf:2200-23ff - memory type=ROM content=Program + mcu map address=00-3f,80-bf:8000-ffff mask=0x408000 map address=c0-ff:0000-ffff + memory type=ROM content=Program memory type=RAM content=Save map address=00-3f,80-bf:6000-7fff size=0x2000 map address=40-4f:0000-ffff @@ -346,11 +351,12 @@ board: SHVC-1L3B-(02,11) map address=00-3f,80-bf:3000-37ff size=0x800 board: SHVC-1L5B-(11,20) - sa1 + processor architecture=W65C816S map address=00-3f,80-bf:2200-23ff - memory type=ROM content=Program + mcu map address=00-3f,80-bf:8000-ffff mask=0x408000 map address=c0-ff:0000-ffff + memory type=ROM content=Program memory type=RAM content=Save map address=00-3f,80-bf:6000-7fff size=0x2000 map address=40-4f:0000-ffff @@ -358,11 +364,12 @@ board: SHVC-1L5B-(11,20) map address=00-3f,80-bf:3000-37ff size=0x800 board: SHVC-1N0N-(01,10) - sdd1 + processor identifier=SDD1 map address=00-3f,80-bf:4800-480f - memory type=ROM content=Program + mcu map address=00-3f,80-bf:8000-ffff map address=c0-ff:0000-ffff + memory type=ROM content=Program board: SHVC-2A0N-01#A memory type=ROM content=Program @@ -409,7 +416,7 @@ board: SHVC-2B3B-01 map address=00-3f,80-bf:8000-ffff mask=0x8000 memory type=RAM content=Save map address=70-7d,f0-ff:0000-7fff mask=0x8000 - necdsp model=uPD7725 + processor architecture=uPD7725 map address=60-6f,e0-ef:0000-7fff mask=0x3fff memory type=ROM content=Program architecture=uPD7725 memory type=ROM content=Data architecture=uPD7725 @@ -417,11 +424,12 @@ board: SHVC-2B3B-01 oscillator board: SHVC-2DC0N-01 - hitachidsp model=HG51BS169 + processor architecture=HG51BS169 map address=00-3f,80-bf:6c00-6fff,7c00-7fff - map address=70-77:0000-7fff memory type=ROM content=Program map address=00-3f,80-bf:8000-ffff mask=0x8000 + memory type=RAM content=Save + map address=70-77:0000-7fff memory type=ROM content=Data architecture=HG51BS169 memory type=RAM content=Data architecture=HG51BS169 map address=00-3f,80-bf:6000-6bff,7000-7bff mask=0xf000 @@ -430,7 +438,7 @@ board: SHVC-2DC0N-01 board: SHVC-2E3M-01 memory type=ROM content=Program map address=00-3f,80-bf:8000-ffff mask=0x8000 - obc1 + processor identifier=OBC1 map address=00-3f,80-bf:6000-7fff mask=0xe000 map address=70-71,f0-f1:6000-7fff,e000-ffff mask=0xe000 memory type=RAM content=Save @@ -488,7 +496,7 @@ board: SHVC-BJ1M-(10,20) memory type=RAM content=Save map address=20-3f,a0-bf:6000-7fff mask=0xe000 -board: SHVC-BJ3M-10 +board: SHVC-BJ3M-(10,20) memory type=ROM content=Program map address=00-3f,80-bf:8000-ffff map address=40-7d,c0-ff:0000-ffff @@ -496,25 +504,27 @@ board: SHVC-BJ3M-10 map address=20-3f,a0-bf:6000-7fff mask=0xe000 board: SHVC-LDH3C-01 - spc7110 + processor identifier=SPC7110 map address=00-3f,80-bf:4800-483f map address=50,58:0000-ffff - map=mcu address=00-3f,80-bf:8000-ffff mask=0x800000 - map=mcu address=c0-ff:0000-ffff mask=0xc00000 - memory type=ROM content=Program - memory type=ROM content=Data + mcu + map address=00-3f,80-bf:8000-ffff mask=0x800000 + map address=c0-ff:0000-ffff mask=0xc00000 + memory type=ROM content=Program + memory type=ROM content=Data memory type=RAM content=Save map address=00-3f,80-bf:6000-7fff mask=0xe000 - epsonrtc + rtc manufacturer=Epson map address=00-3f,80-bf:4840-4842 memory type=RTC content=Time manufacturer=Epson board: SHVC-LN3B-01 - sdd1 + processor identifier=SDD1 map address=00-3f,80-bf:4800-480f - memory type=ROM content=Program + mcu map address=00-3f,80-bf:8000-ffff map address=c0-ff:0000-ffff + memory type=ROM content=Program memory type=RAM content=Save map address=00-3f,80-bf:6000-7fff mask=0xe000 map address=70-73:0000-ffff @@ -523,7 +533,7 @@ board: SHVC-SGB2-01 memory type=ROM content=Program map address=00-7d,80-ff:8000-ffff mask=0x8000 map address=40-7d,c0-ff:0000-7fff mask=0x8000 - icd revision=2 + processor identifier=ICD revision=2 map address=00-3f,80-bf:6000-67ff,7000-7fff memory type=ROM content=Boot architecture=LR35902 oscillator @@ -542,7 +552,7 @@ board: SHVC-YJ0N-01 //Boards (Generic) database - revision: 2018-04-08 + revision: 2018-05-08 board: ARM-LOROM-RAM memory type=ROM content=Program @@ -550,11 +560,11 @@ board: ARM-LOROM-RAM map address=40-6f,c0-ef:0000-7fff mask=0x8000 memory type=RAM content=Save map address=70-7d,f0-ff:0000-ffff - armdsp + processor architecture=ARM6 map address=00-3f,80-bf:3800-38ff - memory type=ROM content=Program manufacturer=SETA - memory type=ROM content=Data manufacturer=SETA - memory type=RAM content=Data manufacturer=SETA + memory type=ROM content=Program architecture=ARM6 + memory type=ROM content=Data architecture=ARM6 + memory type=RAM content=Data architecture=ARM6 oscillator board: BS-HIROM-RAM @@ -563,7 +573,7 @@ board: BS-HIROM-RAM map address=40-5f,c0-df:0000-ffff memory type=RAM content=Save map address=20-3f,a0-bf:6000-7fff mask=0xe000 - bsmemory + slot type=BSMemory map address=20-3f,a0-bf:8000-ffff map address=60-7d,e0-ff:0000-ffff @@ -575,33 +585,89 @@ board: BS-LOROM-RAM map address=a0-bf:8000-ffff base=0x100000 mask=0x8000 memory type=RAM content=Save map address=70-7d,f0-ff:0000-7fff mask=0x8000 - bsmemory + slot type=BSMemory map address=c0-ef:0000-ffff board: BS-MCC-RAM memory type=RAM content=Save map address=10-1f:5000-5fff mask=0xf000 - mcc + processor identifier=MCC map address=00-0f:5000 - map=mcu address=00-3f,80-bf:8000-ffff mask=0x408000 - map=mcu address=40-7d,c0-ff:0000-ffff - memory type=ROM content=Program + mcu + map address=00-3f,80-bf:8000-ffff mask=0x408000 + map address=40-7d,c0-ff:0000-ffff + memory type=ROM content=Program + slot type=BSMemory memory type=RAM content=Download map address=00-3f,80-bf:6000-7fff mask=0xe000 - bsmemory board: BS-SA1-RAM - sa1 + processor architecture=W65C816S map address=00-3f,80-bf:2200-23ff - memory type=ROM content=Program + mcu map address=00-3f,80-bf:8000-ffff mask=0x408000 map address=c0-ff:0000-ffff + memory type=ROM content=Program + slot type=BSMemory memory type=RAM content=Save map address=00-3f,80-bf:6000-7fff size=0x2000 map address=40-4f:0000-ffff memory type=RAM content=Internal map address=00-3f,80-bf:3000-37ff size=0x800 - bsmemory + +board: EXHIROM-RAM + memory type=ROM content=Program + map address=00-3f:8000-ffff base=0x400000 + map address=40-7d:0000-ffff base=0x400000 + map address=80-bf:8000-ffff mask=0xc00000 + map address=c0-ff:0000-ffff mask=0xc00000 + memory type=RAM content=Save + map address=20-3f,a0-bf:6000-7fff mask=0xe000 + map address=70-7d:0000-7fff + +board: EXHIROM-RAM-SHARPRTC + memory type=ROM content=Program + map address=00-3f:8000-ffff base=0x400000 + map address=40-7d:0000-ffff base=0x400000 + map address=80-bf:8000-ffff mask=0xc00000 + map address=c0-ff:0000-ffff mask=0xc00000 + memory type=RAM content=Save + map address=20-3f,a0-bf:6000-7fff mask=0xe000 + map address=70-7d:0000-7fff + rtc manufacturer=Sharp + map address=00-3f,80-bf:2800-2801 + memory type=RTC content=Time manufacturer=Sharp + +board: EXNEC-LOROM + memory type=ROM content=Program + map address=00-7d,80-ff:8000-ffff mask=0x8000 + processor architecture=uPD96050 + map address=60-67,e0-e7:0000-3fff + memory type=ROM content=Program architecture=uPD96050 + memory type=ROM content=Data architecture=uPD96050 + memory type=RAM content=Data architecture=uPD96050 + map address=68-6f,e8-ef:0000-7fff mask=0x8000 + oscillator + +board: GB-LOROM + memory type=ROM content=Program + map address=00-7d,80-ff:8000-ffff mask=0x8000 + map address=40-7d,c0-ff:0000-7fff mask=0x8000 + processor identifier=ICD revision=2 + map address=00-3f,80-bf:6000-67ff,7000-7fff + memory type=ROM content=Boot architecture=LR35902 + oscillator + slot type=GameBoy + +board: GSU-RAM + processor architecture=GSU + map address=00-3f,80-bf:3000-34ff + memory type=ROM content=Program + map address=00-3f,80-bf:8000-ffff mask=0x8000 + map address=40-5f,c0-df:0000-ffff + memory type=RAM content=Save + map address=00-3f,80-bf:6000-7fff size=0x2000 + map address=70-71,f0-f1:0000-ffff board: HIROM memory type=ROM content=Program @@ -615,24 +681,15 @@ board: HIROM-RAM memory type=RAM content=Save map address=20-3f,a0-bf:6000-7fff mask=0xe000 -board: HIROMEX-RAM - memory type=ROM content=Program - map address=00-3f:8000-ffff base=0x400000 - map address=40-7d:0000-ffff base=0x400000 - map address=80-bf:8000-ffff mask=0xc00000 - map address=c0-ff:0000-ffff mask=0xc00000 - memory type=RAM content=Save - map address=20-3f,a0-bf:6000-7fff mask=0xe000 - map address=70-7d:0000-7fff - board: HITACHI-LOROM - hitachidsp model=HG51BS169 + processor architecture=HG51BS169 map address=00-3f,80-bf:6c00-6fff,7c00-7fff - map address=70-77:0000-7fff memory type=ROM content=Program map address=00-3f,80-bf:8000-ffff mask=0x8000 - memory type=ROM content=Data manufacturer=Hitachi - memory type=RAM content=Data manufacturer=Hitachi + memory type=RAM content=Save + map address=70-77:0000-7fff + memory type=ROM content=Data architecture=HG51BS169 + memory type=RAM content=Data architecture=HG51BS169 map address=00-3f,80-bf:6000-6bff,7000-7bff mask=0xf000 oscillator @@ -640,13 +697,13 @@ board: LOROM memory type=ROM content=Program map address=00-7d,80-ff:8000-ffff mask=0x8000 -board: LOROM-RAM +board: LOROM-RAM#A memory type=ROM content=Program map address=00-3f,80-bf:8000-ffff mask=0x8000 memory type=RAM content=Save map address=70-7d,f0-ff:0000-ffff mask=0x8000 -board: LOROMEX-RAM +board: LOROM-RAM#B memory type=ROM content=Program map address=00-7d,80-ff:8000-ffff mask=0x8000 memory type=RAM content=Save @@ -656,11 +713,11 @@ board: NEC-HIROM memory type=ROM content=Program map address=00-3f,80-bf:8000-ffff map address=40-7d,c0-ff:0000-ffff - necdsp model=uPD7725 + processor architecture=uPD7725 map address=00-1f,80-9f:6000-7fff mask=0xfff - memory type=ROM content=Program manufacturer=NEC - memory type=ROM content=Data manufacturer=NEC - memory type=RAM content=Data manufacturer=NEC + memory type=ROM content=Program architecture=uPD7725 + memory type=ROM content=Data architecture=uPD7725 + memory type=RAM content=Data architecture=uPD7725 oscillator board: NEC-HIROM-RAM @@ -669,85 +726,62 @@ board: NEC-HIROM-RAM map address=40-7d,c0-ff:0000-ffff memory type=RAM content=Save map address=20-3f,a0-bf:6000-7fff mask=0xe000 - necdsp model=uPD7725 + processor architecture=uPD7725 map address=00-1f,80-9f:6000-7fff mask=0xfff - memory type=ROM content=Program manufacturer=NEC - memory type=ROM content=Data manufacturer=NEC - memory type=RAM content=Data manufacturer=NEC + memory type=ROM content=Program architecture=uPD7725 + memory type=ROM content=Data architecture=uPD7725 + memory type=RAM content=Data architecture=uPD7725 oscillator board: NEC-LOROM memory type=ROM content=Program map address=00-1f,80-9f:8000-ffff mask=0x8000 - necdsp model=uPD7725 + processor architecture=uPD7725 map address=30-3f,b0-bf:8000-ffff mask=0x3fff - memory type=ROM content=Program manufacturer=NEC - memory type=ROM content=Data manufacturer=NEC - memory type=RAM content=Data manufacturer=NEC + memory type=ROM content=Program architecture=uPD7725 + memory type=ROM content=Data architecture=uPD7725 + memory type=RAM content=Data architecture=uPD7725 oscillator -board: NEC-LOROM-RAM +board: NEC-LOROM-RAM#A memory type=ROM content=Program map address=00-1f,80-9f:8000-ffff mask=0x8000 memory type=RAM content=Save map address=70-7d,f0-ff:0000-ffff - necdsp model=uPD7725 + processor architecture=uPD7725 map address=20-3f,a0-bf:8000-ffff mask=0x3fff - memory type=ROM content=Program manufacturer=NEC - memory type=ROM content=Data manufacturer=NEC - memory type=RAM content=Data manufacturer=NEC + memory type=ROM content=Program architecture=uPD7725 + memory type=ROM content=Data architecture=uPD7725 + memory type=RAM content=Data architecture=uPD7725 oscillator -board: NEC-LOROMEX-RAM +board: NEC-LOROM-RAM#B memory type=ROM content=Program map address=00-3f,80-bf:8000-ffff mask=0x8000 memory type=RAM content=Save map address=70-7d,f0-ff:0000-7fff mask=0x8000 - necdsp model=uPD7725 + processor architecture=uPD7725 map address=60-6f,e0-ef:0000-7fff mask=0x3fff - memory type=ROM content=Program manufacturer=NEC - memory type=ROM content=Data manufacturer=NEC - memory type=RAM content=Data manufacturer=NEC - oscillator - -board: NECEX-LOROM-BATTERY - memory type=ROM content=Program - map address=00-7d,80-ff:8000-ffff mask=0x8000 - necdsp model=uPD96050 - map address=60-67,e0-e7:0000-3fff - memory type=ROM content=Program manufacturer=NEC - memory type=ROM content=Data manufacturer=NEC - memory type=RAM content=Data manufacturer=NEC - map address=68-6f,e8-ef:0000-7fff mask=0x8000 + memory type=ROM content=Program architecture=uPD7725 + memory type=ROM content=Data architecture=uPD7725 + memory type=RAM content=Data architecture=uPD7725 oscillator board: OBC1-LOROM-RAM memory type=ROM content=Program map address=00-3f,80-bf:8000-ffff mask=0x8000 - obc1 + processor identifier=OBC1 map address=00-3f,80-bf:6000-7fff mask=0xe000 map address=70-71,f0-f1:6000-7fff,e000-ffff mask=0xe000 memory type=RAM content=Save -board: RTC-HIROMEX-RAM - memory type=ROM content=Program - map address=00-3f:8000-ffff base=0x400000 - map address=40-7d:0000-ffff base=0x400000 - map address=80-bf:8000-ffff mask=0xc00000 - map address=c0-ff:0000-ffff mask=0xc00000 - memory type=RAM content=Save - map address=20-3f,a0-bf:6000-7fff mask=0xe000 - map address=70-7d:0000-7fff - sharprtc - map address=00-3f,80-bf:2800-2801 - memory type=RTC manufacturer=Sharp - board: SA1-RAM - sa1 + processor architecture=W65C816S map address=00-3f,80-bf:2200-23ff - memory type=ROM content=Program + mcu map address=00-3f,80-bf:8000-ffff mask=0x408000 map address=c0-ff:0000-ffff + memory type=ROM content=Program memory type=RAM content=Save map address=00-3f,80-bf:6000-7fff size=0x2000 map address=40-4f:0000-ffff @@ -755,78 +789,62 @@ board: SA1-RAM map address=00-3f,80-bf:3000-37ff size=0x800 board: SDD1 - sdd1 + processor identifier=SDD1 map address=00-3f,80-bf:4800-480f - memory type=ROM content=Program + mcu map address=00-3f,80-bf:8000-ffff map address=c0-ff:0000-ffff + memory type=ROM content=Program board: SDD1-RAM - sdd1 + processor identifier=SDD1 map address=00-3f,80-bf:4800-480f - memory type=ROM content=Program + mcu map address=00-3f,80-bf:8000-ffff map address=c0-ff:0000-ffff + memory type=ROM content=Program memory type=RAM content=Save map address=00-3f,80-bf:6000-7fff mask=0xe000 map address=70-73:0000-ffff mask=0x8000 -board: SGB-LOROM - memory type=ROM content=Program - map address=00-7d,80-ff:8000-ffff mask=0x8000 - map address=40-7d,c0-ff:0000-7fff mask=0x8000 - icd revision=2 - map address=00-3f,80-bf:6000-67ff,7000-7fff - memory type=ROM content=Boot manufacturer=Nintendo - oscillator - gameboy - board: SPC7110-RAM - spc7110 + processor identifier=SPC7110 map address=00-3f,80-bf:4800-483f map address=50,58:0000-ffff - map type=MCU address=00-3f,80-bf:8000-ffff mask=0x800000 - map type=MCU address=c0-ff:0000-ffff mask=0xc00000 - memory type=ROM content=Program - memory type=ROM content=Data + mcu + map address=00-3f,80-bf:8000-ffff mask=0x800000 + map address=c0-ff:0000-ffff mask=0xc00000 + memory type=ROM content=Program + memory type=ROM content=Data memory type=RAM content=Save map address=00-3f,80-bf:6000-7fff mask=0xe000 -board: SPC7110-RTC-RAM - spc7110 +board: SPC7110-RAM-EPSONRTC + processor identifier=SPC7110 map address=00-3f,80-bf:4800-483f map address=50,58:0000-ffff - map type=MCU address=00-3f,80-bf:8000-ffff mask=0x800000 - map type=MCU address=c0-ff:0000-ffff mask=0xc00000 - memory type=ROM content=Program - memory type=ROM content=Data + mcu + map address=00-3f,80-bf:8000-ffff mask=0x800000 + map address=c0-ff:0000-ffff mask=0xc00000 + memory type=ROM content=Program + memory type=ROM content=Data memory type=RAM content=Save map address=00-3f,80-bf:6000-7fff mask=0xe000 - epsonrtc + rtc manufacturer=Epson map address=00-3f,80-bf:4800-4842 - memory type=RTC manufacturer=Epson + memory type=RTC content=Time manufacturer=Epson board: ST-LOROM memory type=ROM content=Program map address=00-1f,80-9f:8000-ffff mask=0x8000 - sufamiturbo + slot type=SufamiTurbo rom map address=20-3f,a0-bf:8000-ffff mask=0x8000 ram map address=60-6f,e0-ef:0000-ffff - sufamiturbo + slot type=SufamiTurbo rom map address=40-5f,c0-df:0000-ffff mask=0x8000 ram map address=70-7d,f0-ff:0000-ffff -board: SUPERFX-RAM - superfx - map address=00-3f,80-bf:3000-34ff - memory type=ROM content=Program - map address=00-3f,80-bf:8000-ffff mask=0x8000 - map address=40-5f,c0-df:0000-ffff - memory type=RAM content=Save - map address=00-3f,80-bf:6000-7fff size=0x2000 - map address=70-71,f0-f1:0000-ffff - diff --git a/higan/target-tomoko/GNUmakefile b/higan/target-tomoko/GNUmakefile index 117f8d40..4f96df68 100644 --- a/higan/target-tomoko/GNUmakefile +++ b/higan/target-tomoko/GNUmakefile @@ -91,8 +91,9 @@ else ifneq ($(filter $(platform),linux bsd),) mkdir -p $(prefix)/share/applications/ mkdir -p $(prefix)/share/icons/ mkdir -p $(prefix)/share/$(name)/ + mkdir -p $(prefix)/share/$(name)/systems/ cp out/$(name) $(prefix)/bin/$(name) - cp -R systems/* $(prefix)/share/$(name)/ + cp -R systems/* $(prefix)/share/$(name)/systems/ cp data/$(name).desktop $(prefix)/share/applications/$(name).desktop cp data/$(name).png $(prefix)/share/icons/$(name).png endif diff --git a/higan/target-tomoko/presentation/presentation.cpp b/higan/target-tomoko/presentation/presentation.cpp index 4d0bda6f..8a2b8946 100644 --- a/higan/target-tomoko/presentation/presentation.cpp +++ b/higan/target-tomoko/presentation/presentation.cpp @@ -342,7 +342,7 @@ auto Presentation::loadSystems() -> void { } auto Presentation::loadShaders() -> void { - auto pathname = locate("Video Shaders/"); + auto pathname = locate("shaders/"); if(settings["Video/Driver"].text() == "OpenGL") { for(auto shader : directory::folders(pathname, "*.shader")) { diff --git a/higan/target-tomoko/program/medium.cpp b/higan/target-tomoko/program/medium.cpp index 41b1d15b..bcaa39ec 100644 --- a/higan/target-tomoko/program/medium.cpp +++ b/higan/target-tomoko/program/medium.cpp @@ -17,7 +17,7 @@ auto Program::loadMedium() -> void { auto Program::loadMedium(Emulator::Interface& interface, const Emulator::Interface::Medium& medium) -> void { unloadMedium(); - mediumPaths.append(locate({medium.name, ".sys/"})); + mediumPaths.append(locate({"systems/", medium.name, ".sys/"})); Emulator::audio.reset(2, audio->frequency()); inputManager->bind(emulator = &interface); diff --git a/icarus/GNUmakefile b/icarus/GNUmakefile index cf4b54a1..d2748531 100644 --- a/icarus/GNUmakefile +++ b/icarus/GNUmakefile @@ -43,13 +43,14 @@ else ifneq ($(filter $(platform),linux bsd),) mkdir -p $(prefix)/bin/ mkdir -p $(prefix)/share/applications/ mkdir -p $(prefix)/share/icons/ - mkdir -p $(prefix)/share/$(name)/Database/ - mkdir -p $(prefix)/share/$(name)/Firmware/ + mkdir -p $(prefix)/share/$(name)/ + mkdir -p $(prefix)/share/$(name)/database/ + mkdir -p $(prefix)/share/$(name)/firmware/ cp out/$(name) $(prefix)/bin/$(name) cp data/$(name).desktop $(prefix)/share/applications/$(name).desktop cp data/$(name).png $(prefix)/share/icons/$(name).png - cp -R Database/* $(prefix)/share/$(name)/Database/ - cp -R Firmware/* $(prefix)/share/$(name)/Firmware/ + cp -R database/* $(prefix)/share/$(name)/database/ + cp -R firmware/* $(prefix)/share/$(name)/firmware/ endif uninstall: diff --git a/icarus/core/core.cpp b/icarus/core/core.cpp index 8a3fd306..18cfcf9f 100644 --- a/icarus/core/core.cpp +++ b/icarus/core/core.cpp @@ -1,19 +1,19 @@ Icarus::Icarus() { - Database::Famicom = BML::unserialize(string::read(locate("Database/Famicom.bml"))); - Database::SuperFamicom = BML::unserialize(string::read(locate("Database/Super Famicom.bml"))); - Database::MasterSystem = BML::unserialize(string::read(locate("Database/Master System.bml"))); - Database::MegaDrive = BML::unserialize(string::read(locate("Database/Mega Drive.bml"))); - Database::PCEngine = BML::unserialize(string::read(locate("Database/PC Engine.bml"))); - Database::SuperGrafx = BML::unserialize(string::read(locate("Database/SuperGrafx.bml"))); - Database::GameBoy = BML::unserialize(string::read(locate("Database/Game Boy.bml"))); - Database::GameBoyColor = BML::unserialize(string::read(locate("Database/Game Boy Color.bml"))); - Database::GameBoyAdvance = BML::unserialize(string::read(locate("Database/Game Boy Advance.bml"))); - Database::GameGear = BML::unserialize(string::read(locate("Database/Game Gear.bml"))); - Database::WonderSwan = BML::unserialize(string::read(locate("Database/WonderSwan.bml"))); - Database::WonderSwanColor = BML::unserialize(string::read(locate("Database/WonderSwan Color.bml"))); - Database::PocketChallengeV2 = BML::unserialize(string::read(locate("Database/Pocket Challenge V2.bml"))); - Database::BSMemory = BML::unserialize(string::read(locate("Database/BS Memory.bml"))); - Database::SufamiTurbo = BML::unserialize(string::read(locate("Database/Sufami Turbo.bml"))); + Database::Famicom = BML::unserialize(string::read(locate("database/Famicom.bml"))); + Database::SuperFamicom = BML::unserialize(string::read(locate("database/Super Famicom.bml"))); + Database::MasterSystem = BML::unserialize(string::read(locate("database/Master System.bml"))); + Database::MegaDrive = BML::unserialize(string::read(locate("database/Mega Drive.bml"))); + Database::PCEngine = BML::unserialize(string::read(locate("database/PC Engine.bml"))); + Database::SuperGrafx = BML::unserialize(string::read(locate("database/SuperGrafx.bml"))); + Database::GameBoy = BML::unserialize(string::read(locate("database/Game Boy.bml"))); + Database::GameBoyColor = BML::unserialize(string::read(locate("database/Game Boy Color.bml"))); + Database::GameBoyAdvance = BML::unserialize(string::read(locate("database/Game Boy Advance.bml"))); + Database::GameGear = BML::unserialize(string::read(locate("database/Game Gear.bml"))); + Database::WonderSwan = BML::unserialize(string::read(locate("database/WonderSwan.bml"))); + Database::WonderSwanColor = BML::unserialize(string::read(locate("database/WonderSwan Color.bml"))); + Database::PocketChallengeV2 = BML::unserialize(string::read(locate("database/Pocket Challenge V2.bml"))); + Database::BSMemory = BML::unserialize(string::read(locate("database/BS Memory.bml"))); + Database::SufamiTurbo = BML::unserialize(string::read(locate("database/Sufami Turbo.bml"))); } auto Icarus::error() const -> string { diff --git a/icarus/core/super-famicom.cpp b/icarus/core/super-famicom.cpp index 54824efd..39977571 100644 --- a/icarus/core/super-famicom.cpp +++ b/icarus/core/super-famicom.cpp @@ -47,7 +47,7 @@ auto Icarus::superFamicomImport(vector& buffer, string location) -> str auto size = rom["size"].natural(); if(size > buffer.size() - offset) { auto name = string{rom["note"].text(), ".", rom["category"].text(), ".rom"}.trimLeft(".", 1L).downcase(); - auto location = locate({"Firmware/", name}); + auto location = locate({"firmware/", name}); if(location && file::size(location) == size) { write({target, name}, file::read(location)); } else { diff --git a/icarus/Database/BS Memory.bml b/icarus/database/BS Memory.bml similarity index 97% rename from icarus/Database/BS Memory.bml rename to icarus/database/BS Memory.bml index 87cbd3fd..ab8c0394 100644 --- a/icarus/Database/BS Memory.bml +++ b/icarus/database/BS Memory.bml @@ -1,5 +1,5 @@ database - revision: 2018-04-15 + revision: 2018-05-06 //BS Memory (JPN) diff --git a/icarus/Database/Sufami Turbo.bml b/icarus/database/Sufami Turbo.bml similarity index 99% rename from icarus/Database/Sufami Turbo.bml rename to icarus/database/Sufami Turbo.bml index 64969ec5..46c99cf8 100644 --- a/icarus/Database/Sufami Turbo.bml +++ b/icarus/database/Sufami Turbo.bml @@ -1,5 +1,5 @@ database - revision: 2018-04-15 + revision: 2018-05-06 //Sufami Turbo (JPN) diff --git a/icarus/Database/Super Famicom.bml b/icarus/database/Super Famicom.bml similarity index 99% rename from icarus/Database/Super Famicom.bml rename to icarus/database/Super Famicom.bml index 8b26f6e9..efe174a1 100644 --- a/icarus/Database/Super Famicom.bml +++ b/icarus/database/Super Famicom.bml @@ -1,5 +1,5 @@ database - revision: 2018-04-15 + revision: 2018-05-06 //Prototypes (JPN) @@ -1818,7 +1818,7 @@ game //Super Nintendo (EUR) database - revision: 2018-04-14 + revision: 2018-05-06 game sha256: ec3e81d628a293514e303b44e3b1ac03461ddd1da32764b10b7fab1e507602df @@ -2513,7 +2513,7 @@ game size: 0xc00 content: Data manufacturer: Hitachi - architecture: HS51BS169 + architecture: HG51BS169 identifier: Cx4 volatile oscillator @@ -2542,7 +2542,7 @@ game size: 0xc00 content: Data manufacturer: Hitachi - architecture: HS51BS169 + architecture: HG51BS169 identifier: Cx4 volatile oscillator @@ -5733,7 +5733,7 @@ game //Super Nintendo (USA) database - revision: 2018-04-14 + revision: 2018-05-06 game sha256: 2ffe8828480f943056fb1ab5c3c84d48a0bf8cbe3ed7c9960b349b59adb07f3b @@ -10293,7 +10293,7 @@ game size: 0xc00 content: Data manufacturer: Hitachi - architecture: HS51BS169 + architecture: HG51BS169 identifier: Cx4 volatile oscillator @@ -10322,7 +10322,7 @@ game size: 0xc00 content: Data manufacturer: Hitachi - architecture: HS51BS169 + architecture: HG51BS169 identifier: Cx4 volatile oscillator diff --git a/icarus/Firmware/cx4.data.rom b/icarus/firmware/cx4.data.rom similarity index 100% rename from icarus/Firmware/cx4.data.rom rename to icarus/firmware/cx4.data.rom diff --git a/icarus/Firmware/sgb1.boot.rom b/icarus/firmware/sgb1.boot.rom similarity index 100% rename from icarus/Firmware/sgb1.boot.rom rename to icarus/firmware/sgb1.boot.rom diff --git a/icarus/Firmware/sgb2.boot.rom b/icarus/firmware/sgb2.boot.rom similarity index 100% rename from icarus/Firmware/sgb2.boot.rom rename to icarus/firmware/sgb2.boot.rom diff --git a/icarus/heuristics/super-famicom.cpp b/icarus/heuristics/super-famicom.cpp index f1e29c76..058ff2aa 100644 --- a/icarus/heuristics/super-famicom.cpp +++ b/icarus/heuristics/super-famicom.cpp @@ -19,10 +19,10 @@ private: auto size() const -> uint { return data.size(); } auto scoreHeader(uint address) -> uint; auto firmwareARM() const -> string; + auto firmwareEXNEC() const -> string; + auto firmwareGB() const -> string; auto firmwareHITACHI() const -> string; auto firmwareNEC() const -> string; - auto firmwareNECEX() const -> string; - auto firmwareSGB() const -> string; vector& data; string location; @@ -38,13 +38,16 @@ SuperFamicom::SuperFamicom(vector& data, string location) : data(data), if(size() < 0x8000) return; //ignore images too small to be valid - uint scoreLo = scoreHeader( 0x7fb0); - uint scoreHi = scoreHeader( 0xffb0); - uint scoreEx = scoreHeader(0x40ffb0); - if(scoreEx) scoreEx += 4; + uint LoROM = scoreHeader( 0x7fb0); + uint HiROM = scoreHeader( 0xffb0); + uint ExLoROM = scoreHeader(0x407fb0); + uint ExHiROM = scoreHeader(0x40ffb0); + if(ExLoROM) ExLoROM += 4; + if(ExHiROM) ExHiROM += 4; - if(scoreLo >= scoreHi && scoreLo >= scoreEx) headerAddress = 0x7fb0; - else if(scoreHi >= scoreEx) headerAddress = 0xffb0; + if(LoROM >= HiROM && LoROM >= ExLoROM && LoROM >= ExHiROM) headerAddress = 0x7fb0; + else if(HiROM >= ExLoROM && HiROM >= ExHiROM) headerAddress = 0xffb0; + else if(ExLoROM >= ExHiROM) headerAddress = 0x407fb0; else headerAddress = 0x40ffb0; } @@ -64,7 +67,7 @@ auto SuperFamicom::manifest() const -> string { output.append(" revision: ", revision(), "\n"); output.append(" board: ", board(), "\n"); - auto board = this->board().split("-"); + auto board = this->board().trimRight("#A", 1L).trimRight("#B", 1L).split("-"); if(auto size = romSize()) { if(board(0) == "SPC7110") size = 0x100000; @@ -87,6 +90,18 @@ auto SuperFamicom::manifest() const -> string { output.append(Oscillator{}.frequency(21'440'000).text()); } else if(board(0) == "BS" && board(1) == "MCC") { output.append(Memory{}.type("RAM").size(0x80000).content("Download").text()); + } else if(board(0) == "EXNEC") { + output.append(Memory{}.type("ROM").size(0xc000).content("Program").manufacturer("NEC").architecture("uPD96050").identifier(firmwareEXNEC()).text()); + output.append(Memory{}.type("ROM").size(0x1000).content("Data" ).manufacturer("NEC").architecture("uPD96050").identifier(firmwareEXNEC()).text()); + output.append(Memory{}.type("RAM").size(0x1000).content("Data" ).manufacturer("NEC").architecture("uPD96050").identifier(firmwareEXNEC()).text()); + output.append(Oscillator{}.frequency(firmwareEXNEC() == "ST010" ? 11'000'000 : 15'000'000).text()); + } else if(board(0) == "GB") { + output.append(Memory{}.type("ROM").size(0x100).content("Boot").manufacturer("Nintendo").architecture("LR35902").identifier(firmwareGB()).text()); + if(firmwareGB() == "SGB2") + output.append(Oscillator{}.frequency(20'971'520).text()); + } else if(board(0) == "GSU") { + //todo: MARIO CHIP 1 uses CPU oscillator + output.append(Oscillator{}.frequency(21'440'000).text()); } else if(board(0) == "HITACHI") { output.append(Memory{}.type("ROM").size(0xc00).content("Data").manufacturer("Hitachi").architecture("HG51BS169").identifier(firmwareHITACHI()).text()); output.append(Memory{}.type("RAM").size(0xc00).content("Data").manufacturer("Hitachi").architecture("HG51BS169").identifier(firmwareHITACHI()).isVolatile().text()); @@ -96,26 +111,14 @@ auto SuperFamicom::manifest() const -> string { output.append(Memory{}.type("ROM").size( 0x800).content("Data" ).manufacturer("NEC").architecture("uPD7725").identifier(firmwareNEC()).text()); output.append(Memory{}.type("RAM").size( 0x200).content("Data" ).manufacturer("NEC").architecture("uPD7725").identifier(firmwareNEC()).isVolatile().text()); output.append(Oscillator{}.frequency(7'600'000).text()); - } else if(board(0) == "NECEX") { - output.append(Memory{}.type("ROM").size(0xc000).content("Program").manufacturer("NEC").architecture("uPD96050").identifier(firmwareNECEX()).text()); - output.append(Memory{}.type("ROM").size(0x1000).content("Data" ).manufacturer("NEC").architecture("uPD96050").identifier(firmwareNECEX()).text()); - output.append(Memory{}.type("RAM").size(0x1000).content("Data" ).manufacturer("NEC").architecture("uPD96050").identifier(firmwareNECEX()).text()); - output.append(Oscillator{}.frequency(firmwareNECEX() == "ST010" ? 11'000'000 : 15'000'000).text()); - } else if(board(0) == "RTC") { - output.append(Memory{}.type("RTC").size(0x10).content("Time").text()); } else if(board(0) == "SA1") { output.append(Memory{}.type("RAM").size(0x800).content("Internal").isVolatile().text()); - } else if(board(0) == "SGB") { - output.append(Memory{}.type("ROM").size(0x100).content("Boot").manufacturer("Nintendo").architecture("LR35902").identifier(firmwareSGB()).text()); - if(firmwareSGB() == "SGB2") - output.append(Oscillator{}.frequency(20'971'520).text()); } else if(board(0) == "SPC7110") { output.append(Memory{}.type("ROM").size(romSize() - 0x100000).content("Data").text()); - if(board(1) == "RTC") + } + + if(board.right() == "EPSONRTC" || board.right() == "SHARPRTC") { output.append(Memory{}.type("RTC").size(0x10).content("Time").text()); - } else if(board(0) == "SUPERFX") { - //todo: MARIO CHIP 1 uses CPU oscillator - output.append(Oscillator{}.frequency(21'440'000).text()); } return output; @@ -205,30 +208,35 @@ auto SuperFamicom::revision() const -> string { return revision ? revision : string{"1.", F}; } +//format: [slot]-[coprocessor]-[mapper]-[ram]-[rtc] auto SuperFamicom::board() const -> string { - auto mapMode = data[headerAddress + 0x25]; - auto cartridgeType = data[headerAddress + 0x26]; - auto cartridgeTypeLo = cartridgeType & 15; - auto cartridgeTypeHi = cartridgeType >> 4; - auto cartridgeSubType = data[headerAddress + 0x0f]; - string board; + auto mapMode = data[headerAddress + 0x25]; + auto cartridgeTypeLo = data[headerAddress + 0x26] & 15; + auto cartridgeTypeHi = data[headerAddress + 0x26] >> 4; + auto cartridgeSubType = data[headerAddress + 0x0f]; + string mode; if(mapMode == 0x20 || mapMode == 0x30) mode = "LOROM-"; if(mapMode == 0x21 || mapMode == 0x31) mode = "HIROM-"; if(mapMode == 0x22 || mapMode == 0x32) mode = "SDD1-"; if(mapMode == 0x23 || mapMode == 0x33) mode = "SA1-"; - if(mapMode == 0x25 || mapMode == 0x35) mode = "HIROMEX-"; + if(mapMode == 0x25 || mapMode == 0x35) mode = "EXHIROM-"; if(mapMode == 0x2a || mapMode == 0x3a) mode = "SPC7110-"; //many games will store an extra title character, overwriting the map mode + //further, ExLoROM mode is unofficial, and lacks a mapping mode value if(!mode) { if(headerAddress == 0x7fb0) mode = "LOROM-"; if(headerAddress == 0xffb0) mode = "HIROM-"; - if(headerAddress == 0x40ffb0) mode = "HIROMEX-"; + if(headerAddress == 0x407fb0) mode = "EXLOROM-"; + if(headerAddress == 0x40ffb0) mode = "EXHIROM-"; } + bool epsonRTC = false; + bool sharpRTC = false; + if(serial() == "A9PJ") { //Sufami Turbo (JPN) board.append("ST-", mode); @@ -237,37 +245,36 @@ auto SuperFamicom::board() const -> string { board.append("BS-MCC-"); } else if(serial() == "042J") { //Super Game Boy 2 - board.append("SGB-", mode); - } else if(serial().match("Z\?\?J")) { + board.append("GB-", mode); + } else if(serial().match("Z??J")) { board.append("BS-", mode); } else if(cartridgeTypeLo >= 0x3) { if(cartridgeTypeHi == 0x0) board.append("NEC-", mode); - if(cartridgeTypeHi == 0x1) board.append("SUPERFX-"); + if(cartridgeTypeHi == 0x1) board.append("GSU-"); if(cartridgeTypeHi == 0x2) board.append("OBC1-", mode); if(cartridgeTypeHi == 0x3) board.append("SA1-"); if(cartridgeTypeHi == 0x4) board.append("SDD1-"); - if(cartridgeTypeHi == 0x5) board.append("RTC-", mode); - if(cartridgeTypeHi == 0xe && cartridgeTypeLo == 0x3) board.append("SGB-", mode); - if(cartridgeTypeHi == 0xf && cartridgeSubType == 0x00 && cartridgeTypeLo == 0x5) board.append("SPC7110-"); - if(cartridgeTypeHi == 0xf && cartridgeSubType == 0x00 && cartridgeTypeLo == 0x9) board.append("SPC7110-RTC-"); - if(cartridgeTypeHi == 0xf && cartridgeSubType == 0x01) board.append("NECEX-", mode); - if(cartridgeTypeHi == 0xf && cartridgeSubType == 0x02) board.append("ARM-", mode); - if(cartridgeTypeHi == 0xf && cartridgeSubType == 0x10) board.append("HITACHI-", mode); + if(cartridgeTypeHi == 0x5) board.append(mode), sharpRTC = true; + if(cartridgeTypeHi == 0xe && cartridgeTypeLo == 0x3) board.append("GB-", mode); + if(cartridgeTypeHi == 0xf && cartridgeTypeLo == 0x5 && cartridgeSubType == 0x00) board.append("SPC7110-"); + if(cartridgeTypeHi == 0xf && cartridgeTypeLo == 0x9 && cartridgeSubType == 0x00) board.append("SPC7110-"), epsonRTC = true; + if(cartridgeTypeHi == 0xf && cartridgeSubType == 0x01) board.append("EXNEC-", mode); + if(cartridgeTypeHi == 0xf && cartridgeSubType == 0x02) board.append("ARM-", mode); + if(cartridgeTypeHi == 0xf && cartridgeSubType == 0x10) board.append("HITACHI-", mode); } if(!board) board.append(mode); - if(board.beginsWith("LOROM-") && romSize() > 0x200000 && ramSize()) board.replace("LOROM-", "LOROMEX-"); - if(board.beginsWith("NEC-LOROM-") && romSize() > 0x100000) board.replace("NEC-LOROM-", "NEC-LOROMEX-"); + if(cartridgeTypeLo == 0x1 || cartridgeTypeLo == 0x4) board.append("RAM-"); //RAM without battery + if(cartridgeTypeLo == 0x2 || cartridgeTypeLo == 0x5) board.append("RAM-"); //RAM with battery + if(cartridgeTypeLo == 0x6); //battery without RAM - if(cartridgeTypeLo == 0x1 || cartridgeTypeLo == 0x4) board.append("RAM-"); //without battery - if(cartridgeTypeLo == 0x2 || cartridgeTypeLo == 0x5) board.append("RAM-"); //with battery - if(cartridgeTypeLo == 0x6) board.append("BATTERY-"); //without RAM + if(epsonRTC) board.append("EPSONRTC-"); + if(sharpRTC) board.append("SHARPRTC-"); board.trimRight("-", 1L); - //NEC uPD96050 frequency - if(board.beginsWith("NECEX-") && firmwareNECEX() == "st010") board.append("#11"); //11MHz (22MHz / 2) - if(board.beginsWith("NECEX-") && firmwareNECEX() == "st011") board.append("#15"); //15MHz + if(board.beginsWith( "LOROM-RAM")) board.append(romSize() <= 0x200000 ? "#A" : "#B"); + if(board.beginsWith("NEC-LOROM-RAM")) board.append(romSize() <= 0x100000 ? "#A" : "#B"); return board; } @@ -480,6 +487,19 @@ auto SuperFamicom::firmwareARM() const -> string { return "ST018"; } +auto SuperFamicom::firmwareEXNEC() const -> string { + if(label() == "EXHAUST HEAT2") return "ST010"; + if(label() == "F1 ROC II") return "ST010"; + if(label() == "2DAN MORITA SHOUGI") return "ST011"; + return "ST010"; +} + +auto SuperFamicom::firmwareGB() const -> string { + if(label() == "Super GAMEBOY") return "SGB1"; + if(label() == "Super GAMEBOY2") return "SGB2"; + return "SGB1"; +} + auto SuperFamicom::firmwareHITACHI() const -> string { return "Cx4"; } @@ -493,17 +513,4 @@ auto SuperFamicom::firmwareNEC() const -> string { return "DSP1B"; } -auto SuperFamicom::firmwareNECEX() const -> string { - if(label() == "EXHAUST HEAT2") return "ST010"; - if(label() == "F1 ROC II") return "ST010"; - if(label() == "2DAN MORITA SHOUGI") return "ST011"; - return "ST010"; -} - -auto SuperFamicom::firmwareSGB() const -> string { - if(label() == "Super GAMEBOY") return "SGB1"; - if(label() == "Super GAMEBOY2") return "SGB2"; - return "SGB1"; -} - }