mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-02-06 22:20:35 +01:00
bbc33fe05f
byuu says: higan changelog: - compiler is set to g++-4.7, subst(cc,++) rule is gone, C files compile with $(compiler) -x c - make throws an error when you specify an invalid profile or compile on an unsupported platform (instead of hanging forever) - added unverified.png to resources (causes too big of a speed hit to actually check for folder/unverified file ... so disabled for now) - fixed default browser paths for Game Boy, Sufami Turbo and BS-X Satellaview (have to delete paths.cfg to see this) - browser home button seeks to configpath()/higan/library.cfg - settings->driver is now settings->advanced, and it adds game library path setting and profile information - emulation cores now load manifest files internally, manifest.bml is not required for a game folder to be recognized by higan as such - BS-X Satellaview and Sufami Turbo slot cartridge handling moved out of sfc/chip and into sfc/slot - Video::StartFullScreen only sets fullscreen when a game is specified on the command-line purify and ananke changelog: - library output path shown in purify window - added button to change library path - squelch firmware warning windows to prevent multi-threading crash, but only via purify (they show up in higan still)
41 lines
1.4 KiB
C++
41 lines
1.4 KiB
C++
void Ananke::copyFamicomSaves(const string &pathname) {
|
|
if(!file::exists({pathname, "save.ram"})) {
|
|
if(file::exists({information.path, nall::basename(information.name), ".sav"})) {
|
|
file::copy({information.path, nall::basename(information.name), ".srm"}, {pathname, "save.ram"});
|
|
}
|
|
}
|
|
}
|
|
|
|
string Ananke::createFamicomHeuristic(vector<uint8_t> &buffer) {
|
|
string pathname = {
|
|
libraryPath, "Famicom/",
|
|
nall::basename(information.name),
|
|
".fc/"
|
|
};
|
|
directory::create(pathname);
|
|
file::create({pathname, "unverified"});
|
|
|
|
FamicomCartridge info(buffer.data(), buffer.size());
|
|
string markup = info.markup();
|
|
markup.append("\ninformation\n title: ", nall::basename(information.name), "\n");
|
|
if(!information.manifest.empty()) markup = information.manifest; //override with embedded beat manifest, if one exists
|
|
|
|
file::write({pathname, "manifest.bml"}, markup);
|
|
file::write({pathname, "program.rom"}, buffer.data() + 16, info.prgrom);
|
|
if(info.chrrom > 0) file::write({pathname, "character.rom"}, buffer.data() + 16 + info.prgrom, info.chrrom);
|
|
|
|
copyFamicomSaves(pathname);
|
|
return pathname;
|
|
}
|
|
|
|
string Ananke::openFamicom(vector<uint8_t> &buffer) {
|
|
return createFamicomHeuristic(buffer);
|
|
}
|
|
|
|
//this currently cannot work:
|
|
//game folders discard iNES header required for heuristic detection
|
|
//a games database of all commercial Famicom software will be required
|
|
string Ananke::syncFamicom(const string &pathname) {
|
|
return "";
|
|
}
|