Skip to content

Commit

Permalink
Update to v106r168 release.
Browse files Browse the repository at this point in the history
byuu says:

added viewport input capturing for windows. updated ruby (opengl 2.0, opengl
3.2, direct3d 9.0 only so far) to support width,height on the output() call,
which lets me center video inside a viewport widget. added center,scale,stretch
video output modes. added aspect correction setting. hotkey bindings are now
saved between runs. added fast forward hotkey. replaced alternating row colors
with column colors for input mappings. added batched mapping assignments to
inputs and hotkeys. fixed the video output not being black on startup with
windows and gtk3. added mouse cursor changing support to hiro for windows, gtk
and qt. the resize grips and about dialog hyperlink get appropriate cursors now.
the input driver now fully runs [as of] startup for the sake of hotkeys.
activating menu items that display panels will reshow a hidden panel bar now.
resored the ability to get game titles from every higan/icarus core. restored
the framerate counter. fixed a bug with nall::Location::pathname() returning a
blank string when there was no suffix on a filename. added video shader support
(needs testing with the new output(width, height) support.) lots of other
polishing work.
  • Loading branch information
Screwtapello committed Jun 25, 2019
1 parent 327a19d commit fe2296b
Show file tree
Hide file tree
Showing 172 changed files with 1,455 additions and 843 deletions.
2 changes: 2 additions & 0 deletions higan/cv/cartridge/cartridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ auto Cartridge::connect(Node::Peripheral with) -> void {
}

auto document = BML::unserialize(information.metadata);
information.name = document["game/label"].text();
information.region = document["game/region"].text();

if(auto memory = document["game/board/memory(type=ROM,content=Program)"]) {
rom.allocate(memory["size"].natural());
Expand Down
2 changes: 2 additions & 0 deletions higan/cv/cartridge/cartridge.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ struct Cartridge {
Node::Peripheral node;

inline auto metadata() const -> string { return information.metadata; }
inline auto name() const -> string { return information.name; }
inline auto region() const -> string { return information.region; }

//cartridge.cpp
Expand All @@ -19,6 +20,7 @@ struct Cartridge {
//private:
struct Information {
string metadata;
string name;
string region;
} information;

Expand Down
8 changes: 8 additions & 0 deletions higan/cv/interface/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ namespace higan::ColecoVision {

Interface* interface = nullptr;

auto AbstractInterface::game() -> string {
if(cartridge.node) {
return cartridge.name();
}

return "(no cartridge connected)";
}

auto AbstractInterface::root() -> Node::Object {
return system.node;
}
Expand Down
2 changes: 2 additions & 0 deletions higan/cv/interface/interface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ namespace higan::ColecoVision {
extern Interface* interface;

struct AbstractInterface : Interface {
auto game() -> string override;

auto root() -> Node::Object override;
auto load(string tree = {}) -> void override;
auto power() -> void override;
Expand Down
4 changes: 2 additions & 2 deletions higan/cv/system/video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ auto System::Video::load(Node::Object parent, Node::Object from) -> void {
node->type = "CRT";
node->width = 256;
node->height = 192;
node->scaleX = 2.0;
node->scaleY = 2.0;
node->scaleX = 1.0;
node->scaleY = 1.0;
node->colors = 1 << 4;
node->color = [&](auto index) { return color(index); };
}
Expand Down
4 changes: 2 additions & 2 deletions higan/emulator/emulator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ using namespace nall;

namespace higan {
static const string Name = "higan";
static const string Version = "106.167";
static const string Version = "106.168";
static const string Author = "byuu";
static const string License = "GPLv3";
static const string Website = "https://byuu.org/";

//incremented only when serialization format changes
static const string SerializerVersion = "106.63";
static const string SerializerVersion = "106";

namespace Constants {
namespace Colorburst {
Expand Down
2 changes: 1 addition & 1 deletion higan/emulator/interface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ struct Interface {

//information
virtual auto name() -> string { return {}; }
virtual auto title() -> string { return {}; }
virtual auto game() -> string { return {}; }

//system interface
virtual auto root() -> Node::Object { return {}; }
Expand Down
4 changes: 4 additions & 0 deletions higan/fc/cartridge/cartridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ auto Cartridge::connect(Node::Peripheral with) -> void {
information.metadata = fp->reads();
}

auto document = BML::unserialize(information.metadata);
information.name = document["game/label"].text();
information.region = document["game/region"].text();

Board::load(information.metadata); //this call will set Cartridge::board if successful
power();
if(fds.present) {
Expand Down
2 changes: 2 additions & 0 deletions higan/fc/cartridge/cartridge.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ struct Cartridge : Thread {

inline auto rate() const -> uint { return Region::PAL() ? 16 : 12; }
inline auto metadata() const -> string { return information.metadata; }
inline auto name() const -> string { return information.name; }
inline auto region() const -> string { return information.region; }

//cartridge.cpp
Expand All @@ -24,6 +25,7 @@ struct Cartridge : Thread {

struct Information {
string metadata;
string name;
string region;
} information;

Expand Down
1 change: 1 addition & 0 deletions higan/fc/fds/fds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ auto FDS::connect(Node::Peripheral with) -> void {
} else return;

auto document = BML::unserialize(information.metadata);
information.name = document["game/label"].text();

if(auto fp = platform->open(node, "disk1.sideA", File::Read, File::Required)) {
disk1.sideA.allocate(fp->size());
Expand Down
4 changes: 4 additions & 0 deletions higan/fc/fds/fds.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ struct FDS {
Node::String state;
uint1 present;

inline auto metadata() const -> string { return information.metadata; }
inline auto name() const -> string { return information.name; }

struct Disk {
Memory::Writable<uint8> sideA;
Memory::Writable<uint8> sideB;
Expand Down Expand Up @@ -41,6 +44,7 @@ struct FDS {
private:
struct Information {
string metadata;
string name;
} information;

FDSDrive drive;
Expand Down
12 changes: 12 additions & 0 deletions higan/fc/interface/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ namespace higan::Famicom {

Interface* interface = nullptr;

auto FamicomInterface::game() -> string {
if(fds.node) {
return fds.name();
}

if(cartridge.node) {
return cartridge.name();
}

return "(no cartridge connected)";
}

auto FamicomInterface::root() -> Node::Object {
return system.node;
}
Expand Down
1 change: 1 addition & 0 deletions higan/fc/interface/interface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ extern Interface* interface;

struct FamicomInterface : Interface {
auto name() -> string override { return "Famicom"; }
auto game() -> string override;

auto root() -> Node::Object override;
auto load(string tree = {}) -> void override;
Expand Down
4 changes: 2 additions & 2 deletions higan/fc/system/video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ auto System::Video::load(Node::Object parent, Node::Object from) -> void {
node->type = "CRT";
node->width = 256;
node->height = 240;
node->scaleX = 2.0;
node->scaleY = 2.0;
node->scaleX = 1.0;
node->scaleY = 1.0;
node->aspectX = 8.0;
node->aspectY = 7.0;
node->colors = 1 << 9;
Expand Down
8 changes: 6 additions & 2 deletions higan/gb/interface/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ namespace higan::GameBoy {
Interface* interface = nullptr;
SuperGameBoyInterface* superGameBoy = nullptr;

auto AbstractInterface::title() -> string {
return cartridge.name();
auto AbstractInterface::game() -> string {
if(cartridge.node) {
return cartridge.name();
}

return "(no cartridge connected)";
}

auto AbstractInterface::root() -> Node::Object {
Expand Down
2 changes: 1 addition & 1 deletion higan/gb/interface/interface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace higan::GameBoy {
extern Interface* interface;

struct AbstractInterface : Interface {
auto title() -> string override;
auto game() -> string override;

auto root() -> Node::Object override;
auto load(string tree = {}) -> void override;
Expand Down
4 changes: 2 additions & 2 deletions higan/gb/system/video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ auto System::Video::load(Node::Object parent, Node::Object from) -> void {
node->type = "LCD";
node->width = 160;
node->height = 144;
node->scaleX = 3.0;
node->scaleY = 3.0;
node->scaleX = 1.0;
node->scaleY = 1.0;
if(GameBoy::Model::GameBoy()) {
node->colors = 1 << 2;
node->color = [&](auto index) { return colorGameBoy(index); };
Expand Down
3 changes: 2 additions & 1 deletion higan/gba/cartridge/cartridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ auto Cartridge::connect(Node::Peripheral with) -> void {

if(auto fp = platform->open(node, "metadata.bml", File::Read, File::Required)) {
information.metadata = fp->reads();
} else return;
}

auto document = BML::unserialize(information.metadata);
information.name = document["game/label"].text();

hasSRAM = false;
hasEEPROM = false;
Expand Down
2 changes: 2 additions & 0 deletions higan/gba/cartridge/cartridge.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ struct Cartridge {
#include "memory.hpp"

inline auto metadata() const -> string { return information.metadata; }
inline auto name() const -> string { return information.name; }

//cartridge.cpp
Cartridge();
Expand All @@ -25,6 +26,7 @@ struct Cartridge {
private:
struct {
string metadata;
string name;
} information;

bool hasSRAM = false;
Expand Down
8 changes: 8 additions & 0 deletions higan/gba/interface/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ namespace higan::GameBoyAdvance {

Interface* interface = nullptr;

auto GameBoyAdvanceInterface::game() -> string {
if(cartridge.node) {
return cartridge.name();
}

return "(no cartridge connected)";
}

auto GameBoyAdvanceInterface::root() -> Node::Object {
return system.node;
}
Expand Down
1 change: 1 addition & 0 deletions higan/gba/interface/interface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ extern Interface* interface;

struct GameBoyAdvanceInterface : Interface {
auto name() -> string override { return "Game Boy Advance"; }
auto game() -> string override;

auto root() -> Node::Object override;
auto load(string tree = {}) -> void override;
Expand Down
4 changes: 2 additions & 2 deletions higan/gba/system/video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ auto System::Video::load(Node::Object parent, Node::Object from) -> void {
node->type = "CRT";
node->width = 240;
node->height = 160;
node->scaleX = 3.0;
node->scaleY = 3.0;
node->scaleX = 1.0;
node->scaleY = 1.0;
node->colors = 1 << 15;
node->color = [&](auto index) { return color(index); };

Expand Down
1 change: 1 addition & 0 deletions higan/md/cartridge/cartridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ auto Cartridge::connect(Node::Peripheral with) -> void {
if(!loadRAM(wram, document["game/board/memory(type=RAM,content=Save)"])) wram.reset();
if(!loadRAM(bram, document["game/board/memory(type=RAM,content=Save)"])) bram.reset();

information.name = document["game/label"].text();
information.regions = document["game/region"].text().split(",").strip();
information.bootable = (bool)document["game/bootable"];

Expand Down
2 changes: 2 additions & 0 deletions higan/md/cartridge/cartridge.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ struct Cartridge {
Memory::Writable< uint8> bram; // 8-bit save RAM

inline auto metadata() const -> string { return information.metadata; }
inline auto name() const -> string { return information.name; }
inline auto regions() const -> vector<string> { return information.regions; }
inline auto bootable() const -> boolean { return information.bootable; } //CART_IN line

Expand Down Expand Up @@ -49,6 +50,7 @@ struct Cartridge {

struct Information {
string metadata;
string name;
vector<string> regions;
boolean bootable;
} information;
Expand Down
2 changes: 1 addition & 1 deletion higan/md/expansion/expansion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ auto Expansion::connect(Node::Peripheral with) -> void {
}

auto document = BML::unserialize(information.metadata);

information.name = document["game/label"].text();
information.regions = document["game/region"].text().split(",").strip();

mcd.load(node, with);
Expand Down
2 changes: 2 additions & 0 deletions higan/md/expansion/expansion.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ struct Expansion {
Node::Peripheral node;

inline auto metadata() const -> string { return information.metadata; }
inline auto name() const -> string { return information.name; }
inline auto regions() const -> vector<string> { return information.regions; }

auto load(Node::Object, Node::Object) -> void;
Expand All @@ -27,6 +28,7 @@ struct Expansion {

struct Information {
string metadata;
string name;
vector<string> regions;
};

Expand Down
12 changes: 12 additions & 0 deletions higan/md/interface/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ namespace higan::MegaDrive {

Interface* interface = nullptr;

auto MegaDriveInterface::game() -> string {
if(expansion.node && (!cartridge.node || !cartridge.bootable())) {
return expansion.name();
}

if(cartridge.node && cartridge.bootable()) {
return cartridge.name();
}

return "(no cartridge connected)";
}

auto MegaDriveInterface::root() -> Node::Object {
return system.node;
}
Expand Down
1 change: 1 addition & 0 deletions higan/md/interface/interface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ extern Interface* interface;

struct MegaDriveInterface : Interface {
auto name() -> string override { return "Mega Drive"; }
auto game() -> string override;

auto root() -> Node::Object override;
auto load(string tree = {}) -> void override;
Expand Down
4 changes: 2 additions & 2 deletions higan/md/system/video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ auto System::Video::load(Node::Object parent, Node::Object from) -> void {
node->type = "CRT";
node->width = 1280;
node->height = 480;
node->scaleX = 0.5;
node->scaleY = 1.0;
node->scaleX = 0.25;
node->scaleY = 0.50;
node->colors = 3 * (1 << 9);
node->color = [&](auto index) { return color(index); };
}
Expand Down
1 change: 1 addition & 0 deletions higan/ms/cartridge/cartridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ auto Cartridge::connect(Node::Peripheral with) -> void {
}

auto document = BML::unserialize(information.metadata);
information.name = document["game/label"].text();

if(auto memory = document["game/board/memory(type=ROM,content=Program)"]) {
rom.allocate(memory["size"].natural());
Expand Down
2 changes: 2 additions & 0 deletions higan/ms/cartridge/cartridge.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ struct Cartridge {
Node::Peripheral node;

inline auto metadata() const -> string { return information.metadata; }
inline auto name() const -> string { return information.name; }
inline auto region() const -> string { return information.region; }

//cartridge.cpp
Expand All @@ -23,6 +24,7 @@ struct Cartridge {
//private:
struct Information {
string metadata;
string name;
string region;
} information;

Expand Down
8 changes: 8 additions & 0 deletions higan/ms/interface/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ namespace higan::MasterSystem {

Interface* interface = nullptr;

auto AbstractInterface::game() -> string {
if(cartridge.node) {
return cartridge.name();
}

return "(no cartridge connected)";
}

auto AbstractInterface::root() -> Node::Object {
return system.node;
}
Expand Down
Loading

0 comments on commit fe2296b

Please sign in to comment.