mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-01-18 05:08:55 +01:00
90da691717
byuu says: Changelog: - added all pre-requisite to make install rule (note: only for higan, icarus so far) - added SG-1000 emulation - added SC-3000 emulation (no keyboard support yet) - added MS graphics mode 1 emulation (SC-1000) - added MS graphics mode 2 emulation (F-16 Fighter) - improve Audio::process() to prevent a possible hang - higan: repeat monaural audio to both left+right speakers - icarus: add heuristics for importing MSX games (not emulated in higan yet in this WIP) - added DC bias removal filter [jsd1982] - improved Audio::Stream::reset() [jsd1982] I was under the impression that the 20hz highpass filter would have removed DC bias ... if not, then I don't know why I added that filter to all of the emulation cores that have it. In any case, if anyone is up for helping me out ... if we could analyze the output with and without the DC bias filter to see if it's actually helping, then I'll enable it if it is. To enable it, edit higan/audio/stream.cpp::addDCRemovalFilter() and remove the return statement at the top of the function.
40 lines
1.3 KiB
C++
40 lines
1.3 KiB
C++
auto Icarus::msxManifest(string location) -> string {
|
|
vector<uint8_t> buffer;
|
|
concatenate(buffer, {location, "program.rom"});
|
|
return msxManifest(buffer, location);
|
|
}
|
|
|
|
auto Icarus::msxManifest(vector<uint8_t>& buffer, string location) -> string {
|
|
if(settings["icarus/UseDatabase"].boolean()) {
|
|
auto digest = Hash::SHA256(buffer).digest();
|
|
for(auto game : Database::MSX.find("game")) {
|
|
if(game["sha256"].text() == digest) return BML::serialize(game);
|
|
}
|
|
}
|
|
|
|
if(settings["icarus/UseHeuristics"].boolean()) {
|
|
Heuristics::MSX game{buffer, location};
|
|
if(auto manifest = game.manifest()) return manifest;
|
|
}
|
|
|
|
return {};
|
|
}
|
|
|
|
auto Icarus::msxImport(vector<uint8_t>& buffer, string location) -> string {
|
|
auto name = Location::prefix(location);
|
|
auto source = Location::path(location);
|
|
string target{settings["Library/Location"].text(), "MSX/", name, ".msx/"};
|
|
|
|
auto manifest = msxManifest(buffer, location);
|
|
if(!manifest) return failure("failed to parse ROM image");
|
|
|
|
if(!create(target)) return failure("library path unwritable");
|
|
if(exists({source, name, ".sav"}) && !exists({target, "save.ram"})) {
|
|
copy({source, name, ".sav"}, {target, "save.ram"});
|
|
}
|
|
|
|
if(settings["icarus/CreateManifests"].boolean()) write({target, "manifest.bml"}, manifest);
|
|
write({target, "program.rom"}, buffer);
|
|
return success(target);
|
|
}
|