mirror of
https://github.com/notwa/mm
synced 2024-11-13 22:39:02 -08:00
Revert "update for new readbyterange behaviour"
This reverts commit 71f44db82e
.
This commit is contained in:
parent
3342eb90d3
commit
adab471173
2 changed files with 5 additions and 3 deletions
|
@ -12,10 +12,12 @@ function Monitor:init(name, a)
|
|||
end
|
||||
|
||||
function Monitor:read()
|
||||
local raw = mainmemory.readbyterange(self.begin, self.len)
|
||||
-- bizhawk has an off-by-one bug where this returns length + 1 bytes
|
||||
local raw = mainmemory.readbyterange(self.begin, self.len-1)
|
||||
local bytes = {}
|
||||
local begin = self.begin
|
||||
for k, v in pairs(raw) do
|
||||
bytes[k] = v
|
||||
bytes[k - begin] = v
|
||||
end
|
||||
return bytes
|
||||
end
|
||||
|
|
|
@ -43,7 +43,7 @@ function read_ascii(addr, len)
|
|||
-- so we'll set up a table we can use ipairs() on
|
||||
local ordered_bytes = {}
|
||||
for a, v in pairs(bytes) do
|
||||
ordered_bytes[tonumber(a, 16) + 1] = v
|
||||
ordered_bytes[tonumber(a, 16) - begin + 1] = v
|
||||
end
|
||||
|
||||
local seq = false
|
||||
|
|
Loading…
Reference in a new issue