2014-04-11 05:28:28 +05:30
|
|
|
// Copyright 2014 Citra Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "common/common_types.h"
|
|
|
|
#include "core/core.h"
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2014-04-11 07:45:07 +05:30
|
|
|
#define PARAM(n) Core::g_app_core->GetReg(n)
|
2014-04-17 06:11:33 +05:30
|
|
|
#define PARAM64(n) (Core::g_app_core->GetReg(n) | ((u64)Core::g_app_core->GetReg(n + 1) << 32))
|
2014-04-11 07:45:07 +05:30
|
|
|
#define RETURN(n) Core::g_app_core->SetReg(0, n)
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
namespace HLE {
|
2014-04-11 05:28:28 +05:30
|
|
|
|
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-05-15 06:19:02 +05:30
|
|
|
void EatCycles(u32 cycles);
|
|
|
|
|
|
|
|
void ReSchedule(const char *reason);
|
|
|
|
|
2014-04-11 07:00:00 +05:30
|
|
|
void Init();
|
|
|
|
|
|
|
|
void Shutdown();
|
|
|
|
|
|
|
|
} // namespace
|