2013-04-17 22:43:11 -04:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
2008-12-08 04:46:09 +00:00
|
|
|
|
|
|
|
#ifndef _BOOT_H
|
|
|
|
#define _BOOT_H
|
|
|
|
|
2013-10-17 00:32:18 -04:00
|
|
|
#include <cstdlib>
|
2008-12-08 04:46:09 +00:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include "../CoreParameter.h"
|
|
|
|
|
2014-02-07 17:26:50 +13:00
|
|
|
#include "Volume.h"
|
|
|
|
using DiscIO::IVolume;
|
|
|
|
|
|
|
|
typedef struct CountrySetting
|
|
|
|
{
|
|
|
|
const std::string area;
|
|
|
|
const std::string video;
|
|
|
|
const std::string game;
|
|
|
|
const std::string code;
|
|
|
|
} CountrySetting;
|
|
|
|
|
2008-12-08 04:46:09 +00:00
|
|
|
class CBoot
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2009-01-18 01:45:53 +00:00
|
|
|
static bool BootUp();
|
2008-12-08 04:46:09 +00:00
|
|
|
static bool IsElfWii(const char *filename);
|
2013-09-12 01:02:41 +02:00
|
|
|
|
|
|
|
// Tries to find a map file for the current game by looking first in the
|
|
|
|
// local user directory, then in the shared user directory.
|
|
|
|
//
|
|
|
|
// If existing_map_file is not NULL and a map file exists, it is set to the
|
|
|
|
// path to the existing map file.
|
|
|
|
//
|
|
|
|
// If writable_map_file is not NULL, it is set to the path to where a map
|
|
|
|
// file should be saved.
|
|
|
|
//
|
|
|
|
// Returns true if a map file exists, false if none could be found.
|
|
|
|
static bool FindMapFile(std::string* existing_map_file,
|
|
|
|
std::string* writable_map_file);
|
2008-12-08 04:46:09 +00:00
|
|
|
|
|
|
|
private:
|
2008-12-21 11:56:37 +00:00
|
|
|
static void RunFunction(u32 _iAddr);
|
2008-12-08 04:46:09 +00:00
|
|
|
|
|
|
|
static void UpdateDebugger_MapLoaded(const char* _gameID = NULL);
|
|
|
|
|
2013-09-12 01:02:41 +02:00
|
|
|
static bool LoadMapFromFilename();
|
2008-12-08 04:46:09 +00:00
|
|
|
static bool Boot_ELF(const char *filename);
|
2009-02-22 00:40:52 +00:00
|
|
|
static bool Boot_WiiWAD(const char *filename);
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2009-12-10 09:16:10 +00:00
|
|
|
static bool EmulatedBS2_GC();
|
|
|
|
static bool EmulatedBS2_Wii();
|
|
|
|
static bool EmulatedBS2(bool _bIsWii);
|
2013-04-16 23:14:36 -04:00
|
|
|
static bool Load_BS2(const std::string& _rBootROMFilename);
|
2008-12-08 04:46:09 +00:00
|
|
|
static void Load_FST(bool _bIsWii);
|
2009-03-14 19:13:21 +00:00
|
|
|
|
2014-02-07 17:26:50 +13:00
|
|
|
static bool SetupWiiMemory(IVolume::ECountry country);
|
2008-12-08 04:46:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|