2015-12-19 09:00:27 +00:00
|
|
|
auto Icarus::famicomManifest(string location) -> string {
|
Update to v097r14 release.
byuu says:
This is a few days old, but oh well.
This WIP changes nall,hiro,ruby,icarus back to (u)int(8,16,32,64)_t.
I'm slowly pushing for (u)int(8,16,32,64) to use my custom
Integer<Size>/Natural<Size> classes instead. But it's going to be one
hell of a struggle to get that into higan.
2016-02-16 09:11:58 +00:00
|
|
|
vector<uint8_t> buffer;
|
2015-08-21 11:29:53 +00:00
|
|
|
concatenate(buffer, {location, "ines.rom"});
|
|
|
|
concatenate(buffer, {location, "program.rom"});
|
|
|
|
concatenate(buffer, {location, "character.rom"});
|
|
|
|
return famicomManifest(buffer, location);
|
|
|
|
}
|
|
|
|
|
2018-02-21 00:12:09 +00:00
|
|
|
auto Icarus::famicomManifest(vector<uint8_t>& buffer, string location) -> string {
|
|
|
|
if(settings["icarus/UseDatabase"].boolean()) {
|
|
|
|
auto digest = Hash::SHA256(buffer).digest();
|
|
|
|
for(auto game : Database::Famicom.find("game")) {
|
|
|
|
if(game["sha256"].text() == digest) return BML::serialize(game);
|
2015-12-19 09:00:27 +00:00
|
|
|
}
|
|
|
|
}
|
2015-08-21 11:29:53 +00:00
|
|
|
|
2018-02-21 00:12:09 +00:00
|
|
|
if(settings["icarus/UseHeuristics"].boolean()) {
|
|
|
|
Heuristics::Famicom game{buffer, location};
|
|
|
|
if(auto manifest = game.manifest()) return manifest;
|
2015-12-19 09:00:27 +00:00
|
|
|
}
|
|
|
|
|
2018-02-21 00:12:09 +00:00
|
|
|
return {};
|
2015-12-19 09:00:27 +00:00
|
|
|
}
|
|
|
|
|
Update to v097r14 release.
byuu says:
This is a few days old, but oh well.
This WIP changes nall,hiro,ruby,icarus back to (u)int(8,16,32,64)_t.
I'm slowly pushing for (u)int(8,16,32,64) to use my custom
Integer<Size>/Natural<Size> classes instead. But it's going to be one
hell of a struggle to get that into higan.
2016-02-16 09:11:58 +00:00
|
|
|
auto Icarus::famicomImport(vector<uint8_t>& buffer, string location) -> string {
|
Update to v099r16 release (public beta).
byuu says:
Changelog:
- hiro: BrowserDialog can navigate up to drive selection on Windows
- nall: (file,path,dir,base,prefix,suffix)name =>
Location::(file,path,dir,base,prefix,suffix)
- higan/tomoko: rename audio filter label from "Sinc" to "IIR - Biquad"
- higan/tomoko: allow loading files via icarus on the command-line
once again
- higan/tomoko: (begrudging) quick hack to fix presentation window focus
on startup
- higan/audio: don't divide output audio volume by number of streams
- processor/r65816: fix a regression in (read,write)DB; fixes Taz-Mania
- fixed compilation regressions on Windows and Linux
I'm happy with where we are at with code cleanups and stability, so I'd
like to release v100. But even though I'm not assigning any special
significance to this version, we should probably test it more thoroughly
first.
2016-07-04 11:53:24 +00:00
|
|
|
auto name = Location::prefix(location);
|
|
|
|
auto source = Location::path(location);
|
2015-12-19 09:00:27 +00:00
|
|
|
string target{settings["Library/Location"].text(), "Famicom/", name, ".fc/"};
|
2015-08-21 11:29:53 +00:00
|
|
|
|
2018-02-21 00:12:09 +00:00
|
|
|
auto manifest = famicomManifest(buffer, location);
|
|
|
|
if(!manifest) return failure("failed to parse ROM image");
|
|
|
|
|
2017-09-24 01:01:48 +00:00
|
|
|
if(!create(target)) return failure("library path unwritable");
|
|
|
|
if(exists({source, name, ".sav"}) && !exists({target, "save.ram"})) {
|
|
|
|
copy({source, name, ".sav"}, {target, "save.ram"});
|
2016-01-23 07:29:34 +00:00
|
|
|
}
|
2015-08-21 11:29:53 +00:00
|
|
|
|
2018-02-21 00:12:09 +00:00
|
|
|
if(settings["icarus/CreateManifests"].boolean()) write({target, "manifest.bml"}, manifest);
|
2018-05-14 13:53:18 +00:00
|
|
|
auto document = BML::unserialize(manifest);
|
|
|
|
uint offset = 0;
|
|
|
|
if(true) {
|
|
|
|
//todo: support images without iNES headers (via database lookup)
|
|
|
|
uint size = 16;
|
|
|
|
write({target, "ines.rom"}, &buffer[offset], size);
|
|
|
|
offset += size;
|
|
|
|
}
|
Update to v106r21 release.
byuu says:
Changelog:
- higan: target-tomoko has been renamed to target-higan
- Super Famicom: event has been renamed to
processor(architecture=uPD78214)
- Super Famicom: SNES-EVENT supported once more; under board IDs
EVENT-CC92 and EVENT-PF94
- Super Famicom: SNES-EVENT preliminarily set up to use DIP switch
settings ala the Nintendo Super System (incomplete)
- Super Famicom: MCC PSRAM moved inside the MCU, as it is remappable
- Super Famicom: MCC emulation rewritten from scratch; it is now
vastly more accurate than before
- Super Famicom: added BSC-1A5B9P-01 board definition to database;
corrected BS-MCC-RAM board definition
- Super Famicom: moved SHVC-LN3B-01 RAM outside of
processor(identifier=SDD1)
- higan: when selecting a default game to load for a new system entry,
it will change the system option to match the media type
- higan: the load text box on the system entry window is now editable;
can be used to erase entries
- icarus: fixed bug in Famicom importing
- icarus: importing unappended SNES coprocessor firmware will now
rename the firmware properly
- hiro/GTK,Qt: WM_CLASS is now set correctly in `argv[0]`, so
applications should show “higan”, “icarus” instead of “hiro” now
Note: if you wish to run the BS-X town cartridge, the database currently
lists the download RAM as type “PSRAM”. This needs to be changed to
“RAM” in order to load properly. Otherwise, the emulator will bomb
out on the load window, because BSC-1A5B9P-01 expects PSRAM to always be
present, but it won't find it with the wrong memory type. I'll correct
this in the database in a later release. For now, you can copy the game
portion of the manifest to a new manifest.bml file and drop it into the
gamepak folder until I fix the database.
2018-05-17 03:37:29 +00:00
|
|
|
if(auto program = document["game/board/memory(type=ROM,content=Program)"]) {
|
2018-05-14 13:53:18 +00:00
|
|
|
uint size = program["size"].natural();
|
|
|
|
write({target, "program.rom"}, &buffer[offset], size);
|
|
|
|
offset += size;
|
|
|
|
}
|
Update to v106r21 release.
byuu says:
Changelog:
- higan: target-tomoko has been renamed to target-higan
- Super Famicom: event has been renamed to
processor(architecture=uPD78214)
- Super Famicom: SNES-EVENT supported once more; under board IDs
EVENT-CC92 and EVENT-PF94
- Super Famicom: SNES-EVENT preliminarily set up to use DIP switch
settings ala the Nintendo Super System (incomplete)
- Super Famicom: MCC PSRAM moved inside the MCU, as it is remappable
- Super Famicom: MCC emulation rewritten from scratch; it is now
vastly more accurate than before
- Super Famicom: added BSC-1A5B9P-01 board definition to database;
corrected BS-MCC-RAM board definition
- Super Famicom: moved SHVC-LN3B-01 RAM outside of
processor(identifier=SDD1)
- higan: when selecting a default game to load for a new system entry,
it will change the system option to match the media type
- higan: the load text box on the system entry window is now editable;
can be used to erase entries
- icarus: fixed bug in Famicom importing
- icarus: importing unappended SNES coprocessor firmware will now
rename the firmware properly
- hiro/GTK,Qt: WM_CLASS is now set correctly in `argv[0]`, so
applications should show “higan”, “icarus” instead of “hiro” now
Note: if you wish to run the BS-X town cartridge, the database currently
lists the download RAM as type “PSRAM”. This needs to be changed to
“RAM” in order to load properly. Otherwise, the emulator will bomb
out on the load window, because BSC-1A5B9P-01 expects PSRAM to always be
present, but it won't find it with the wrong memory type. I'll correct
this in the database in a later release. For now, you can copy the game
portion of the manifest to a new manifest.bml file and drop it into the
gamepak folder until I fix the database.
2018-05-17 03:37:29 +00:00
|
|
|
if(auto character = document["game/board/memory(type=ROM,content=Character)"]) {
|
2018-05-14 13:53:18 +00:00
|
|
|
uint size = character["size"].natural();
|
|
|
|
write({target, "character.rom"}, &buffer[offset], size);
|
|
|
|
offset += size;
|
|
|
|
}
|
Update to v096r06 release.
byuu says:
This WIP finally achieves the vision I've had for icarus.
I also fixed a mapping issue with Cx4 that, oddly enough, only caused
the "2" from the Mega Man X2 title screen to disappear.
[Editor's note - "the vision for icarus" was described in a separate,
public forum post: http://board.byuu.org/phpbb3/viewtopic.php?p=20584
Quoting for posterity:
icarus is now a full-fledged part of higan, and will be bundled with
each higan WIP as well. This will ensure that in the future, the
exact version of icarus you need to run higan will be included right
along with it. As of this WIP, physical manifest files are now truly
and entirely optional.
From now on, you can associate your ROM image files with higan's
main binary, or drop them directly on top of it, to load and play
your games.
Furthermore, there are two new menu options that appear under the
library menu when icarus is present:
- "Load ROM File ..." => gives you a single-file selection dialog to
import (and if possible) run the game
- "Import ROM Files ..." => gives you a multi-file import dialog
with checkboxes to pull in multiple games at once
Finally, as before, icarus can generate manifest.bml files for
folders that lack them.
For people who like the game folder and library system, nothing's
changed. Keep using higan as you have been.
For people who hate it, you can now use higan like your classic
emulators. Treat the "Library->{System Name}" entries as your
"favorites" list: the games you actually play. Treat the
"Library->Load ROM" as your standard open file dialog in other
emulators. And finally, treat "Advanced->Game Library" as your save
data path for cheat codes, save states, save RAM, etc.
]
2016-01-13 10:47:45 +00:00
|
|
|
return success(target);
|
2015-08-21 11:29:53 +00:00
|
|
|
}
|