123456789101112131415161718192021222324252627282930 |
- struct SG1000 : Cartridge {
- auto name() -> string override { return "SG-1000"; }
- auto extensions() -> vector<string> override { return {"sg1000", "sg"}; }
- auto export(string location) -> vector<uint8_t> override;
- auto heuristics(vector<uint8_t>& data, string location) -> string override;
- };
- auto SG1000::export(string location) -> vector<uint8_t> {
- vector<uint8_t> data;
- append(data, {location, "program.rom"});
- return data;
- }
- auto SG1000::heuristics(vector<uint8_t>& data, string location) -> string {
- string s;
- s += "game\n";
- s +={" name: ", Media::name(location), "\n"};
- s +={" label: ", Media::name(location), "\n"};
- s += " board\n";
- s += " memory\n";
- s += " type: ROM\n";
- s +={" size: 0x", hex(data.size()), "\n"};
- s += " content: Program\n";
- s += " memory\n";
- s += " type: RAM\n";
- s += " size: 0x4000\n";
- s += " content: Save\n";
- return s;
- }
|