blob: 200ea29757da5af379901c4a0eb2e26894bc3939 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#include <stdio.h>
#include <sys/mman.h>
#include "utils.h"
#include "drc_core.h"
#include "vb_types.h"
#include "vb_set.h"
void hbHaxInit() {
tVBOpt.DYNAREC = 1;
}
void hbHaxExit() {
}
void FlushInvalidateCache() {
__clear_cache(cache_start, cache_start + CACHE_SIZE - 1);
}
Result ReprotectMemory(u32* addr, u32 pages, u32 mode) {
int ret = mprotect(addr, pages*0x1000, PROT_READ | PROT_WRITE | PROT_EXEC);
dprintf(0, "[DRC]: mprotect returned %d\n", ret);
return ret;
}
|