sdk/include/tbase.h
Kirill Zhumarin 6c855ab332 utf-8
2023-10-15 22:37:30 +03:00

40 lines
1.3 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//tbase.h - Работа с базой трансляции для применения виртуальных патчей
//(C)Dimadze
//v1.2
#ifndef __VPATCHER_H__
#define __VPATCHER_H__
#ifdef __cplusplus
extern "C" {
#endif
void EnableINT(int fi);
int DisableINT();
void CleanCache(void *vaddress);
void CleanTLB();
int *GetTBaseAddr();
void UnLockAccess();
void ExecuteIMB();
//Получение значения байта из адреса
char GetByteFromAddress(void *addr);
//Виртуальная запись байта по адресу (Применение патча)
int ApplyPatch(void *addr, char new_byte);
//Виртуальная запись байта по адресу (Отмена патча)
int UndoPatch(void *addr, char old_byte);
/* При отмене всех патчей было решено */
/* Разбивку секций оставить */
/* Хотя для очистки flash страниц есть все данные */
/* Участки RAM, которые отводится под flash страницы */
/* Не имеют доступа для записи, только чтение */
/* Чтобы в них писать надо разблокировывать доступ */
#ifdef __cplusplus
}
#endif
#endif