| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include <array> |
| 7 |
#include <optional> |
| 8 |
#include <string> |
| 9 |
|
| 10 |
#include "Common/CommonTypes.h" |
| 11 |
#include "Common/Crypto/SHA1.h" |
| 12 |
#include "DiscIO/Volume.h" |
| 13 |
|
| 14 |
namespace DiscIO |
| 15 |
{ |
| 16 |
class VolumeDisc : public Volume |
| 17 |
{ |
| 18 |
public: |
| 19 |
struct BootID |
| 20 |
{ |
| 21 |
u32 magic; |
| 22 |
std::array<uint32_t, 3> unknown0; |
| 23 |
std::array<uint32_t, 4> unknown1; |
| 24 |
std::array<char, 4> mediaboard_type; |
| 25 |
uint32_t unknown2; |
| 26 |
uint16_t year; |
| 27 |
uint8_t month; |
| 28 |
uint8_t day; |
| 29 |
uint8_t video_mode; |
| 30 |
uint8_t unknown3; |
| 31 |
uint8_t type_3_compatible; |
| 32 |
uint8_t unknown4; |
| 33 |
std::array<char, 8> game_id; |
| 34 |
uint32_t region_flags; |
| 35 |
std::array<uint32_t, 9> unknown6; |
| 36 |
std::array<char, 0x20> manufacturer; |
| 37 |
std::array<char, 0x20> game_name; |
| 38 |
std::array<char, 0x20> game_executable; |
| 39 |
std::array<char, 0x20> test_executable; |
| 40 |
std::array<std::array<char, 0x20>, 8> credit_types; |
| 41 |
}; |
| 42 |
|
| 43 |
std::string GetGameID(const Partition& partition = PARTITION_NONE) const override; |
| 44 |
Country GetCountry(const Partition& partition = PARTITION_NONE) const override; |
| 45 |
std::string GetMakerID(const Partition& partition = PARTITION_NONE) const override; |
| 46 |
std::optional<u16> GetRevision(const Partition& partition = PARTITION_NONE) const override; |
| 47 |
std::string GetInternalName(const Partition& partition = PARTITION_NONE) const override; |
| 48 |
std::string GetApploaderDate(const Partition& partition) const override; |
| 49 |
std::optional<u8> GetDiscNumber(const Partition& partition = PARTITION_NONE) const override; |
| 50 |
bool IsNKit() const override; |
| 51 |
|
| 52 |
protected: |
| 53 |
Region RegionCodeToRegion(std::optional<u32> region_code) const; |
| 54 |
void AddGamePartitionToSyncHash(Common::SHA1::Context* context) const; |
| 55 |
}; |
| 56 |
|
| 57 |
static_assert(sizeof(VolumeDisc::BootID) == 480); |
| 58 |
|
| 59 |
} |