Update to v106r13 release.

byuu says:

Changelog:

  - game/memory/category → game/memory/content
  - game/memory/model → game/memory/architecture
  - game/memory/identity → game/memory/identifier
  - Super Famicom: memory/content=Bitmap → memory/content=Save
  - Super Famicom: memory/architecture=DMG,MGB →
    memory/architecture=LR35902

The game manifest field names are now officially set in stone. I won't
change them again, I'll only add new fields if required.

As for the values in the field, I'm still undecided on the manufacturer
of the ST018, and I could be talked into different identifiers for the
Super Game Boy (SGB1/SGB2, DMG/MGB, or just ICD(2)?)

The board manifest format is still in flux, as is the choice of what to
name firmware files (it's between manufacturer and architecture, where
I'm leaning toward the latter currently.)

Board memory to Game memory mappings will require both the manufacturer
and architecture fields to match.

I'll be updating doc.byuu.org soon with the finalized game manifest
format.
This commit is contained in:
Tim Allen 2018-04-09 09:50:42 +10:00
parent 985610c167
commit eaa2c1f6c0
19 changed files with 202 additions and 203 deletions

View File

@ -129,10 +129,10 @@ auto ListWindow::loadDatabase(string location) -> void {
component.memory.type = object["type"].text();
component.memory.battery = (bool)object["type/battery"];
component.memory.size = object["size"].text();
component.memory.category = object["category"].text();
component.memory.content = object["content"].text();
component.memory.manufacturer = object["manufacturer"].text();
component.memory.model = object["model"].text();
component.memory.identity = object["identity"].text();
component.memory.architecture = object["architecture"].text();
component.memory.identifier = object["identifier"].text();
}
if(object.name() == "oscillator") {
component.type = Component::Type::Oscillator;
@ -187,13 +187,13 @@ auto ListWindow::saveDatabase(string location) -> void {
if(component.memory.battery)
fp.print(" battery\n");
fp.print(" size: ", component.memory.size, "\n");
fp.print(" category: ", component.memory.category, "\n");
fp.print(" content: ", component.memory.content, "\n");
if(component.memory.manufacturer)
fp.print(" manufacturer: ", component.memory.manufacturer, "\n");
if(component.memory.model)
fp.print(" model: ", component.memory.model, "\n");
if(component.memory.identity)
fp.print(" identity: ", component.memory.identity, "\n");
if(component.memory.architecture)
fp.print(" architecture: ", component.memory.architecture, "\n");
if(component.memory.identifier)
fp.print(" identifier: ", component.memory.identifier, "\n");
}
if(component.type == Component::Type::Oscillator) {
@ -369,13 +369,13 @@ auto GameWindow::reloadList() -> void {
item.setText({index, "Memory"});
item.append(TreeViewItem().setText({"Type: ", component.memory.type, component.memory.battery ? " + Battery" : ""}));
item.append(TreeViewItem().setText({"Size: ", component.memory.size}));
item.append(TreeViewItem().setText({"Category: ", component.memory.category}));
item.append(TreeViewItem().setText({"Content: ", component.memory.content}));
if(component.memory.manufacturer)
item.append(TreeViewItem().setText({"Manufacturer: ", component.memory.manufacturer}));
if(component.memory.model)
item.append(TreeViewItem().setText({"Model: ", component.memory.model}));
if(component.memory.identity)
item.append(TreeViewItem().setText({"Identity: ", component.memory.identity}));
if(component.memory.architecture)
item.append(TreeViewItem().setText({"Architecture: ", component.memory.architecture}));
if(component.memory.identifier)
item.append(TreeViewItem().setText({"Identifier: ", component.memory.identifier}));
}
if(component.type == Component::Type::Oscillator) {
@ -460,19 +460,19 @@ MemoryWindow::MemoryWindow() {
typeEdit.onChange([&] { modified = true, updateWindow(); });
sizeLabel.setText("Size:").setAlignment(1.0);
sizeEdit.onChange([&] { modified = true, updateWindow(); });
categoryLabel.setText("Category:").setAlignment(1.0);
categoryEdit.append(ComboEditItem().setText("Program"));
categoryEdit.append(ComboEditItem().setText("Data"));
categoryEdit.append(ComboEditItem().setText("Character"));
categoryEdit.append(ComboEditItem().setText("Save"));
categoryEdit.append(ComboEditItem().setText("Time"));
categoryEdit.onChange([&] { modified = true, updateWindow(); });
contentLabel.setText("Content:").setAlignment(1.0);
contentEdit.append(ComboEditItem().setText("Program"));
contentEdit.append(ComboEditItem().setText("Data"));
contentEdit.append(ComboEditItem().setText("Character"));
contentEdit.append(ComboEditItem().setText("Save"));
contentEdit.append(ComboEditItem().setText("Time"));
contentEdit.onChange([&] { modified = true, updateWindow(); });
manufacturerLabel.setText("Manufacturer:").setAlignment(1.0);
manufacturerEdit.onChange([&] { modified = true, updateWindow(); });
modelLabel.setText("Model:").setAlignment(1.0);
modelEdit.onChange([&] { modified = true, updateWindow(); });
identityLabel.setText("Identity:").setAlignment(1.0);
identityEdit.onChange([&] { modified = true, updateWindow(); });
architectureLabel.setText("Architecture:").setAlignment(1.0);
architectureEdit.onChange([&] { modified = true, updateWindow(); });
identifierLabel.setText("Identifier:").setAlignment(1.0);
identifierEdit.onChange([&] { modified = true, updateWindow(); });
batteryOption.setText("Battery").onToggle([&] { modified = true, updateWindow(); });
acceptButton.setText("Accept").onActivate([&] { accept(); });
cancelButton.setText("Cancel").onActivate([&] { cancel(); });
@ -490,10 +490,10 @@ auto MemoryWindow::show(Memory memory) -> void {
typeEdit.setText(memory.type);
sizeEdit.setText(memory.size);
categoryEdit.setText(memory.category);
contentEdit.setText(memory.content);
manufacturerEdit.setText(memory.manufacturer);
modelEdit.setText(memory.model);
identityEdit.setText(memory.identity);
architectureEdit.setText(memory.architecture);
identifierEdit.setText(memory.identifier);
batteryOption.setChecked(memory.battery);
updateWindow();
@ -506,10 +506,10 @@ auto MemoryWindow::show(Memory memory) -> void {
auto MemoryWindow::accept() -> void {
memory.type = typeEdit.text().strip();
memory.size = sizeEdit.text().strip();
memory.category = categoryEdit.text().strip();
memory.content = contentEdit.text().strip();
memory.manufacturer = manufacturerEdit.text().strip();
memory.model = modelEdit.text().strip();
memory.identity = identityEdit.text().strip();
memory.architecture = architectureEdit.text().strip();
memory.identifier = identifierEdit.text().strip();
memory.battery = batteryOption.checked() && (memory.type == "RAM" || memory.type == "RTC");
Component component{Component::Type::Memory};
@ -539,10 +539,10 @@ auto MemoryWindow::updateWindow() -> void {
bool valid = true;
typeEdit.setBackgroundColor(typeEdit.text().strip() ? Color{} : (valid = false, Color{255, 224, 224}));
sizeEdit.setBackgroundColor(sizeEdit.text().strip() ? Color{} : (valid = false, Color{255, 224, 224}));
categoryEdit.setBackgroundColor(categoryEdit.text().strip() ? Color{} : (valid = false, Color{255, 224, 224}));
contentEdit.setBackgroundColor(contentEdit.text().strip() ? Color{} : (valid = false, Color{255, 224, 224}));
manufacturerEdit.setBackgroundColor(manufacturerEdit.text().strip() ? Color{} : (Color{255, 255, 240}));
modelEdit.setBackgroundColor(modelEdit.text().strip() ? Color{} : (Color{255, 255, 240}));
identityEdit.setBackgroundColor(identityEdit.text().strip() ? Color{} : (Color{255, 255, 240}));
architectureEdit.setBackgroundColor(architectureEdit.text().strip() ? Color{} : (Color{255, 255, 240}));
identifierEdit.setBackgroundColor(identifierEdit.text().strip() ? Color{} : (Color{255, 255, 240}));
batteryOption.setEnabled(typeEdit.text().strip() == "RAM" || typeEdit.text().strip() == "RTC");
acceptButton.setEnabled(valid);
setTitle({modified ? "*" : "", create ? "Add New Memory" : "Modify Memory Details"});

View File

@ -2,10 +2,10 @@ struct Memory {
string type;
boolean battery;
string size;
string category;
string content;
string manufacturer;
string model;
string identity;
string architecture;
string identifier;
};
struct Oscillator {
@ -136,18 +136,18 @@ private:
ComboEdit typeEdit{&infoLayout, Size{~0, 0}};
Label sizeLabel{&infoLayout, Size{0, 0}};
LineEdit sizeEdit{&infoLayout, Size{~0, 0}};
HorizontalLayout categoryLayout{&layout, Size{~0, 0}};
Label categoryLabel{&categoryLayout, Size{80, 0}};
ComboEdit categoryEdit{&categoryLayout, Size{~0, 0}};
HorizontalLayout contentLayout{&layout, Size{~0, 0}};
Label contentLabel{&contentLayout, Size{80, 0}};
ComboEdit contentEdit{&contentLayout, Size{~0, 0}};
HorizontalLayout manufacturerLayout{&layout, Size{~0, 0}};
Label manufacturerLabel{&manufacturerLayout, Size{80, 0}};
LineEdit manufacturerEdit{&manufacturerLayout, Size{~0, 0}};
HorizontalLayout modelLayout{&layout, Size{~0, 0}};
Label modelLabel{&modelLayout, Size{80, 0}};
LineEdit modelEdit{&modelLayout, Size{~0, 0}};
HorizontalLayout identityLayout{&layout, Size{~0, 0}};
Label identityLabel{&identityLayout, Size{80, 0}};
LineEdit identityEdit{&identityLayout, Size{~0, 0}};
HorizontalLayout architectureLayout{&layout, Size{~0, 0}};
Label architectureLabel{&architectureLayout, Size{80, 0}};
LineEdit architectureEdit{&architectureLayout, Size{~0, 0}};
HorizontalLayout identifierLayout{&layout, Size{~0, 0}};
Label identifierLabel{&identifierLayout, Size{80, 0}};
LineEdit identifierEdit{&identifierLayout, Size{~0, 0}};
HorizontalLayout controlLayout{&layout, Size{~0, 0}};
Widget controlSpacer{&controlLayout, Size{~0, 0}};
CheckLabel batteryOption{&controlLayout, Size{0, 0}};

View File

@ -12,7 +12,7 @@ using namespace nall;
namespace Emulator {
static const string Name = "higan";
static const string Version = "106.12";
static const string Version = "106.13";
static const string Author = "byuu";
static const string License = "GPLv3";
static const string Website = "https://byuu.org/";

View File

@ -17,10 +17,10 @@ struct Game {
string type;
boolean battery;
natural size;
string category;
string content;
string manufacturer;
string model;
string identity;
string architecture;
string identifier;
};
struct Oscillator {
@ -55,10 +55,10 @@ auto Game::load(string_view text) -> void {
memory.type = node["type"].text();
memory.battery = (bool)node["type/battery"];
memory.size = node["size"].natural();
memory.category = node["category"].text();
memory.content = node["content"].text();
memory.manufacturer = node["manufacturer"].text();
memory.model = node["model"].text();
memory.identity = node["identity"].text();
memory.architecture = node["architecture"].text();
memory.identifier = node["identifier"].text();
memoryList.append(memory);
}
@ -74,16 +74,16 @@ auto Game::memory(Markup::Node node) -> maybe<Memory> {
for(auto& memory : memoryList) {
auto type = node["type"].text();
auto size = node["size"].natural();
auto category = node["category"].text();
auto content = node["content"].text();
auto manufacturer = node["manufacturer"].text();
auto model = node["model"].text();
auto identity = node["identity"].text();
auto architecture = node["architecture"].text();
auto identifier = node["identifier"].text();
if(type && type != memory.type) continue;
if(size && size != memory.size) continue;
if(category && category != memory.category) continue;
if(content && content != memory.content) continue;
if(manufacturer && manufacturer != memory.manufacturer) continue;
if(model && model != memory.model) continue;
if(identity && identity != memory.identity) continue;
if(architecture && architecture != memory.architecture) continue;
if(identifier && identifier != memory.identifier) continue;
return memory;
}
return nothing;
@ -95,8 +95,8 @@ auto Game::oscillator(natural index) -> maybe<Oscillator> {
}
auto Game::Memory::name() const -> string {
if(manufacturer) return string{manufacturer, ".", category, ".", type}.downcase();
return string{category, ".", type}.downcase();
if(manufacturer) return string{manufacturer, ".", content, ".", type}.downcase();
return string{content, ".", type}.downcase();
}
}

View File

@ -1,5 +1,5 @@
database
revision: 2018-04-03
revision: 2018-04-08
//Boards (Production)
@ -533,86 +533,86 @@ board: SHVC-YJ0N-01
//Boards (Generic)
database
revision: 2018-04-03
revision: 2018-04-08
board: ARM-LOROM-RAM
memory type=ROM category=Program
memory type=ROM content=Program
map address=00-7d,80-ff:8000-ffff mask=0x8000
map address=40-6f,c0-ef:0000-7fff mask=0x8000
memory type=RAM category=Save
memory type=RAM content=Save
map address=70-7d,f0-ff:0000-ffff
armdsp
map address=00-3f,80-bf:3800-38ff
memory type=ROM category=Program manufacturer=ARM
memory type=ROM category=Data manufacturer=ARM
memory type=RAM category=Data manufacturer=ARM
memory type=ROM content=Program manufacturer=SETA
memory type=ROM content=Data manufacturer=SETA
memory type=RAM content=Data manufacturer=SETA
oscillator
board: BS-HIROM-RAM
memory type=ROM category=Program
memory type=ROM content=Program
map address=00-1f,80-9f:8000-ffff
map address=40-5f,c0-df:0000-ffff
memory type=RAM category=Save
memory type=RAM content=Save
map address=20-3f,a0-bf:6000-7fff mask=0xe000
bsmemory
map address=20-3f,a0-bf:8000-ffff
map address=60-7d,e0-ff:0000-ffff
board: BS-LOROM-RAM
memory type=ROM category=Program
memory type=ROM content=Program
map address=00-1f:8000-ffff base=0x000000 mask=0x8000
map address=20-3f:8000-ffff base=0x100000 mask=0x8000
map address=80-9f:8000-ffff base=0x200000 mask=0x8000
map address=a0-bf:8000-ffff base=0x100000 mask=0x8000
memory type=RAM category=Save
memory type=RAM content=Save
map address=70-7d,f0-ff:0000-7fff mask=0x8000
bsmemory
map address=c0-ef:0000-ffff
board: BS-MCC-RAM
memory type=RAM category=Save
memory type=RAM content=Save
map address=10-1f:5000-5fff mask=0xf000
mcc
map address=00-0f:5000
map=mcu address=00-3f,80-bf:8000-ffff mask=0x408000
map=mcu address=40-7d,c0-ff:0000-ffff
memory type=ROM category=Program
memory type=RAM category=Download
memory type=ROM content=Program
memory type=RAM content=Download
map address=00-3f,80-bf:6000-7fff mask=0xe000
bsmemory
board: BS-SA1-RAM
sa1
map address=00-3f,80-bf:2200-23ff
memory type=ROM category=Program
memory type=ROM content=Program
map address=00-3f,80-bf:8000-ffff mask=0x408000
map address=c0-ff:0000-ffff
memory type=RAM category=Bitmap
memory type=RAM content=Save
map address=00-3f,80-bf:6000-7fff size=0x2000
map address=40-4f:0000-ffff
memory type=RAM category=Internal
memory type=RAM content=Internal
map address=00-3f,80-bf:3000-37ff size=0x800
bsmemory
board: HIROM
memory type=ROM category=Program
memory type=ROM content=Program
map address=00-3f,80-bf:8000-ffff
map address=40-7d,c0-ff:0000-ffff
board: HIROM-RAM
memory type=ROM category=Program
memory type=ROM content=Program
map address=00-3f,80-bf:8000-ffff
map address=40-7d,c0-ff:0000-ffff
memory type=RAM category=Save
memory type=RAM content=Save
map address=20-3f,a0-bf:6000-7fff mask=0xe000
board: HIROMEX-RAM
memory type=ROM category=Program
memory type=ROM content=Program
map address=00-3f:8000-ffff base=0x400000
map address=40-7d:0000-ffff base=0x400000
map address=80-bf:8000-ffff mask=0xc00000
map address=c0-ff:0000-ffff mask=0xc00000
memory type=RAM category=Save
memory type=RAM content=Save
map address=20-3f,a0-bf:6000-7fff mask=0xe000
map address=70-7d:0000-7fff
@ -620,113 +620,113 @@ board: HITACHI-LOROM
hitachidsp model=HG51BS169
map address=00-3f,80-bf:6c00-6fff,7c00-7fff
map address=70-77:0000-7fff
memory type=ROM category=Program
memory type=ROM content=Program
map address=00-3f,80-bf:8000-ffff mask=0x8000
memory type=ROM category=Data manufacturer=Hitachi
memory type=RAM category=Data manufacturer=Hitachi
memory type=ROM content=Data manufacturer=Hitachi
memory type=RAM content=Data manufacturer=Hitachi
map address=00-3f,80-bf:6000-6bff,7000-7bff mask=0xf000
oscillator
board: LOROM
memory type=ROM category=Program
memory type=ROM content=Program
map address=00-7d,80-ff:8000-ffff mask=0x8000
board: LOROM-RAM
memory type=ROM category=Program
memory type=ROM content=Program
map address=00-3f,80-bf:8000-ffff mask=0x8000
memory type=RAM category=Save
memory type=RAM content=Save
map address=70-7d,f0-ff:0000-ffff mask=0x8000
board: LOROMEX-RAM
memory type=ROM category=Program
memory type=ROM content=Program
map address=00-7d,80-ff:8000-ffff mask=0x8000
memory type=RAM category=Save
memory type=RAM content=Save
map address=70-7d,f0-ff:0000-7fff mask=0x8000
board: NEC-HIROM
memory type=ROM category=Program
memory type=ROM content=Program
map address=00-3f,80-bf:8000-ffff
map address=40-7d,c0-ff:0000-ffff
necdsp model=uPD7725
map address=00-1f,80-9f:6000-7fff mask=0xfff
memory type=ROM category=Program manufacturer=NEC
memory type=ROM category=Data manufacturer=NEC
memory type=RAM category=Data manufacturer=NEC
memory type=ROM content=Program manufacturer=NEC
memory type=ROM content=Data manufacturer=NEC
memory type=RAM content=Data manufacturer=NEC
oscillator
board: NEC-HIROM-RAM
memory type=ROM category=Program
memory type=ROM content=Program
map address=00-3f,80-bf:8000-ffff
map address=40-7d,c0-ff:0000-ffff
memory type=RAM category=Save
memory type=RAM content=Save
map address=20-3f,a0-bf:6000-7fff mask=0xe000
necdsp model=uPD7725
map address=00-1f,80-9f:6000-7fff mask=0xfff
memory type=ROM category=Program manufacturer=NEC
memory type=ROM category=Data manufacturer=NEC
memory type=RAM category=Data manufacturer=NEC
memory type=ROM content=Program manufacturer=NEC
memory type=ROM content=Data manufacturer=NEC
memory type=RAM content=Data manufacturer=NEC
oscillator
board: NEC-LOROM
memory type=ROM category=Program
memory type=ROM content=Program
map address=00-1f,80-9f:8000-ffff mask=0x8000
necdsp model=uPD7725
map address=30-3f,b0-bf:8000-ffff mask=0x3fff
memory type=ROM category=Program manufacturer=NEC
memory type=ROM category=Data manufacturer=NEC
memory type=RAM category=Data manufacturer=NEC
memory type=ROM content=Program manufacturer=NEC
memory type=ROM content=Data manufacturer=NEC
memory type=RAM content=Data manufacturer=NEC
oscillator
board: NEC-LOROM-RAM
memory type=ROM category=Program
memory type=ROM content=Program
map address=00-1f,80-9f:8000-ffff mask=0x8000
memory type=RAM category=Save
memory type=RAM content=Save
map address=70-7d,f0-ff:0000-ffff
necdsp model=uPD7725
map address=20-3f,a0-bf:8000-ffff mask=0x3fff
memory type=ROM category=Program manufacturer=NEC
memory type=ROM category=Data manufacturer=NEC
memory type=RAM category=Data manufacturer=NEC
memory type=ROM content=Program manufacturer=NEC
memory type=ROM content=Data manufacturer=NEC
memory type=RAM content=Data manufacturer=NEC
oscillator
board: NEC-LOROMEX-RAM
memory type=ROM category=Program
memory type=ROM content=Program
map address=00-3f,80-bf:8000-ffff mask=0x8000
memory type=RAM category=Save
memory type=RAM content=Save
map address=70-7d,f0-ff:0000-7fff mask=0x8000
necdsp model=uPD7725
map address=60-6f,e0-ef:0000-7fff mask=0x3fff
memory type=ROM category=Program manufacturer=NEC
memory type=ROM category=Data manufacturer=NEC
memory type=RAM category=Data manufacturer=NEC
memory type=ROM content=Program manufacturer=NEC
memory type=ROM content=Data manufacturer=NEC
memory type=RAM content=Data manufacturer=NEC
oscillator
board: NECEX-LOROM-BATTERY
memory type=ROM category=Program
memory type=ROM content=Program
map address=00-7d,80-ff:8000-ffff mask=0x8000
necdsp model=uPD96050
map address=60-67,e0-e7:0000-3fff
memory type=ROM category=Program manufacturer=NEC
memory type=ROM category=Data manufacturer=NEC
memory type=RAM category=Data manufacturer=NEC
memory type=ROM content=Program manufacturer=NEC
memory type=ROM content=Data manufacturer=NEC
memory type=RAM content=Data manufacturer=NEC
map address=68-6f,e8-ef:0000-7fff mask=0x8000
oscillator
board: OBC1-LOROM-RAM
memory type=ROM category=Program
memory type=ROM content=Program
map address=00-3f,80-bf:8000-ffff mask=0x8000
obc1
map address=00-3f,80-bf:6000-7fff mask=0xe000
map address=70-71,f0-f1:6000-7fff,e000-ffff mask=0xe000
memory type=RAM category=Save
memory type=RAM content=Save
board: RTC-HIROMEX-RAM
memory type=ROM category=Program
memory type=ROM content=Program
map address=00-3f:8000-ffff base=0x400000
map address=40-7d:0000-ffff base=0x400000
map address=80-bf:8000-ffff mask=0xc00000
map address=c0-ff:0000-ffff mask=0xc00000
memory type=RAM category=Save
memory type=RAM content=Save
map address=20-3f,a0-bf:6000-7fff mask=0xe000
map address=70-7d:0000-7fff
sharprtc
@ -736,39 +736,39 @@ board: RTC-HIROMEX-RAM
board: SA1-RAM
sa1
map address=00-3f,80-bf:2200-23ff
memory type=ROM category=Program
memory type=ROM content=Program
map address=00-3f,80-bf:8000-ffff mask=0x408000
map address=c0-ff:0000-ffff
memory type=RAM category=Bitmap
memory type=RAM content=Save
map address=00-3f,80-bf:6000-7fff size=0x2000
map address=40-4f:0000-ffff
memory type=RAM category=Internal
memory type=RAM content=Internal
map address=00-3f,80-bf:3000-37ff size=0x800
board: SDD1
sdd1
map address=00-3f,80-bf:4800-480f
memory type=ROM category=Program
memory type=ROM content=Program
map address=00-3f,80-bf:8000-ffff
map address=c0-ff:0000-ffff
board: SDD1-RAM
sdd1
map address=00-3f,80-bf:4800-480f
memory type=ROM category=Program
memory type=ROM content=Program
map address=00-3f,80-bf:8000-ffff
map address=c0-ff:0000-ffff
memory type=RAM category=Save
memory type=RAM content=Save
map address=00-3f,80-bf:6000-7fff mask=0xe000
map address=70-73:0000-ffff mask=0x8000
board: SGB-LOROM
memory type=ROM category=Program
memory type=ROM content=Program
map address=00-7d,80-ff:8000-ffff mask=0x8000
map address=40-7d,c0-ff:0000-7fff mask=0x8000
icd revision=2
map address=00-3f,80-bf:6000-67ff,7000-7fff
memory type=ROM category=Boot manufacturer=Nintendo
memory type=ROM content=Boot manufacturer=Nintendo
oscillator
gameboy
@ -778,9 +778,9 @@ board: SPC7110-RAM
map address=50,58:0000-ffff
map type=MCU address=00-3f,80-bf:8000-ffff mask=0x800000
map type=MCU address=c0-ff:0000-ffff mask=0xc00000
memory type=ROM category=Program
memory type=ROM category=Data
memory type=RAM category=Save
memory type=ROM content=Program
memory type=ROM content=Data
memory type=RAM content=Save
map address=00-3f,80-bf:6000-7fff mask=0xe000
board: SPC7110-RTC-RAM
@ -789,35 +789,35 @@ board: SPC7110-RTC-RAM
map address=50,58:0000-ffff
map type=MCU address=00-3f,80-bf:8000-ffff mask=0x800000
map type=MCU address=c0-ff:0000-ffff mask=0xc00000
memory type=ROM category=Program
memory type=ROM category=Data
memory type=RAM category=Save
memory type=ROM content=Program
memory type=ROM content=Data
memory type=RAM content=Save
map address=00-3f,80-bf:6000-7fff mask=0xe000
epsonrtc
map address=00-3f,80-bf:4800-4842
memory type=RTC manufacturer=Epson
board: ST-LOROM
memory type=ROM category=Program
memory type=ROM content=Program
map address=00-1f,80-9f:8000-ffff mask=0x8000
sufamiturbo
memory type=ROM category=Program
rom
map address=20-3f,a0-bf:8000-ffff mask=0x8000
memory type=RAM category=Save
ram
map address=60-6f,e0-ef:0000-ffff
sufamiturbo
memory type=ROM category=Program
rom
map address=40-5f,c0-df:0000-ffff mask=0x8000
memory type=RAM category=Save
ram
map address=70-7d,f0-ff:0000-ffff
board: SUPERFX-RAM
superfx
map address=00-3f,80-bf:3000-34ff
memory type=ROM category=Program
memory type=ROM content=Program
map address=00-3f,80-bf:8000-ffff mask=0x8000
map address=40-5f,c0-df:0000-ffff
memory type=RAM category=Save
memory type=RAM content=Save
map address=00-3f,80-bf:6000-7fff size=0x2000
map address=70-71,f0-f1:0000-ffff

View File

@ -26,7 +26,7 @@ auto BSMemory::manifest() const -> string {
output.append(" label: ", Location::prefix(location), "\n");
output.append(" name: ", Location::prefix(location), "\n");
output.append(" board\n");
output.append(Memory{}.type("Flash").size(data.size()).category("Program").text());
output.append(Memory{}.type("Flash").size(data.size()).content("Program").text());
return output;
}

View File

@ -161,11 +161,11 @@ auto Famicom::manifest() const -> string {
break;
}
if(prgrom) output.append(Memory{}.type("ROM").size(prgrom).category("Program").text());
if(prgram) output.append(Memory{}.type("RAM").size(prgram).category("Save").battery().text());
if(prgrom) output.append(Memory{}.type("ROM").size(prgrom).content("Program").text());
if(prgram) output.append(Memory{}.type("RAM").size(prgram).content("Save").battery().text());
if(chrrom) output.append(Memory{}.type("ROM").size(chrrom).category("Character").text());
if(chrram) output.append(Memory{}.type("RAM").size(chrram).category("Character").text());
if(chrrom) output.append(Memory{}.type("ROM").size(chrrom).content("Character").text());
if(chrram) output.append(Memory{}.type("RAM").size(chrram).content("Character").text());
return output;
}

View File

@ -53,14 +53,14 @@ auto GameBoyAdvance::manifest() const -> string {
output.append(" label: ", Location::prefix(location), "\n");
output.append(" name: ", Location::prefix(location), "\n");
output.append(" board\n");
output.append(Memory{}.type("ROM").size(data.size()).category("Program").text());
output.append(Memory{}.type("ROM").size(data.size()).content("Program").text());
if(!list);
else if(list.left().beginsWith("SRAM_V" )) output.append(Memory{}.type("RAM" ).size( 0x8000).category("Save").text());
else if(list.left().beginsWith("SRAM_F_V" )) output.append(Memory{}.type("RAM" ).size( 0x8000).category("Save").text());
else if(list.left().beginsWith("EEPROM_V" )) output.append(Memory{}.type("EEPROM").size( 0x0).category("Save").text());
else if(list.left().beginsWith("FLASH_V" )) output.append(Memory{}.type("Flash" ).size(0x10000).category("Save").text());
else if(list.left().beginsWith("FLASH512_V")) output.append(Memory{}.type("Flash" ).size(0x10000).category("Save").text());
else if(list.left().beginsWith("FLASH1M_V" )) output.append(Memory{}.type("Flash" ).size(0x20000).category("Save").text());
else if(list.left().beginsWith("SRAM_V" )) output.append(Memory{}.type("RAM" ).size( 0x8000).content("Save").text());
else if(list.left().beginsWith("SRAM_F_V" )) output.append(Memory{}.type("RAM" ).size( 0x8000).content("Save").text());
else if(list.left().beginsWith("EEPROM_V" )) output.append(Memory{}.type("EEPROM").size( 0x0).content("Save").text());
else if(list.left().beginsWith("FLASH_V" )) output.append(Memory{}.type("Flash" ).size(0x10000).content("Save").text());
else if(list.left().beginsWith("FLASH512_V")) output.append(Memory{}.type("Flash" ).size(0x10000).content("Save").text());
else if(list.left().beginsWith("FLASH1M_V" )) output.append(Memory{}.type("Flash" ).size(0x20000).content("Save").text());
return output;
}

View File

@ -241,13 +241,13 @@ auto GameBoy::manifest() const -> string {
output.append(" label: ", Location::prefix(location), "\n");
output.append(" name: ", Location::prefix(location), "\n");
output.append(" board: ", mapper, "\n");
output.append(Memory{}.type("ROM").size(data.size()).category("Program").text());
output.append(Memory{}.type("ROM").size(data.size()).content("Program").text());
if(ram && ramSize)
output.append(Memory{}.type("RAM").size(ramSize).category("Save").battery(battery).text());
output.append(Memory{}.type("RAM").size(ramSize).content("Save").battery(battery).text());
if(flash && flashSize)
output.append(Memory{}.type("Flash").size(flashSize).category("Download").text());
output.append(Memory{}.type("Flash").size(flashSize).content("Download").text());
if(rtc && rtcSize)
output.append(Memory{}.type("RTC").size(rtcSize).category("Time").battery().text());
output.append(Memory{}.type("RTC").size(rtcSize).content("Time").battery().text());
if(accelerometer)
output.append(" accelerometer\n");
if(rumble)

View File

@ -24,8 +24,8 @@ auto GameGear::manifest() const -> string {
output.append(" label: ", Location::prefix(location), "\n");
output.append(" name: ", Location::prefix(location), "\n");
output.append(" board\n");
output.append(Memory{}.type("ROM").size(data.size()).category("Program").text());
output.append(Memory{}.type("RAM").size(0x8000).category("Save").battery().text());
output.append(Memory{}.type("ROM").size(data.size()).content("Program").text());
output.append(Memory{}.type("RAM").size(0x8000).content("Save").battery().text());
return output;
}

View File

@ -7,13 +7,13 @@ auto Memory::text() const -> string {
if(_battery)
output.append(" battery\n");
output.append(" size: 0x", hex(_size), "\n");
output.append(" category: ", _category, "\n");
output.append(" content: ", _content, "\n");
if(_manufacturer)
output.append(" manufacturer: ", _manufacturer, "\n");
if(_model)
output.append(" model: ", _model, "\n");
if(_identity)
output.append(" identity: ", _identity, "\n");
if(_architecture)
output.append(" architecture: ", _architecture, "\n");
if(_identifier)
output.append(" identifier: ", _identifier, "\n");
return output;
}

View File

@ -4,19 +4,19 @@ struct Memory {
auto& type(string type) { _type = type; return *this; }
auto& battery(boolean battery = true) { _battery = battery; return *this; }
auto& size(natural size) { _size = size; return *this; }
auto& category(string category) { _category = category; return *this; }
auto& content(string content) { _content = content; return *this; }
auto& manufacturer(string manufacturer) { _manufacturer = manufacturer; return *this; }
auto& model(string model) { _model = model; return *this; }
auto& identity(string identity) { _identity = identity; return *this; }
auto& architecture(string architecture) { _architecture = architecture; return *this; }
auto& identifier(string identifier) { _identifier = identifier; return *this; }
auto text() const -> string;
string _type;
boolean _battery;
natural _size;
string _category;
string _content;
string _manufacturer;
string _model;
string _identity;
string _architecture;
string _identifier;
};
struct Oscillator {

View File

@ -24,8 +24,8 @@ auto MasterSystem::manifest() const -> string {
output.append(" label: ", Location::prefix(location), "\n");
output.append(" name: ", Location::prefix(location), "\n");
output.append(" board\n");
output.append(Memory{}.type("ROM").size(data.size()).category("Program").text());
output.append(Memory{}.type("RAM").size(0x8000).category("Save").battery().text());
output.append(Memory{}.type("ROM").size(data.size()).content("Program").text());
output.append(Memory{}.type("RAM").size(0x8000).content("Save").battery().text());
return output;
}

View File

@ -75,9 +75,9 @@ auto MegaDrive::manifest() const -> string {
output.append(" name: ", Location::prefix(location), "\n");
output.append(" region: ", regions.left(), "\n");
output.append(" board\n");
output.append(Memory{}.type("ROM").size(data.size()).category("Program").text());
output.append(Memory{}.type("ROM").size(data.size()).content("Program").text());
if(ramSize && ramMode != "none") {
output.append(Memory{}.type("RAM").size(ramSize).category("Save").text());
output.append(Memory{}.type("RAM").size(ramSize).content("Save").text());
output.append(" mode: ", ramMode, "\n");
output.append(" offset: 0x", hex(ramFrom), "\n");
}

View File

@ -29,7 +29,7 @@ auto PCEngine::manifest() const -> string {
output.append(" label: ", Location::prefix(location), "\n");
output.append(" name: ", Location::prefix(location), "\n");
output.append(" board\n");
output.append(Memory{}.type("ROM").size(data.size()).category("Program").text());
output.append(Memory{}.type("ROM").size(data.size()).content("Program").text());
return output;
}

View File

@ -30,9 +30,9 @@ auto SufamiTurbo::manifest() const -> string {
output.append(" label: ", Location::prefix(location), "\n");
output.append(" name: ", Location::prefix(location), "\n");
output.append(" board\n");
output.append(Memory{}.type("ROM").size(data.size()).category("Program").text());
output.append(Memory{}.type("ROM").size(data.size()).content("Program").text());
if(ramSize)
output.append(Memory{}.type("RAM").size(ramSize).category("Save").battery().text());
output.append(Memory{}.type("RAM").size(ramSize).content("Save").battery().text());
return output;
}

View File

@ -68,52 +68,51 @@ auto SuperFamicom::manifest() const -> string {
if(auto size = romSize()) {
if(board(0) == "SPC7110") size = 0x100000;
output.append(Memory{}.type("ROM").size(size).category("Program").text());
output.append(Memory{}.type("ROM").size(size).content("Program").text());
}
if(auto size = ramSize()) {
output.append(Memory{}.type("RAM").size(size).category("Save").battery(battery()).text());
output.append(Memory{}.type("RAM").size(size).content("Save").battery(battery()).text());
}
if(auto size = expansionRamSize()) {
output.append(Memory{}.type("RAM").size(size).category("Save").battery(battery()).text());
output.append(Memory{}.type("RAM").size(size).content("Save").battery(battery()).text());
}
if(0) {
} else if(board(0) == "ARM") {
output.append(Memory{}.type("ROM").size(0x20000).category("Program").manufacturer("SETA").model("ARM6").identity(firmwareARM()).text());
output.append(Memory{}.type("ROM").size( 0x8000).category("Data" ).manufacturer("SETA").model("ARM6").identity(firmwareARM()).text());
output.append(Memory{}.type("RAM").size( 0x4000).category("Data" ).manufacturer("SETA").model("ARM6").identity(firmwareARM()).text());
output.append(Memory{}.type("ROM").size(0x20000).content("Program").manufacturer("SETA").architecture("ARM6").identifier(firmwareARM()).text());
output.append(Memory{}.type("ROM").size( 0x8000).content("Data" ).manufacturer("SETA").architecture("ARM6").identifier(firmwareARM()).text());
output.append(Memory{}.type("RAM").size( 0x4000).content("Data" ).manufacturer("SETA").architecture("ARM6").identifier(firmwareARM()).text());
output.append(Oscillator{}.frequency(21'440'000).text());
} else if(board(0) == "BS" && board(1) == "MCC") {
output.append(Memory{}.type("RAM").size(0x80000).category("Download").battery().text());
output.append(Memory{}.type("RAM").size(0x80000).content("Download").battery().text());
} else if(board(0) == "HITACHI") {
output.append(Memory{}.type("ROM").size(0xc00).category("Data").manufacturer("Hitachi").model("HG51BS169").identity(firmwareHITACHI()).text());
output.append(Memory{}.type("RAM").size(0xc00).category("Data").manufacturer("Hitachi").model("HG51BS169").identity(firmwareHITACHI()).text());
output.append(Memory{}.type("ROM").size(0xc00).content("Data").manufacturer("Hitachi").architecture("HG51BS169").identifier(firmwareHITACHI()).text());
output.append(Memory{}.type("RAM").size(0xc00).content("Data").manufacturer("Hitachi").architecture("HG51BS169").identifier(firmwareHITACHI()).text());
output.append(Oscillator{}.frequency(20'000'000).text());
} else if(board(0) == "NEC") {
output.append(Memory{}.type("ROM").size(0x1800).category("Program").manufacturer("NEC").model("uPD7725").identity(firmwareNEC()).text());
output.append(Memory{}.type("ROM").size( 0x800).category("Data" ).manufacturer("NEC").model("uPD7725").identity(firmwareNEC()).text());
output.append(Memory{}.type("RAM").size( 0x200).category("Data" ).manufacturer("NEC").model("uPD7725").identity(firmwareNEC()).text());
output.append(Memory{}.type("ROM").size(0x1800).content("Program").manufacturer("NEC").architecture("uPD7725").identifier(firmwareNEC()).text());
output.append(Memory{}.type("ROM").size( 0x800).content("Data" ).manufacturer("NEC").architecture("uPD7725").identifier(firmwareNEC()).text());
output.append(Memory{}.type("RAM").size( 0x200).content("Data" ).manufacturer("NEC").architecture("uPD7725").identifier(firmwareNEC()).text());
output.append(Oscillator{}.frequency(7'600'000).text());
} else if(board(0) == "NECEX") {
output.append(Memory{}.type("ROM").size(0xc000).category("Program").manufacturer("NEC").model("uPD96050").identity(firmwareNECEX()).text());
output.append(Memory{}.type("ROM").size(0x1000).category("Data" ).manufacturer("NEC").model("uPD96050").identity(firmwareNECEX()).text());
output.append(Memory{}.type("RAM").size(0x1000).category("Data" ).manufacturer("NEC").model("uPD96050").identity(firmwareNECEX()).text());
output.append(Memory{}.type("ROM").size(0xc000).content("Program").manufacturer("NEC").architecture("uPD96050").identifier(firmwareNECEX()).text());
output.append(Memory{}.type("ROM").size(0x1000).content("Data" ).manufacturer("NEC").architecture("uPD96050").identifier(firmwareNECEX()).text());
output.append(Memory{}.type("RAM").size(0x1000).content("Data" ).manufacturer("NEC").architecture("uPD96050").identifier(firmwareNECEX()).text());
output.append(Oscillator{}.frequency(firmwareNECEX() == "ST010" ? 11'000'000 : 15'000'000).text());
} else if(board(0) == "RTC") {
output.append(Memory{}.type("RTC").size(0x10).category("Time").battery().text());
output.append(Memory{}.type("RTC").size(0x10).content("Time").battery().text());
} else if(board(0) == "SA1") {
output.append(Memory{}.type("RAM").size(0x800).category("Internal").text());
output.append(Memory{}.type("RAM").size(0x800).content("Internal").text());
} else if(board(0) == "SGB") {
string model = firmwareSGB() == "SGB1" ? "DMG" : "MGB";
output.append(Memory{}.type("ROM").size(0x100).category("Boot").manufacturer("Nintendo").model(model).identity(firmwareSGB()).text());
output.append(Memory{}.type("ROM").size(0x100).content("Boot").manufacturer("Nintendo").architecture("LR35902").identifier(firmwareSGB()).text());
if(firmwareSGB() == "SGB2")
output.append(Oscillator{}.frequency(20'971'520).text());
} else if(board(0) == "SPC7110") {
output.append(Memory{}.type("ROM").size(romSize() - 0x100000).category("Data").text());
output.append(Memory{}.type("ROM").size(romSize() - 0x100000).content("Data").text());
if(board(1) == "RTC")
output.append(Memory{}.type("RTC").size(0x10).category("Time").battery().text());
output.append(Memory{}.type("RTC").size(0x10).content("Time").battery().text());
} else if(board(0) == "SUPERFX") {
//todo: MARIO CHIP 1 uses CPU oscillator
output.append(Oscillator{}.frequency(21'440'000).text());

View File

@ -24,7 +24,7 @@ auto SuperGrafx::manifest() const -> string {
output.append(" label: ", Location::prefix(location), "\n");
output.append(" name: ", Location::prefix(location), "\n");
output.append(" board\n");
output.append(Memory{}.type("ROM").size(data.size()).category("Program").text());
output.append(Memory{}.type("ROM").size(data.size()).content("Program").text());
return output;
}

View File

@ -47,11 +47,11 @@ auto WonderSwan::manifest() const -> string {
output.append(" name: ", Location::prefix(location), "\n");
output.append(" orientation: ", !orientation ? "horizontal" : "vertical", "\n");
output.append(" board\n");
output.append(Memory{}.type("ROM").size(data.size()).category("Program").text());
output.append(Memory{}.type("ROM").size(data.size()).content("Program").text());
if(ramType && ramSize)
output.append(Memory{}.type(ramType).size(ramSize).category("Save").battery(ramType == "RAM").text());
output.append(Memory{}.type(ramType).size(ramSize).content("Save").battery(ramType == "RAM").text());
if(hasRTC)
output.append(Memory{}.type("RTC").size(0x10).category("Time").text());
output.append(Memory{}.type("RTC").size(0x10).content("Time").text());
return output;
}