1
0
Fork 0
mirror of https://github.com/notwa/mm synced 2024-05-16 12:43:24 -07:00

get smart (small fixes)

This commit is contained in:
Connor Olding 2015-05-01 09:37:56 -07:00
parent fee7a6f2e2
commit 1ecb9cb382
6 changed files with 10 additions and 48 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
lua chest test
lua movement test
_ootmemod.lua

View File

@ -1,38 +1,3 @@
return {
checksum = AL(0x100A, 2),
disable_pause = AL(0x100D, 1),
hookshot_ba = AL(0x100E, 1),
disable_c_buttons_2 = AL(0x100F, 1),
disable_items = AL(0x1010, 1),
rock_sirloin = AL(0x1014, 1),
sword_disabler = AL(0x1015, 1),
bubble_timer = AL(0x1016, 2),
rupee_accumulator = AL(0x1018, 2),
spring_water_timers = AL(0x1020, 0xC0),
spring_water_time_1 = AL(0x1020, 0x20),
spring_water_time_2 = AL(0x1040, 0x20),
spring_water_time_3 = AL(0x1060, 0x20),
spring_water_time_4 = AL(0x1080, 0x20),
spring_water_time_5 = AL(0x10A0, 0x20),
spring_water_time_6 = AL(0x10C0, 0x20),
pictograph_picture = AL(0x10E0, 0x2BC0),
title_screen_mod = AL(0x3CA8, 4),
entrance_mod = AL(0x3CAC, 4),
timer_crap = AL(0x3DD0, 4),
timer_x = AL(0x3EFA, 2),
timer_y = AL(0x3F08, 2),
buttons_enabled = AL(0x3F18, 4),
magic_modifier = AL(0x3F28, 4),
magic_max = AL(0x3F2E, 2),
weird_a_graphic = AL(0x3F42, 1),
target_style = AL(0x3F45, 1),
music_mod = AL(0x3F46, 2),
entrance_mod_setter = AL(0x3F4A, 2),
title_screen_thing = AL(0x3F4C, 1),
transition_mod = AL(0x3F55, 2),
suns_song_effect = AL(0x3F58, 2),
health_mod = AL(0x3F5A, 2),
screen_scale_enable = AL(0x3F60, 1),
screen_scale = AL(0x3F64, 'f'),
scene_flags_ingame = AL(0x3F68, 0x960),
mask_mask_bit = A(0x24405A, 3),
}

View File

@ -3,6 +3,7 @@ return {
visibility = A(0x166118, 2),
stored_epona = A(0x1BDA9F, 1),
stored_song = A(0x1C6A7D, 1),
mask_mask_bit = A(0x1F3F3A, 3),
buttons_3 = A(0x1FB870, 2),
buttons_4 = A(0x1FB876, 2),
}

View File

@ -8,7 +8,8 @@ function Monitor:init(name, a)
end
function Monitor:diff()
local bytes = mainmemory.readbyterange(self.begin, self.len)
-- bizhawk has an off-by-one bug where this returns length + 1 bytes
local bytes = mainmemory.readbyterange(self.begin, self.len-1)
local old_bytes = self.old_bytes
if self.once then
for k, v in pairs(bytes) do

View File

@ -23,13 +23,6 @@ local ignore = {
}
FlagMonitor = Class(Monitor)
function FlagMonitor:init(name, a)
self.name = name
self.begin = a.addr
self.len = a.type
self.once = false
self.old_bytes = {}
end
function FlagMonitor:mark(i, x, x1)
local now = emu.framecount()
@ -49,8 +42,8 @@ end
local weg = FlagMonitor('weg', addrs.week_event_reg)
local inf = FlagMonitor('inf', addrs.event_inf)
--local mmb = FlagMonitor('mmb', A(0x24405A, 3))
local mmb = FlagMonitor('mmb', A(0x1F3F3A, 3))
while true do
local mmb = FlagMonitor('mmb', addrs.mask_mask_bit)
while mm do
weg:diff()
inf:diff()
mmb:diff()

View File

@ -52,7 +52,8 @@ function ShortMonitor:dump()
local mod = self.modified[ih]
local value = R2(self.begin + ih)
local vs = mod and 'n/a' or ('%04X'):format(value)
local s = ('%02X\t%i\t%i\t%s\n'):format(block, page+1, row+1, vs)
local name = ('%s%02i'):format(blocknames[block+1], page*16 + row)
local s = ('%s\t%i\t%i\t%s\n'):format(name, page+1, row+1, vs)
buff = buff..s
end
print(buff)
@ -64,7 +65,7 @@ me = ShortMonitor('me', A(0x210A24, 0x15C0))
me.modified = deserialize('_ootmemod.lua') or {}
while true do
while version == "O EUDB MQ" do
me:diff()
if me.dirty then
serialize(me.modified, ('_ootmemod.lua'))