blob: 82dd5b1771c77bb8a65c92a8073e4d7f1d3db635 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#pragma once
#include <vector>
#include <string>
#include <cstdint>
namespace N64 {
enum class CountryCode {
Japan,
NorthAmerica,
Europe,
Unknown
};
class Cartridge {
public:
explicit Cartridge(const std::vector<uint8_t>& romData) : gRomData(romData), gCountryCode(CountryCode::Unknown), gVersion(0), gGameTitle("Unknown") {}
void Initialize();
const std::string& GetGameTitle();
std::string GetCountryCode();
CountryCode GetCountry();
uint8_t GetVersion() const;
std::string GetHash();
uint32_t GetCRC();
private:
std::vector<uint8_t> gRomData;
CountryCode gCountryCode;
uint8_t gVersion;
std::string gGameTitle;
std::string gHash;
uint32_t gRomCRC;
};
}
|