From 93ef53d042f2ca9c503c93c71e8b2b124b9aa083 Mon Sep 17 00:00:00 2001 From: Thomas Touhey Date: Mon, 25 Apr 2016 15:08:15 +0200 Subject: [PATCH] Adapted syscall to SH4 --- src/ML_vram_adress.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ML_vram_adress.c b/src/ML_vram_adress.c index ca4cbcc..519a9ec 100644 --- a/src/ML_vram_adress.c +++ b/src/ML_vram_adress.c @@ -10,10 +10,11 @@ #include -static int SysCallCode[] = {0xD201422B,0x60F20000,0x80010070}; -static int (*SysCall)(int R4, int R5, int R6, int R7, int FNo) = (void*)&SysCallCode; +// Syscall 0x135 (Thanks to Simon Lothar for this function) +typedef char*(*sc_cpv)(void); +const unsigned int sc0135[] = {0xD201D002, 0x422B0009, 0x80010070, 0x0135}; char* ML_vram_adress() { - return (char*)((*SysCall)(0, 0, 0, 0, 309)); + return ((sc_cpv)sc0135)(); }