2015-05-24 06:55:12 +02:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2015-05-18 01:08:10 +02:00
|
|
|
// Licensed under GPLv2+
|
2013-04-17 22:43:11 -04:00
|
|
|
// Refer to the license.txt file included.
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2014-02-10 13:54:46 -05:00
|
|
|
#pragma once
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2013-10-17 00:32:18 -04:00
|
|
|
#include <cstdlib>
|
2008-12-08 04:46:09 +00:00
|
|
|
#include <string>
|
|
|
|
|
2014-02-17 05:18:15 -05:00
|
|
|
#include "DiscIO/Volume.h"
|
2014-02-07 17:26:50 +13:00
|
|
|
|
2014-07-13 15:28:50 -04:00
|
|
|
struct CountrySetting
|
2014-02-07 17:26:50 +13:00
|
|
|
{
|
|
|
|
const std::string area;
|
|
|
|
const std::string video;
|
|
|
|
const std::string game;
|
|
|
|
const std::string code;
|
2014-07-13 15:28:50 -04:00
|
|
|
};
|
2014-03-29 11:05:44 +01:00
|
|
|
|
2008-12-08 04:46:09 +00:00
|
|
|
class CBoot
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2009-01-18 01:45:53 +00:00
|
|
|
static bool BootUp();
|
2014-03-12 15:33:41 -04:00
|
|
|
static bool IsElfWii(const std::string& 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.
|
|
|
|
//
|
2014-03-09 21:14:26 +01:00
|
|
|
// If existing_map_file is not nullptr and a map file exists, it is set to the
|
2013-09-12 01:02:41 +02:00
|
|
|
// path to the existing map file.
|
|
|
|
//
|
2014-03-09 21:14:26 +01:00
|
|
|
// If writable_map_file is not nullptr, it is set to the path to where a map
|
2013-09-12 01:02:41 +02:00
|
|
|
// file should be saved.
|
|
|
|
//
|
2014-12-15 08:47:36 +10:30
|
|
|
// If title_id is not nullptr, it is set to the title id
|
|
|
|
//
|
2013-09-12 01:02:41 +02:00
|
|
|
// Returns true if a map file exists, false if none could be found.
|
|
|
|
static bool FindMapFile(std::string* existing_map_file,
|
2014-12-15 08:47:36 +10:30
|
|
|
std::string* writable_map_file,
|
|
|
|
std::string* title_id = nullptr);
|
2008-12-08 04:46:09 +00:00
|
|
|
|
|
|
|
private:
|
2015-04-22 17:06:13 +02:00
|
|
|
static bool DVDRead(u64 dvd_offset, u32 output_address, u32 length, bool decrypt);
|
2008-12-21 11:56:37 +00:00
|
|
|
static void RunFunction(u32 _iAddr);
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2014-03-23 17:19:12 -04:00
|
|
|
static void UpdateDebugger_MapLoaded();
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2013-09-12 01:02:41 +02:00
|
|
|
static bool LoadMapFromFilename();
|
2014-03-12 15:33:41 -04:00
|
|
|
static bool Boot_ELF(const std::string& filename);
|
|
|
|
static bool Boot_WiiWAD(const std::string& filename);
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2014-11-01 22:20:56 +13:00
|
|
|
static bool EmulatedBS2_GC(bool skipAppLoader = false);
|
2009-12-10 09:16:10 +00:00
|
|
|
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
|
|
|
|
2015-05-08 17:28:03 -04:00
|
|
|
static bool SetupWiiMemory(DiscIO::IVolume::ECountry country);
|
2008-12-08 04:46:09 +00:00
|
|
|
};
|