2018-08-04 11:44:00 +00:00
|
|
|
const uint Program::State::Signature = 0x5a22'0000;
|
|
|
|
|
|
|
|
auto Program::availableStates(string type) -> vector<State> {
|
|
|
|
vector<State> result;
|
Update to 20180729 release.
byuu wrote:
Sigh ...
asio.hpp needs #include <nall/windows/registry.hpp>
[Since the last WIP, byuu also posted the following message. -Ed.]
ruby drivers have all been updated (but not tested outside of BSD), and
I redesigned the settings window. The driver functionality all exists on
a new "Drivers" panel, the emulator/hack settings go to a
"Configuration" panel, and the video/audio panels lose driver settings.
As does the settings menu and its synchronize options.
I want to start pushing toward a v107 release. Critically, I will need
DirectSound and ALSA to support dynamic rate control. I'd also like to
eliminate the other system manifest.bml files. I need to update the
cheat code database format, and bundle at least a few quark shaders --
although I still need to default to Direct3D on Windows.
Turbo keys would be nice, if it's not too much effort. Aside from
netplay, it's the last significant feature I'm missing.
I think for v107, higan is going to be a bit rough around the edges
compared to bsnes. And I don't think it's practical to finish the bsnes
localization support.
I'm thinking we probably want another WIP to iron out any critical
issues, but this time there should be a feature freeze with the next
WIP.
2018-07-29 13:24:38 +00:00
|
|
|
if(!emulator->loaded()) return result;
|
2018-06-27 01:56:27 +00:00
|
|
|
|
|
|
|
if(gamePath().endsWith("/")) {
|
Update to 20180729 release.
byuu wrote:
Sigh ...
asio.hpp needs #include <nall/windows/registry.hpp>
[Since the last WIP, byuu also posted the following message. -Ed.]
ruby drivers have all been updated (but not tested outside of BSD), and
I redesigned the settings window. The driver functionality all exists on
a new "Drivers" panel, the emulator/hack settings go to a
"Configuration" panel, and the video/audio panels lose driver settings.
As does the settings menu and its synchronize options.
I want to start pushing toward a v107 release. Critically, I will need
DirectSound and ALSA to support dynamic rate control. I'd also like to
eliminate the other system manifest.bml files. I need to update the
cheat code database format, and bundle at least a few quark shaders --
although I still need to default to Direct3D on Windows.
Turbo keys would be nice, if it's not too much effort. Aside from
netplay, it's the last significant feature I'm missing.
I think for v107, higan is going to be a bit rough around the edges
compared to bsnes. And I don't think it's practical to finish the bsnes
localization support.
I'm thinking we probably want another WIP to iron out any critical
issues, but this time there should be a feature freeze with the next
WIP.
2018-07-29 13:24:38 +00:00
|
|
|
for(auto& file : directory::ifiles({statePath(), type}, "*.bst")) {
|
2018-08-04 11:44:00 +00:00
|
|
|
auto timestamp = file::timestamp({statePath(), type, file}, file::time::modify);
|
|
|
|
result.append({{type, file.trimRight(".bst", 1L)}, timestamp});
|
Update to 20180729 release.
byuu wrote:
Sigh ...
asio.hpp needs #include <nall/windows/registry.hpp>
[Since the last WIP, byuu also posted the following message. -Ed.]
ruby drivers have all been updated (but not tested outside of BSD), and
I redesigned the settings window. The driver functionality all exists on
a new "Drivers" panel, the emulator/hack settings go to a
"Configuration" panel, and the video/audio panels lose driver settings.
As does the settings menu and its synchronize options.
I want to start pushing toward a v107 release. Critically, I will need
DirectSound and ALSA to support dynamic rate control. I'd also like to
eliminate the other system manifest.bml files. I need to update the
cheat code database format, and bundle at least a few quark shaders --
although I still need to default to Direct3D on Windows.
Turbo keys would be nice, if it's not too much effort. Aside from
netplay, it's the last significant feature I'm missing.
I think for v107, higan is going to be a bit rough around the edges
compared to bsnes. And I don't think it's practical to finish the bsnes
localization support.
I'm thinking we probably want another WIP to iron out any critical
issues, but this time there should be a feature freeze with the next
WIP.
2018-07-29 13:24:38 +00:00
|
|
|
}
|
2018-06-27 01:56:27 +00:00
|
|
|
} else {
|
|
|
|
Decode::ZIP input;
|
|
|
|
if(input.open(statePath())) {
|
|
|
|
for(auto& file : input.file) {
|
2018-08-04 11:44:00 +00:00
|
|
|
if(!file.name.match({type, "*.bst"})) continue;
|
|
|
|
result.append({file.name.trimRight(".bst", 1L), (uint64_t)file.timestamp});
|
Update to 20180729 release.
byuu wrote:
Sigh ...
asio.hpp needs #include <nall/windows/registry.hpp>
[Since the last WIP, byuu also posted the following message. -Ed.]
ruby drivers have all been updated (but not tested outside of BSD), and
I redesigned the settings window. The driver functionality all exists on
a new "Drivers" panel, the emulator/hack settings go to a
"Configuration" panel, and the video/audio panels lose driver settings.
As does the settings menu and its synchronize options.
I want to start pushing toward a v107 release. Critically, I will need
DirectSound and ALSA to support dynamic rate control. I'd also like to
eliminate the other system manifest.bml files. I need to update the
cheat code database format, and bundle at least a few quark shaders --
although I still need to default to Direct3D on Windows.
Turbo keys would be nice, if it's not too much effort. Aside from
netplay, it's the last significant feature I'm missing.
I think for v107, higan is going to be a bit rough around the edges
compared to bsnes. And I don't think it's practical to finish the bsnes
localization support.
I'm thinking we probably want another WIP to iron out any critical
issues, but this time there should be a feature freeze with the next
WIP.
2018-07-29 13:24:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2018-08-04 11:44:00 +00:00
|
|
|
auto Program::hasState(string filename) -> bool {
|
|
|
|
if(!emulator->loaded()) return false;
|
Update to 20180729 release.
byuu wrote:
Sigh ...
asio.hpp needs #include <nall/windows/registry.hpp>
[Since the last WIP, byuu also posted the following message. -Ed.]
ruby drivers have all been updated (but not tested outside of BSD), and
I redesigned the settings window. The driver functionality all exists on
a new "Drivers" panel, the emulator/hack settings go to a
"Configuration" panel, and the video/audio panels lose driver settings.
As does the settings menu and its synchronize options.
I want to start pushing toward a v107 release. Critically, I will need
DirectSound and ALSA to support dynamic rate control. I'd also like to
eliminate the other system manifest.bml files. I need to update the
cheat code database format, and bundle at least a few quark shaders --
although I still need to default to Direct3D on Windows.
Turbo keys would be nice, if it's not too much effort. Aside from
netplay, it's the last significant feature I'm missing.
I think for v107, higan is going to be a bit rough around the edges
compared to bsnes. And I don't think it's practical to finish the bsnes
localization support.
I'm thinking we probably want another WIP to iron out any critical
issues, but this time there should be a feature freeze with the next
WIP.
2018-07-29 13:24:38 +00:00
|
|
|
|
|
|
|
if(gamePath().endsWith("/")) {
|
2018-08-04 11:44:00 +00:00
|
|
|
return file::exists({statePath(), filename, ".bst"});
|
Update to 20180729 release.
byuu wrote:
Sigh ...
asio.hpp needs #include <nall/windows/registry.hpp>
[Since the last WIP, byuu also posted the following message. -Ed.]
ruby drivers have all been updated (but not tested outside of BSD), and
I redesigned the settings window. The driver functionality all exists on
a new "Drivers" panel, the emulator/hack settings go to a
"Configuration" panel, and the video/audio panels lose driver settings.
As does the settings menu and its synchronize options.
I want to start pushing toward a v107 release. Critically, I will need
DirectSound and ALSA to support dynamic rate control. I'd also like to
eliminate the other system manifest.bml files. I need to update the
cheat code database format, and bundle at least a few quark shaders --
although I still need to default to Direct3D on Windows.
Turbo keys would be nice, if it's not too much effort. Aside from
netplay, it's the last significant feature I'm missing.
I think for v107, higan is going to be a bit rough around the edges
compared to bsnes. And I don't think it's practical to finish the bsnes
localization support.
I'm thinking we probably want another WIP to iron out any critical
issues, but this time there should be a feature freeze with the next
WIP.
2018-07-29 13:24:38 +00:00
|
|
|
} else {
|
2018-08-04 11:44:00 +00:00
|
|
|
auto type = string{filename.split("/").first(), "/"};
|
|
|
|
return (bool)availableStates(type).find([&](auto& state) { return state.name == filename; });
|
2018-06-27 01:56:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-08-04 11:44:00 +00:00
|
|
|
auto Program::loadStateData(string filename) -> vector<uint8_t> {
|
|
|
|
if(!emulator->loaded()) return {};
|
2018-06-11 04:50:18 +00:00
|
|
|
|
|
|
|
vector<uint8_t> memory;
|
|
|
|
if(gamePath().endsWith("/")) {
|
|
|
|
string location = {statePath(), filename, ".bst"};
|
|
|
|
memory = file::read(location);
|
|
|
|
} else {
|
|
|
|
string location = {filename, ".bst"};
|
|
|
|
Decode::ZIP input;
|
|
|
|
if(input.open(statePath())) {
|
|
|
|
for(auto& file : input.file) {
|
|
|
|
if(file.name != location) continue;
|
|
|
|
memory = input.extract(file);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-08-04 11:44:00 +00:00
|
|
|
if(memory.size() < 3 * sizeof(uint)) return {}; //too small to be a valid state file
|
|
|
|
if(memory::readl<sizeof(uint)>(memory.data()) != State::Signature) return {}; //wrong format or version
|
|
|
|
return memory;
|
|
|
|
}
|
|
|
|
|
|
|
|
auto Program::loadState(string filename) -> bool {
|
|
|
|
string prefix = Location::file(filename);
|
|
|
|
if(auto memory = loadStateData(filename)) {
|
Update to 20180729 release.
byuu wrote:
Sigh ...
asio.hpp needs #include <nall/windows/registry.hpp>
[Since the last WIP, byuu also posted the following message. -Ed.]
ruby drivers have all been updated (but not tested outside of BSD), and
I redesigned the settings window. The driver functionality all exists on
a new "Drivers" panel, the emulator/hack settings go to a
"Configuration" panel, and the video/audio panels lose driver settings.
As does the settings menu and its synchronize options.
I want to start pushing toward a v107 release. Critically, I will need
DirectSound and ALSA to support dynamic rate control. I'd also like to
eliminate the other system manifest.bml files. I need to update the
cheat code database format, and bundle at least a few quark shaders --
although I still need to default to Direct3D on Windows.
Turbo keys would be nice, if it's not too much effort. Aside from
netplay, it's the last significant feature I'm missing.
I think for v107, higan is going to be a bit rough around the edges
compared to bsnes. And I don't think it's practical to finish the bsnes
localization support.
I'm thinking we probably want another WIP to iron out any critical
issues, but this time there should be a feature freeze with the next
WIP.
2018-07-29 13:24:38 +00:00
|
|
|
if(filename != "quick/undo") saveUndoState();
|
|
|
|
if(filename == "quick/undo") saveRedoState();
|
2018-08-04 11:44:00 +00:00
|
|
|
auto serializerRLE = Decode::RLE<uint8_t>(memory.data() + 3 * sizeof(uint));
|
|
|
|
serializer s{serializerRLE.data(), serializerRLE.size()};
|
2018-06-11 04:50:18 +00:00
|
|
|
if(!emulator->unserialize(s)) return showMessage({"[", prefix, "] is in incompatible format"}), false;
|
|
|
|
return showMessage({"Loaded [", prefix, "]"}), true;
|
|
|
|
} else {
|
|
|
|
return showMessage({"[", prefix, "] not found"}), false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
auto Program::saveState(string filename) -> bool {
|
|
|
|
if(!emulator->loaded()) return false;
|
|
|
|
string prefix = Location::file(filename);
|
2018-08-04 11:44:00 +00:00
|
|
|
|
2018-06-11 04:50:18 +00:00
|
|
|
serializer s = emulator->serialize();
|
|
|
|
if(!s.size()) return showMessage({"Failed to save [", prefix, "]"}), false;
|
2018-08-04 11:44:00 +00:00
|
|
|
auto serializerRLE = Encode::RLE<uint8_t>(s.data(), s.size());
|
|
|
|
|
|
|
|
image preview;
|
|
|
|
preview.allocate(screenshot.data, screenshot.pitch, screenshot.width, screenshot.height);
|
|
|
|
if(preview.width() != 256 || preview.height() != 240) preview.scale(256, 240, true);
|
|
|
|
preview.transform(0, 15, 0x8000, 0x7c00, 0x03e0, 0x001f);
|
|
|
|
auto previewRLE = Encode::RLE<uint16_t>(preview.data(), preview.size());
|
|
|
|
|
|
|
|
vector<uint8_t> saveState;
|
|
|
|
saveState.resize(3 * sizeof(uint));
|
|
|
|
memory::writel<sizeof(uint)>(saveState.data() + 0 * sizeof(uint), State::Signature);
|
|
|
|
memory::writel<sizeof(uint)>(saveState.data() + 1 * sizeof(uint), serializerRLE.size());
|
|
|
|
memory::writel<sizeof(uint)>(saveState.data() + 2 * sizeof(uint), previewRLE.size());
|
|
|
|
saveState.append(serializerRLE);
|
|
|
|
saveState.append(previewRLE);
|
2018-06-11 04:50:18 +00:00
|
|
|
|
|
|
|
if(gamePath().endsWith("/")) {
|
|
|
|
string location = {statePath(), filename, ".bst"};
|
|
|
|
directory::create(Location::path(location));
|
2018-08-04 11:44:00 +00:00
|
|
|
if(!file::write(location, saveState.data(), saveState.size())) {
|
|
|
|
return showMessage({"Unable to write [", prefix, "] to disk"}), false;
|
|
|
|
}
|
2018-06-11 04:50:18 +00:00
|
|
|
} else {
|
|
|
|
string location = {filename, ".bst"};
|
|
|
|
|
Update to 20180729 release.
byuu wrote:
Sigh ...
asio.hpp needs #include <nall/windows/registry.hpp>
[Since the last WIP, byuu also posted the following message. -Ed.]
ruby drivers have all been updated (but not tested outside of BSD), and
I redesigned the settings window. The driver functionality all exists on
a new "Drivers" panel, the emulator/hack settings go to a
"Configuration" panel, and the video/audio panels lose driver settings.
As does the settings menu and its synchronize options.
I want to start pushing toward a v107 release. Critically, I will need
DirectSound and ALSA to support dynamic rate control. I'd also like to
eliminate the other system manifest.bml files. I need to update the
cheat code database format, and bundle at least a few quark shaders --
although I still need to default to Direct3D on Windows.
Turbo keys would be nice, if it's not too much effort. Aside from
netplay, it's the last significant feature I'm missing.
I think for v107, higan is going to be a bit rough around the edges
compared to bsnes. And I don't think it's practical to finish the bsnes
localization support.
I'm thinking we probably want another WIP to iron out any critical
issues, but this time there should be a feature freeze with the next
WIP.
2018-07-29 13:24:38 +00:00
|
|
|
struct State { string name; time_t timestamp; vector<uint8_t> memory; };
|
2018-06-11 04:50:18 +00:00
|
|
|
vector<State> states;
|
|
|
|
|
|
|
|
Decode::ZIP input;
|
|
|
|
if(input.open(statePath())) {
|
|
|
|
for(auto& file : input.file) {
|
|
|
|
if(!file.name.endsWith(".bst")) continue;
|
|
|
|
if(file.name == location) continue;
|
Update to 20180729 release.
byuu wrote:
Sigh ...
asio.hpp needs #include <nall/windows/registry.hpp>
[Since the last WIP, byuu also posted the following message. -Ed.]
ruby drivers have all been updated (but not tested outside of BSD), and
I redesigned the settings window. The driver functionality all exists on
a new "Drivers" panel, the emulator/hack settings go to a
"Configuration" panel, and the video/audio panels lose driver settings.
As does the settings menu and its synchronize options.
I want to start pushing toward a v107 release. Critically, I will need
DirectSound and ALSA to support dynamic rate control. I'd also like to
eliminate the other system manifest.bml files. I need to update the
cheat code database format, and bundle at least a few quark shaders --
although I still need to default to Direct3D on Windows.
Turbo keys would be nice, if it's not too much effort. Aside from
netplay, it's the last significant feature I'm missing.
I think for v107, higan is going to be a bit rough around the edges
compared to bsnes. And I don't think it's practical to finish the bsnes
localization support.
I'm thinking we probably want another WIP to iron out any critical
issues, but this time there should be a feature freeze with the next
WIP.
2018-07-29 13:24:38 +00:00
|
|
|
states.append({file.name, file.timestamp, input.extract(file)});
|
2018-06-11 04:50:18 +00:00
|
|
|
}
|
|
|
|
}
|
Update to v106r44 release.
byuu says:
Changelog:
- hiro/Windows: use `WS_CLIPSIBLINGS` on Label to prevent resize
drawing issues
- bsnes: correct viewport resizing
- bsnes: speed up window resizing a little bit
- bsnes: fix the cheat editor list enable checkbox
- bsnes: fix the state manager filename display in game ROM mode
- bsnes: fix the state manager save/rename/remove functionality in
game ROM mode
- bsnes: correct path searching for IPS and BPS patches in game ROM
mode
- bsnes: patch BS-X town cartridge to disable play limits
- bsnes: do not load (program,data,expansion).(rom,flash) from disk in
game pak mode
- this is required to support soft-patching and ROM hacks
- bsnes: added speed mode selection (50%, 75%, 100%, 150%, 200%);
maintains proper pitch
- bsnes: added icons to the menubar
- this is particularly useful to tell game ROMs from game paks in
the load recent game menu
- bsnes: added emblem at bottom left of status bar to indicate if a
game is verified or not
- verified means it is in the icarus verified game dump database
- the verified diamond is orange; the unverified diamond is blue
- bsnes: added an option (which defaults to off) to warn when loading
unverified games
- working around a bug in GTK, I have to use the uglier
MessageWindow instead of MessageDialog
- bsnes: added (non-functional) link to <https://doc.byuu.org/bsnes/>
to the help menu
- bsnes: added GUI setting to toggle memory auto-save feature
- bsnes: added GUI setting to toggle capturing a backup save state
when closing the emulator
- bsnes: made auto-saving states on exit an option
- bsnes: added an option to auto-load the auto-saved state on load
- basically, the two combined implements auto-resume
- bsnes: when firmware is missing, offer to take the user to the
online help documentation
- bsnes: added fast PPU option to disable the sprite limit
- increase from 32 items/line + 34 tiles/line to 128 items/line +
128 tiles/line
- technically, 1024 tiles/line are possible with 128 sprites at
64-width
- but this is just a waste of cache locality and worst-case
performance; it'll never happen
Errata:
- hiro/Windows: fallthrough on Canvas `WM_ERASEBKGND` to prevent
startup flicker
2018-06-28 06:28:27 +00:00
|
|
|
input.close();
|
2018-06-11 04:50:18 +00:00
|
|
|
|
|
|
|
Encode::ZIP output{statePath()};
|
|
|
|
for(auto& state : states) {
|
Update to 20180729 release.
byuu wrote:
Sigh ...
asio.hpp needs #include <nall/windows/registry.hpp>
[Since the last WIP, byuu also posted the following message. -Ed.]
ruby drivers have all been updated (but not tested outside of BSD), and
I redesigned the settings window. The driver functionality all exists on
a new "Drivers" panel, the emulator/hack settings go to a
"Configuration" panel, and the video/audio panels lose driver settings.
As does the settings menu and its synchronize options.
I want to start pushing toward a v107 release. Critically, I will need
DirectSound and ALSA to support dynamic rate control. I'd also like to
eliminate the other system manifest.bml files. I need to update the
cheat code database format, and bundle at least a few quark shaders --
although I still need to default to Direct3D on Windows.
Turbo keys would be nice, if it's not too much effort. Aside from
netplay, it's the last significant feature I'm missing.
I think for v107, higan is going to be a bit rough around the edges
compared to bsnes. And I don't think it's practical to finish the bsnes
localization support.
I'm thinking we probably want another WIP to iron out any critical
issues, but this time there should be a feature freeze with the next
WIP.
2018-07-29 13:24:38 +00:00
|
|
|
output.append(state.name, state.memory.data(), state.memory.size(), state.timestamp);
|
2018-06-11 04:50:18 +00:00
|
|
|
}
|
2018-08-04 11:44:00 +00:00
|
|
|
output.append(location, saveState.data(), saveState.size());
|
2018-06-11 04:50:18 +00:00
|
|
|
}
|
|
|
|
|
Update to 20180731 release.
byuu says:
I've completed moving all the class objects from `unique_pointer<T>` to
just T. The one exception is the Emulator::Interface instance. I can
absolutely make that a global object, but only in bsnes where there's
just the one emulation core.
I also moved all the SettingsWindow and ToolsWindow panels out to their
own global objects, and fixed a very difficult bug with GTK TabFrame
controls.
The configuration settings panel is now the emulator settings panel. And
I added some spacing between bold label sections on both the emulator
and driver settings panels.
I gave fixing ComboButtonItem my best shot, given I can't reproduce the
crash. Probably won't work, though.
Also made a very slight consistency improvement to ruby and renamed
driverName() to driver().
...
An important change ... as a result of moving bsnes to global objects,
this means that the constructors for all windows run before the
presentation window is displayed. Before this change, only the
presentation window was constructed first berore displaying it, followed
by the construction of the rest of the GUI windows.
The upside to this is that as soon as you see the main window, the GUI
is ready to go without a period where it's unresponsive.
The downside to this is it takes about 1.5 seconds to show the main
window, compared to around 0.75 seconds before.
I've no intention of changing that back. So if the startup time becomes
a problem, then we'll just have to work on optimizing hiro, so that it
can construct all the global Window objects quicker. The main way to do
that would be to not do calls to the Layout::setGeometry functions for
every widget added, and instead wait until the window is displayed. But
I don't have an easy way to do that, because you want the widget
geometry values to be sane even before the window is visible to help
size certain things.
2018-07-31 10:56:45 +00:00
|
|
|
if(filename.beginsWith("quick/")) presentation.updateStateMenus();
|
2018-08-04 11:44:00 +00:00
|
|
|
stateManager.stateEvent(filename);
|
2018-06-11 04:50:18 +00:00
|
|
|
return showMessage({"Saved [", prefix, "]"}), true;
|
|
|
|
}
|
|
|
|
|
2018-07-02 01:55:42 +00:00
|
|
|
auto Program::saveUndoState() -> bool {
|
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
|
|
|
auto statusTime = this->statusTime;
|
|
|
|
auto statusMessage = this->statusMessage;
|
2018-07-02 01:55:42 +00:00
|
|
|
auto result = saveState("quick/undo");
|
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
|
|
|
this->statusTime = statusTime;
|
|
|
|
this->statusMessage = statusMessage;
|
2018-07-02 01:55:42 +00:00
|
|
|
return result;
|
2018-06-11 04:50:18 +00:00
|
|
|
}
|
2018-06-27 01:56:27 +00:00
|
|
|
|
2018-07-16 06:16:26 +00:00
|
|
|
auto Program::saveRedoState() -> bool {
|
|
|
|
auto statusTime = this->statusTime;
|
|
|
|
auto statusMessage = this->statusMessage;
|
|
|
|
auto result = saveState("quick/redo");
|
|
|
|
this->statusTime = statusTime;
|
|
|
|
this->statusMessage = statusMessage;
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2018-06-27 01:56:27 +00:00
|
|
|
auto Program::removeState(string filename) -> bool {
|
|
|
|
if(!emulator->loaded()) return false;
|
2018-08-04 11:44:00 +00:00
|
|
|
bool result = false;
|
2018-06-27 01:56:27 +00:00
|
|
|
|
|
|
|
if(gamePath().endsWith("/")) {
|
|
|
|
string location = {statePath(), filename, ".bst"};
|
2018-08-04 11:44:00 +00:00
|
|
|
result = file::remove(location);
|
2018-06-27 01:56:27 +00:00
|
|
|
} else {
|
|
|
|
bool found = false;
|
|
|
|
string location = {filename, ".bst"};
|
|
|
|
|
Update to 20180729 release.
byuu wrote:
Sigh ...
asio.hpp needs #include <nall/windows/registry.hpp>
[Since the last WIP, byuu also posted the following message. -Ed.]
ruby drivers have all been updated (but not tested outside of BSD), and
I redesigned the settings window. The driver functionality all exists on
a new "Drivers" panel, the emulator/hack settings go to a
"Configuration" panel, and the video/audio panels lose driver settings.
As does the settings menu and its synchronize options.
I want to start pushing toward a v107 release. Critically, I will need
DirectSound and ALSA to support dynamic rate control. I'd also like to
eliminate the other system manifest.bml files. I need to update the
cheat code database format, and bundle at least a few quark shaders --
although I still need to default to Direct3D on Windows.
Turbo keys would be nice, if it's not too much effort. Aside from
netplay, it's the last significant feature I'm missing.
I think for v107, higan is going to be a bit rough around the edges
compared to bsnes. And I don't think it's practical to finish the bsnes
localization support.
I'm thinking we probably want another WIP to iron out any critical
issues, but this time there should be a feature freeze with the next
WIP.
2018-07-29 13:24:38 +00:00
|
|
|
struct State { string name; time_t timestamp; vector<uint8_t> memory; };
|
2018-06-27 01:56:27 +00:00
|
|
|
vector<State> states;
|
|
|
|
|
|
|
|
Decode::ZIP input;
|
|
|
|
if(input.open(statePath())) {
|
|
|
|
for(auto& file : input.file) {
|
|
|
|
if(file.name == location) { found = true; continue; }
|
Update to 20180729 release.
byuu wrote:
Sigh ...
asio.hpp needs #include <nall/windows/registry.hpp>
[Since the last WIP, byuu also posted the following message. -Ed.]
ruby drivers have all been updated (but not tested outside of BSD), and
I redesigned the settings window. The driver functionality all exists on
a new "Drivers" panel, the emulator/hack settings go to a
"Configuration" panel, and the video/audio panels lose driver settings.
As does the settings menu and its synchronize options.
I want to start pushing toward a v107 release. Critically, I will need
DirectSound and ALSA to support dynamic rate control. I'd also like to
eliminate the other system manifest.bml files. I need to update the
cheat code database format, and bundle at least a few quark shaders --
although I still need to default to Direct3D on Windows.
Turbo keys would be nice, if it's not too much effort. Aside from
netplay, it's the last significant feature I'm missing.
I think for v107, higan is going to be a bit rough around the edges
compared to bsnes. And I don't think it's practical to finish the bsnes
localization support.
I'm thinking we probably want another WIP to iron out any critical
issues, but this time there should be a feature freeze with the next
WIP.
2018-07-29 13:24:38 +00:00
|
|
|
states.append({file.name, file.timestamp, input.extract(file)});
|
2018-06-27 01:56:27 +00:00
|
|
|
}
|
|
|
|
}
|
Update to v106r44 release.
byuu says:
Changelog:
- hiro/Windows: use `WS_CLIPSIBLINGS` on Label to prevent resize
drawing issues
- bsnes: correct viewport resizing
- bsnes: speed up window resizing a little bit
- bsnes: fix the cheat editor list enable checkbox
- bsnes: fix the state manager filename display in game ROM mode
- bsnes: fix the state manager save/rename/remove functionality in
game ROM mode
- bsnes: correct path searching for IPS and BPS patches in game ROM
mode
- bsnes: patch BS-X town cartridge to disable play limits
- bsnes: do not load (program,data,expansion).(rom,flash) from disk in
game pak mode
- this is required to support soft-patching and ROM hacks
- bsnes: added speed mode selection (50%, 75%, 100%, 150%, 200%);
maintains proper pitch
- bsnes: added icons to the menubar
- this is particularly useful to tell game ROMs from game paks in
the load recent game menu
- bsnes: added emblem at bottom left of status bar to indicate if a
game is verified or not
- verified means it is in the icarus verified game dump database
- the verified diamond is orange; the unverified diamond is blue
- bsnes: added an option (which defaults to off) to warn when loading
unverified games
- working around a bug in GTK, I have to use the uglier
MessageWindow instead of MessageDialog
- bsnes: added (non-functional) link to <https://doc.byuu.org/bsnes/>
to the help menu
- bsnes: added GUI setting to toggle memory auto-save feature
- bsnes: added GUI setting to toggle capturing a backup save state
when closing the emulator
- bsnes: made auto-saving states on exit an option
- bsnes: added an option to auto-load the auto-saved state on load
- basically, the two combined implements auto-resume
- bsnes: when firmware is missing, offer to take the user to the
online help documentation
- bsnes: added fast PPU option to disable the sprite limit
- increase from 32 items/line + 34 tiles/line to 128 items/line +
128 tiles/line
- technically, 1024 tiles/line are possible with 128 sprites at
64-width
- but this is just a waste of cache locality and worst-case
performance; it'll never happen
Errata:
- hiro/Windows: fallthrough on Canvas `WM_ERASEBKGND` to prevent
startup flicker
2018-06-28 06:28:27 +00:00
|
|
|
input.close();
|
2018-06-27 01:56:27 +00:00
|
|
|
|
|
|
|
if(states) {
|
|
|
|
Encode::ZIP output{statePath()};
|
|
|
|
for(auto& state : states) {
|
Update to 20180729 release.
byuu wrote:
Sigh ...
asio.hpp needs #include <nall/windows/registry.hpp>
[Since the last WIP, byuu also posted the following message. -Ed.]
ruby drivers have all been updated (but not tested outside of BSD), and
I redesigned the settings window. The driver functionality all exists on
a new "Drivers" panel, the emulator/hack settings go to a
"Configuration" panel, and the video/audio panels lose driver settings.
As does the settings menu and its synchronize options.
I want to start pushing toward a v107 release. Critically, I will need
DirectSound and ALSA to support dynamic rate control. I'd also like to
eliminate the other system manifest.bml files. I need to update the
cheat code database format, and bundle at least a few quark shaders --
although I still need to default to Direct3D on Windows.
Turbo keys would be nice, if it's not too much effort. Aside from
netplay, it's the last significant feature I'm missing.
I think for v107, higan is going to be a bit rough around the edges
compared to bsnes. And I don't think it's practical to finish the bsnes
localization support.
I'm thinking we probably want another WIP to iron out any critical
issues, but this time there should be a feature freeze with the next
WIP.
2018-07-29 13:24:38 +00:00
|
|
|
output.append(state.name, state.memory.data(), state.memory.size(), state.timestamp);
|
2018-06-27 01:56:27 +00:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
//remove .bsz file if there are no states left in the archive
|
|
|
|
file::remove(statePath());
|
|
|
|
}
|
|
|
|
|
2018-08-04 11:44:00 +00:00
|
|
|
result = found;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(result) {
|
|
|
|
presentation.updateStateMenus();
|
|
|
|
stateManager.stateEvent(filename);
|
2018-06-27 01:56:27 +00:00
|
|
|
}
|
2018-08-04 11:44:00 +00:00
|
|
|
return result;
|
2018-06-27 01:56:27 +00:00
|
|
|
}
|
|
|
|
|
2018-08-04 11:44:00 +00:00
|
|
|
auto Program::renameState(string from_, string to_) -> bool {
|
2018-06-27 01:56:27 +00:00
|
|
|
if(!emulator->loaded()) return false;
|
2018-08-04 11:44:00 +00:00
|
|
|
bool result = false;
|
2018-06-27 01:56:27 +00:00
|
|
|
|
|
|
|
if(gamePath().endsWith("/")) {
|
2018-08-04 11:44:00 +00:00
|
|
|
string from = {statePath(), from_, ".bst"};
|
|
|
|
string to = {statePath(), to_, ".bst"};
|
|
|
|
result = file::rename(from, to);
|
2018-06-27 01:56:27 +00:00
|
|
|
} else {
|
|
|
|
bool found = false;
|
2018-08-04 11:44:00 +00:00
|
|
|
string from = {from_, ".bst"};
|
|
|
|
string to = {to_, ".bst"};
|
2018-06-27 01:56:27 +00:00
|
|
|
|
Update to 20180729 release.
byuu wrote:
Sigh ...
asio.hpp needs #include <nall/windows/registry.hpp>
[Since the last WIP, byuu also posted the following message. -Ed.]
ruby drivers have all been updated (but not tested outside of BSD), and
I redesigned the settings window. The driver functionality all exists on
a new "Drivers" panel, the emulator/hack settings go to a
"Configuration" panel, and the video/audio panels lose driver settings.
As does the settings menu and its synchronize options.
I want to start pushing toward a v107 release. Critically, I will need
DirectSound and ALSA to support dynamic rate control. I'd also like to
eliminate the other system manifest.bml files. I need to update the
cheat code database format, and bundle at least a few quark shaders --
although I still need to default to Direct3D on Windows.
Turbo keys would be nice, if it's not too much effort. Aside from
netplay, it's the last significant feature I'm missing.
I think for v107, higan is going to be a bit rough around the edges
compared to bsnes. And I don't think it's practical to finish the bsnes
localization support.
I'm thinking we probably want another WIP to iron out any critical
issues, but this time there should be a feature freeze with the next
WIP.
2018-07-29 13:24:38 +00:00
|
|
|
struct State { string name; time_t timestamp; vector<uint8_t> memory; };
|
2018-06-27 01:56:27 +00:00
|
|
|
vector<State> states;
|
|
|
|
|
|
|
|
Decode::ZIP input;
|
|
|
|
if(input.open(statePath())) {
|
|
|
|
for(auto& file : input.file) {
|
|
|
|
if(file.name == from) { found = true; file.name = to; }
|
Update to 20180729 release.
byuu wrote:
Sigh ...
asio.hpp needs #include <nall/windows/registry.hpp>
[Since the last WIP, byuu also posted the following message. -Ed.]
ruby drivers have all been updated (but not tested outside of BSD), and
I redesigned the settings window. The driver functionality all exists on
a new "Drivers" panel, the emulator/hack settings go to a
"Configuration" panel, and the video/audio panels lose driver settings.
As does the settings menu and its synchronize options.
I want to start pushing toward a v107 release. Critically, I will need
DirectSound and ALSA to support dynamic rate control. I'd also like to
eliminate the other system manifest.bml files. I need to update the
cheat code database format, and bundle at least a few quark shaders --
although I still need to default to Direct3D on Windows.
Turbo keys would be nice, if it's not too much effort. Aside from
netplay, it's the last significant feature I'm missing.
I think for v107, higan is going to be a bit rough around the edges
compared to bsnes. And I don't think it's practical to finish the bsnes
localization support.
I'm thinking we probably want another WIP to iron out any critical
issues, but this time there should be a feature freeze with the next
WIP.
2018-07-29 13:24:38 +00:00
|
|
|
states.append({file.name, file.timestamp, input.extract(file)});
|
2018-06-27 01:56:27 +00:00
|
|
|
}
|
|
|
|
}
|
Update to v106r44 release.
byuu says:
Changelog:
- hiro/Windows: use `WS_CLIPSIBLINGS` on Label to prevent resize
drawing issues
- bsnes: correct viewport resizing
- bsnes: speed up window resizing a little bit
- bsnes: fix the cheat editor list enable checkbox
- bsnes: fix the state manager filename display in game ROM mode
- bsnes: fix the state manager save/rename/remove functionality in
game ROM mode
- bsnes: correct path searching for IPS and BPS patches in game ROM
mode
- bsnes: patch BS-X town cartridge to disable play limits
- bsnes: do not load (program,data,expansion).(rom,flash) from disk in
game pak mode
- this is required to support soft-patching and ROM hacks
- bsnes: added speed mode selection (50%, 75%, 100%, 150%, 200%);
maintains proper pitch
- bsnes: added icons to the menubar
- this is particularly useful to tell game ROMs from game paks in
the load recent game menu
- bsnes: added emblem at bottom left of status bar to indicate if a
game is verified or not
- verified means it is in the icarus verified game dump database
- the verified diamond is orange; the unverified diamond is blue
- bsnes: added an option (which defaults to off) to warn when loading
unverified games
- working around a bug in GTK, I have to use the uglier
MessageWindow instead of MessageDialog
- bsnes: added (non-functional) link to <https://doc.byuu.org/bsnes/>
to the help menu
- bsnes: added GUI setting to toggle memory auto-save feature
- bsnes: added GUI setting to toggle capturing a backup save state
when closing the emulator
- bsnes: made auto-saving states on exit an option
- bsnes: added an option to auto-load the auto-saved state on load
- basically, the two combined implements auto-resume
- bsnes: when firmware is missing, offer to take the user to the
online help documentation
- bsnes: added fast PPU option to disable the sprite limit
- increase from 32 items/line + 34 tiles/line to 128 items/line +
128 tiles/line
- technically, 1024 tiles/line are possible with 128 sprites at
64-width
- but this is just a waste of cache locality and worst-case
performance; it'll never happen
Errata:
- hiro/Windows: fallthrough on Canvas `WM_ERASEBKGND` to prevent
startup flicker
2018-06-28 06:28:27 +00:00
|
|
|
input.close();
|
2018-06-27 01:56:27 +00:00
|
|
|
|
|
|
|
Encode::ZIP output{statePath()};
|
|
|
|
for(auto& state : states) {
|
Update to 20180729 release.
byuu wrote:
Sigh ...
asio.hpp needs #include <nall/windows/registry.hpp>
[Since the last WIP, byuu also posted the following message. -Ed.]
ruby drivers have all been updated (but not tested outside of BSD), and
I redesigned the settings window. The driver functionality all exists on
a new "Drivers" panel, the emulator/hack settings go to a
"Configuration" panel, and the video/audio panels lose driver settings.
As does the settings menu and its synchronize options.
I want to start pushing toward a v107 release. Critically, I will need
DirectSound and ALSA to support dynamic rate control. I'd also like to
eliminate the other system manifest.bml files. I need to update the
cheat code database format, and bundle at least a few quark shaders --
although I still need to default to Direct3D on Windows.
Turbo keys would be nice, if it's not too much effort. Aside from
netplay, it's the last significant feature I'm missing.
I think for v107, higan is going to be a bit rough around the edges
compared to bsnes. And I don't think it's practical to finish the bsnes
localization support.
I'm thinking we probably want another WIP to iron out any critical
issues, but this time there should be a feature freeze with the next
WIP.
2018-07-29 13:24:38 +00:00
|
|
|
output.append(state.name, state.memory.data(), state.memory.size(), state.timestamp);
|
2018-06-27 01:56:27 +00:00
|
|
|
}
|
|
|
|
|
2018-08-04 11:44:00 +00:00
|
|
|
result = found;
|
2018-06-27 01:56:27 +00:00
|
|
|
}
|
2018-08-04 11:44:00 +00:00
|
|
|
|
|
|
|
if(result) {
|
|
|
|
stateManager.stateEvent(to_);
|
|
|
|
}
|
|
|
|
return result;
|
2018-06-27 01:56:27 +00:00
|
|
|
}
|