2018-05-24 02:14:17 +00:00
|
|
|
auto Program::path(string type, string location, string extension) -> string {
|
|
|
|
auto pathname = Location::path(location);
|
|
|
|
auto filename = Location::file(location);
|
|
|
|
auto prefix = Location::prefix(filename);
|
Update to v106r37 release.
byuu says:
Changelog:
- bsnes: cheat code “enabled” option changed to “enable”
- bsnes: connected “Cancel” action on add/edit cheat code window
- hiro: improved BrowserDialog::selectFolder() behavior
- can choose “Select” inside of a target folder when no items are
selected
- bsnes: implemented state manager
- bsnes: save a recovery state before loading a state, quitting, or
changing drivers
- bsnes: input settings, hotkey settings, cheat editor, state manager
entries are now batchable
- this allows bulk clearing/deleting of entries
- bsnes: cheat code list now auto-sorts alphabetically instead of
using up/down move arrows
I know most people will probably prefer to order cheat codes the way
they want, but the issue is that the state manager can't really work
this way. Each state is a file on disk. So yes, we could store a
states-manifest.bml to track the order of the states, or try to insert
numbers into the filenames and do bulk filesystem rename operations on
sorting, but then we would run into oddities when users delete state
files manually. And really, manual sorting is just clumsy. If you really
want a specific ordering, you can prefix cheats/states with numeric
indices instead.
2018-06-07 11:48:41 +00:00
|
|
|
auto suffix = extension;
|
2018-05-24 02:14:17 +00:00
|
|
|
|
|
|
|
if(type == "Games") {
|
|
|
|
if(auto path = settings["Path/Games"].text()) {
|
|
|
|
pathname = path;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(type == "Patches") {
|
|
|
|
if(auto path = settings["Path/Patches"].text()) {
|
|
|
|
pathname = path;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(type == "Saves") {
|
|
|
|
if(auto path = settings["Path/Saves"].text()) {
|
|
|
|
pathname = path;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-06-11 04:50:18 +00:00
|
|
|
if(type == "Cheats") {
|
|
|
|
if(auto path = settings["Path/Cheats"].text()) {
|
2018-05-24 02:14:17 +00:00
|
|
|
pathname = path;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-06-11 04:50:18 +00:00
|
|
|
if(type == "States") {
|
|
|
|
if(auto path = settings["Path/States"].text()) {
|
2018-05-24 02:14:17 +00:00
|
|
|
pathname = path;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-07-02 01:55:42 +00:00
|
|
|
if(type == "Screenshots") {
|
|
|
|
if(auto path = settings["Path/Screenshots"].text()) {
|
|
|
|
pathname = path;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-24 02:14:17 +00:00
|
|
|
return {pathname, prefix, suffix};
|
|
|
|
}
|
2018-06-11 04:50:18 +00:00
|
|
|
|
|
|
|
auto Program::gamePath() -> string {
|
|
|
|
if(!emulator->loaded()) return "";
|
|
|
|
if(gameBoy.location) return gameBoy.location;
|
Update to v106r42 release.
byuu says:
Changelog:
- emulator: added `Thread::setHandle(cothread_t)`
- icarus: added special heuristics support for the Tengai Maykou Zero
fan translation
- board identifier is: EXSPC7110-RAM-EPSONRTC (match on SPC7110 +
ROM size=56mbit)
- board ROM contents are: 8mbit program, 40mbit data, 8mbit
expansion (sizes are fixed)
- bsnes: show messages on game load, unload, and reset
- bsnes: added support for BS Memory and Sufami Turbo games
- bsnes: added support for region selection (Auto [default], NTSC,
PAL)
- bsnes: correct presentation window size from 223/239 to 224/240
- bsnes: add SA-1 internal RAM on cartridges with BS Memory slot
- bsnes: fixed recovery state to store inside .bsz archive
- bsnes: added support for custom manifests in both game pak and game
ROM modes
- bsnes: added icarus game database support (manifest → database →
heuristics)
- bsnes: added flexible SuperFX overclocking
- bsnes: added IPS and BPS soft-patching support to all ROM types
(sfc,smc,gb,gbc,bs,st)
- can load patches inside of ZIP archives (matches first “.ips” or
“.bps” file)
- bsnes/ppu: cache interlace/overscan/vdisp (277 → 291fps with fast
PPU)
- hiro/Windows: faster painting of Label widget on expose
- hiro/Windows: immediately apply LineEdit::setBackgroundColor changes
- hiro/Qt: inherit Window backgroundColor when one is not assigned to
Label
Errata:
- sfc/ppu-fast: remove `renderMode7Hires()` function (the body isn't in
the codebase)
- bsnes: advanced note label should probably use a lighter text color
and/or smaller font size instead of italics
I didn't test the soft-patching at all, as I don't have any patches on
my dev box. If anyone wants to test, that'd be great. The Tengai Makyou
Zero fan translation would be a great test case.
2018-06-26 03:17:26 +00:00
|
|
|
return superFamicom.location;
|
2018-06-11 04:50:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
auto Program::cheatPath() -> string {
|
|
|
|
if(!emulator->loaded()) return "";
|
|
|
|
auto location = gamePath();
|
|
|
|
if(location.endsWith("/")) {
|
|
|
|
return {location, "cheats.bml"};
|
|
|
|
} else {
|
|
|
|
return path("Cheats", location, ".cht");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
auto Program::statePath() -> string {
|
|
|
|
if(!emulator->loaded()) return "";
|
|
|
|
auto location = gamePath();
|
|
|
|
if(location.endsWith("/")) {
|
|
|
|
return {location, "bsnes/states/"};
|
|
|
|
} else {
|
|
|
|
return path("States", location, ".bsz");
|
|
|
|
}
|
|
|
|
}
|
2018-07-02 01:55:42 +00:00
|
|
|
|
|
|
|
auto Program::screenshotPath() -> string {
|
|
|
|
if(!emulator->loaded()) return "";
|
|
|
|
auto location = gamePath();
|
|
|
|
if(location.endsWith("/")) {
|
|
|
|
directory::create({location, "bsnes/screenshots/"});
|
|
|
|
location = {location, "bsnes/screenshots/capture"};
|
|
|
|
} else {
|
|
|
|
location = path("Screenshots", location);
|
|
|
|
}
|
|
|
|
for(uint n : range(1, 999)) {
|
|
|
|
string filename = {location, ".", pad(n, 3, '0'), ".bmp"};
|
|
|
|
if(!file::exists(filename)) return filename;
|
|
|
|
}
|
|
|
|
return {location, ".000.bmp"};
|
|
|
|
}
|