mirror of
https://github.com/notwa/mm
synced 2024-06-25 11:37:12 -07:00
make event flag addrs generic
This commit is contained in:
parent
30dff10c7e
commit
671d7b4dee
|
@ -91,6 +91,7 @@ return {
|
||||||
slulltula_count_wf = AL(0xEC0, 2),
|
slulltula_count_wf = AL(0xEC0, 2),
|
||||||
slulltula_count_gb = AL(0xEC2, 2),
|
slulltula_count_gb = AL(0xEC2, 2),
|
||||||
banked_rupees = AL(0xEDE, 2),
|
banked_rupees = AL(0xEDE, 2),
|
||||||
|
week_event_reg = AL(0xEF8, 100),
|
||||||
archery = AL(0xF00, 1),
|
archery = AL(0xF00, 1),
|
||||||
chateau_romani = AL(0xF06, 1), -- 8
|
chateau_romani = AL(0xF06, 1), -- 8
|
||||||
disable_c_buttons = AL(0xF4A, 1), -- 8
|
disable_c_buttons = AL(0xF4A, 1), -- 8
|
||||||
|
@ -129,6 +130,7 @@ return {
|
||||||
|
|
||||||
-- note: these addresses are invalid for JP10, JP11.
|
-- note: these addresses are invalid for JP10, JP11.
|
||||||
checksum = AL(0x100A, 2),
|
checksum = AL(0x100A, 2),
|
||||||
|
event_inf = AL(0x100C, 9),
|
||||||
disable_pause = AL(0x100D, 1),
|
disable_pause = AL(0x100D, 1),
|
||||||
hookshot_ba = AL(0x100E, 1),
|
hookshot_ba = AL(0x100E, 1),
|
||||||
disable_c_buttons_2 = AL(0x100F, 1),
|
disable_c_buttons_2 = AL(0x100F, 1),
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
require "boilerplate"
|
require "boilerplate"
|
||||||
|
require "addrs.init"
|
||||||
|
|
||||||
local ignore = {
|
local ignore = {
|
||||||
-- every time a scene (un)loads
|
-- every time a scene (un)loads
|
||||||
|
@ -37,10 +38,10 @@ end
|
||||||
|
|
||||||
FlagMonitor = Class()
|
FlagMonitor = Class()
|
||||||
|
|
||||||
function FlagMonitor:init(name, begin, len)
|
function FlagMonitor:init(name, a)
|
||||||
self.name = name
|
self.name = name
|
||||||
self.begin = begin
|
self.begin = a.addr
|
||||||
self.len = len
|
self.len = a.type
|
||||||
self.once = false
|
self.once = false
|
||||||
self.old_bytes = {}
|
self.old_bytes = {}
|
||||||
end
|
end
|
||||||
|
@ -62,13 +63,12 @@ function FlagMonitor:diff()
|
||||||
self.once = true
|
self.once = true
|
||||||
end
|
end
|
||||||
|
|
||||||
-- US 1.0 addresses for the time being
|
local weg = FlagMonitor('weg', addrs.week_event_reg)
|
||||||
local weg = FlagMonitor('weg', 0x1F0568, 100) -- week_event_reg
|
local inf = FlagMonitor('inf', addrs.event_inf)
|
||||||
local inf = FlagMonitor('inf', 0x1F067C, 8) -- event_inf
|
--local mmb = FlagMonitor('mmb', addrs.mask_mask_bit)
|
||||||
local mmb = FlagMonitor('mmb', 0x1F3F3A, 8) -- mask_mask_bit (bad address?)
|
|
||||||
while true do
|
while true do
|
||||||
weg:diff()
|
weg:diff()
|
||||||
inf:diff()
|
inf:diff()
|
||||||
mmb:diff()
|
--mmb:diff()
|
||||||
emu.frameadvance()
|
emu.frameadvance()
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user