pc-engine-cd.cpp 765 B

123456789101112131415161718192021
  1. struct PCEngineCD : CompactDisc {
  2. auto name() -> string override { return "PC Engine CD"; }
  3. auto manifestSector() const -> uint override { return 0; }
  4. auto manifest(vector<uint8_t> sector, string location) -> string override;
  5. };
  6. auto PCEngineCD::manifest(vector<uint8_t> sector, string location) -> string {
  7. //yes, "Electronics" is spelled incorrectly in actual PC Engine CD games ...
  8. if(memory::compare(sector.data() + 0x264, "NEC Home Electoronics", 21)) return {};
  9. //note: there is no method to determine the region for PC Engine CDs ...
  10. string region = "NTSC-J";
  11. string s;
  12. s += "game\n";
  13. s +={" name: ", Media::name(location), "\n"};
  14. s +={" label: ", Media::name(location), "\n"};
  15. s +={" region: ", region, "\n"};
  16. return s;
  17. }