mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 22:09:19 -07:00
8842a0f402
The difference between Dolphin's game IDs and GameTDB's game IDs is that GameTDB uses four characters for non-disc titles, whereas Dolphin uses six characters for all titles. This fixes: - TitleDatabase considering Datel discs to be NHL Hitz 2002 - Gecko code downloading not working for discs with IDs starting with P - Cover downloading mixing up discs with channels (e.g. Mario Kart Wii and Mario Kart Channel) and making extra HTTP requests. (Android was actually doing a better job at this than DolphinQt!)
73 lines
2.2 KiB
C++
73 lines
2.2 KiB
C++
// Copyright 2008 Dolphin Emulator Project
|
|
// Licensed under GPLv2+
|
|
// Refer to the license.txt file included.
|
|
|
|
#pragma once
|
|
|
|
#include <map>
|
|
#include <memory>
|
|
#include <optional>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "Common/CommonTypes.h"
|
|
#include "Core/IOS/ES/Formats.h"
|
|
#include "DiscIO/Volume.h"
|
|
|
|
namespace DiscIO
|
|
{
|
|
class BlobReader;
|
|
enum class BlobType;
|
|
enum class Country;
|
|
class FileSystem;
|
|
enum class Language;
|
|
enum class Region;
|
|
enum class Platform;
|
|
|
|
class VolumeWAD : public Volume
|
|
{
|
|
public:
|
|
VolumeWAD(std::unique_ptr<BlobReader> reader);
|
|
~VolumeWAD();
|
|
bool Read(u64 offset, u64 length, u8* buffer,
|
|
const Partition& partition = PARTITION_NONE) const override;
|
|
const FileSystem* GetFileSystem(const Partition& partition = PARTITION_NONE) const override;
|
|
std::optional<u64> GetTitleID(const Partition& partition = PARTITION_NONE) const override;
|
|
const IOS::ES::TMDReader& GetTMD(const Partition& partition = PARTITION_NONE) const override;
|
|
std::string GetGameID(const Partition& partition = PARTITION_NONE) const override;
|
|
std::string GetGameTDBID(const Partition& partition = PARTITION_NONE) const override;
|
|
std::string GetMakerID(const Partition& partition = PARTITION_NONE) const override;
|
|
std::optional<u16> GetRevision(const Partition& partition = PARTITION_NONE) const override;
|
|
std::string GetInternalName(const Partition& partition = PARTITION_NONE) const override
|
|
{
|
|
return "";
|
|
}
|
|
std::map<Language, std::string> GetLongNames() const override;
|
|
std::vector<u32> GetBanner(u32* width, u32* height) const override;
|
|
std::string GetApploaderDate(const Partition& partition = PARTITION_NONE) const override
|
|
{
|
|
return "";
|
|
}
|
|
Platform GetVolumeType() const override;
|
|
Region GetRegion() const override;
|
|
Country GetCountry(const Partition& partition = PARTITION_NONE) const override;
|
|
|
|
BlobType GetBlobType() const override;
|
|
u64 GetSize() const override;
|
|
u64 GetRawSize() const override;
|
|
|
|
private:
|
|
std::unique_ptr<BlobReader> m_reader;
|
|
IOS::ES::TMDReader m_tmd;
|
|
u32 m_offset = 0;
|
|
u32 m_tmd_offset = 0;
|
|
u32 m_opening_bnr_offset = 0;
|
|
u32 m_hdr_size = 0;
|
|
u32 m_cert_size = 0;
|
|
u32 m_tick_size = 0;
|
|
u32 m_tmd_size = 0;
|
|
u32 m_data_size = 0;
|
|
};
|
|
|
|
} // namespace
|