2014-04-11 05:28:28 +05:30
|
|
|
// Copyright 2014 Citra Emulator Project
|
2014-12-17 11:08:14 +05:30
|
|
|
// Licensed under GPLv2 or any later version
|
2014-11-19 14:19:13 +05:30
|
|
|
// Refer to the license.txt file included.
|
2014-04-11 05:28:28 +05:30
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "common/common_types.h"
|
|
|
|
#include "core/core.h"
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2014-04-11 07:45:07 +05:30
|
|
|
namespace HLE {
|
2014-04-11 05:28:28 +05:30
|
|
|
|
2014-06-05 09:56:48 +05:30
|
|
|
extern bool g_reschedule; ///< If true, immediately reschedules the CPU to a new thread
|
|
|
|
|
2014-04-13 07:25:36 +05:30
|
|
|
typedef u32 Addr;
|
2014-04-11 07:45:07 +05:30
|
|
|
typedef void (*Func)();
|
|
|
|
|
|
|
|
struct FunctionDef {
|
2014-04-12 03:39:23 +05:30
|
|
|
u32 id;
|
|
|
|
Func func;
|
|
|
|
std::string name;
|
2014-04-11 05:28:28 +05:30
|
|
|
};
|
|
|
|
|
2014-04-11 07:45:07 +05:30
|
|
|
struct ModuleDef {
|
2014-04-12 03:39:23 +05:30
|
|
|
std::string name;
|
|
|
|
int num_funcs;
|
|
|
|
const FunctionDef* func_table;
|
2014-04-11 05:28:28 +05:30
|
|
|
};
|
|
|
|
|
2014-04-11 08:56:12 +05:30
|
|
|
void RegisterModule(std::string name, int num_functions, const FunctionDef *func_table);
|
|
|
|
|
2014-05-21 03:58:38 +05:30
|
|
|
void CallSVC(u32 opcode);
|
2014-04-11 08:56:12 +05:30
|
|
|
|
2014-06-02 07:12:50 +05:30
|
|
|
void Reschedule(const char *reason);
|
2014-05-15 06:19:02 +05:30
|
|
|
|
2014-04-11 07:00:00 +05:30
|
|
|
void Init();
|
|
|
|
|
|
|
|
void Shutdown();
|
|
|
|
|
|
|
|
} // namespace
|