Update to v094r17 release.

byuu says:

This updates higan to use the new Markup::Node changes. This is a really
big change, and one slight typo anywhere could break certain classes of
games from playing.

I don't have ananke hooked up again yet, so I don't have the ability to
test this much. If anyone with some v094 game folders wouldn't mind
testing, I'd help out a great deal.

I'm most concerned about testing one of each SNES special chip game.
Most notably, systems like the SA-1, HitachiDSP and NEC-DSP were using
the fancier lookups, eg node["rom[0]/name"], which I had to convert to
a rather ugly node["rom"].at(0)["name"], which I'm fairly confident
won't work. I'm going to blame that on the fumes from the shelves I just
stained >.> Might work with node.find("rom[0]/name")(0) though ...? But
so ugly ... ugh.

That aside, this WIP adds the accuracy-PPU inlining, so the accuracy
profile should run around 7.5% faster than before.
This commit is contained in:
Tim Allen
2015-05-02 23:05:46 +10:00
parent c335ee9d80
commit 39ca8a2fab
45 changed files with 709 additions and 566 deletions

View File

@@ -14,14 +14,14 @@ string Cartridge::title() {
void Cartridge::load() {
interface->loadRequest(ID::Manifest, "manifest.bml");
auto document = Markup::Document(information.markup);
auto document = BML::unserialize(information.markup);
information.title = document["information/title"].text();
unsigned rom_size = 0;
if(document["cartridge/rom"].exists()) {
if(document["cartridge/rom"]) {
auto info = document["cartridge/rom"];
interface->loadRequest(ID::ROM, info["name"].data);
rom_size = numeral(info["size"].data);
interface->loadRequest(ID::ROM, info["name"].text());
rom_size = info["size"].decimal();
for(unsigned addr = rom_size; addr < rom.size; addr++) {
rom.data[addr] = rom.data[Bus::mirror(addr, rom_size)];
}
@@ -31,40 +31,40 @@ void Cartridge::load() {
has_eeprom = false;
has_flashrom = false;
if(document["cartridge/ram"].exists()) {
if(document["cartridge/ram"]) {
auto info = document["cartridge/ram"];
if(info["type"].data == "SRAM" || info["type"].data == "FRAM") {
if(info["type"].text() == "SRAM" || info["type"].text() == "FRAM") {
has_sram = true;
ram.size = numeral(info["size"].data);
ram.size = info["size"].decimal();
ram.mask = ram.size - 1;
for(unsigned n = 0; n < ram.size; n++) ram.data[n] = 0xff;
interface->loadRequest(ID::RAM, info["name"].data);
memory.append({ID::RAM, info["name"].data});
interface->loadRequest(ID::RAM, info["name"].text());
memory.append({ID::RAM, info["name"].text()});
}
if(info["type"].data == "EEPROM") {
if(info["type"].text() == "EEPROM") {
has_eeprom = true;
eeprom.size = numeral(info["size"].data);
eeprom.size = info["size"].decimal();
eeprom.bits = eeprom.size <= 512 ? 6 : 14;
if(eeprom.size == 0) eeprom.size = 8192, eeprom.bits = 0; //auto-detect size
eeprom.mask = rom_size > 16 * 1024 * 1024 ? 0x0fffff00 : 0x0f000000;
eeprom.test = rom_size > 16 * 1024 * 1024 ? 0x0dffff00 : 0x0d000000;
for(unsigned n = 0; n < eeprom.size; n++) eeprom.data[n] = 0xff;
interface->loadRequest(ID::EEPROM, info["name"].data);
memory.append({ID::EEPROM, info["name"].data});
interface->loadRequest(ID::EEPROM, info["name"].text());
memory.append({ID::EEPROM, info["name"].text()});
}
if(info["type"].data == "FlashROM") {
if(info["type"].text() == "FlashROM") {
has_flashrom = true;
flashrom.id = numeral(info["id"].data);
flashrom.size = numeral(info["size"].data);
flashrom.id = info["id"].decimal();
flashrom.size = info["size"].decimal();
for(unsigned n = 0; n < flashrom.size; n++) flashrom.data[n] = 0xff;
interface->loadRequest(ID::FlashROM, info["name"].data);
memory.append({ID::FlashROM, info["name"].data});
interface->loadRequest(ID::FlashROM, info["name"].text());
memory.append({ID::FlashROM, info["name"].text()});
}
}

View File

@@ -25,10 +25,11 @@ void System::power() {
void System::load() {
string manifest = string::read({interface->path(ID::System), "manifest.bml"});
auto document = Markup::Document(manifest);
auto document = BML::unserialize(manifest);
interface->loadRequest(ID::BIOS, document["system/cpu/rom/name"].data);
if(!file::exists({interface->path(ID::System), document["system/cpu/rom/name"].data})) {
auto bios = document["system/cpu/rom/name"].text();
interface->loadRequest(ID::BIOS, bios);
if(!file::exists({interface->path(ID::System), bios})) {
interface->notify("Error: required Game Boy Advance firmware bios.rom not found.\n");
}