1
0
Fork 0
mirror of https://github.com/notwa/mm synced 2024-11-05 00:19:02 -08:00

some cleanup

This commit is contained in:
Connor Olding 2015-03-17 14:59:06 -07:00
parent 6fe4a58056
commit 2676397fd9
3 changed files with 17 additions and 18 deletions

View file

@ -176,5 +176,5 @@ while true do
end
old_ctrl = ctrl
emu.yield()
emu.frameadvance()
end

View file

@ -5,7 +5,7 @@ local unset="unset"
return {
[0x000]="Link",
[0x001]="Wall Punch / Ground Pound Effect",
[0x002]="Store Item", -- TODO: double check
[0x002]="Store Item",
[0x003]="?",
[0x004]="Flame Prop", -- also ice?
[0x005]="Wooden Door",
@ -45,7 +45,7 @@ return {
[0x027]="? STT Flip",
[0x028]="Environmental Noise",
[0x029]=unset,
[0x02A]="Trading Post Owner", -- Storefront?
[0x02A]="Trading Post Owner", -- Storefront? also bomb shop owner
[0x02B]=unset,
[0x02C]=unset,
[0x02D]="Death Armos",
@ -383,7 +383,7 @@ return {
[0x179]="Drifting Ice Platform",
[0x17A]="Deku Palace Guard",
[0x17B]="3 Bugs",
[0x17C]="? En_Fall", -- considering the filename and number of places it's in, could this affect voiding out? or what if it means the moon can fall in this area?
[0x17C]="Moon / Moon Stuff",
[0x17D]="Postman (Home)",
[0x17E]="Deku Shrine Closing Door",
[0x17F]="Deku Butler",
@ -548,7 +548,7 @@ return {
[0x21E]="Pirate Guard", -- or is Gerudo Guard better?
[0x21F]="Romani",
[0x220]="Cremia",
[0x221]="Lower Carnival Platform", -- "String of Flags"
[0x221]="Carnival Platform", -- "String of Flags"
[0x222]="Elevator (GBT)",
[0x223]="Owl Statue",
[0x224]="Mikau",

View file

@ -2,24 +2,23 @@
local hash = gameinfo.getromhash()
local versions = {
['D6133ACE5AFAA0882CF214CF88DABA39E266C078'] = 'US10',
['D6133ACE5AFAA0882CF214CF88DABA39E266C078'] = "US10",
['5FB2301AACBF85278AF30DCA3E4194AD48599E36'] = "JP10",
}
local version = versions[hash]
local JP = version ~= 'US10'
local index = 84
local index = 0
local fn = 'lua chest test'
local start, ours, text
if not JP then
-- US 1.0
if version == 'US10' then
start = 0x779884 -- the get item table
ours = 0x779896 -- the chest we're standing in front of
text = 0x3FCE10 -- ascii text buffer
else
elseif version == 'JP10' then
start = 0x7797E4 -- the get item table
ours = 0x7797F6 -- the chest we're standing in front of
text = 0x3FD660 -- ascii text buffer (not quite but close enough)
text = 0x3FD660 -- no such thing in JP but we need something
end
function draw_index()
@ -61,7 +60,6 @@ function read_ascii(addr, len)
return str
end
local fn = 'lua chest test'
client.unpause()
savestate.save(fn)
for off=index*6, 185*6, 6 do
@ -73,14 +71,15 @@ for off=index*6, 185*6, 6 do
joypad.set({A=true}, 1)
advance()
joypad.set({A=false}, 1)
local good = false
for i=1, 9*20 do
if JP and (
(index >= 85 and index <= 88)
) then break end -- crashes
if version == 'JP10' and (index >= 85 and index <= 88) then
break -- crashes
end
advance()
if mainmemory.readbyte(text + 0xA) == 0xFF then
if not JP then
if version == 'US10' then
local begin = text + 0xC
print(off/6 + 1, read_ascii(begin))
good = true