Update to v095r03 release and icarus 20151107.

byuu says:

Note: you will need the new icarus (and please use the "no manifest"
system) to run GBA games with this WIP.

Changelog:
- fixed caching of r(d) to pass armwrestler tests [Jonas Quinn]
- DMA to/from GBA BIOS should fail [Cydrak]
- fixed sign-extend and rotate on ldrs instructions [Cydrak]
- fixed 8-bit SRAM reading/writing [byuu]
- refactored GBA/cartridge
  - cartridge/rom,ram.type is now cartridge/mrom,sram,eeprom,flash
  - things won't crash horribly if you specify a RAM size larger than
    the largest legal size in the manifest
  - specialized MROM / SRAM classes replace all the shared read/write
    functions that didn't work right anyway
- there's a new ruby/video.glx2 driver, which is not enabled by default
  - use this if you are running Linux/BSD, but don't have OpenGL 3.2 yet
  - I'm not going to support OpenGL2 on Windows/OS X, because these OSes
    don't ship ancient video card drivers
- probably more. What am I, clairvoyant? :P

For endrift's tests, this gets us to 1348/1552 memory and 1016/1260
timing. Overall, this puts us back in second place. Only no$ is ahead
on memory, but bgba is even more ahead on timing.
This commit is contained in:
Tim Allen
2015-11-08 20:09:18 +11:00
parent b42ab2fcb3
commit 0fe55e3f5b
32 changed files with 607 additions and 280 deletions

View File

@@ -13,11 +13,23 @@ struct ManagedNode {
ManagedNode(const string& name, const string& value) : _name(name), _value(value) {}
auto clone() const -> SharedNode {
SharedNode clone(new ManagedNode(_name, _value));
for(auto& child : _children) clone->_children.append(child->clone());
SharedNode clone{new ManagedNode(_name, _value)};
for(auto& child : _children) {
clone->_children.append(child->clone());
}
return clone;
}
auto copy(SharedNode source) -> void {
_name = source->_name;
_value = source->_value;
_metadata = source->_metadata;
_children.reset();
for(auto child : source->_children) {
_children.append(child->clone());
}
}
protected:
string _name;
string _value;
@@ -40,6 +52,7 @@ struct Node {
auto unique() const -> bool { return shared.unique(); }
auto clone() const -> Node { return shared->clone(); }
auto copy(Node source) -> void { return shared->copy(source.shared); }
explicit operator bool() const { return shared->_name || shared->_children; }
auto name() const -> string { return shared->_name; }
@@ -50,8 +63,8 @@ struct Node {
auto integer() const -> intmax_t { return text().integer(); }
auto decimal() const -> uintmax_t { return text().decimal(); }
auto setName(const string& name = "") -> void { shared->_name = name; }
auto setValue(const string& value = "") -> void { shared->_value = value; }
auto setName(const string& name = "") -> Node& { shared->_name = name; return *this; }
auto setValue(const string& value = "") -> Node& { shared->_value = value; return *this; }
auto reset() -> void { shared->_children.reset(); }
auto size() const -> unsigned { return shared->_children.size(); }
@@ -67,16 +80,6 @@ struct Node {
return false;
}
auto at(unsigned position) const -> Node {
if(position >= size()) return {};
return shared->_children[position];
}
auto swap(unsigned x, unsigned y) -> bool {
if(x >= size() || y >= size()) return false;
return std::swap(shared->_children[x], shared->_children[y]), true;
}
auto insert(unsigned position, const Node& node) -> bool {
if(position > size()) return false; //used > instead of >= to allow indexed-equivalent of append()
return shared->_children.insert(position, node.shared), true;
@@ -87,8 +90,26 @@ struct Node {
return shared->_children.remove(position), true;
}
auto operator()(const string& path) -> Node { return shared->_create(path); }
auto swap(unsigned x, unsigned y) -> bool {
if(x >= size() || y >= size()) return false;
return std::swap(shared->_children[x], shared->_children[y]), true;
}
auto sort(function<bool (Node, Node)> comparator = [](auto x, auto y) {
return string::compare(x.shared->_name, y.shared->_name) < 0;
}) -> void {
nall::sort(shared->_children.data(), shared->_children.size(), [&](auto x, auto y) {
return comparator(x, y); //this call converts SharedNode objects to Node objects
});
}
auto operator[](signed position) -> Node {
if(position >= size()) return {};
return shared->_children[position];
}
auto operator[](const string& path) const -> Node { return shared->_lookup(path); }
auto operator()(const string& path) -> Node { return shared->_create(path); }
auto find(const string& query) const -> vector<Node> { return shared->_find(query); }
struct iterator {