Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- output_string = ''
- event.onmemoryread(function()
- local str_ptr = emu.getregister('s2_lo') % 0x100000000
- local count = emu.getregister('s3_lo') % 0x100000000
- while (count > 0) do
- local char = string.char(mainmemory.readbyte(str_ptr - 0x80000000))
- if char == '\n' then
- print(output_string)
- output_string = ''
- else
- output_string = output_string .. char
- end
- count = count - 1
- str_ptr = str_ptr + 1
- end
- end, 0xB3FF0000)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement