Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Chrono Trigger Infoscope for Snes9x(1.51-rr)
- -- 2016/02/17 Redslash
- --HOW TO USE:
- -- 1. get the emulator here http://tasvideos.org/EmulatorResources/Snes9x.html (it's the top link)
- -- 2. download this paste (.LUA file), and open it from Snes9x (File > Lua Scripting > New Lua Script Window)
- -- older version here: http://pastebin.com/J0C5kDnF (2015/10/30)
- local dispbox = 1 -- press Select to toggle
- local dispboxID = 0 -- CHANGE THIS TO SEE NPC IDs
- local dispCronobox = 0 -- CHANGE THIS TO TO SEE PC BOXES
- local infade = "80"
- local outfade = "c0"
- local inputs = joypad.get()
- local button = {'R','L','X','A','right','left','down','up','start','select','Y','B'}
- local btnlabel= {' r','l','X','A','>','<','v','^','S','-','Y','B'}
- local xcoords = { 8.6, 0.4, 9,10, 2, 0, 1, 1, 6, 4, 8, 9}
- local ycoords = { 1, 1, 2, 3, 3, 3, 4, 2, 3, 3, 3, 4}
- local press= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
- local unpress = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
- local turbo = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
- local selectheld = 0
- local dispy = 191
- local yoffset = 168
- local xoffset = 70 -- 89 = button display centered
- local regcolor = {"#CCCCCC","#00CCCC","#CCCCCC"}
- local regshade = {"#444444","#004444","#444444"}
- local nocolor = "#00000000"
- local charname = {"C","M","L","R","F","A","J"}
- local charcolor = {"#CCCC00","#0000FF","#CC0000","#808080","#00CC00","#CC4400","#808080","#808080","#808080"}
- local charshade = {"#444400","#000044","#440000","#444400","#004400","#441100","#404040"}
- local BATTLE_FLAG = 0x7e0117
- local battleflag = 0
- local battlecopy = 0
- local FACING = 0x7e1600
- local MOVING = 0x7e1680
- local facing = {}
- local moving = {}
- local faceoffset = 5 -- experimental
- local MAP_X = 0x7e1800
- local MAP_Y = 0x7e1880
- local mapx = {}
- local mapy = {}
- local mapoffsetx = 0
- local mapoffsety = 0
- local SCREEN_X = 0x7e0A00
- local SCREEN_Y = 0x7e0A80
- local mainsprite = 0
- local farsprite = 0
- local xsign,ysign = "",""
- local xcolor,ycolor = 0,0
- local LOCATION = 0x7e0100
- local loc = memory.readword(LOCATION)
- local locs = {} --http://datacrystal.romhacking.net/wiki/Chrono_Trigger/List_of_Locations
- locs[0x000] = "Load Screen"
- locs[0x001] = "Crono's Kitchen"
- locs[0x002] = "Crono's Room"
- locs[0x003] = "Lucca's Kitchen"
- locs[0x004] = "Lucca's Workshop"
- locs[0x005] = "Millenial Fair"
- locs[0x006] = "Gato's Exhibit"
- locs[0x007] = "Prehistoric Exhibit"
- locs[0x008] = "Telepod Exhibit"
- locs[0x009] = "Lara's Room"
- locs[0x00A] = "Lucca's Room"
- locs[0x00B] = "Ending Selector"
- locs[0x00C] = "Truce Inn (Present)"
- locs[0x00D] = "Truce Mayor's Manor 1F"
- locs[0x00E] = "Truce Mayor's Manor 2F"
- locs[0x00F] = "Truce Single Woman Residence"
- locs[0x010] = "Truce Happy Screaming Couple Residence"
- locs[0x011] = "Truce Market (Present)"
- locs[0x012] = "Truce Ticket Office"
- locs[0x013] = "Guardia Forest (Present)"
- locs[0x014] = "Guardia Forest Dead End"
- locs[0x015] = "Guardia Throneroom (Present)"
- locs[0x016] = "King's Chamber (Present)"
- locs[0x017] = "Queen's Chamber (Present)"
- locs[0x018] = "Guardia Kitchen (Present)"
- locs[0x019] = "Guardia Barracks (Present)"
- locs[0x01A] = "Guardia Basement"
- locs[0x01B] = "Courtroom"
- locs[0x01C] = "Prison Catwalks"
- locs[0x01D] = "Prison Supervisor's Office"
- locs[0x01E] = "Prison Torture Storage Room"
- locs[0x01F] = "Medina Square"
- locs[0x020] = "Zenan Bridge (Present)"
- locs[0x021] = "Medina Elder's House 1F"
- locs[0x022] = "Medina Elder's House 2F"
- locs[0x023] = "Medina Inn"
- locs[0x024] = "Medina Portal"
- locs[0x025] = "Ending: Legendary Hero"
- locs[0x026] = "Guardia Throneroom (Ending: Legendary Hero)"
- locs[0x027] = "Medina Market"
- locs[0x028] = "Melchior's Kitchen"
- locs[0x029] = "Melchior's Workshop"
- locs[0x02A] = "Forest Ruins"
- locs[0x02B] = "Cursed Woods (Ending: The Unknown Past)"
- locs[0x02C] = "Leene Square (Future)"
- locs[0x02D] = "Denadoro Mountain Vista (Ending: Legendary Hero)"
- locs[0x02E] = "Castle Magus Throne of Defense (Ending: Legendary Hero)"
- locs[0x02F] = "Heckran Cave Passageways"
- locs[0x030] = "Heckran Cave Entrance"
- locs[0x031] = "Heckran Cave Underground River"
- locs[0x032] = "Porre Mayor's Manor 1F (Present)"
- locs[0x033] = "Porre Mayor's Manor 2F (Present)"
- locs[0x034] = "Porre Residence (Present)"
- locs[0x035] = "Snail Stop"
- locs[0x036] = "Porre Market (Present)"
- locs[0x037] = "Porre Inn (Present)"
- locs[0x038] = "Porre Ticket Office"
- locs[0x039] = "Fiona's Shrine"
- locs[0x03A] = "Choras Mayor's Manor 1F"
- locs[0x03B] = "Choras Mayor's Manor 2F"
- locs[0x03C] = "Castle Magus Hall of Aggression (Ending: Legendary Hero)"
- locs[0x03D] = "Choras Carpenter's Residence (Present)"
- locs[0x03E] = "Choras Inn (Present)"
- locs[0x03F] = "West Cape"
- locs[0x040] = "Sun Keep (Present)"
- locs[0x041] = "Northern Ruins Entrance (Present)"
- locs[0x042] = "Northern Ruins Basement Corridor (Present)"
- locs[0x043] = "Northern Ruins Landing (Present)"
- locs[0x044] = "Northern Ruins Antechamber (Present)"
- locs[0x045] = "Northern Ruins Vestibule (Present)"
- locs[0x046] = "Northern Ruins Back Room (Present)"
- locs[0x047] = "Prison Cells"
- locs[0x048] = "Prison Stairwells"
- locs[0x049] = "Northern Ruins Hero's Grave (Present)"
- locs[0x04A] = "Unknown"
- locs[0x04B] = "Prison Exterior"
- locs[0x04C] = "Unknown (Lavos Spawn)"
- locs[0x04D] = "Unknown (Lavos Spawn)"
- locs[0x04E] = "Unknown (Lavos Spawn)"
- locs[0x04F] = "Guardia Throneroom (Ending: Moonlight Parade)"
- locs[0x050] = "Millenial Fair (Ending: Moonlight Parade)"
- locs[0x051] = "Leene Square (Ending: Moonlight Parade)"
- locs[0x052] = "Ending Selector"
- locs[0x053] = "Fiona's Forest Recriminations"
- locs[0x054] = "End of Time (Ending: Moonlight Parade)"
- locs[0x055] = "Telepod Exhibit (Ending: Moonlight Parade)"
- locs[0x056] = "Death Peak Summit (Ending: Moonlight Parade)"
- locs[0x057] = "Manoria Sanctuary (Ending: The Successor of Guardia)"
- locs[0x058] = "The End"
- locs[0x059] = "Zenan Bridge (Ending: Moonlight Parade)"
- locs[0x05A] = "Prison Catwalks (Ending: Moonlight Parade)"
- locs[0x05B] = "Ending: People of the Times (Part 1)"
- locs[0x05C] = "Ending: People of the Times (Part 2)"
- locs[0x05D] = "Ending: People of the Times (Part 3)"
- locs[0x05E] = "Ending: People of the Times (Part 4)"
- locs[0x05F] = "Ending: People of the Times (Part 5)"
- locs[0x060] = "Black Omen Lavos Spawn"
- locs[0x061] = "Black Omen 3F Teleporter (no exits)"
- locs[0x062] = "Black Omen 45F Teleporter"
- locs[0x063] = "Black Omen Platform (no exit)"
- locs[0x064] = "Black Omen Platform Shaft (Downward)"
- locs[0x065] = "Black Omen Platform Shaft (Upward)"
- locs[0x066] = "Black Omen Celestial Gate (no map)"
- locs[0x067] = "Black Omen Celestial Gate (no map)"
- locs[0x068] = "Black Omen Celestial Gate (no map)"
- locs[0x069] = "Black Omen Celestial Gate (no map)"
- locs[0x06A] = "Black Omen Celestial Gate (no map)"
- locs[0x06B] = "Black Omen Celestial Gate"
- locs[0x06C] = "Lucca Explains Paradoxes"
- locs[0x06D] = "Ancient Tyrano Lair"
- locs[0x06E] = "Ancient Tyrano Lair Traps"
- locs[0x06F] = "Ancient Tyrano Lair Nizbel's Room"
- locs[0x070] = "Truce Canyon"
- locs[0x071] = "Truce Canyon Portal"
- locs[0x072] = "Truce Couple's Residence (Middle Ages)"
- locs[0x073] = "Truce Smithy's Residence"
- locs[0x074] = "Truce Inn 1F (Middle Ages)"
- locs[0x075] = "Truce Inn 2F (Middle Ages)"
- locs[0x076] = "Truce Market (Middle Ages)"
- locs[0x077] = "Guardia Forest (Middle Ages)"
- locs[0x078] = "Guardia Throneroom (Middle Ages)"
- locs[0x079] = "Guardia King's Chamber (Middle Ages)"
- locs[0x07A] = "Guardia Queen's Chamber (Middle Ages)"
- locs[0x07B] = "Guardia Kitchen (Middle Ages)"
- locs[0x07C] = "Guardia Barracks (Middle Ages)"
- locs[0x07D] = "Castle Magus Doppleganger Corridor"
- locs[0x07E] = "Geno Dome Main Conveyor"
- locs[0x07F] = "Geno Dome Elevator"
- locs[0x080] = "Geno Dome Long Corridor"
- locs[0x081] = "Manoria Sanctuary"
- locs[0x082] = "Manoria Main Hall"
- locs[0x083] = "Manoria Headquarters"
- locs[0x084] = "Manoria Royal Guard Hall"
- locs[0x085] = "Zenan Bridge (Wrecked)"
- locs[0x086] = "Zenan Bridge (Middle Ages, no map)"
- locs[0x087] = "Zenan Bridge (Middle Ages)"
- locs[0x088] = "Sandorino Pervert Residence"
- locs[0x089] = "Sandorino Elder's House"
- locs[0x08A] = "Sandorino Inn"
- locs[0x08B] = "Sandorino Market"
- locs[0x08C] = "Cursed Woods"
- locs[0x08D] = "Frog's Burrow"
- locs[0x08E] = "Denadoro South Face"
- locs[0x08F] = "Denadoro Cave of the Masamune Exterior"
- locs[0x090] = "Denadoro North Face"
- locs[0x091] = "Denadoro Entrance"
- locs[0x092] = "Denadoro Lower East Face"
- locs[0x093] = "Denadoro Upper East Face"
- locs[0x094] = "Denadoro Mountain Vista"
- locs[0x095] = "Denadoro West Face"
- locs[0x096] = "Denadoro Gauntlet"
- locs[0x097] = "Denadoro Cave of the Masamune"
- locs[0x098] = "Tata's House 1F"
- locs[0x099] = "Tata's House 2F"
- locs[0x09A] = "Porre Elder's House (Middle Ages)"
- locs[0x09B] = "Porre Cafe (Middle Ages)"
- locs[0x09C] = "Porre Inn (Middle Ages)"
- locs[0x09D] = "Porre Market (Middle Ages)"
- locs[0x09E] = "Fiona's Villa"
- locs[0x09F] = "Sunken Desert Entrance"
- locs[0x0A0] = "Sunken Desert Parasytes"
- locs[0x0A1] = "Sunken Desert Devourer"
- locs[0x0A2] = "Ozzie's Fort Entrance (no map)"
- locs[0x0A3] = "Magic Cave Exterior"
- locs[0x0A4] = "Magic Cave Interior"
- locs[0x0A5] = "Castle Magus Exterior"
- locs[0x0A6] = "Castle Magus Entrance"
- locs[0x0A7] = "Castle Magus Chamber of Guillotines"
- locs[0x0A8] = "Castle Magus Chamber of Pits"
- locs[0x0A9] = "Castle Magus Throne of Strength"
- locs[0x0AA] = "Castle Magus Hall of Aggression"
- locs[0x0AB] = "Castle Magus Hall of Deceit"
- locs[0x0AC] = "Castle Magus Inner Sanctum"
- locs[0x0AD] = "Castle Magus Throne of Magic"
- locs[0x0AE] = "Castle Magus Throne of Defense"
- locs[0x0AF] = "Castle Magus Hall of Apprehension"
- locs[0x0B0] = "Castle Magus Lower Battlements"
- locs[0x0B1] = "Ozzie's Fort Entrance"
- locs[0x0B2] = "Ozzie's Fort Hall of Disregard"
- locs[0x0B3] = "Ozzie's Fort Chamber of Kitchen Knives"
- locs[0x0B4] = "Ozzie's Fort Last Stand"
- locs[0x0B5] = "Ozzie's Fort Throne of Incompetence"
- locs[0x0B6] = "Ozzie's Fort Throne of Impertinence (wrong map)"
- locs[0x0B7] = "Ozzie's Fort Throne of Impertinence"
- locs[0x0B8] = "Ozzie's Fort Throne of Ineptitude"
- locs[0x0B9] = "Choras Old Couple Residence (Middle Ages)"
- locs[0x0BA] = "Choras Carpenter's Residence 1F (Middle Ages)"
- locs[0x0BB] = "Choras Carpenter's Residence 2F (Middle Ages)"
- locs[0x0BC] = "Choras Cafe"
- locs[0x0BD] = "Choras Inn (Middle Ages)"
- locs[0x0BE] = "Choras Market (Middle Ages)"
- locs[0x0BF] = "Sun Keep (Middle Ages)"
- locs[0x0C0] = "(empty map)"
- locs[0x0C1] = "(empty map)"
- locs[0x0C2] = "(empty map)"
- locs[0x0C3] = "Giant's Claw Entrance"
- locs[0x0C4] = "Giant's Claw Caverns"
- locs[0x0C5] = "Giant's Claw Last Tyranno"
- locs[0x0C6] = "Manoria Command"
- locs[0x0C7] = "Manoria Confinement"
- locs[0x0C8] = "Manoria Shrine Antechamber"
- locs[0x0C9] = "Manoria Storage"
- locs[0x0CA] = "Manoria Kitchen"
- locs[0x0CB] = "Manoria Shrine"
- locs[0x0CC] = "Guardia Forest Frog King Battle"
- locs[0x0CD] = "Denadoro Cyrus's Last Battle"
- locs[0x0CE] = "Guardia Throneroom Cyrus's Final Mission"
- locs[0x0CF] = "Schala's Room (no map)"
- locs[0x0D0] = "Bangor Dome"
- locs[0x0D1] = "Bangor Dome Sealed Room"
- locs[0x0D2] = "Trann Dome"
- locs[0x0D3] = "Trann Dome Sealed Room"
- locs[0x0D4] = "Lab 16 West"
- locs[0x0D5] = "Lab 16 East"
- locs[0x0D6] = "Arris Dome"
- locs[0x0D7] = "Arris Dome Infestation"
- locs[0x0D8] = "Arris Dome Auxiliary Console"
- locs[0x0D9] = "Arris Dome Lower Commons"
- locs[0x0DA] = "Arris Dome Command Central"
- locs[0x0DB] = "Arris Dome Guardian Chamber"
- locs[0x0DC] = "Arris Dome Sealed Room"
- locs[0x0DD] = "Arris Dome Rafters"
- locs[0x0DE] = "Reptite Lair 2F"
- locs[0x0DF] = "Lab 32 West Entrance"
- locs[0x0E0] = "Lab 32"
- locs[0x0E1] = "Lab 32 East Entrance"
- locs[0x0E2] = "Proto Dome"
- locs[0x0E3] = "Proto Dome Portal"
- locs[0x0E4] = "Factory Ruins Entrance"
- locs[0x0E5] = "Factory Ruins Auxiliary Console"
- locs[0x0E6] = "Factory Ruins Security Center"
- locs[0x0E7] = "Factory Ruins Crane Room"
- locs[0x0E8] = "Factory Ruins Infestation"
- locs[0x0E9] = "Factory Ruins Crane Control Room"
- locs[0x0EA] = "Factory Ruins Information Archive"
- locs[0x0EB] = "Factory Ruins Power Core"
- locs[0x0EC] = "Sewer Access B1"
- locs[0x0ED] = "Sewer Access B2"
- locs[0x0EE] = "Ending: Dream Team (no map) (TBD)"
- locs[0x0EF] = "Ending: A Slide Show?"
- locs[0x0F0] = "Ending: Goodnight"
- locs[0x0F1] = "Keeper's Dome"
- locs[0x0F2] = "Keeper's Dome Corridor"
- locs[0x0F3] = "Keeper's Dome Hanger"
- locs[0x0F4] = "Death Peak Entrance"
- locs[0x0F5] = "Death Peak South Face"
- locs[0x0F6] = "Death Peak Southeast Face"
- locs[0x0F7] = "Death Peak Northeast Face"
- locs[0x0F8] = "Geno Dome Entrance"
- locs[0x0F9] = "Geno Dome Conveyor Entrance"
- locs[0x0FA] = "Geno Dome Conveyor Exit"
- locs[0x0FB] = "Sun Palace"
- locs[0x0FC] = "Millenial Fair (Ending: Dino Age)"
- locs[0x0FD] = "Sun Keep (Last Village)"
- locs[0x0FE] = "Skill Tutorial"
- locs[0x0FF] = "Sun Keep (Future)"
- locs[0x100] = "Geno Dome Labs"
- locs[0x101] = "Geno Dome Storage"
- locs[0x102] = "Geno Dome Robot Hub"
- locs[0x103] = "Factory Ruins Data Core"
- locs[0x104] = "Death Peak Northwest Face"
- locs[0x105] = "Prehistoric Canyon"
- locs[0x106] = "Death Peak Upper North Face"
- locs[0x107] = "Death Peak Lower North Face"
- locs[0x108] = "Death Peak Cave"
- locs[0x109] = "Death Peak Summit"
- locs[0x10A] = "Ending: Dream Team (no map) (TBD)"
- locs[0x10B] = "Geno Dome Robot Elevator Access"
- locs[0x10C] = "Geno Dome Mainframe"
- locs[0x10D] = "Geno Dome Waste Disposal"
- locs[0x10E] = "Leene's Square (Ending: Dino Age)"
- locs[0x10F] = "Special Purpose Area"
- locs[0x110] = "Mystic Mtn Portal"
- locs[0x111] = "Mystic Mtn Base"
- locs[0x112] = "Mystic Mtn Gulch"
- locs[0x113] = "Chief's Hut"
- locs[0x114] = "Ioka Southwestern Hut"
- locs[0x115] = "Ioka Trading Post"
- locs[0x116] = "Ioka Sweet Water Hut"
- locs[0x117] = "Ioka Meeting Site"
- locs[0x118] = "Ioka Meeting Site (Party)"
- locs[0x119] = "Forest Maze Entrance"
- locs[0x11A] = "Forest Maze"
- locs[0x11B] = "Reptite Lair Entrance"
- locs[0x11C] = "Reptite Lair 1F"
- locs[0x11D] = "Reptite Lair Weevil Burrows B1"
- locs[0x11E] = "Reptite Lair Weevil Burrows B2"
- locs[0x11F] = "Reptite Lair Commons"
- locs[0x120] = "Reptite Lair Tunnel"
- locs[0x121] = "Reptite Lair Azala's Room"
- locs[0x122] = "Reptite Lair Access Shaft"
- locs[0x123] = "Hunting Range"
- locs[0x124] = "Laruba Ruins"
- locs[0x125] = "Dactyl Nest, Lower"
- locs[0x126] = "Dactyl Nest, Upper"
- locs[0x127] = "Dactyl Nest Summit"
- locs[0x128] = "Giant's Claw Lair Entrance"
- locs[0x129] = "Giant's Claw Lair Throneroom"
- locs[0x12A] = "Tyrano Lair Exterior"
- locs[0x12B] = "Tyrano Lair Entrance"
- locs[0x12C] = "Tyrano Lair Throneroom"
- locs[0x12D] = "Tyrano Lair Keep"
- locs[0x12E] = "Tyrano Lair Antechambers"
- locs[0x12F] = "Tyrano Lair Storage"
- locs[0x130] = "Tyrano Lair Nizbel's Room"
- locs[0x131] = "Tyrano Lair Room of Vertigo"
- locs[0x132] = "Debug Room?"
- locs[0x133] = "Lair Ruins Portal"
- locs[0x134] = "Black Omen 1F Entrance"
- locs[0x135] = "Black Omen 1F Walkway"
- locs[0x136] = "Black Omen 1F Defense Corridor"
- locs[0x137] = "Black Omen 1F Stairway"
- locs[0x138] = "Black Omen 3F Walkway"
- locs[0x139] = "Black Omen Auxilary Command"
- locs[0x13A] = "Black Omen (TBD)"
- locs[0x13B] = "Black Omen (TBD)"
- locs[0x13C] = "Black Omen (TBD)"
- locs[0x13D] = "Black Omen (TBD)"
- locs[0x13E] = "Black Omen (TBD)"
- locs[0x13F] = "Black Omen (TBD)"
- locs[0x140] = "Black Omen (TBD)"
- locs[0x141] = "Black Omen (TBD)"
- locs[0x142] = "Black Omen (TBD)"
- locs[0x143] = "Black Omen (TBD)"
- locs[0x144] = "Black Omen (TBD)"
- locs[0x145] = "Black Omen (TBD)"
- locs[0x146] = "Black Omen (TBD)"
- locs[0x147] = "Sunkeep (Prehistoric)"
- locs[0x148] = "Zeal Palace Schala's Room"
- locs[0x149] = "Zeal Palace Regal Hall"
- locs[0x14A] = "Zeal Palace Corridor to the Mammon Machine"
- locs[0x14B] = "Zeal Palace Hall of the Mammon Machine"
- locs[0x14C] = "Zeal Palace Zeal Throneroom"
- locs[0x14D] = "Zeal Palace Hall of the Mammon Machine (Night)"
- locs[0x14E] = "Zeal Palace Zeal Throneroom (Night)"
- locs[0x14F] = "Enhasa (wrong map)"
- locs[0x150] = "Land Bridge (TBD)"
- locs[0x151] = "Skyway? (TBD)"
- locs[0x152] = "Present Age Home Room (Ending: The Dream Project)"
- locs[0x153] = "Prehistoric Age Jungle (Ending: The Dream Project)"
- locs[0x154] = "Dark Age Ocean Palace Room (Ending: The Dream Project)"
- locs[0x155] = "Present Age Jail Cell (Ending: The Dream Project)"
- locs[0x156] = "Dark Age Earthbound Room (Ending: The Dream Project)"
- locs[0x157] = "Present Age Northern Ruins Room (Ending: The Dream Project)"
- locs[0x158] = "Arris Dome Food Locker"
- locs[0x159] = "Lucca's Workshop (Ending: The Oath)"
- locs[0x15A] = "Arris Dome Guardian Chamber (Battle with Lavos)"
- locs[0x15B] = "Prison Catwalks (Battle with Lavos)"
- locs[0x15C] = "Heckran Cave (Battle with Lavos)"
- locs[0x15D] = "Zenan Bridge (Battle with Lavos)"
- locs[0x15E] = "Cave of the Masamune (Battle with Lavos)"
- locs[0x15F] = "Dark Ages Portal"
- locs[0x160] = "Land Bridge (TBD)"
- locs[0x161] = "Land Bridge (TBD)"
- locs[0x162] = "Skyway (TBD)"
- locs[0x163] = "Enhasa"
- locs[0x164] = "Skyway (TBD)"
- locs[0x165] = "Kajar"
- locs[0x166] = "Kajar Study"
- locs[0x167] = "Kajar Belthasar's Private Room"
- locs[0x168] = "Kajar Magic Lab"
- locs[0x169] = "Zeal Palace Belthasar's Private Room"
- locs[0x16A] = "Blackbird Scaffolding"
- locs[0x16B] = "Blackbird Left Wing"
- locs[0x16C] = "Blackbird Right Port"
- locs[0x16D] = "Blackbird Left Port"
- locs[0x16E] = "Blackbird Overhead"
- locs[0x16F] = "Blackbird Hanger"
- locs[0x170] = "Blackbird Rear Halls"
- locs[0x171] = "Blackbird Forward Halls"
- locs[0x172] = "Blackbird Treasury"
- locs[0x173] = "Blackbird Cell"
- locs[0x174] = "Blackbird Barracks"
- locs[0x175] = "Blackbird Armory 3"
- locs[0x176] = "Blackbird Inventory"
- locs[0x177] = "Blackbird Lounge"
- locs[0x178] = "Blackbird Ducts"
- locs[0x179] = "Reborn Epoch"
- locs[0x17A] = "Future Age Room (Ending: The Dream Project)"
- locs[0x17B] = "End of Time (Ending: The Dream Project)"
- locs[0x17C] = "Algetty"
- locs[0x17D] = "Algetty Inn"
- locs[0x17E] = "Algetty Elder's Grotto"
- locs[0x17F] = "Algetty Commoner Grotto"
- locs[0x180] = "Algetty Shop"
- locs[0x181] = "Algetty Tsunami (wrong map)"
- locs[0x182] = "Algetty Entrance"
- locs[0x183] = "The Beast's Nest (wrong map)"
- locs[0x184] = "The Beast's Nest"
- locs[0x185] = "Zeal Teleporters"
- locs[0x186] = "Prehistoric Hut (Ending: The Dream Project)"
- locs[0x187] = "Castle Magus Room (Ending: The Dream Project)"
- locs[0x188] = "Mt. Woe Western Face"
- locs[0x189] = "Mt. Woe Lower Eastern Face"
- locs[0x18A] = "Mt. Woe Middle Eastern Face"
- locs[0x18B] = "Mt. Woe Upper Eastern Face"
- locs[0x18C] = "Mt. Woe Summit (wrong map)"
- locs[0x18D] = "Mt. Woe Summit"
- locs[0x18E] = "Leene Square (Ending: What the Prophet Seeks)"
- locs[0x18F] = "Crono's Kitchen (Ending: What the Prophet Seeks)"
- locs[0x190] = "The End (Ending: Multiple?)"
- locs[0x191] = "Zeal Palace"
- locs[0x192] = "Zeal Palace Hallway"
- locs[0x193] = "Zeal Palace Study"
- locs[0x194] = "Ocean Palace Entrance"
- locs[0x195] = "Ocean Palace Piazza"
- locs[0x196] = "Ocean Palace Side Rooms"
- locs[0x197] = "Ocean Palace Forward Area"
- locs[0x198] = "Ocean Palace B3 Landing"
- locs[0x199] = "Ocean Palace Grand Stairwell"
- locs[0x19A] = "Ocean Palace B20 Landing"
- locs[0x19B] = "Ocean Palace Southern Access Lift"
- locs[0x19C] = "Ocean Palace Security Pool"
- locs[0x19D] = "Ocean Palace Security Esplanade"
- locs[0x19E] = "Ocean Palace Regal Antechamber"
- locs[0x19F] = "Ocean Palace Throneroom"
- locs[0x1A0] = "Ocean Palace (TBD)"
- locs[0x1A1] = "Ocean Palace Eastern Access Lift"
- locs[0x1A2] = "Ocean Palace Western Access Lift"
- locs[0x1A3] = "Ocean Palace Time Freeze (wrong map)"
- locs[0x1A4] = "Ocean Palace Time Freeze (wrong map)"
- locs[0x1A5] = "Ocean Palace Time Freeze (wrong map)"
- locs[0x1A6] = "Time Distortion Mammon Machine"
- locs[0x1A7] = "Ocean Palace Time Freeze"
- locs[0x1A8] = "Last Village Commons"
- locs[0x1A9] = "Last Village Empty Hut"
- locs[0x1AA] = "Last Village Shop"
- locs[0x1AB] = "Last Village Residence"
- locs[0x1AC] = "North Cape"
- locs[0x1AD] = "Death Peak Summit"
- locs[0x1AE] = "Tyrano Lair Main Cell"
- locs[0x1AF] = "Title Screen (wrong map)"
- locs[0x1B0] = "Flying Epoch"
- locs[0x1B1] = "Title Screen"
- locs[0x1B2] = "Bekkler's Lab"
- locs[0x1B3] = "Magic Cave Exterior (after cutscene)"
- locs[0x1B4] = "Fiona's Forest Campfire"
- locs[0x1B5] = "Factory Ruins (TBD)"
- locs[0x1B6] = "Courtroom King's Trial"
- locs[0x1B7] = "Leene Square"
- locs[0x1B8] = "Guardia Rear Storage"
- locs[0x1B9] = "Courtroom Lobby"
- locs[0x1BA] = "Blackbird Access Shaft"
- locs[0x1BB] = "Blackbird Armory 2"
- locs[0x1BC] = "Blackbird Armory 1"
- locs[0x1BD] = "Blackbird Storage"
- locs[0x1BE] = "Castle Magus Upper Battlements"
- locs[0x1BF] = "Castle Magus Grand Stairway"
- locs[0x1C0] = "(Bad Event Data Packet)"
- locs[0x1C1] = "Black Omen Entrance"
- locs[0x1C2] = "Black Omen Omega Defense"
- locs[0x1C3] = "Black Omen Seat of Agelessness"
- locs[0x1C4] = "(Bad Event Data Packet)"
- locs[0x1C5] = "(Bad Event Data Packet)"
- locs[0x1C6] = "(Bad Event Data Packet)"
- locs[0x1C7] = "(Bad Event Data Packet)"
- locs[0x1C8] = "Reptite Lair (Battle with Lavos)"
- locs[0x1C9] = "Castle Magus Inner Sanctum (Battle with Lavos)"
- locs[0x1CA] = "Tyrano Lair Keep (Battle with Lavos)"
- locs[0x1CB] = "Mt. Woe Summit (Battle with Lavos)"
- locs[0x1CC] = "Credits (TBD)"
- locs[0x1CD] = "(Empty Data)"
- locs[0x1CE] = "(Empty Data)"
- locs[0x1CF] = "(Empty Data)"
- locs[0x1D0] = "End of Time"
- locs[0x1D1] = "Spekkio"
- locs[0x1D2] = "Apocalypse Lavos"
- locs[0x1D3] = "Lavos"
- locs[0x1D4] = "Guardia Queen's Tower (Middle Ages)"
- locs[0x1D5] = "Castle Magus Corridor of Combat"
- locs[0x1D6] = "Castle Magus Hall of Ambush"
- locs[0x1D7] = "Castle Magus Dungeon"
- locs[0x1D8] = "Apocalypse Epoch"
- locs[0x1D9] = "End of Time Epoch"
- locs[0x1DA] = "Lavos Tunnel"
- locs[0x1DB] = "Lavos Core"
- locs[0x1DC] = "Truce Dome"
- locs[0x1DD] = "Emergence of the Black Omen"
- locs[0x1DE] = "Blackbird Wing Access"
- locs[0x1DF] = "Tesseract"
- locs[0x1E0] = "Guardia King's Tower (Middle Ages)"
- locs[0x1E1] = "Death of the Blackbird"
- locs[0x1E2] = "Blackbird (no exits)"
- locs[0x1E3] = "Blackbird (no exits)"
- locs[0x1E4] = "Blackbird (no exits)"
- locs[0x1E5] = "Blackbird (no exits)"
- locs[0x1E6] = "Guardia King's Tower (Present)"
- locs[0x1E7] = "Guardia Queen's Tower (Present)"
- locs[0x1E8] = "Guardia Lawgiver's Tower"
- locs[0x1E9] = "Guardia Prison Tower"
- locs[0x1EA] = "Ancient Tyrano Lair Room of Vertigo"
- locs[0x1EB] = "(empty map)"
- locs[0x1EC] = "(empty map)"
- locs[0x1ED] = "Algetty Tsunami"
- locs[0x1EE] = "Paradise Lost"
- locs[0x1EF] = "Death Peak Guardian Spawn"
- locs[0x1F0] = "Present"
- locs[0x1F1] = "Middle Ages"
- locs[0x1F2] = "Future"
- locs[0x1F3] = "Prehistoric"
- locs[0x1F4] = "Dark Ages"
- locs[0x1F5] = "Kingdom of Zeal"
- locs[0x1F6] = "Last Village"
- locs[0x1F7] = "Apocalypse"
- locs[0x1F8] = "(empty map)"
- locs[0x1F9] = "(empty map)"
- locs[0x1FA] = "(empty map)"
- locs[0x1FB] = "(empty map)"
- locs[0x1FC] = "(empty map)"
- locs[0x1FD] = "(empty map)"
- locs[0x1FE] = "(empty map)"
- locs[0x1FF] = "(empty map)"
- local frame,locstart = 0,0
- local timesav,locsav = 0,0
- local timeend = 0
- local recentload = 0
- local second = 0
- local segcount = 0
- function displayTime()
- frame = frame + 1
- --Catch battleflag change
- if battleflag ~= memory.readbyte(BATTLE_FLAG) % 2 then
- timeend = frame - locstart
- second = timeend / 60
- print(string.format("%6.2f",second).."\t"..locs[loc].." ("..segcount..")")
- segcount = segcount + 1
- battleflag = memory.readbyte(BATTLE_FLAG) % 2
- if recentload == 0 then locstart = frame end
- end
- --Catch location change
- if loc ~= memory.readword(LOCATION) then
- timeend = frame - locstart
- second = timeend / 60
- print(string.format("%6.2f",second).."\t"..locs[loc].." ("..segcount..")")
- segcount = 0
- loc = memory.readword(LOCATION)
- if recentload == 0 then locstart = frame end
- end
- recentload = 0
- gui.text(xoffset+146,yoffset+36," "..string.format("%6.2f",second), "#808080","#00000000")
- end
- function Saving()
- timesav = frame
- locsav = locstart
- batsav = batstart
- end
- savestate.registersave(Saving) -- for room timing, only works with MOST RECENT state
- function Reload()
- frame = timesav
- locstart = locsav
- batstart = batsav
- recentload = 1
- end
- savestate.registerload(Reload)
- local redbox = {}
- redbox[0x70] = {0x14,0x2e,0x30,0x32,0x28}
- redbox[0x77] = {0x32,0x34,0x3c,0x3e,0x28,0x2a,0x46,0x1c,0x1e}
- redbox[0x91] = {0x14,0x16}
- redbox[0x8c] = {0x20,0x22,0x24,0x2e,0x30,0x1e,0x1a} --3 frogs are friendly
- redbox[0x1d5] = {0x1c,0x26}
- redbox[0xb0] = {0x20,0x22}
- --redbox[0xa8] = {0x14,0x16,0x18,0x1a,0x1c,0x1e} --ozzie pits
- redbox[0x8e] = {0x24}
- redbox[0x92] = {0x10,0x18}
- redbox[0x93] = {0x10,0x18,0x1a}
- redbox[0x96] = {0x10}
- redbox[0x90] = {0x10,0x12,0x1a}
- redbox[0x94] = {0x10,0x12}
- redbox[0x8f] = {0x28,0x2a,0x1c,0x2c}
- redbox[0x82] = {0x3c,0x44,0x40,0x26,0x28,0X32,0x38,0x24,0x30,0x34,0x36,0x10,0x16,0x18}
- redbox[0x83] = {0x66,0x68,0x5e,0x1c,0x2c,0x32,0x40,0x4c,0x4e,0x50}
- redbox[0x84] = {0x1a,0x1c,0x1e,0x20,0x22,0x24,}
- redbox[0x78] = {0x16}
- redbox[0x13] = {0x1c,0x24,0x26,0x28,0x2a,0x2c,0x2e,0x30,0x3c,0x3e,0x40}
- redbox[0x1C] = {0x4}
- redbox[0x15] = {0x22}
- redbox[0xd4] = {0x24,0x26,0x28,0x2a,0x3a,0x3c,0x3e,0x40,0x42,0x12,0x14,0x16,0x18,0x1a,0x1c}
- redbox[0xd7] = {0x10,0x12,0x14,0x16,0x18,0x1a,0x1c}
- redbox[0xd9] = {0x20,0x22,0x24,0x26,0x18,0x1a,0x1c,0x1e,0x14,0x16}
- redbox[0xe4] = {0x16,0x18,0x1a}
- redbox[0x1d1] = {0x20,0x22,0x24,0x26,0x28}
- redbox[0x112] = {0x12,0x14,0x16,0x18,0x1c,0x1e,0x22,0x24,0x26,0x28,0x2a,0x2c}
- redbox[0x11a] = {0x2a,0x2c,0x2e,0x30,0x32,0x34,0x36,0x38}
- redbox[0x11d] = {0x20,0x22}
- redbox[0x11e] = {0x10}
- redbox[0x11f] = {0x1a,0x1c,0x1e,0x20,0x22,0x24}
- redbox[0x120] = {0x14,0x16,0x18}
- redbox[0x11c] = {0x12,0x14,0x16,0x18}
- redbox[0xa4] = {0x16,0x18,0x1a}
- redbox[0x7d] = {0x12,0x22,0x1e}
- redbox[0x1be] = {0x24,0x26,0x28,0x2a,0x2c,0x2e}
- redbox[0x1bf] = {0x30,0x32,0x34,0x36,0x38,0x3a}
- redbox[0x125] = {0x18,0x1a,0x1c,0x1e,0x22,0x24,0x28,0x2c,0x26,0x30}
- redbox[0x126] = {0x16,0x1a,0x1c,0x28}
- redbox[0x12a] = {0x22,0x24,0x26,0x28,0x2c,0x2e,0x30,0x3e,0x42,0x40,0x5c,0x5e,0x60,0x62,0x6e,0x70,0x72}
- redbox[0x12b] = {0x14,0x12,0x16,0x18}
- redbox[0x131] = {0x10,0x12,0x14,0x1c,0x24,0x20}
- redbox[0x130] = {0x12,0x14}
- redbox[0x12f] = {0x1a,0x18}
- redbox[0xdb] = {0x10,0x12}
- redbox[0xa0] = {0x02,0x04,0x06,0x08,0x0a}
- redbox[0xa1] = {0x20}
- redbox[0xec] = {0x1c,0x36,0x3c,0x22,0x24,0x26,0x3e,0x46,0x28,0x16,0x18,0x14} --sewer
- redbox[0xed] = {0x2c} --sewer
- redbox[0x18a]= {0x16} --woe
- redbox[0x188]= {0x32,0x34} --woe
- redbox[0x189]= {0x2c} --woe
- redbox[0x195]= {0x14,0x16,0x1e,0x20,0x2a,0x18,0x1a,0x1c} --op
- redbox[0x196]= {0x14,0x1a,0x1c,0x2e,0x30,0x32,0x36,0x38,0x3a} --op
- redbox[0x197]= {0x1c,0x1e,0x30,0x36,0x24,0x2a} --op
- redbox[0x198]= {0x0e,0x10,0x12} --op
- redbox[0x199]= {0x26,0x28,0x2a,0x2c,0x30,0x32,0x34,0x36} --op
- redbox[0x19a]= {0x0e,0x10} --op
- redbox[0x171]= {0x1e} --blackbird
- redbox[0x16b]= {0x30,0x32,0x34,0x36,0x38,0x3a} -- giant's claw
- redbox[0xc3] = {0x1c,0x1e} -- giant's claw
- redbox[0x139]= {0x10,0x18,0x1e,0x26,0x28,0x2a,0x2c,0x2e} -- omen
- redbox[0x13a]= {0x10,0x12,0x14,0x1a,0x1c,0x1e,0x24,0x2c,0x2e,0x30,0x32,0x34,0x36,0x38,0x3e,0x40,0x42,0x44,0x46,0x48,0x4a} -- omen
- redbox[0x13d]= {0x1a,0x26,0x28,0x2a,0x2c}
- redbox[0x142]= {0x10,0x12,0x14,0x2a,0x2c,0x2e}
- redbox[0x143]= {0x12,0x14} -- gigamute
- redbox[0x144]= {0x1a,0x1c}
- redbox[0xf5]= {0x10,0x12,0x14,0x16,0x18} -- deathpeak
- redbox[0xf6]= {0x16,0x12,0x14,0x1a,0x1c} -- deathpeak
- redbox[0x107]= {0x10,0x12,0x14} -- deathpeak
- redbox[0x108]= {0x16,0x18,0x14,0x20} -- deathpeak
- redbox[0x104]= {0x10,0x12,0x14,0x16,0x18,0x1a,0x1c,0x1e} -- deathpeak
- redbox[0x1a]= {0x18} -- yakra13
- redbox[0x1b8]= {0x1a,0x1c} -- yakra13
- local trigger = {}
- trigger[0xc6] = {0x010d,0x020d,0x030d,0x040d,0x050d,0x060d,0x070d,0x080d,0x090d,0x0a0d,0x0b0d,0x0c0d,0x0d0d}
- trigger[0xd4] = {0x0c34,0x0d34,0x0e34,0x0f34,0x1034,
- 0x0c33,0x0d33,0x0e33,0x0f33,0x1033,
- 0x0c32,0x0d32,0x0e32,0x0f32,0x1032,
- 0x0c31,0x0d31,0x0e31,0x0f31,0x1031,
- 0x0c30,0x0d30,0x0e30,0x0f30,0x1030,
- 0x1727,0x1827,0x1927,
- 0x0714,0x0715,0x0716,0x0717,0x0718,0x0719,0x071a,0x071b,0x071c}
- trigger[0xd5] = {0x2622,0x2623,0x2624,0x2625,0x2626,
- 0x2d37,0x2d38,0x2d39,0x2d3a,0x2d3b,
- 0x2e31,0x2e30,
- 0x3925,0x3a25,0x3b25,0x3c25,0x3d25,
- 0x3437,0x3438,0x3439,0x343a,0x343b}
- trigger[0xda] = {0x352a,0x362a,0x372a,0x382a,0x392a,0x3a2a}
- trigger[0xe2] = {0x3424,0x3524,0x3624,0x3724,0x3824,0x3924,0x3a24,
- 0x3423,0x3523,0x3623,0x3723,0x3823,0x3923,0x3a23,0x3b23,
- 0x3422,0x3522,0x3622,0x3722,0x3822,0x3922,0x3a22,0x3b22,
- 0x3421,0x3521,0x3621,0x3721,0x3821,0x3921,0x3a21}
- trigger[0xe6] = {0x1323,0x1324,0x1325,0x1326,
- 0x0d23,0x0d24,0x0d25,0x0d26,0x0431,0x0d3d,0x0d3c}
- trigger[0x30] = {0x0914,0x0915,0x0916,0x0917,0x0918,0x0919,0x091a}
- trigger[0x31] = {0x1f2f,0x202f,0x212f,0x222f,0x232f,0x242f,0x252f,0x262f,0x272f,
- 0x1f30,0x1f31,0x1f32,0x1f33,0x1f34,
- 0x122b,0x122c,0x122d,0x122e,0x122f}
- trigger[0x2f] = {0x3235,0x3335,0x3435,0x3535,0x3635,0x3735,0x3835,0x3935,0x3a35,0x3b35,0x3c35,
- 0x2933,0x2932,0x2931,0x2833,0x2832,0x2831,0x2a33,0x2a32,0x2a31,
- 0x102c,0x0f2c,0x0e2c,0x0d2c,0x0c2c,0x0b2c,
- 0x301f,0x311f,0x321f,0x331f,0x341f,0x351f,0x361f,0x371f,0x381f,0x391f}
- trigger[0x87] = {0x3308,0x3309,0x330a,0x2a07,0x2a08,0x2a09,0x2a0a}
- trigger[0x91] = {0x0e02,0x0e03,0x0e04,0x0e05,0x0d05,0x0c05,0x0b05,0x0a05,0x0905}
- trigger[0x8e] = {0x0518,0x0618,0x0418,0x0318,0x0218}
- trigger[0x2a] = {0x0712,0x0612,0x0512,0x0812,0x1012,0x0912}
- trigger[0xa8] = {0x320a,0x3310,0x390f,0x390c,0x3a08,0x3c0b,
- 0x320b,0x3311,0x3910,0x390d,0x3a09,0x3c0c,
- 0x330a,0x3410,0x3a0f,0x3a0c,0x3b08,0x3d0b,
- 0x330b,0x3411,0x3a10,0x3a0d,0x3b09,0x3d0c}
- trigger[0x124] = {0x080e,0x090e,0x0a0e,0x0b0e,0x070e,0x060e,0x050e,0x030e,0x020e,0x010e,0x000e,0x0d0e,0x0e0e}
- trigger[0x12e] = {0x0f0d,0x0f0e,0x0f0f,0x0f10,0x0f11}
- trigger[0xa0] = {0x0e10,0x0d10,0x0c10,0x0b10,0x0a10,0x0910,0x0f10,0x1010,0x1110,0x1210,0x1310,0x1410,0x1510,
- 0x0909,0x090a,0x090b,0x090c,0x090d,0x090e,0x090f}
- trigger[0x1d6] = {0x252e,0x262e,0x272e,0x282e,0x292e,
- 0x2522,0x2622,0x2722,0x2822,0x2922,
- 0x2516,0x2616,0x2716,0x2816,0x2916,
- 0x250a,0x260a,0x270a,0x280a,0x290a,0x2705}
- trigger[0xe0] = {0x0707,0x0708,0x0709,0x070a,0x070b,0x070c,0x070d,0x1d0a,0x1d0b,0x1d0c,0x1d0d}
- trigger[0x184]= {0x072f,0x062f,0x052f,0x082f,0x092f,0x0a2f,
- 0x061d,0x051d,0x041d,0x031d,
- 0x0811,0x0911,0x0a11,0x0b11} --beasts
- trigger[0x18a]= {0x232d,0x242d,0x252d,0x262d,0x272d,0x282d,0x292d}
- trigger[0x188]= {0x2407,0x2408,0x2409,0x240a,0x240b,
- 0x0f13,0x1013,0x1113,0x1213,0x1313,0x1413,
- 0x3210,0x3211,0x3212,0x3213,0x3214,0x3215,0x3216,
- 0x2e1e,0x2e1f,0x2e20,0x2e21,0x2e22,0x2e23,0x2e24,0x2e25,
- 0x302d,0x302d,0x302e,0x302f,0x302d,0x3030,0x3031,0x3032,0x3033,0x3034,0x3035,0x3036,0x3037,0x3038,0x3039}
- trigger[0x189]= {0x0c29,0x0d29,0x0e29,0x0f29,0x1029,0x1129,0x1229,
- 0x1911,0x1912}
- trigger[0x199]= {0x010d,0x020d,0x030d,0x040d,0x050d,0x060d,0x070d,0x080d,0x090d,0x0a0d,0x0b0d,0x0c0d,0x0d0d,0x0e0d,
- 0x116d,0x126d,0x136d,0x146d,0x156d,0x166d,0x176d,0x186d,0x196d,0x1a6d,0x1b6d,0x1c6d,0x1d6d,0x1e6d}
- trigger[0x19b]= {0x0013,0x0113,0x0213,0x0313,0x0413,0x0513,0x0613,0x0713,0x0813,0x0913,0x0a13,0x0b13,0x0c13,0x0d13,0x0e13,0x0f13}
- trigger[0x16b]= {0x1019,0x0f19,0x0e19,0x0d19,0x0c19} -- giant's claw
- trigger[0xc4] = {0x163a,0x163b,0x163c,0x0a3a,0x0a3b,0x0a3c} -- giant's claw
- trigger[0x128]= {0x3338,0x3438,0x3538,0x3638,0x3738,0x3838} -- giant's claw
- trigger[0x6d] = {0x1c0d,0x1c0e,0x1c0f,0x1c10,0x1c11} -- giant's claw
- trigger[0xc5] = {0x0b29,0x0c29,0x0d29} -- giant's claw
- trigger[0xb7] = {0x2128,0x2228,0x2328,0x2428,0x2528,0x2628,0x2728,0x2828,0x2928,0x2a28,0x2b28,0x2c28,0x2d28} -- ozzie
- trigger[0xb2] = {0x1411,0x1511,0x1611,0x1711,0x1811,0x1911,0x1a11} -- ozzie
- trigger[0xb8] = {0x2128,0x2228,0x2328,0x2428,0x2528,0x2628,0x2728,0x2828,0x2928,0x2a28,0x2b28,0x2c28,0x2d28} -- ozzie
- trigger[0xb3] = {0x0124,0x0224,0x0324,0x0824,0x0924,0x0a24,0x0b24,0x0c24,0x0d24} -- ozzie
- --final ozzie
- trigger[0x13e]= {0x1808,0x1809,0x180a,0x180b,0x180c,0x1b08,0x1b09,0x1b0a,0x1b0b,0x1b0c, -- omen
- 0x3508,0x3509,0x350a,0x350b,0x350c,0x3808,0x3809,0x380a,0x380b,0x380c}
- local warning = {}
- warning[0x92] = {0x081b}
- warning[0x70] = {0x0d09,0x0c09,0x0b09,0x0e09,0x0712,0x0912,0x0812,0x0b0d,0x0c0d}
- warning[0x7a] = {0x30,0x32,0x34}
- warning[0x48] = {0x1211,0x1212,0x1213,0x1207,0x1208,0x1209}
- warning[0x8e] = {0x1235,0x0f35,0x0e35,0x0d35,
- 0x1234,0x1134,0x1034,0x0f34,0x0d34}
- warning[0x120] ={0x0622,0x0623,0x0624,0x0625,0x0626,0x0627,0x0628,0x0629,0x062a,0x062b,0x062c,0x062d,0x062e,0x062f,0x0630,0x0631,0x0632,
- 0x0722,0x0723,0x0724,0x0725,0x0726,0x0727,0x0728,0x0729,0x072a,0x072b,0x072c,0x072d,0x072e,0x072f,0x0730,0x0731,0x0732,
- 0x0822,0x0823,0x0824,0x0825,0x0826,0x0827,0x0828,0x0829,0x082a,0x082b,0x082c,0x082d,0x082e,0x082f,0x0830,0x0831,0x0832,
- 0x0436,0x0536,0x0636,0x0736,
- 0x0437,0x0537,0x0637,0x0737,
- 0x0438,0x0538,0x0638,0x0738}
- warning[0x196]= {0x240a,0x240b,0x240c,0x240d,0x240e,0x240f,0x2410}
- warning[0x135]= {0x0727,0x0827,0x0927,0x0a27,0x0627,0x0628,0x0629,0x062a,0x062b,0x062c,0x062d,0x071b,0x081b} --omen
- warning[0x137]= {0x071a,0x081a,0x0706,0x0806} --omen
- warning[0x138]= {0x061e,0x061d,0x061c,0x071e,0x071d,0x071c,0x081e,0x081d,0x081c,0x091e,0x091d,0x091c,0x0a1e,0x0a1d,0x0a1c,0x0b1d,0x0b1c,
- 0x031f,0x041f,0x051f,0x061f,0x071f,0x081f,0x091f,0x0a1f,0x0b1f,
- 0x0320,0x0420,0x0520,0x0620,0x0720,0x0820,0x0920,0x0a20,0x0b20,0x0c20, --omen
- 0x0421,0x0521,0x0621,0x0721,0x0821,0x0921,0x0a21,0x0b21,0x0c21,0x0d21, --omen
- 0x0522,0x0622,0x0722,0x0822,0x0922,0x0a22,0x0b22,0x0c22,0x0d22,0x0e22, --omen
- 0x0623,0x0723,0x0823,0x0923,0x0a23,0x0b23,0x0c23,0x0d23,0x0e23, --omen
- 0x0724,0x0824,0x0924,0x0a24,0x0b24,0x0c24,0x0d24,0x0e24, --omen
- 0x0825,0x0925,0x0a25,0x0b25,0x0c25,0x0d25,0x0e25,
- 0x0926,0x0a26,0x0b26,0x0c26,0x0d26,
- 0x0927,0x0a27,0x0b27}
- warning[0x13f]= {0x3735,0x3835,0x3636,0x3736,0x3836,0x3936,0x3637,0x3737,0x3837,0x3937} -- omen
- warning[0xf4]= {0x3731,0x3732,0x3820,0x3821} -- deathpeak
- function displayHitbox()
- for i = 1,64 do
- mapx[i] = math.floor(memory.readword(MAP_X + 2*(i-1))/16)
- mapy[i] = math.floor(memory.readword(MAP_Y + 2*(i-1))/16)
- facing[i] = memory.readbyte(FACING + 2*(i-1))
- if memory.readbyte(MOVING + 2*(i-1)) > 0 then
- moving[i] = 1
- else moving[i] = 0 end
- end
- spritex = {}
- spritey = {}
- mainsprite = 0
- farsprite = 0
- for i = 1,16 do -- get one sprite to compare
- spritex[i] = memory.readword(SCREEN_X + 2*(i-1))
- spritey[i] = memory.readword(SCREEN_Y + 2*(i-1))
- if loc == 0xa0 then mainsprite = 7
- elseif loc == 0xa1 then mainsprite = 8
- elseif mainsprite == 0 and spritex[i] > 0 and spritey[i] > 0 and mapx[i] ~= 0xFF0 and
- (mapy[i] ~= 0xff0 and mapx[i] ~= 0x178) and
- (mapy[i] ~= 0xff0 and mapx[i] ~= 0x088) and
- (mapy[i] ~= 0xff0 and mapx[i] ~= 0x298) and
- (mapy[i] ~= 0xff0 and mapx[i] ~= 0x368) and
- (mapy[i] ~= 0xff0 and mapx[i] ~= 0x268) and
- (mapy[i] ~= 0xff0 and mapx[i] ~= 0x2b8) and
- (mapy[i] ~= 0xff0 and mapx[i] ~= 0x0c8) and
- (mapy[i] ~= 0xff0 and mapx[i] ~= 0xff8) then
- mainsprite = i
- end
- end
- if mainsprite ~= 0 then
- mapoffsetx = mapx[mainsprite] - spritex[mainsprite]
- mapoffsety = mapy[mainsprite] - spritey[mainsprite]
- end
- if warning[loc] ~= nil then
- if table.getn(warning[loc]) ~= nil then
- for j = 1,table.getn(warning[loc]) do
- screenx = math.floor(warning[loc][j] / 0x100)*0x10 - mapoffsetx
- screeny = (warning[loc][j] % 0x100)*0x10 - mapoffsety
- gui.box(screenx,screeny,screenx+16,screeny+16,"#ffff0020","#ffff00"..outfade)
- end
- end
- end
- if mainsprite ~= 0 and trigger[loc] ~= nil then
- special = 0
- if loc == 0xa8 then special = 8 end
- if table.getn(trigger[loc]) ~= nil then
- for j = 1,table.getn(trigger[loc]) do
- screenx = math.floor(trigger[loc][j] / 0x100)*0x10 - mapoffsetx --+ special
- screeny = (trigger[loc][j] % 0x100)*0x10 - mapoffsety
- gui.box(screenx,screeny,screenx+15,screeny+7,"#404040"..infade,"#404040"..outfade)
- if screenx -1 < spritex[mainsprite] then
- gui.box(screenx,screeny,screenx+7,screeny+7,"#ff0000"..infade,"#ff0000"..outfade)
- else gui.box(screenx+8,screeny,screenx+15,screeny+7,"#ff0000"..infade,"#ff0000"..outfade) end
- end
- end
- end
- boxlimit = 64
- if loc == 0xa8 then boxlimit = 8 end
- for i = 1,boxlimit do
- isred = 0
- screenx = mapx[i] - mapoffsetx - 8
- screeny = mapy[i] - mapoffsety - 16
- if screenx < 260 and screeny < 216 then
- if i < 9 then color = "#0000ff00" else color = "#00ff0000" end
- if redbox[loc] ~= nil then
- if table.getn(redbox[loc]) ~= nil then
- for j = 1,table.getn(redbox[loc]) do
- if i == redbox[loc][j]/2+1 then
- color = "#ff0000"..infade
- isred = 1
- end
- end
- end
- end
- if isred == 1 or dispCronobox == 1 then
- screenx2 = screenx + 15
- screeny2 = screeny + 15
- if facing[i] == 0 then --up
- screeny = screeny - faceoffset*moving[i]
- screeny2= screeny2- faceoffset
- elseif facing[i] == 1 then --down
- screeny = screeny + faceoffset
- screeny2= screeny2+ faceoffset*moving[i]
- elseif facing[i] == 2 then --left
- screenx = screenx - faceoffset*moving[i]
- screenx2= screenx2- faceoffset
- elseif facing[i] == 3 then --right
- screenx = screenx + faceoffset
- screenx2= screenx2+ faceoffset*moving[i]
- end
- gui.box(screenx-7,screeny-7,screenx2+7,screeny2+7, "#40804020","#C0C040"..outfade)
- gui.box(screenx,screeny,screenx2,screeny2,color,"#ff0000"..outfade)
- end
- if (dispboxID == 1) then
- gui.text(screenx+faceoffset, screeny+faceoffset, string.format("%x",2*(i-1)),"#FFFFFF","#00000000")
- end
- end
- end
- gui.box(0,211,256,224,"#000000")
- end
- local BATTLE_VALUE = 0x7e0026
- local BATTLE_STORE = 0x7e29AD
- local CRIT_VALUE = 0x7eB3E6
- local MENU_TIME = 0x7e0D00
- local menutime = 0
- local menuopen = 0
- local CHAR_ID = 0x7e2980 -- 3 in-party, 6 reserve
- local chars = {}
- local ATB = 0x7eAFAB
- local atb = {}
- for i = 0,10 do atb[i] = memory.readbyte(ATB+i) end
- local windowname = {}
- windowname[0] = {"00","01","02","05","07","09","11","14","18","23","26","28","33","36","39","41"}
- windowname[1] = {"00","01","02","05","09","12","15","16","19","22","25","28","31","35","39","42"}
- windowname[2] = {"00","02","03","05","07","11","15","16","18","20","24","28","32","35","39","41"}
- local battlewindow = {} --set of windows for 0, 1, and 2 empty characters
- battlewindow[0] = { 0,0x09,0x0d,0x1d,0x2e,0x37,0x3e,0x58,0x61,0x88,0x98,0xab,0xb9,0xdc,0xe3,0xfb,256}
- battlewindow[1] = { 0,0x0d,0x12,0x17,0x35,0x40,0x5c,0x67,0x6a,0x88,0x8f,0xad,0xb3,0xd0,0xe4,0xfd,256}
- battlewindow[2] = { 0,0x0b,0x18,0x1d,0x2c,0x33,0x64,0x66,0x6d,0x79,0x85,0xa7,0xb6,0xd3,0xe6,0xf7,256}
- local bvrec = {}
- local bvsave = 0
- function Reload()
- bvrec = {}
- end
- savestate.registerload(Reload)
- bvreccolor = {}
- for i = 0,255 do bvreccolor[i] = 8 end
- secrange = {"0",".5","1","1.5","2","2.5","3","3.5","4"}
- rulecolors={"#A00000","#FF0000",
- "#008000","#00FF00",
- "#0000FF","#2020FF",
- "#A0A0A0","#FFFFFF",
- "#A000A0","#FF00FF",
- "#808000","#FFFF00",
- "#008080","#00FFFF",
- "#404040","#808080"}
- function getValues()
- --Catch the BV copy
- if battlecopy == 0 and battleflag == 1 and memory.readbyte(BATTLE_VALUE) == memory.readbyte(BATTLE_STORE) then
- battlecopy = 1
- elseif battleflag == 0 then
- battlecopy = 0
- end
- --Get the active PCs
- mtchars = 0
- for i = 1,3 do
- chars[i] = memory.readbyte(CHAR_ID+i-1)
- if chars[i] >= 0x07 then mtchars = mtchars + 1 end
- end
- --Value is at different address for in-battle, out-of-battle, & load menu:
- if battlecopy == 1 then
- bv = memory.readbyte(BATTLE_VALUE)
- cv = memory.readbyte(CRIT_VALUE)
- else
- if (memory.readbyte(MENU_TIME) > 0 and memory.readbyte(BATTLE_STORE) == 0 and mtchars == 0) then
- --menutime is for ALL menus, BV is 0 for entire beginning... but load menu has "3 Crono's" (000000)
- bv = memory.readbyte(MENU_TIME)
- bvrec = {}
- else bv = memory.readbyte(BATTLE_STORE) end
- cv = bv
- end
- if bv > bvsave then
- for i = bvsave+1,bv-1 do bvrec[i] = 0 end
- bvrec[bv] = 1
- bvsave = bv
- bvreccolor[bv] = 8
- elseif bv < bvsave then
- for i = bvsave+1,255 do bvrec[i] = 0 end
- for i = 0,bv-1 do bvrec[i] = 0 end
- bvrec[bv] = 1
- bvsave = bv
- bvreccolor[bv] = 8
- end
- --catch ATB reset
- newatb = {}
- for i = 0,10 do
- newatb[i] = memory.readbyte(ATB+i)
- if atb[i] == 0 and newatb[i] ~= 0 and newatb[i] ~= 0x80 then
- if bvreccolor[bv] == 8 then
- if i < 3 then
- bvreccolor[bv] = chars[i+1]
- else
- bvreccolor[bv] = 7
- end
- end
- end
- atb[i] = newatb[i]
- end
- end
- function displayValues()
- rulecolor = 1
- for j = 1,16 do
- if bv >= battlewindow[mtchars][j] and bv < battlewindow[mtchars][j+1] then
- rulecolor = j
- end
- end
- gui.text(bv,dispy+26,string.format("%x",bv),rulecolors[rulecolor],"#00000000")
- for i = 0,255 do
- for j = 1,16 do
- if i >= battlewindow[mtchars][j] and i < battlewindow[mtchars][j+1] then
- rulecolor = j
- end
- end
- gui.pixel(i,dispy+24,rulecolors[rulecolor])
- if i%4 == 0 then gui.pixel(i,dispy+25,rulecolors[rulecolor]) end
- if i%16 == 0 then
- gui.pixel(i,dispy+26,rulecolors[rulecolor])
- gui.pixel(i,dispy+27,rulecolors[rulecolor]) end
- if bvrec[i] == 1 then
- gui.pixel(i,dispy+23,charcolor[bvreccolor[i]+1])
- if bvreccolor[i] < 7 then
- gui.pixel(i,dispy+22,charcolor[bvreccolor[i]+1])
- end
- end
- end
- gui.pixel(bv,dispy+21,charcolor[bvreccolor[bv]+1])
- gui.pixel(bv,dispy+22,charcolor[bvreccolor[bv]+1])
- gui.pixel(bv,dispy+23,charcolor[bvreccolor[bv]+1])
- end
- local CHAR_ID = 0x7e2980 -- 3 in-party then 6 reserve (e.g. for 1-on-1 bosses)
- local CHAR_WEAP = 0x7e2629
- local CHAR_ACC = 0x7e262A
- local crits = "0737062067712743017053012106621026206760245002737143667207070014"..
- "1101674231747620560305126422403270125313166113731602620666773021"..
- "1714114244363074011420427072702021156152710015037100071773030063"..
- "3110560024303132144471071671003163600200333701061633241110004006"..
- "0737062067" --wrap-around
- function displayCrits()
- --Get equipment and their crit chance
- chance = {}
- crittext = ""
- for i = 1,3 do
- if chars[i] < 0x07 then
- weap = memory.readbyte(CHAR_WEAP + 0x50*(chars[i]))
- acc = memory.readbyte(CHAR_ACC + 0x50*(chars[i]))
- if weap == 0x55 then -- rainbow
- chance[i] = 1
- elseif acc == 0xB3 and (weap == 0x42 or weap == 0x3D) then -- masamune+heromedal
- chance[i] = 2
- elseif weap == 0x40 or weap == 0x19 or weap == 0x1A then -- wonder, siren, valkerye
- chance[i] = 3
- elseif weap == 0x53 then -- swallow
- chance[i] = 4
- elseif weap == 0x54 or chars[i] == 4 then -- slasher2 (22)
- chance[i] = 5
- elseif weap == 0x0D or chars[i] == 1 or chars[i] == 2 or chars[i] == 5 then -- kaliblade
- chance[i] = 6
- elseif chars[i] == 0 or chars[i] == 3 or chars[i] == 6 then
- chance[i] = 7 end
- else chance[i] = 8 end
- end
- for i = 1,6 do
- cc = 7
- critconf = 0
- cv = cv + 1
- for j = 1,3 do
- if chance[j] <= tonumber(crits:sub(cv,cv)) then
- critconf = critconf + 1
- if critconf == 1 then
- cc = chars[j] + 1
- elseif critconf > 1 then
- end
- end
- end
- writeDigit(tonumber(crits:sub(cv,cv)),184+i*10,charcolor[cc],charshade[cc])
- end
- end
- local emuframe = 0
- local moviedata = {}
- local movieoffset = 0
- function displayJoypad()
- emuframe = emu.framecount()
- --Read in movie file:
- if movie.mode() == "playback" and movieoffset == 0 then
- f = io.open(movie.name(), "rb")
- byte = f:read(1)
- while byte ~= nil do
- byte = string.byte(byte)
- table.insert(moviedata, byte)
- byte = f:read(1)
- end
- f:close()
- for i = 0,3 do
- movieoffset = movieoffset + moviedata[0x1C+1+i]*(0x100^i)
- end
- end
- --Get inputs either from movie or user:
- if movie.mode() == "playback" then
- word = moviedata[movieoffset + emuframe*2 + 1] + moviedata[movieoffset + emuframe*2]*0x100
- word = math.floor(word / 16) --discard 4 lowest bits; Lua uses all doubles (floating point)
- for i = 1, 12 do
- if word % 2 == 1 then
- inputs[ button[i] ] = true
- else inputs[ button[i] ] = nil end
- word = math.floor(word / 2)
- end
- else inputs = joypad.get() end
- --Draw each button (color it based on hold duration):
- for i = 1, 12 do
- if inputs[button[i]] then
- if unpress[i] > 0 then
- press[i] = 0
- if unpress[i] == 6 then
- turbo[i] = 1
- else
- turbo[i] = 0
- end
- unpress[i] = 0
- end
- if press[i] < 240 then
- press[i] = press[i] + 6
- end
- else
- if unpress[i] ~= 0 then -- i.e. was pressed in previous frame
- turbo[i] = 0
- end
- if unpress[i] < 240 then
- unpress[i] = unpress[i] + 6
- end
- end
- shoulder = 0
- if i == 1 or i == 2 then shoulder = 1 end
- buttontext = "#000000c0"
- buttoncolor = "#00000000"
- if inputs[button[i]] then
- buttoncolor = "#"..string.format("%02x",0xF0-press[i]).."ff80".."a0"
- elseif press[i] > 0 then
- darken = string.rep(string.format("%02x",0xF0-press[i]),3)
- buttoncolor = "#"..string.format("%02x",press[i]).."00"..string.format("%02x",0xF0-press[i])..string.format("%02x",160-unpress[i]/3*2)
- end
- if turbo[i] == 1 then
- buttontext = "#ff0000c0"
- buttoncolor = "#ffffffa0"
- end
- bx = 10
- by = 8
- gui.box(
- xoffset+xcoords[i]*bx, yoffset+ycoords[i]*by,
- xoffset+xcoords[i]*bx+bx +shoulder*bx, yoffset+ycoords[i]*by+by -shoulder*3, buttoncolor, buttoncolor)
- gui.text(xoffset+xcoords[i]*bx+4, yoffset+ycoords[i]*by+0,btnlabel[i],buttontext,"#00000000")
- end
- end
- while true do
- inputs = joypad.get()
- getValues()
- --Catch <select> pressed
- if inputs[ button[10] ] then
- if selectheld == 0 then
- selectheld = 1
- if dispbox == 4 then
- dispbox = 1
- else dispbox = dispbox + 1 end
- end
- else selectheld = 0 end
- if menutime ~= memory.readbyte(MENU_TIME) then
- if menuopen == 0 then
- menuopen = 1 end
- else menuopen = 0 end
- menutime = memory.readbyte(MENU_TIME)
- --Display all
- if (dispbox < 3) and loc < 0x1F0 and menuopen == 0 and battleflag == 0 then
- displayHitbox()
- end
- if dispbox % 2 > 0 then
- displayJoypad()
- end
- if dispbox > 0 and mtchars < 3 then
- displayValues()
- displayTime()
- -- displayCrits()
- end
- emu.frameadvance()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement