Skip to content

Commit 483c578

Browse files
author
byuu
committed
v110
Final release.
1 parent c45c82e commit 483c578

File tree

8 files changed

+43
-11
lines changed

8 files changed

+43
-11
lines changed

higan/GNUmakefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#target := higan
2-
target := byuu
1+
target := higan
2+
#target := byuu
33
build := performance
44
openmp := false
55
local := true

higan/emulator/emulator.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ namespace higan {
4747

4848
namespace higan {
4949
static const string Name = "higan";
50-
static const string Version = "109.4";
50+
static const string Version = "110";
5151
static const string Copyright = "byuu";
5252
static const string License = "GPLv3";
5353
static const string Website = "https://byuu.org";

higan/pce/cartridge/cartridge.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ auto Cartridge::unload() -> void {
2121
port = {};
2222
}
2323

24-
//most PC Engine HuCards lack save RAM on them due to the card size and cost savings.
25-
//the PC Engine CD adds 2KB of backup RAM that some HuCard games can use for saves.
26-
//however, all games must share this small amount of RAM.
27-
//since this is an emulator, we can make this process nicer by storing BRAM per-game.
28-
2924
auto Cartridge::connect(Node::Peripheral with) -> void {
3025
node = Node::append<Node::Peripheral>(port, with, interface->name());
3126
node->setManifest([&] { return information.manifest; });
@@ -48,6 +43,10 @@ auto Cartridge::connect(Node::Peripheral with) -> void {
4843
if(!board) board = new Board::Interface;
4944
board->load(document);
5045

46+
if(auto fp = platform->open(node, "save.ram", File::Read)) {
47+
pcd.bram.load(fp);
48+
}
49+
5150
power();
5251
}
5352

@@ -61,6 +60,10 @@ auto Cartridge::save() -> void {
6160
if(!node) return;
6261
auto document = BML::unserialize(information.manifest);
6362
board->save(document);
63+
64+
if(auto fp = platform->open(node, "save.ram", File::Write)) {
65+
pcd.bram.save(fp);
66+
}
6467
}
6568

6669
auto Cartridge::power() -> void {

higan/target-byuu/byuu.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace ruby {
1717

1818
namespace byuu {
1919
static const string Name = "byuu";
20-
static const string Version = "3.4";
20+
static const string Version = "4";
2121
static const string Copyright = "byuu";
2222
static const string License = "GPLv3";
2323
static const string Website = "https://byuu.org";

higan/target-byuu/program/platform.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ auto Program::event(higan::Event event) -> void {
2828

2929
auto Program::log(string_view message) -> void {
3030
if(!traceLogger.fp) {
31-
string datetime = chrono::local::datetime().replace("-", "").replace(":", "").replace(" ", "-");
32-
string location = {Location::notsuffix(emulator->game.location), "-", datetime, ".log"};
31+
auto datetime = chrono::local::datetime().replace("-", "").replace(":", "").replace(" ", "-");
32+
auto location = emulator->locate({emulator->game.location, "-", datetime, ".log"}, ".log", settings.paths.traces);
3333
traceLogger.fp.open(location, file::mode::write);
3434
}
3535
traceLogger.fp.print(message);

higan/target-byuu/settings/paths.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,22 @@ auto PathSettings::construct() -> void {
3434
refresh();
3535
});
3636

37+
tracesLabel.setText("Trace Logs").setFont(Font().setBold());
38+
tracesPath.setEditable(false);
39+
tracesAssign.setText("Assign ...").onActivate([&] {
40+
BrowserDialog dialog;
41+
dialog.setTitle("Select Traces Path");
42+
dialog.setPath(Path::desktop());
43+
if(auto location = program.selectFolder(dialog)) {
44+
settings.paths.traces = location;
45+
refresh();
46+
}
47+
});
48+
tracesReset.setText("Reset").onActivate([&] {
49+
settings.paths.traces = "";
50+
refresh();
51+
});
52+
3753
firmwareLabel.setText("DSP Firmware").setFont(Font().setBold());
3854
firmwarePath.setEditable(false);
3955
firmwareAssign.setText("Assign ...").onActivate([&] {
@@ -66,6 +82,12 @@ auto PathSettings::refresh() -> void {
6682
patchesPath.setText("(same as game path)").setForegroundColor({80, 80, 80});
6783
}
6884

85+
if(settings.paths.traces) {
86+
tracesPath.setText(settings.paths.traces).setForegroundColor();
87+
} else {
88+
tracesPath.setText("(same as game path)").setForegroundColor({80, 80, 80});
89+
}
90+
6991
if(settings.paths.firmware) {
7092
firmwarePath.setText(settings.paths.firmware).setForegroundColor();
7193
} else {

higan/target-byuu/settings/settings.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ auto Settings::process(bool load) -> void {
9292

9393
bind(string, "Paths/Saves", paths.saves);
9494
bind(string, "Paths/Patches", paths.patches);
95+
bind(string, "Paths/Traces", paths.traces);
9596
bind(string, "Paths/Firmware", paths.firmware);
9697

9798
for(uint index : range(9)) {

higan/target-byuu/settings/settings.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ struct Settings : Markup::Node {
6363
struct Paths {
6464
string saves;
6565
string patches;
66+
string traces;
6667
string firmware;
6768
} paths;
6869

@@ -211,6 +212,11 @@ struct PathSettings : VerticalLayout {
211212
LineEdit patchesPath{&patchesLayout, Size{~0, 0}};
212213
Button patchesAssign{&patchesLayout, Size{80, 0}};
213214
Button patchesReset{&patchesLayout, Size{80, 0}};
215+
Label tracesLabel{this, Size{~0, 0}, 2};
216+
HorizontalLayout tracesLayout{this, Size{~0, 0}};
217+
LineEdit tracesPath{&tracesLayout, Size{~0, 0}};
218+
Button tracesAssign{&tracesLayout, Size{80, 0}};
219+
Button tracesReset{&tracesLayout, Size{80, 0}};
214220
Label firmwareLabel{this, Size{~0, 0}, 2};
215221
HorizontalLayout firmwareLayout{this, Size{~0, 0}};
216222
LineEdit firmwarePath{&firmwareLayout, Size{~0, 0}};

0 commit comments

Comments
 (0)