colecovision.cpp 832 B

1234567891011121314151617181920212223242526
  1. struct ColecoVision : Cartridge {
  2. auto name() -> string override { return "ColecoVision"; }
  3. auto extensions() -> vector<string> override { return {"cv"}; }
  4. auto export(string location) -> vector<uint8_t> override;
  5. auto heuristics(vector<uint8_t>& data, string location) -> string override;
  6. };
  7. auto ColecoVision::export(string location) -> vector<uint8_t> {
  8. vector<uint8_t> data;
  9. append(data, {location, "program.rom"});
  10. return data;
  11. }
  12. auto ColecoVision::heuristics(vector<uint8_t>& data, string location) -> string {
  13. string s;
  14. s += "game\n";
  15. s +={" name: ", Media::name(location), "\n"};
  16. s +={" label: ", Media::name(location), "\n"};
  17. s += " board\n";
  18. s += " memory\n";
  19. s += " type: ROM\n";
  20. s +={" size: 0x", hex(data.size()), "\n"};
  21. s += " content: Program\n";
  22. return s;
  23. }