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>
|
|
|
|
|
2017-02-08 10:55:55 -05:00
|
|
|
#include "Common/CommonTypes.h"
|
|
|
|
|
2016-12-23 18:41:21 +01:00
|
|
|
struct RegionSetting
|
2014-02-07 17:26:50 +13:00
|
|
|
{
|
2016-06-24 10:43:46 +02: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:
|
2016-06-24 10:43:46 +02:00
|
|
|
static bool BootUp();
|
|
|
|
static bool IsElfWii(const std::string& filename);
|
|
|
|
|
|
|
|
// 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 nullptr and a map file exists, it is set to the
|
|
|
|
// path to the existing map file.
|
|
|
|
//
|
|
|
|
// If writable_map_file is not nullptr, it is set to the path to where a map
|
|
|
|
// file should be saved.
|
|
|
|
//
|
|
|
|
// If title_id is not nullptr, it is set to the title id
|
|
|
|
//
|
|
|
|
// 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,
|
|
|
|
std::string* title_id = nullptr);
|
2017-01-28 18:12:05 +01:00
|
|
|
static bool LoadMapFromFilename();
|
2008-12-08 04:46:09 +00:00
|
|
|
|
|
|
|
private:
|
2016-06-24 10:43:46 +02:00
|
|
|
static bool DVDRead(u64 dvd_offset, u32 output_address, u32 length, bool decrypt);
|
|
|
|
static void RunFunction(u32 _iAddr);
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2016-06-24 10:43:46 +02:00
|
|
|
static void UpdateDebugger_MapLoaded();
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2016-06-24 10:43:46 +02: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
|
|
|
|
2016-06-24 10:43:46 +02:00
|
|
|
static bool EmulatedBS2_GC(bool skipAppLoader = false);
|
|
|
|
static bool EmulatedBS2_Wii();
|
|
|
|
static bool EmulatedBS2(bool _bIsWii);
|
|
|
|
static bool Load_BS2(const std::string& _rBootROMFilename);
|
|
|
|
static void Load_FST(bool _bIsWii);
|
2009-03-14 19:13:21 +00:00
|
|
|
|
2017-01-22 22:50:07 -05:00
|
|
|
static bool SetupWiiMemory(u64 ios_title_id);
|
2008-12-08 04:46:09 +00:00
|
|
|
};
|