2016-06-15 21:59:34 -04:00
|
|
|
#pragma once
|
|
|
|
#include "stdafx.h"
|
|
|
|
#include <unordered_map>
|
2016-07-26 19:19:28 -04:00
|
|
|
#include "RomData.h"
|
2016-06-15 21:59:34 -04:00
|
|
|
|
|
|
|
class GameDatabase
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
static std::unordered_map<uint32_t, GameInfo> _gameDatabase;
|
|
|
|
|
|
|
|
template<typename T> static T ToInt(string value);
|
|
|
|
|
2017-04-01 15:47:43 -04:00
|
|
|
static BusConflictType GetBusConflictType(string busConflictSetting);
|
2016-06-15 21:59:34 -04:00
|
|
|
static GameSystem GetGameSystem(string system);
|
2018-07-07 14:52:51 -04:00
|
|
|
static VsSystemType GetVsSystemType(string system);
|
|
|
|
static PpuModel GetPpuModel(string model);
|
2018-07-07 17:30:13 -04:00
|
|
|
static GameInputType GetInputType(GameSystem system, string inputType);
|
2016-06-15 21:59:34 -04:00
|
|
|
static uint8_t GetSubMapper(GameInfo &info);
|
|
|
|
|
|
|
|
static void InitDatabase();
|
2016-07-26 19:19:28 -04:00
|
|
|
static void UpdateRomData(GameInfo &info, RomData &romData);
|
2018-01-04 19:03:47 -05:00
|
|
|
static void SetVsSystemDefaults(uint32_t prgCrc32);
|
2016-06-15 21:59:34 -04:00
|
|
|
|
|
|
|
public:
|
2018-01-04 19:03:47 -05:00
|
|
|
static void LoadGameDb(vector<string> data);
|
|
|
|
|
2018-07-07 17:30:13 -04:00
|
|
|
static void InitializeInputDevices(GameInputType inputType, GameSystem system, bool silent = false);
|
2018-07-10 00:39:19 -04:00
|
|
|
static void InitializeInputDevices(RomInfo &romInfo);
|
2018-04-14 22:31:19 -04:00
|
|
|
static void SetGameInfo(uint32_t romCrc, RomData &romData, bool updateRomData, bool forHeaderlessRom);
|
2017-03-18 19:11:26 -04:00
|
|
|
static bool GetiNesHeader(uint32_t romCrc, NESHeader &nesHeader);
|
2017-05-25 20:04:49 -04:00
|
|
|
static bool GetDbRomSize(uint32_t romCrc, uint32_t &prgSize, uint32_t &chrSize);
|
2016-06-15 21:59:34 -04:00
|
|
|
};
|