Adapted syscall to SH4

This commit is contained in:
Thomas Touhey 2016-04-25 15:08:15 +02:00
parent c9e2a6130f
commit 93ef53d042
1 changed files with 4 additions and 3 deletions

View File

@ -10,10 +10,11 @@
#include <monochrome/internals.h>
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)();
}