| 1590 | } |
| 1591 | |
| 1592 | static int memory_readbyterange(lua_State *L) { |
| 1593 | |
| 1594 | int range_start = luaL_checkinteger(L,1); |
| 1595 | int range_size = luaL_checkinteger(L,2); |
| 1596 | if(range_size < 0) |
| 1597 | return 0; |
| 1598 | |
| 1599 | char* buf = (char*)alloca(range_size); |
| 1600 | for(int i=0;i<range_size;i++) { |
| 1601 | buf[i] = GetMem(range_start+i); |
| 1602 | } |
| 1603 | |
| 1604 | lua_pushlstring(L,buf,range_size); |
| 1605 | |
| 1606 | return 1; |
| 1607 | } |
| 1608 | |
| 1609 | static int ppu_readbyte(lua_State *L) { |
| 1610 | lua_pushinteger(L, FFCEUX_PPURead(luaL_checkinteger(L, 1))); |
nothing calls this directly
no test coverage detected