lua-add vram_readword and vram_writeword
This commit is contained in:
parent
375fa0c94f
commit
92fe950b24
|
@ -1750,6 +1750,14 @@ DEFINE_LUA_FUNCTION(memory_readbytesigned, "address")
|
|||
lua_pushinteger(L, value);
|
||||
return 1;
|
||||
}
|
||||
DEFINE_LUA_FUNCTION(vram_readword, "address")
|
||||
{
|
||||
int address = luaL_checkinteger(L,1);
|
||||
u16 value = T1ReadWord(MMU.ARM9_LCD,address);
|
||||
lua_settop(L,0);
|
||||
lua_pushinteger(L, value);
|
||||
return 1;
|
||||
}
|
||||
DEFINE_LUA_FUNCTION(memory_readword, "address")
|
||||
{
|
||||
int address = luaL_checkinteger(L,1);
|
||||
|
@ -1797,6 +1805,13 @@ DEFINE_LUA_FUNCTION(memory_writeword, "address,value")
|
|||
_MMU_write16<ARMCPU_ARM9>(address, value);
|
||||
return 0;
|
||||
}
|
||||
DEFINE_LUA_FUNCTION(vram_writeword, "address,value")
|
||||
{
|
||||
int address = luaL_checkinteger(L,1);
|
||||
u16 value = (u16)(luaL_checkinteger(L,2) & 0xFFFF);
|
||||
T1WriteWord(MMU.ARM9_LCD,address,value);
|
||||
return 0;
|
||||
}
|
||||
DEFINE_LUA_FUNCTION(memory_writedword, "address,value")
|
||||
{
|
||||
int address = luaL_checkinteger(L,1);
|
||||
|
|
Loading…
Reference in New Issue