1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-19 23:32:28 +00:00
CLK/Storage/Cartridge/Encodings/CommodoreROM.cpp
2018-05-13 15:19:52 -04:00

25 lines
537 B
C++

//
// CommodoreROM.cpp
// Clock Signal
//
// Created by Thomas Harte on 29/09/2016.
// Copyright 2016 Thomas Harte. All rights reserved.
//
#include "CommodoreROM.hpp"
bool Storage::Cartridge::Encodings::CommodoreROM::isROM(const std::vector<uint8_t> &contents) {
return
(
contents.size() == 0x400 ||
contents.size() == 0x800 ||
contents.size() == 0x1000 ||
contents.size() == 0x2000
) &&
contents[4] == 0x41 &&
contents[5] == 0x30 &&
contents[6] == 0xc3 &&
contents[7] == 0xc2 &&
contents[8] == 0xcd;
}