├── .gitattributes ├── .gitignore ├── Beta ├── CB3.lua ├── DKR-EEP.lua ├── Drillbot.lua ├── Joypad Copy.lua ├── Random Buttons.lua ├── Sonic the Hedgehog (SMS) - Debug Mode.lua ├── Taz.lua ├── bk_osd_minimal.lua ├── cursor.png ├── dk64_line_script.lua ├── flappo.lua ├── lots_menu.lua ├── memory_callbacks │ ├── BKFunctions.lua │ ├── BTFunctions.lua │ ├── DK64Functions.lua │ ├── N64CallbackFramework.lua │ └── SMSCallbackFramework.lua ├── mmv_reader.lua └── remove_klump.lua ├── Docs ├── BK ASM Hacking │ ├── Actor Spawner (Japan).asm │ ├── Actor Spawner (PAL).asm │ ├── Actor Spawner (USA 1.0).asm │ ├── Actor Spawner (USA 1.1).asm │ ├── Actor Spawner.asm │ ├── BK Functions.txt │ ├── BK Jump list.txt │ ├── BK Lag │ │ ├── BK Lag Simulator NTSC-U 1.0.asm │ │ ├── BK Lag Simulator PAL.asm │ │ ├── C-up and L Lag Poker.lua │ │ └── C-up and L TAStudio Lag Poker.lua │ ├── BK SaveState Code.txt │ ├── BKPracticeICs │ │ ├── FreezeClip.asm │ │ ├── Ghost.asm │ │ ├── HUDInfo.asm │ │ ├── HUDTimer.asm │ │ ├── ICTemplate.asm │ │ ├── Infinites.asm │ │ ├── InputDisplay.asm │ │ ├── L2Levitate.asm │ │ ├── Lag.asm │ │ ├── Loop.asm │ │ ├── Music.asm │ │ ├── OpenSeasons.asm │ │ ├── ResetOnEnter.asm │ │ ├── SetMoves.asm │ │ ├── SpeedControl.asm │ │ ├── TakeMeThere.asm │ │ ├── TakeOff.asm │ │ └── TransformMe.asm │ ├── BK_Enum.S │ ├── BK_Japan.S │ ├── BK_NTSC.S │ ├── BK_PAL.S │ ├── BK_characterChange.asm │ ├── BK_characterChange.yml │ ├── BK_puppet (USA 1.0).asm │ ├── BK_puppet (USA 1.0).yml │ ├── BK_tooty.asm │ ├── Game Over.asm │ ├── Hello World (PAL).asm │ ├── Hello World.asm │ ├── N64 Function Finding Tips.txt │ ├── Position Display (Japan).asm │ ├── Position Display (PAL).asm │ ├── Position Display (USA 1.0).asm │ ├── Position Display.asm │ ├── PracticeMenu (PAL).asm │ ├── PracticeMenu (PAL).txt │ ├── PracticeMenu (PAL).yml │ ├── PracticeMenu (USA 1.0).asm │ ├── PracticeMenu (USA 1.0).txt │ ├── PracticeMenu (USA 1.0).yml │ ├── PracticeMenu.asm │ ├── PracticeMenu_GUI.asm │ ├── RagDollBanjo.asm │ ├── SaveState.asm │ ├── Savestate (USA 1.0).asm │ ├── Simple Return.asm │ └── new_ss.asm ├── BK Cheats.txt ├── BK Model Replacement.txt ├── BK Music Replacement.txt ├── BK Stuff.txt ├── BK Text Indices.txt ├── BKSoundTraining.html ├── BK_flags.txt ├── BT - Bonk RNG Values.txt ├── BT GS Codes.txt ├── BT Todo.txt ├── DK64 - Kremling Kosh Layout.png ├── DK64 ASM Hacking │ ├── DK64Library.s │ ├── L to Skew.asm │ ├── LZRandomizer.asm │ ├── Moonjump 2.asm │ ├── Moonjump.asm │ ├── Paper Kong 64.asm │ ├── PlayCutscene.asm │ ├── Practice ROM │ │ ├── Practice V0_1.asm │ │ ├── Practice V0_2.asm │ │ ├── Practice V1_0.asm │ │ ├── Practice V1_1.asm │ │ ├── Practice V1_1_1.asm │ │ ├── Practice V1_1_2.asm │ │ ├── Practice V1_1_3.asm │ │ ├── Practice V1_2.asm │ │ ├── Practice V1_2_1.asm │ │ ├── Practice V1_2_2.asm │ │ ├── Practice V1_2_3.asm │ │ └── Practice V1_2_4.asm │ ├── Practice ROM2.asm │ ├── Tag Anywhere V2.asm │ ├── Tag Anywhere V3.asm │ ├── Tag Anywhere V4.asm │ ├── Tag Anywhere V5.asm │ ├── Tag Anywhere.asm │ ├── TakeMeThere.asm │ ├── TakeMeThere_WithGUI.asm │ └── template.asm ├── DK64 Kiosk Object Model 2 Loader.txt ├── DK64 Model Replacement.txt ├── DK64 Stuff.txt ├── DK64 Wrong Grab.txt ├── Design.txt ├── Golden Axe Warrior Maps.txt ├── Key Priority Simulator.html ├── LotS │ ├── LOTS JP TAS ROUTE.txt │ ├── LOTS TAS ROUTE.txt │ ├── Lord of the Sword RAM Hacking.txt │ ├── Lord of the Sword ROM Hacking.txt │ ├── Lord of the Sword Walkthrough.txt │ └── Other Notes.txt ├── Object Analysis Tools.txt ├── TODO.md └── Vile Map.jpg ├── Images ├── ChunkyFace.png ├── DK64 Framebuffer │ ├── 2dos.png │ ├── Tag Barrel │ │ ├── ButWhereWasMumbo.png │ │ ├── ButWhereWasMumbo_left.png │ │ ├── ButWhereWasMumbo_light.png │ │ ├── ExpansionPak.png │ │ ├── ExpansionPak_left.png │ │ ├── ExpansionPak_right.png │ │ ├── Texture List (DK Isle).txt │ │ ├── dosPapoosed.png │ │ ├── dosPapoosed_left.png │ │ ├── dosPapoosed_right.png │ │ ├── dosWink.png │ │ ├── dosWink_left.png │ │ ├── dosWink_right.png │ │ ├── miniOven.png │ │ ├── miniOven_left.png │ │ └── miniOven_right.png │ └── info.txt ├── DKFace.png ├── DiddyFace.png ├── IM │ ├── 01.png │ ├── 02.png │ ├── 03.png │ ├── 04.png │ ├── 05.png │ ├── 06.png │ ├── 07.png │ ├── 08.png │ ├── 09.png │ ├── 0A.png │ ├── 0B.png │ ├── 0C.png │ ├── 0D.png │ ├── 0E.png │ ├── 0F.png │ ├── 10.png │ ├── 11.png │ ├── 12.png │ ├── 13.png │ ├── 14.png │ ├── 15.png │ ├── 16.png │ ├── 17.png │ ├── 18.png │ ├── 19.png │ ├── 1A.png │ ├── 1B.png │ ├── 1C.png │ ├── 1D.png │ ├── 1E.png │ └── 1F.png ├── LankyFace.png ├── Promo │ ├── bk_ui.png │ ├── dk64.png │ ├── dk64_ui.png │ ├── dkr_ui.png │ ├── smash64.png │ └── smash64_ui.png ├── TinyFace.png ├── TinyFaceEdited.png ├── WBIII │ ├── Armor.png │ ├── Arrow.png │ ├── Boomerang.png │ ├── CharmStone.png │ ├── Fireball.png │ ├── Key.png │ ├── Shield.png │ ├── Sword.png │ ├── Thunder.png │ └── Tornado.png ├── down.png ├── down_left.png ├── down_right.png ├── jack_icon.png ├── kko_icon.png ├── kko_map.png ├── left.png ├── question-mark.png ├── right.png ├── switch.png ├── up.png ├── up_left.png └── up_right.png ├── LICENSE ├── Lagometer.lua ├── README.md ├── ScriptHawk (TAS Safe).lua ├── ScriptHawk.lua ├── Tetris Attack Bot.lua ├── Watch ├── Alex Kidd in Miracle World (UE) (Rev 1).wch ├── Balloon Fight.wch ├── Banjo to Kazooie no Daibouken (Japan).wch ├── Banjo to Kazooie no Daibouken 2 (Japan).wch ├── Banjo-Kazooie (Europe) (En,Fr,De).wch ├── Banjo-Kazooie (USA) (Rev A).wch ├── Banjo-Kazooie (USA).wch ├── Banjo-Kazooie EEPROM.wch ├── Banjo-Tooie (Australia).wch ├── Banjo-Tooie (Europe) (En,Fr,De,Es).wch ├── Banjo-Tooie (USA).wch ├── Conker's Bad Fur Day (Europe).wch ├── Conker's Bad Fur Day (USA).wch ├── Constants │ ├── Diddy Kong Racing (Japan).wch │ ├── Donkey Kong 64 (Europe) (En,Fr,De,Es).wch │ ├── Donkey Kong 64 (Japan).wch │ ├── Donkey Kong 64 (USA) (Demo) (Kiosk).wch │ └── Donkey Kong 64 (USA).wch ├── Crash Bandicoot (Europe).wch ├── Crash Bandicoot (Japan).wch ├── Crash Bandicoot (USA).wch ├── Crash Bandicoot - Warped (USA).wch ├── Crash Bandicoot 2 - Cortex Strikes Back (Europe) (En,Fr,De,Es,It).wch ├── Crash Bandicoot 2 - Cortex Strikes Back (USA).wch ├── Crash Bandicoot 2 - Cortex no Gyakushuu! (Japan).wch ├── Crash Bandicoot 3 - Buttobi! Sekai Isshuu (Japan).wch ├── Crash Bandicoot 3 - Warped (Europe) (En,Fr,De,Es,It).wch ├── DK64sound.wch ├── Diddy Kong Racing (Europe) (En,Fr,De) (Rev A).wch ├── Diddy Kong Racing (Europe) (En,Fr,De).wch ├── Diddy Kong Racing (Japan).wch ├── Diddy Kong Racing (USA) (En,Fr) (Rev A).wch ├── Diddy Kong Racing (USA) (En,Fr).wch ├── Donkey Kong 64 (Europe) (En,Fr,De,Es).wch ├── Donkey Kong 64 (Japan).wch ├── Donkey Kong 64 (USA) (Demo) (Kiosk).wch ├── Donkey Kong 64 (USA) - Quick Kill Science.wch ├── Donkey Kong 64 (USA).wch ├── Elmo's Letter Adventure (USA).wch ├── Elmo's Number Journey (USA).wch ├── Enduro Racer (J).wch ├── Esper Dream 2 - Aratanaru Tatakai (J).wch ├── Gex 64 - Enter the Gecko (USA).wch ├── Golden Axe Warrior (UE).wch ├── Golvellius (UE).wch ├── Gran Turismo 2 (Europe) (En,Fr,De,Es,It) (Disc 2) (Gran Turismo Mode).wch ├── Gran Turismo 2 (Japan) (Disc 2) (Gran Turismo) (v1.0).wch ├── Gran Turismo 2 (Japan) (Disc 2) (Gran Turismo) (v1.1).wch ├── Gran Turismo 2 (USA) (Simulation Mode) (v1.0).wch ├── Gran Turismo 2 (USA) (Simulation Mode) (v1.1).wch ├── Gran Turismo 2 (USA) (Simulation Mode) (v1.2).wch ├── Impossible Mission (E).wch ├── Legend of Galahad, The (UE) [!].wch ├── Legend of Zelda, The - Majora's Mask (Europe) (En,Fr,De,Es) (Rev A).wch ├── Legend of Zelda, The - Majora's Mask (Europe) (En,Fr,De,Es).wch ├── Legend of Zelda, The - Majora's Mask (USA).wch ├── Legend of Zelda, The - Ocarina of Time (Europe) (En,Fr,De) (Rev A).wch ├── Legend of Zelda, The - Ocarina of Time (Europe) (En,Fr,De).wch ├── Legend of Zelda, The - Ocarina of Time (USA) (Rev A).wch ├── Legend of Zelda, The - Ocarina of Time (USA) (Rev B).wch ├── Legend of Zelda, The - Ocarina of Time (USA).wch ├── Legend of Zelda, The - Ocarina of Time - Master Quest (E) (GC) [!].wch ├── Lord of the Sword (J).wch ├── Lord of the Sword (UE).wch ├── Mercs (E).wch ├── Metroid.wch ├── Mischief Makers (USA).wch ├── Mr. Driller 2 (USA).wch ├── Nintendo All-Star! Dairantou Smash Brothers (Japan).wch ├── Panel de Pon (Japan).wch ├── Paper Mario (USA).wch ├── Penguin Land (UE).wch ├── Rayman 2 - The Great Escape (Europe) (En,Fr,De,Es,It).wch ├── Rayman 2 - The Great Escape (USA) (En,Fr,De,Es,It).wch ├── San Francisco Rush 2049 (Europe) (En,Fr,De,Es,It,Nl).wch ├── San Francisco Rush 2049 (USA).wch ├── Sonic The Hedgehog (W) (Rev 1) (Game Gear).wch ├── Sonic the Hedgehog (UE) (SMS).wch ├── SpaceStation Silicon Valley (USA).wch ├── Super Mario 64 (Europe) (En,Fr,De).wch ├── Super Mario 64 (Japan) (Rev A) (Shindou Edition).wch ├── Super Mario 64 (Japan).wch ├── Super Mario 64 (USA).wch ├── Super Smash Bros. (Australia).wch ├── Super Smash Bros. (Europe) (En,Fr,De).wch ├── Super Smash Bros. (USA).wch ├── Taz-Mania (E).wch ├── Tetris Attack (Europe) (En,Ja).wch ├── Tetris Attack (USA) (En,Ja).wch ├── The Ninja (UE).wch ├── Tom and Jerry - The Movie (E).wch ├── Toy Story 2 - Buzz Lightyear to the Rescue! (Europe).wch ├── Toy Story 2 - Buzz Lightyear to the Rescue! (USA).wch ├── Toy Story 2 - Buzz l'Eclair a la Rescousse! (France).wch ├── Toy Story 2 - Captain Buzz Lightyear auf Rettungsmission! (Germany) (Rev A).wch ├── Toy Story 2 - Captain Buzz Lightyear auf Rettungsmission! (Germany).wch ├── Tyrants - Fight Through Time (U) [!].wch ├── Wonder Boy III - The Dragon's Trap (UE).wch ├── Ys - The Vanished Omens (UE).wch ├── Zelda no Densetsu - Mujura no Kamen (Japan) (Rev A).wch ├── Zelda no Densetsu - Mujura no Kamen (Japan).wch ├── Zelda no Densetsu - Toki no Ocarina (Japan) (Rev A).wch ├── Zelda no Densetsu - Toki no Ocarina (Japan) (Rev B).wch ├── Zelda no Densetsu - Toki no Ocarina (Japan).wch └── flappo.wch ├── default_preferences.lua ├── games ├── GBA_DrillDozer.lua ├── GBA_Ty2.lua ├── GBA_Ty3.lua ├── GBA_brother_bear.lua ├── GBA_dkc1.lua ├── GBA_dkc2.lua ├── GBA_klonoa.lua ├── balloon_fight.lua ├── bk.lua ├── bk_flags.lua ├── bk_objects_USA.lua ├── blank.lua ├── bomberman64.lua ├── bt.lua ├── cbfd.lua ├── crash1.lua ├── crash2.lua ├── crash3.lua ├── crash_bash.lua ├── day_dreamin_davey.lua ├── dk64.lua ├── dk64_flags.lua ├── dk64_flags_JP.lua ├── dk64_temp_flags.lua ├── dkr.lua ├── donald_land.lua ├── duck_dodgers.lua ├── ej3d.lua ├── elmo.lua ├── galahad.lua ├── golden_axe_warrior.lua ├── golvellius.lua ├── gran_turismo_2.lua ├── impossible_mission.lua ├── knight_shift.lua ├── land_of_illusion.lua ├── lots.lua ├── mercs_sms.lua ├── metroid.lua ├── miracle_world.lua ├── mm.lua ├── oot.lua ├── penguin_land.lua ├── phantasy_star_1.lua ├── psycho_fox.lua ├── rats.lua ├── rayman_2.lua ├── rush_2049.lua ├── shinobi_world.lua ├── sm64.lua ├── smash64.lua ├── sonic1_sms.lua ├── sonic2_sms.lua ├── sonic_all_stars_racing.lua ├── sssv.lua ├── taz.lua ├── tftt.lua ├── the_ninja.lua ├── ts2.lua ├── wonder_boy_iii.lua ├── wonder_boy_monster_world.lua └── wonder_boy_sms.lua ├── lib ├── BanjoCommonFunctions.lua ├── LibScriptHawk.lua ├── Stats.lua └── pngLua │ ├── 30log.lua │ ├── 30logLICENSE │ ├── Example.png │ ├── LICENSE │ ├── README.md │ ├── deflate.lua │ ├── deflateLICENSE │ ├── logo.png │ ├── numberlua.lua │ ├── numberluaLICENSE │ ├── png.lua │ ├── stream.lua │ └── test.lua ├── lips ├── Base.lua ├── Collector.lua ├── Dumper.lua ├── LICENSE ├── Lexer.lua ├── Muncher.lua ├── Parser.lua ├── Preproc.lua ├── README.md ├── Reader.lua ├── Statement.lua ├── TODO ├── Token.lua ├── data.lua ├── init.lua ├── overrides.lua ├── util.lua └── writers.lua └── user_preferences.lua /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear on external disk 35 | .Spotlight-V100 36 | .Trashes 37 | 38 | # Directories potentially created on remote AFP share 39 | .AppleDB 40 | .AppleDesktop 41 | Network Trash Folder 42 | Temporary Items 43 | .apdisk 44 | 45 | *.State 46 | *.bk2 47 | user_preferences.lua 48 | -------------------------------------------------------------------------------- /Beta/DKR-EEP.lua: -------------------------------------------------------------------------------- 1 | local slot_size = 0x28; 2 | local number_of_slots = 3; 3 | 4 | local slot_data = {}; 5 | 6 | local function toHexString(value, desiredLength, prefix) 7 | value = string.format("%X", value or 0); 8 | prefix = prefix or "0x"; 9 | desiredLength = desiredLength or string.len(value); 10 | while string.len(value) < desiredLength do 11 | value = "0"..value; 12 | end 13 | return prefix..value; 14 | end 15 | 16 | local function checksum_16(b, start) 17 | local sum = 0; 18 | local i = start or 1; 19 | 20 | while i < #b do 21 | sum = sum + b[i]; 22 | sum = sum + b[i + 1] * 256; 23 | i = i + 2; 24 | end 25 | print("Raw sum: "..toHexString(sum)); 26 | 27 | sum = bit.rshift(sum, 16) + bit.band(sum, 0xffff); 28 | sum = sum + bit.rshift(sum, 16); 29 | sum = bit.bnot(sum); 30 | sum = bit.band(sum, 0xffff); -- truncate to 16 bits 31 | return sum 32 | end 33 | 34 | local f_name = 1; 35 | local f_base = 2; 36 | local f_length = 3; 37 | 38 | local fields = { 39 | {"Checksum", 0x00, 2}, 40 | {"TT Text", 0x23, 1}, 41 | }; 42 | 43 | local function getFieldByIndex(index) 44 | for i = 1, #fields do 45 | if index >= fields[i][f_base] and index < fields[i][f_base] + fields[i][f_length] then 46 | return fields[i][f_name]; 47 | end 48 | end 49 | return "Unknown"; 50 | end 51 | 52 | local function analyseSlots() 53 | local diffFound = false; 54 | local newSlotData = {}; 55 | for i = 1, number_of_slots do 56 | newSlotData[i] = memory.readbyterange(slot_size * (i - 1), slot_size, "EEPROM"); 57 | end 58 | if #slot_data == number_of_slots then 59 | for i = 1, #slot_data do 60 | for j = 0, slot_size do 61 | if slot_data[i][j + 1] ~= newSlotData[i][j + 1] then 62 | local fieldName = getFieldByIndex(j); 63 | if fieldName ~= "Unknown" then 64 | print("Diff at "..i.."->"..toHexString(j, 2)..": "..toHexString(slot_data[i][j + 1], 2).."->"..toHexString(newSlotData[i][j + 1], 2).." ("..fieldName..")"); 65 | else 66 | print("Diff at "..i.."->"..toHexString(j, 2)..": "..toHexString(slot_data[i][j + 1], 2).."->"..toHexString(newSlotData[i][j + 1], 2)); 67 | end 68 | diffFound = true; 69 | end 70 | end 71 | if diffFound then 72 | print("Checksum "..i..": "..toHexString(checksum_16(newSlotData[i], 3), 4).." Actual: "..toHexString(newSlotData[i][1],2)..toHexString(newSlotData[i][1],2,"")); 73 | end 74 | end 75 | if diffFound then 76 | print(); 77 | end 78 | end 79 | 80 | slot_data = newSlotData; 81 | end 82 | 83 | event.onframestart(analyseSlots, "Analyse slots"); -------------------------------------------------------------------------------- /Beta/Joypad Copy.lua: -------------------------------------------------------------------------------- 1 | -- Copies joypad inputs from player 1 to player 2, 3, and 4 2 | local function copyJoypad() 3 | local buttons = joypad.get(1); 4 | for i = 2, 4 do 5 | joypad.set(buttons, i); 6 | joypad.setanalog(buttons, i); 7 | end 8 | end 9 | event.onframestart(copyJoypad, "ScriptHawk - Copy Joypad Inputs"); -------------------------------------------------------------------------------- /Beta/Random Buttons.lua: -------------------------------------------------------------------------------- 1 | local function pickRandomUniqueIndex(reference, alreadyChosen) 2 | local indexFound = false; 3 | local index; 4 | while not indexFound do 5 | index = math.random(#reference); 6 | indexFound = true; 7 | for i = 0, #alreadyChosen do 8 | if index == alreadyChosen[i] then 9 | indexFound = false; 10 | break; 11 | end 12 | end 13 | end 14 | return index; 15 | end 16 | 17 | ------------ 18 | -- Analog -- 19 | ------------ 20 | 21 | local function getRandomAnalog() 22 | return math.random(-127, 128); 23 | end 24 | 25 | local x = getRandomAnalog(); 26 | local y = getRandomAnalog(); 27 | 28 | local function generateAnalogInputs() 29 | return { 30 | ["X Axis"] = x, 31 | ["Y Axis"] = y 32 | }; 33 | end 34 | 35 | local analogCounter = 0; 36 | local analogMaxMax = 200; 37 | local analogMax = math.random(1, analogMaxMax); 38 | 39 | ------------- 40 | -- Boolean -- 41 | ------------- 42 | 43 | local max_boolean_inputs = 2; 44 | local booleanInputsReference = { 45 | "C Down", 46 | "C Left", 47 | "C Right", 48 | "C Up", 49 | "L", 50 | "R", 51 | "A", 52 | "B", 53 | "Z", 54 | }; 55 | 56 | local function generateBooleanInputs() 57 | local numInputs = math.random(0, max_boolean_inputs); 58 | local indexes = {}; 59 | while #indexes < numInputs do 60 | table.insert(indexes, pickRandomUniqueIndex(booleanInputsReference, indexes)); 61 | end 62 | 63 | local chosenInputs = {}; 64 | for i = 0,#booleanInputsReference - 1 do 65 | chosenInputs[booleanInputsReference[i + 1]] = false; 66 | for j = 0,#indexes do 67 | if indexes[j] == i then 68 | chosenInputs[booleanInputsReference[i + 1]] = true; 69 | end 70 | end 71 | end 72 | return chosenInputs; 73 | end 74 | 75 | local booleanInputs = generateBooleanInputs(); 76 | local booleanCounter = 0; 77 | local booleanMaxMax = 59; 78 | local booleanMax = math.random(1, booleanMaxMax); 79 | 80 | local function randomPress() 81 | if not emu.islagged() then 82 | analogCounter = analogCounter + 1; 83 | if analogCounter >= analogMax then 84 | analogCounter = 0; 85 | analogMax = math.random(1, analogMaxMax); 86 | x = getRandomAnalog(); 87 | y = getRandomAnalog(); 88 | end 89 | 90 | booleanCounter = booleanCounter + 1; 91 | if booleanCounter >= booleanMax then 92 | booleanCounter = 0; 93 | booleanMax = math.random(1, booleanMaxMax); 94 | booleanInputs = generateBooleanInputs(); 95 | end 96 | 97 | joypad.set(booleanInputs, 1); 98 | joypad.setanalog(generateAnalogInputs(), 1); 99 | end 100 | end 101 | 102 | event.onframestart(randomPress, "ScriptHawk - Random button presser"); -------------------------------------------------------------------------------- /Beta/Sonic the Hedgehog (SMS) - Debug Mode.lua: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------- 2 | -- A simple debug mode for Sonic the Hedgehog on SMS -- 3 | -- Written by The8bitbeast, 2016 -- 4 | ------------------------------------------------------- 5 | 6 | local speed = 0x02; 7 | local max_speed = 0x20; 8 | 9 | local horizontal_velocity = 0x1404; -- signed integer 16 bit little endian -- TODO: It's actually s16.8 fixed point 10 | local vertical_velocity = 0x1407; -- signed integer 16 bit little endian -- TODO: It's actually s16.8 fixed point 11 | 12 | local function increment_speed() 13 | speed = math.min(max_speed, speed + 1); 14 | end 15 | 16 | local function decrement_speed() 17 | speed = math.max(1, speed - 1); 18 | end 19 | 20 | local formhandle = forms.newform(500, 250, "Debug"); 21 | local debugCheck = forms.checkbox(formhandle, "Debug On", 50, 50); 22 | forms.button(formhandle, "+", increment_speed, 50, 70, 20, 20); 23 | forms.button(formhandle, "-", decrement_speed, 150, 70, 20, 20); 24 | 25 | local function debug() 26 | if forms.ischecked(debugCheck) then 27 | local bT = joypad.get(); 28 | 29 | local up = bT["P1 Up"]; 30 | local down = bT["P1 Down"]; 31 | local left = bT["P1 Left"]; 32 | local right = bT["P1 Right"]; 33 | 34 | mainmemory.write_s8(0x1403, 0x00); -- TODO: All versions 35 | mainmemory.write_s16_le(horizontal_velocity, 0); 36 | mainmemory.write_s8(0x1406, 0x00); -- TODO: All versions 37 | mainmemory.write_s16_le(vertical_velocity, 0); 38 | 39 | if up and not down then 40 | mainmemory.write_s16_le(vertical_velocity, -speed); 41 | end 42 | 43 | if down and not up then 44 | mainmemory.write_s16_le(vertical_velocity, speed); 45 | end 46 | 47 | if left and not right then 48 | mainmemory.write_s16_le(horizontal_velocity, -speed); 49 | end 50 | 51 | if right and not left then 52 | mainmemory.write_s16_le(horizontal_velocity, speed); 53 | end 54 | end 55 | end 56 | 57 | event.onframestart(debug, "ScriptHawk - Debug Mode"); -------------------------------------------------------------------------------- /Beta/cursor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Beta/cursor.png -------------------------------------------------------------------------------- /Beta/flappo.lua: -------------------------------------------------------------------------------- 1 | -- Original minified bot 2 | -- Written by Isotarge, 2014 3 | --c=37 h={c,53,c,69,c} m=memory.read_u8 event.oninputpoll(function()x=h[m(92)+1] joypad.set({Button=m(112)==4 or m(5)-x>=m(94)},1)end) 4 | 5 | local game_mode = 0x70; 6 | local y_velocity = 0x5E; 7 | local screen_type = 0x5C; 8 | 9 | local y_position = { 10 | 0x05, 11 | 0x1D, 12 | }; 13 | 14 | ideal_height = { 39, 55, 37, 69, 37 }; 15 | 16 | function do_flappo() 17 | x = ideal_height[mainmemory.read_u8(screen_type) + 1]; 18 | --joypad.set({["P1 Button"]= mainmemory.read_u8(game_mode) == 4 or mainmemory.read_u8(y_position[1]) - x >= mainmemory.read_u8(y_velocity)}); 19 | for i = 1, #y_position do 20 | mainmemory.writebyte(y_position[i], x); 21 | end 22 | end 23 | 24 | event.oninputpoll(do_flappo, "ScriptHawk - Flappo Bot"); -------------------------------------------------------------------------------- /Beta/lots_menu.lua: -------------------------------------------------------------------------------- 1 | -- Plays around on the Lord of the Sword (UE) (SMS) menu 2 | -- Written by Isotarge, 2015 3 | 4 | local titleScreenLength = mainmemory.read_u16_le(0x104); 5 | local mapStatus = mainmemory.readbyte(0xA0); 6 | 7 | local frame = 0; 8 | local distance = 1; 9 | 10 | local input = true; 11 | 12 | local function isOnTitleScreen() 13 | titleScreenLength = mainmemory.read_u16_le(0x104); 14 | mapStatus = mainmemory.readbyte(0xA0); 15 | return mapStatus == 0x03 and titleScreenLength > 0 and not emu.islagged(); 16 | end 17 | 18 | local function do_menu() 19 | if isOnTitleScreen() then 20 | frame = frame + 1; 21 | if frame == distance then 22 | joypad.set({Up = input, Down = (not input)}, 1); 23 | input = not input; 24 | distance = distance + 1; 25 | frame = 0; 26 | else 27 | joypad.set({Up = false, Down = false}, 1); 28 | end 29 | else 30 | frame = 0; 31 | distance = 1; 32 | end 33 | end 34 | 35 | event.onframeend(do_menu, "ScriptHawk - LOTS menu"); -------------------------------------------------------------------------------- /Beta/mmv_reader.lua: -------------------------------------------------------------------------------- 1 | local mmv_filename = forms.openfile(nil, nil, "Dega Movie Files (*.mmv)|*.mmv|All Files (*.*)|*.*"); 2 | 3 | function fileExists(name) 4 | if type(name) == 'string' then 5 | local f = io.open(name, "r"); 6 | if f ~= nil then 7 | io.close(f); 8 | return true; 9 | end 10 | end 11 | return false; 12 | end 13 | 14 | console.clear(); 15 | if not fileExists(mmv_filename) then 16 | print("No movie selected. Exiting."); 17 | return; 18 | end 19 | 20 | print("Opening movie for playback: "..mmv_filename); 21 | 22 | -- Open the file and read past the header data 23 | local input_file = assert(io.open(mmv_filename, "rb")); 24 | local header = input_file:read(0xF3); 25 | 26 | -- Skip frames that have already happened 27 | local currentFrame = emu.framecount(); 28 | if currentFrame > 0 then 29 | input_file:read((currentFrame - 1) * 2); 30 | end 31 | 32 | local function parseControllerByte(byte) 33 | byte = string.byte(byte, 1); 34 | return { 35 | Up = (bit.band(byte, 0x01) ~= 0), 36 | Down = (bit.band(byte, 0x02) ~= 0), 37 | Left = (bit.band(byte, 0x04) ~= 0), 38 | Right = (bit.band(byte, 0x08) ~= 0), 39 | B1 = (bit.band(byte, 0x10) ~= 0), 40 | B2 = (bit.band(byte, 0x20) ~= 0), 41 | Pause = (bit.band(byte, 0x40) ~= 0), 42 | Reset = false, 43 | }; 44 | end 45 | 46 | local function getNextFrame() 47 | local controller1 = input_file:read(1); 48 | local controller2 = input_file:read(1); 49 | 50 | if not controller1 or not controller2 then 51 | return false; 52 | end 53 | 54 | joypad.set(parseControllerByte(controller1), 2); 55 | joypad.set(parseControllerByte(controller2), 1); 56 | 57 | return true; 58 | end 59 | 60 | while getNextFrame() do 61 | emu.frameadvance(); 62 | end 63 | input_file:close(); 64 | 65 | print("Done."); 66 | client.pause(); -------------------------------------------------------------------------------- /Beta/remove_klump.lua: -------------------------------------------------------------------------------- 1 | d=8372209;m=memory;r=m.read_u24_be;w=m.writebyte;while 7 do for i=0,255 do o=r(d+i*4)if o>0 and o pos change then banjo still falls 53 | LUI a0 0x41a0 54 | MTC1 a0 f12 55 | JAL @AddToYPos 56 | NOP 57 | L2Levitate_Normal_Off: 58 | 59 | LW ra 0x24(sp) 60 | LW a0 0x20(sp) 61 | LW a1 0x1C(sp) 62 | LW a2 0x18(sp) 63 | LW at 0x14(sp) 64 | ADDIU sp 0x28 65 | JR 66 | NOP -------------------------------------------------------------------------------- /Docs/BK ASM Hacking/BKPracticeICs/Music.asm: -------------------------------------------------------------------------------- 1 | ;-------------------------------------------------- 2 | ; Function Definition Structure 3 | ;-------------------------------------------------- 4 | ; This struct contains all the info needed for the 5 | ; practice menu to successfully run the function 6 | ; in the practice menu 7 | ; 8 | ; Add X_DefStruct to the function list in PracticeMenu.asm 9 | ;-------------------------------------------------- 10 | .align 11 | music_DefStruct: 12 | music_State: ;STATE AT STARTUP 13 | .byte 1 ;default on 14 | music_MaxState: ;TOTAL # OF STATES 15 | .byte 2 16 | 17 | .align 18 | music_MenuOptionString: ;POINTER TO STRINGS CORRESPONDING TO EACH STATE 19 | .word OnOffOptionString ;set must be 7 character (8 including trailing 0), Must be all caps 20 | 21 | music_PauseModePtr: ;POINTER TO CODE TO RUN UPON EXITING THE PAUSE MENU 22 | .word music_PauseMode ;set to 0 if no code is to be run upon exiting the pause menu 23 | 24 | music_NormalModePtr: ;POINTER TO CODE TO RUN DURING NORMAL GAME PLAY 25 | .word music_Normal_HouseKeeping ;set to 0 if no code is to be run during Normal menu 26 | 27 | music_Label: ;LABEL IN MENU 28 | .asciiz "MUSIC: \0\0\0\0\0\0\0\0" ;must be 15 character (16 including trailing 0), Must be all caps 29 | 30 | .align 31 | ;------------------------------- 32 | ; Pause Mode Code 33 | ;------------------------------- 34 | music_PauseMode: 35 | ADDIU sp -0x28 36 | SW ra 0x24(sp) 37 | SW a0 0x20(sp) 38 | SW a1 0x1C(sp) 39 | SW a2 0x18(sp) 40 | SW at 0x14(sp) 41 | 42 | LUI a0 0x8026 43 | ADDIU a0 a0 0xE883 44 | LB a1 music_State 45 | SB a1 0(a0) 46 | 47 | 48 | music_Normal_HouseKeeping: 49 | LW ra 0x24(sp) 50 | LW a0 0x20(sp) 51 | LW a1 0x1C(sp) 52 | LW a2 0x18(sp) 53 | LW at 0x14(sp) 54 | ADDIU sp 0x28 55 | JR 56 | NOP 57 | 58 | 59 | ;------------------------------- 60 | ; Normal Mode Code 61 | ;------------------------------- 62 | music_NormalMode: 63 | JR 64 | NOP 65 | 66 | ;------------------------------- 67 | ; Variables 68 | ;------------------------------- 69 | 70 | -------------------------------------------------------------------------------- /Docs/BK ASM Hacking/BKPracticeICs/OpenSeasons.asm: -------------------------------------------------------------------------------- 1 | ;-------------------------------------------------- 2 | ; Function Definition Structure 3 | ;-------------------------------------------------- 4 | ; This struct contains all the info needed for the 5 | ; practice menu to successfully run the function 6 | ; in the practice menu 7 | ; 8 | ; Add X_DefStruct to the function list in PracticeMenu.asm 9 | ;-------------------------------------------------- 10 | .align 11 | OpenSeasons_DefStruct: 12 | OpenSeasons_State: ;STATE AT STARTUP 13 | .byte 0 14 | OpenSeasons_MaxState: ;TOTAL # OF STATES 15 | .byte 5 16 | 17 | .align 18 | OpenSeasons_MenuOptionString: ;POINTER TO STRINGS CORRESPONDING TO EACH STATE 19 | .word OpenSeasons_OptionString ;set must be 7 character (8 including trailing 0), Must be all caps 20 | 21 | OpenSeasons_PauseModePtr: ;POINTER TO CODE TO RUN UPON EXITING THE PAUSE MENU 22 | .word 0 ;set to 0 if no code is to be run upon exiting the pause menu 23 | 24 | OpenSeasons_NormalModePtr: ;POINTER TO CODE TO RUN DURING NORMAL GAME PLAY 25 | .word OpenSeasons_NormalMode ;set to 0 if no code is to be run during Normal menu 26 | 27 | OpenSeasons_Label: ;LABEL IN MENU 28 | .asciiz "OPEN SEASONS: \0" ;must be 15 character (16 including trailing 0), Must be all caps 29 | 30 | .align 31 | ;------------------------------- 32 | ; Pause Mode Code 33 | ;------------------------------- 34 | OpenSeasons_PauseMode: 35 | ;YOUR PAUSE MODE CODE HERE 36 | 37 | 38 | ;------------------------------- 39 | ; Normal Mode Code 40 | ;------------------------------- 41 | OpenSeasons_NormalMode: 42 | ADDIU sp -0x28 43 | SW ra 0x24(sp) 44 | SW a0 0x20(sp) 45 | SW a1 0x1C(sp) 46 | SW a2 0x18(sp) 47 | SW at 0x14(sp) 48 | 49 | ;Open Spring 50 | LI a0 @GameProgressFlag_CCWSpringOpen 51 | JAL @SetGameProgressFlag 52 | LI a1 1 53 | LB a2 OpenSeasons_State 54 | LI at 1 55 | BEQ a2 at OpenSeasons_Normal_HouseKeeping 56 | LI a0 @GameProgressFlag_CCWSummerOpen 57 | JAL @SetGameProgressFlag 58 | LI at 2 59 | BEQ a2 at OpenSeasons_Normal_HouseKeeping 60 | LI a0 @GameProgressFlag_CCWAutumnOpen 61 | JAL @SetGameProgressFlag 62 | LI at 3 63 | BEQ a2 at OpenSeasons_Normal_HouseKeeping 64 | LI a0 @GameProgressFlag_CCWWinterOpen 65 | JAL @SetGameProgressFlag 66 | NOP 67 | 68 | OpenSeasons_Normal_HouseKeeping: 69 | 70 | SB zero OpenSeasons_State 71 | 72 | LW ra 0x24(sp) 73 | LW a0 0x20(sp) 74 | LW a1 0x1C(sp) 75 | LW a2 0x18(sp) 76 | LW at 0x14(sp) 77 | ADDIU sp 0x28 78 | JR 79 | NOP 80 | 81 | ;------------------------------- 82 | ; Variables 83 | ;------------------------------- 84 | OpenSeasons_OptionString: 85 | .asciiz "OFF\0\0\0\0" 86 | .asciiz "SPRING\0" 87 | .asciiz "SUMMER\0" 88 | .asciiz "AUTUMN\0" 89 | .asciiz "ALL\0\0\0\0" -------------------------------------------------------------------------------- /Docs/BK ASM Hacking/BKPracticeICs/SetMoves.asm: -------------------------------------------------------------------------------- 1 | ;-------------------------------------------------- 2 | ; Function Definition Structure 3 | ;-------------------------------------------------- 4 | ; This struct contains all the info needed for the 5 | ; practice menu to successfully run the function 6 | ; in the practice menu 7 | ; 8 | ; Add X_DefStruct to the function list in PracticeMenu.asm 9 | ;-------------------------------------------------- 10 | .align 11 | SetMoves_DefStruct: 12 | SetMoves_State: ;STATE AT STARTUP 13 | .byte 0 14 | SetMoves_MaxState: ;TOTAL # OF STATES 15 | .byte 7 16 | 17 | .align 18 | SetMoves_MenuOptionString: ;POINTER TO STRINGS CORRESPONDING TO EACH STATE 19 | .word MoveSetOptionString ;set must be 7 character (8 including trailing 0), Must be all caps 20 | 21 | SetMoves_PauseModePtr: ;POINTER TO CODE TO RUN UPON EXITING THE PAUSE MENU 22 | .word SetMoves_PauseMode ;set to 0 if no code is to be run upon exiting the pause menu 23 | 24 | SetMoves_NormalModePtr: ;POINTER TO CODE TO RUN DURING NORMAL GAME PLAY 25 | .word 0 ;set to 0 if no code is to be run during Normal menu 26 | 27 | SetMoves_Label: ;LABEL IN MENU 28 | .asciiz "SET MOVES: \0\0\0\0" ;must be 15 character (16 including trailing 0), Must be all caps 29 | 30 | .align 31 | ;------------------------------- 32 | ; Pause Mode Code 33 | ;------------------------------- 34 | SetMoves_PauseMode: 35 | ADDIU sp -0x28 36 | SW ra 0x24(sp) 37 | SW a0 0x20(sp) 38 | SW a1 0x1C(sp) 39 | SW a2 0x18(sp) 40 | SW at 0x14(sp) 41 | 42 | LB a0 SetMoves_State 43 | BEQ a0 zero SetMoves_Pause_Housekeeping 44 | NOP 45 | 46 | SUBI a0 a0 1 47 | LA a1 MoveSet_BitfieldValues 48 | SLL a0 a0 2 49 | ADDU a1 a0 a1 50 | LW a0 0(a1); 51 | JAL @SetMovesUnlockedBitfield 52 | NOP 53 | JAL @SetHasUsedMovesBitfield 54 | NOP 55 | SB zero SetMoves_State 56 | 57 | SetMoves_Pause_Housekeeping: 58 | LW ra 0x24(sp) 59 | LW a0 0x20(sp) 60 | LW a1 0x1C(sp) 61 | LW a2 0x18(sp) 62 | LW at 0x14(sp) 63 | ADDIU sp 0x28 64 | JR 65 | NOP 66 | ;------------------------------- 67 | ; Normal Mode Code 68 | ;------------------------------- 69 | SetMoves_NormalMode: 70 | 71 | ;------------------------------- 72 | ; Variables 73 | ;------------------------------- 74 | 75 | MoveSetOptionString: ;6 76 | .asciiz "OFF\0\0\0\0" 77 | .asciiz "NONE\0\0\0" 78 | .asciiz "SM\0\0\0\0\0" 79 | .asciiz "FFM\0\0\0\0" ;FFM no Eggs 80 | .asciiz "FFM EGG" ;FFM Eggs 81 | .asciiz "ALL\0\0\0\0" 82 | .asciiZ "DEMO\0\0\0" 83 | 84 | MoveSet_BitfieldValues: 85 | .word 0 86 | .word 0x00009DB9 87 | .word 0x000BFDBF 88 | .word 0x000BFDFF 89 | .word 0x000FFFFF 90 | .word 0xFFFFFFFF -------------------------------------------------------------------------------- /Docs/BK ASM Hacking/BKPracticeICs/TakeMeThere.asm: -------------------------------------------------------------------------------- 1 | ;-------------------------------------------------- 2 | ; Function Definition Structure 3 | ;-------------------------------------------------- 4 | ; This struct contains all the info needed for the 5 | ; practice menu to successfully run the function 6 | ; in the practice menu 7 | ; 8 | ; Add X_DefStruct to the function list in PracticeMenu.asm 9 | ; And adjust option [NumberOfOptions] & [PageTopMax] 10 | ;-------------------------------------------------- 11 | .align 12 | TakeMeThere_DefStruct: 13 | TakeMeThere_State: 14 | .byte 0 15 | TakeMeThere_MaxState: 16 | .byte 17 17 | 18 | .align 19 | TakeMeThere_MenuOptionString: 20 | .word TakeMeThere_OptionString 21 | TakeMeThere_PauseModePtr: ;set to 0 if no code is to be run upon exiting the pause menu 22 | .word 0 23 | TakeMeThere_NormalModePtr: ;set to 0 if no code is to be run during Normal menu 24 | .word TakeMeThere_NormalMode 25 | TakeMeThere_Label: 26 | .asciiz "TAKE ME THERE: " 27 | 28 | .align 29 | ;------------------------------- 30 | ; Pause Mode Code 31 | ;------------------------------- 32 | TakeMeThere_PauseMode: 33 | ;YOUR PAUSE MODE CODE HERE 34 | 35 | 36 | ;------------------------------- 37 | ; Normal Mode Code 38 | ;------------------------------- 39 | .align 40 | TakeMeThere_NormalMode: 41 | ADDIU sp -0x28 42 | SW ra 0x24(sp) 43 | SW a0 0x20(sp) 44 | SW a1 0x1C(sp) 45 | SW a2 0x18(sp) 46 | SW at 0x14(sp) 47 | 48 | LB a0 TakeMeThere_State 49 | ;convert from option number to level index 50 | 51 | SUBI a0 a0 1 52 | SLL a0 a0 1 53 | LA a2 TakeMeThere_WarpLocations 54 | ADDU a2 a2 a0 55 | LB a1 0x01(a2) ;exit 56 | LB a0 0x00(a2) ;level 57 | JAL @TakeMeThere_LevelReset 58 | LI a2 1 59 | SB zero TakeMeThere_State 60 | 61 | NormalModeCode_TakeMeThereEnd: 62 | 63 | LW ra 0x24(sp) 64 | LW a0 0x20(sp) 65 | LW a1 0x1C(sp) 66 | LW a2 0x18(sp) 67 | LW at 0x14(sp) 68 | ADDIU sp 0x28 69 | JR 70 | NOP 71 | 72 | 73 | ;-------------------------------- 74 | ; Variables 75 | ;-------------------------------- 76 | 77 | .align 78 | TakeMeThere_WarpLocations: 79 | .byte 0x01, 0x12 ;SM 80 | .byte 0x02, 0x05 ;MM 81 | .byte 0x07, 0x04 ;TTC 82 | .byte 0x0B, 0x05 ;CC 83 | .byte 0x0D, 0x02 ;BGS 84 | .byte 0x27, 0x01 ;FP 85 | .byte 0x12, 0x08 ;GV 86 | .byte 0x1B, 0x14 ;MMM 87 | .byte 0x31, 0x10 ;RBB 88 | .byte 0x40, 0x07 ;CCW 89 | .byte 0x44, 0x01 ;CCW Summer 90 | .byte 0x45, 0x01 ;CCW Autumn 91 | .byte 0x46, 0x01 ;CCW Winter 92 | .byte 0x8E, 0x02 ;FF 93 | .byte 0x93, 0x0A ;DoG 94 | .byte 0x90, 0x01 ;Grunty 95 | 96 | .align 97 | TakeMeThere_OptionString: 98 | .asciiz "OFF\0\0\0\0" 99 | .asciiz "SM\0\0\0\0\0" 100 | .asciiz "MM\0\0\0\0\0" 101 | .asciiz "TTC\0\0\0\0" 102 | .asciiz "CC\0\0\0\0\0" 103 | .asciiz "BGS\0\0\0\0" 104 | .asciiz "FP\0\0\0\0\0" 105 | .asciiz "GV\0\0\0\0\0" 106 | .asciiz "MMM\0\0\0\0" 107 | .asciiz "RBB\0\0\0\0" 108 | .asciiz "CCW\0\0\0\0" 109 | .asciiz "CCW-SUM" 110 | .asciiz "CCW-AUT" 111 | .asciiz "CCW-WIN" 112 | .asciiz "FF\0\0\0\0\0" 113 | .asciiz "DOG\0\0\0\0" 114 | .asciiz "GRUNTY\0" -------------------------------------------------------------------------------- /Docs/BK ASM Hacking/BKPracticeICs/TakeOff.asm: -------------------------------------------------------------------------------- 1 | ;-------------------------------------------------- 2 | ; Function Definition Structure 3 | ;-------------------------------------------------- 4 | .align 5 | TakeOff_DefStruct: 6 | TakeOff_State: 7 | .byte 0 8 | TakeOff_MaxState: 9 | .byte 2 10 | .align 11 | TakeOff_MenuOptionString: 12 | .word OnOffOptionString 13 | TakeOff_PauseModePtr: ;set to 0 if no code is to be run upon exiting the pause menu 14 | .word 0 15 | TakeOff_NormalModePtr: ;set to 0 if no code is to be run during Normal menu 16 | .word TakeOff_NormalMode 17 | TakeOff_Label: 18 | .asciiz "FLY ANYWHERE: \0" 19 | 20 | .align 21 | ;------------------------------- 22 | ; Pause Mode Code 23 | ;------------------------------- 24 | TakeOff_PauseMode: 25 | ;YOUR PAUSE MODE CODE HERE 26 | 27 | ;------------------------------- 28 | ; Normal Mode Code 29 | ;------------------------------- 30 | 31 | TakeOff_NormalMode: 32 | ADDIU sp -0x28 33 | SW ra 0x24(sp) 34 | SW a0 0x20(sp) 35 | SW a1 0x1C(sp) 36 | SW a2 0x18(sp) 37 | SW at 0x14(sp) 38 | 39 | 40 | LA a2 @RawP1Buttons 41 | LH a0 0x00(a2) 42 | 43 | ANDI a1 a0 0x0400 44 | BEQ a1 zero TakeOff_HouseKeeping 45 | LI a0 0x1 46 | JAL @SetMiscFlag 47 | NOP 48 | 49 | 50 | TakeOff_HouseKeeping: 51 | LW ra 0x24(sp) 52 | LW a0 0x20(sp) 53 | LW a1 0x1C(sp) 54 | LW a2 0x18(sp) 55 | LW at 0x14(sp) 56 | ADDIU sp 0x28 57 | JR 58 | NOP -------------------------------------------------------------------------------- /Docs/BK ASM Hacking/BKPracticeICs/TransformMe.asm: -------------------------------------------------------------------------------- 1 | ;-------------------------------------------------- 2 | ; Function Definition Structure 3 | ;-------------------------------------------------- 4 | .align 5 | TransformMe_DefStruct: 6 | TransformMe_State: 7 | .byte 0 8 | TransformMe_MaxState: 9 | .byte 8 10 | 11 | .align 12 | TransformMe_MenuOptionString: 13 | .word TransformMe_OptionString 14 | TransformMe_PauseModePtr: ;set to 0 if no code is to be run upon exiting the pause menu 15 | .word 0 16 | TransformMe_NormalModePtr: ;set to 0 if no code is to be run during Normal menu 17 | .word TransformMe_NormalMode 18 | TransformMe_Label: 19 | .asciiz "TRANSFORM ME: \0" 20 | 21 | .align 22 | ;------------------------------- 23 | ; Pause Mode Code 24 | ;------------------------------- 25 | TransformMe_PauseMode: 26 | ;YOUR PAUSE MODE CODE HERE 27 | 28 | ;------------------------------- 29 | ; Normal Mode Code 30 | ;------------------------------- 31 | 32 | TransformMe_NormalMode: 33 | ADDIU sp -0x28 34 | SW ra 0x24(sp) 35 | SW a0 0x20(sp) 36 | SW a1 0x1C(sp) 37 | SW a2 0x18(sp) 38 | SW at 0x14(sp) 39 | 40 | LB a0 TransformMe_State 41 | LUI a1 0x07 42 | BNE a0 a1 TransformMe_notWishyWashy 43 | LUI a1 0x01 44 | JAL @SetCheatFlag 45 | LUI a0 0x9D 46 | LUI a0 0x01 47 | 48 | TransformMe_notWishyWashy: 49 | LB a0 TransformMe_State 50 | JAL @TransformMe 51 | NOP 52 | SB zero TransformMe_State 53 | 54 | TransformMe_NormalMode_End: 55 | 56 | 57 | LW ra 0x24(sp) 58 | LW a0 0x20(sp) 59 | LW a1 0x1C(sp) 60 | LW a2 0x18(sp) 61 | LW at 0x14(sp) 62 | ADDIU sp 0x28 63 | JR 64 | NOP 65 | 66 | 67 | ;------------------------------- 68 | ; Variables 69 | ;------------------------------- 70 | 71 | .align 72 | TransformMe_OptionString: 73 | .asciiz "OFF\0\0\0\0" 74 | .asciiz "BANJO\0\0" 75 | .asciiz "TERMITE" 76 | .asciiz "PUMPKN\0" 77 | .asciiz "WALRUS\0" 78 | .asciiz "CROC\0\0\0" 79 | .asciiz "BEE\0\0\0\0" 80 | .asciiz "WASHY\0\0" -------------------------------------------------------------------------------- /Docs/BK ASM Hacking/Game Over.asm: -------------------------------------------------------------------------------- 1 | // Hook 2 | .org 0x8024EE90 3 | JAL 0x80400000 4 | 5 | [Return]: 0x8024E420 6 | 7 | [P1NewlyPressedButtons]: 0x80281254 8 | 9 | .org 0x80400000 10 | PUSH ra 11 | PUSH a0 12 | PUSH a1 13 | PUSH a2 14 | PUSH a3 15 | 16 | DPadDownCheck: 17 | LW a1 @P1NewlyPressedButtons 18 | LUI a2 0x0400 19 | AND a1 a1 a2 20 | BEQ a1 zero DPadUpCheck 21 | NOP 22 | 23 | LI a1, 0x3f47ae14 // 0.78f 24 | MTC1 a1, f12 25 | LI a1 0x8029B5EC 26 | JAL 0x80324EAC 27 | B Done 28 | NOP 29 | 30 | DPadUpCheck: 31 | LW a1 @P1NewlyPressedButtons 32 | LUI a2 0x0800 33 | AND a1 a1 a2 34 | BEQ a1 zero Done 35 | NOP 36 | 37 | JAL 0x8029B5EC 38 | NOP 39 | 40 | Done: 41 | POP a3 42 | POP a2 43 | POP a1 44 | POP a0 45 | POP ra 46 | J @Return 47 | NOP 48 | -------------------------------------------------------------------------------- /Docs/BK ASM Hacking/Hello World (PAL).asm: -------------------------------------------------------------------------------- 1 | // Hook 2 | .org 0x8024EAE0 3 | JAL 0x80400000 4 | 5 | [Return]: 0x8024E070 6 | .include "Docs/BK ASM Hacking/BK_PAL.S" 7 | //ENUMERATIONS 8 | .include "Docs/BK ASM Hacking/BK_Enum.S" 9 | 10 | .org 0x80400000 11 | PUSH ra 12 | PUSH a0 13 | PUSH a1 14 | PUSH a2 15 | PUSH a3 16 | 17 | LI a0 0x10 // X Pos 18 | LI a1 0x10 // Y Pos 19 | LI a2 0xBF000666 // Text Size, Float 20 | LA a3 Hello 21 | 22 | JAL @Print_TotalMenuFont // Call Print Function 23 | NOP 24 | 25 | POP a3 26 | POP a2 27 | POP a1 28 | POP a0 29 | POP ra 30 | J @Return 31 | NOP 32 | 33 | Hello: 34 | .asciiz "HELLO WORLD" 35 | -------------------------------------------------------------------------------- /Docs/BK ASM Hacking/Hello World.asm: -------------------------------------------------------------------------------- 1 | // Hook 2 | .org 0x8024EE90 3 | JAL 0x80400000 4 | 5 | [Return]: 0x8024E420 6 | .include "Docs/BK ASM Hacking/BK_NTSC.S" 7 | //ENUMERATIONS 8 | .include "Docs/BK ASM Hacking/BK_Enum.S" 9 | 10 | .org 0x80400000 11 | PUSH ra 12 | PUSH a0 13 | PUSH a1 14 | PUSH a2 15 | PUSH a3 16 | 17 | LI a0 0x10 // X Pos 18 | LI a1 0x10 // Y Pos 19 | LI a2 0xBF000666 // Text Size, Float 20 | LA a3 Hello 21 | 22 | JAL @Print_TotalMenuFont // Call Print Function 23 | NOP 24 | 25 | POP a3 26 | POP a2 27 | POP a1 28 | POP a0 29 | POP ra 30 | J @Return 31 | NOP 32 | 33 | Hello: 34 | .asciiz "HELLO WORLD" 35 | -------------------------------------------------------------------------------- /Docs/BK ASM Hacking/N64 Function Finding Tips.txt: -------------------------------------------------------------------------------- 1 | Memory mapping functions 2 | 3 | What to look for: 4 | 5 | 1) All opcodes must be word aligned 6 | -starts at adresss that ends in 2 zero's, 7 | -EXAMPLES: xxxxx0, xxxxx4, xxxxx8, xxxxxC 8 | 9 | 2) Functions must be jumped to and jumped away from 10 | -J (jump) 11 | -Jumps to specified address 12 | -is commonly used if you don't plan on returning from the function 13 | -Example: entering the main loop 14 | -First 6 bits are 0b000010 15 | -Opcode always looks like 0x08??????, 0x09??????, 0x0A??????, or 0x0B?????? 16 | -Remaining 26 bits are jump address right shifted by 2 (shifted since last 2 bits are always 0) 17 | -Find new address by (({OPCODE} | 0x03FFFFFF) << 2) or (({OPCODE} % 0x04000000) * 4) 18 | 19 | * -JAL (jump and link) 20 | -Jumps to specified address AND saves the return address in RA register 21 | -MOST COMMON WAY of jumping to a function since it saves return address 22 | -First 6 bits are 0b000011 23 | -Opcode always looks like 0x0C??????, 0x0D??????, 0x0E??????, or 0x0F?????? 24 | -Remaining 26 bits are jump address right shifted by 2 (shifted since last 2 bits are always 0) 25 | -Find new address by (({OPCODE} | 0x03FFFFFF) << 2) or (({OPCODE} % 0x04000000) * 4) 26 | 27 | ** -JR (jump register) 28 | -jumps the the address stored in the specified address 29 | -MOST COMMON WAY of returning from a function since return address is already saved in RA by JAL 30 | -Allways starts with 0b000000 and ends with 0b001000 31 | -Opcode always looks like on of the following: 32 | 0x00?00008, 0x01?00008, 0x02?00008, 0x03?00008 33 | -$RA is specified by 0b11111 (FACT CHECK this) so most common function return is 34 | 0x03E00008 35 | 36 | -JALR (jump and link register) 37 | 38 | 39 | 3) Functions will normally have a jump to and a return from 40 | -JAL points start of function 41 | -JR indicates end the function -------------------------------------------------------------------------------- /Docs/BK ASM Hacking/Position Display (Japan).asm: -------------------------------------------------------------------------------- 1 | // Hook 2 | .org 0x8033547C 3 | JAL 0x80400000 4 | 5 | /*HOOK USED WAS 0x8033547C 6 | | hook was a JAL to a null_function in the same function that updates the playersPositionVel, etc 7 | | NOTE: Since player only updates when game is in normalUpdateMode: 2 (not paused), 8 | | the hook will not catch when game it paused 9 | */ 10 | 11 | //ENUMERATIONS 12 | .include "Docs/BK ASM Hacking/BK_Enum.S" 13 | //FUNCTIONS & VARIABLES 14 | .include "Docs/BK ASM Hacking/BK_Japan.S" 15 | .include "Docs/BK ASM Hacking/Position Display.asm" 16 | -------------------------------------------------------------------------------- /Docs/BK ASM Hacking/Position Display (PAL).asm: -------------------------------------------------------------------------------- 1 | // Hook 2 | .org 0x8033544C 3 | JAL 0x80400000 4 | 5 | /*HOOK USED WAS 0x8033544C 6 | | hook was a JAL to a null_function in the same function that updates the playersPositionVel, etc 7 | | NOTE: Since player only updates when game is in normalUpdateMode: 2 (not paused), 8 | | the hook will not catch when game it paused 9 | */ 10 | 11 | //ENUMERATIONS 12 | .include "Docs/BK ASM Hacking/BK_Enum.S" 13 | //FUNCTIONS & VARIABLES 14 | .include "Docs/BK ASM Hacking/BK_PAL.S" 15 | .include "Docs/BK ASM Hacking/Position Display.asm" 16 | -------------------------------------------------------------------------------- /Docs/BK ASM Hacking/Position Display (USA 1.0).asm: -------------------------------------------------------------------------------- 1 | // Hook 2 | .org 0x80334FFC 3 | JAL 0x80400000 4 | 5 | /*HOOK USED WAS 0x80334FFC 6 | | hook was a JAL to a null_function in the same function that updates the playersPositionVel, etc 7 | | NOTE: Since player only updates when game is in normalUpdateMode: 2 (not paused), 8 | | the hook will not catch when game it paused 9 | */ 10 | 11 | //ENUMERATIONS 12 | .include "Docs/BK ASM Hacking/BK_Enum.S" 13 | //FUNCTIONS & VARIABLES 14 | .include "Docs/BK ASM Hacking/BK_NTSC.S" 15 | .include "Docs/BK ASM Hacking/Position Display.asm" 16 | -------------------------------------------------------------------------------- /Docs/BK ASM Hacking/Position Display.asm: -------------------------------------------------------------------------------- 1 | //CONSTANTS 2 | [OSDXOffset]: 0x08 3 | 4 | //POSITION_DISPLAY 5 | .org 0x80400000 6 | PUSH ra 7 | PUSH a0 8 | PUSH a1 9 | PUSH a2 10 | 11 | // Convert X position to String 12 | LA a0 XPosValueStr 13 | LA a1 XPosStr //label 14 | JAL @CopyString 15 | NOP 16 | LA a1 @XPos 17 | LW a1 0(a1) 18 | LA a0 XPosValueStr 19 | JAL @FToA 20 | LI a2 3 21 | 22 | // Print X Position 23 | LI a1 0x08 // Y Pos 24 | LA a2 XPosValueStr 25 | JAL @Print_CharFont 26 | LI a0 @OSDXOffset 27 | 28 | // Convert Y position to String 29 | LA a0 YPosValueStr 30 | LA a1 YPosStr //label 31 | JAL @CopyString 32 | NOP 33 | LA a1 @XPos 34 | LW a1 4(a1) 35 | LA a0 YPosValueStr 36 | JAL @FToA 37 | LI a2 3 38 | 39 | // Print Y Position 40 | LI a1 0x14 // Y Pos 41 | LA a2 YPosValueStr 42 | JAL @Print_CharFont 43 | LI a0 @OSDXOffset 44 | 45 | // Convert Z position to String 46 | LA a0 ZPosValueStr 47 | LA a1 ZPosStr //label 48 | JAL @CopyString 49 | NOP 50 | LA a1 @XPos 51 | LW a1 8(a1) 52 | LA a0 ZPosValueStr 53 | JAL @FToA 54 | LI a2 3 55 | 56 | // Print Z Position 57 | LI a1 0x20 // Y Pos 58 | LA a2 ZPosValueStr 59 | JAL @Print_CharFont 60 | LI a0 @OSDXOffset 61 | 62 | // Convert XZ velocity to String 63 | LA a0 XZVelocityValueStr 64 | LA a1 XZVelocityStr 65 | JAL @CopyString 66 | NOP 67 | JAL @GetXZVelocity 68 | NOP 69 | mfc1 a1 f0 70 | LA a0 XZVelocityValueStr 71 | JAL @FToA 72 | LI a2 3 73 | 74 | // Print XZ Velocity 75 | LI a1 0x34 // Y Pos 76 | LA a2 XZVelocityValueStr 77 | JAL @Print_CharFont 78 | LI a0 @OSDXOffset 79 | 80 | // Convert Y velocity to String 81 | LA a0 YVelocityValueStr 82 | LA a1 YVelocityStr 83 | JAL @CopyString 84 | NOP 85 | LA a1 @XVelocity 86 | LW a1 4(a1) 87 | LA a0 YVelocityValueStr 88 | JAL @FToA 89 | LI a2 3 90 | 91 | // Print Y Velocity 92 | LI a1 0x40 // Y Pos 93 | LA a2 YVelocityValueStr 94 | JAL @Print_CharFont 95 | LI a0 @OSDXOffset 96 | 97 | // Convert SlopeTimer to String 98 | LA a0 SlopeTimerValueStr 99 | LA a1 SlopeTimerStr 100 | JAL @CopyString 101 | NOP 102 | LA a1 @SlopeTimer 103 | LW a1 0(a1) 104 | LA a0 SlopeTimerValueStr 105 | JAL @FToA 106 | LI a2 3 107 | 108 | // Print SlopeTimer 109 | LI a1 0x54 // Y Pos 110 | LA a2 SlopeTimerValueStr 111 | JAL @Print_CharFont 112 | LI a0 @OSDXOffset 113 | 114 | POP a2 115 | POP a1 116 | POP a0 117 | POP ra 118 | JR 119 | NOP 120 | 121 | XPosStr: 122 | .asciiz "X:\0\0" 123 | YPosStr: 124 | .asciiz "Y:\0\0" 125 | ZPosStr: 126 | .asciiz "Z:\0\0" 127 | XZVelocityStr: 128 | .asciiz "XZ':\0\0" 129 | YVelocityStr: 130 | .asciiz "Y':\0" 131 | ZVelocityStr: 132 | .asciiz "Z':\0" 133 | SlopeTimerStr: 134 | .asciiz "ST:\0" 135 | 136 | XPosValueStr: 137 | .asciiz "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" 138 | YPosValueStr: 139 | .asciiz "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" 140 | ZPosValueStr: 141 | .asciiz "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" 142 | YVelocityValueStr: 143 | .asciiz "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" 144 | XZVelocityValueStr: 145 | .asciiz "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" 146 | SlopeTimerValueStr: 147 | .asciiz "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" -------------------------------------------------------------------------------- /Docs/BK ASM Hacking/PracticeMenu (PAL).asm: -------------------------------------------------------------------------------- 1 | // HOOKS 2 | 3 | ;PAUSE MODE JUMP LOCATION: 0x802E49E4 4 | .org 0x802E49E4 5 | JAL 0x80400000 6 | NOP 7 | 8 | ;NORMAL MODE JUMP LOCATION: 0x8033544C 9 | .org 0x8033544C 10 | JAL NormalModeCode 11 | NOP 12 | 13 | //ENUMERATIONS 14 | .include "Docs/BK ASM Hacking/BK_Enum.S" 15 | //EXISTING FUNCTIONS 16 | .include "Docs/BK ASM Hacking/BK_PAL.S" 17 | 18 | //EXISTING VARIABLES 19 | [P1DPadUp]:0x80280F7C 20 | [P1DPadDown]:0x80280F80 21 | [P1DPadLeft]:0x80280F84 22 | [P1DPadRight]:0x80280F88 23 | [P1Start]:0x80280F8C 24 | [PauseMenuData]:0x8036C99C 25 | [PauseMenuState]:0x803839F0 26 | 27 | .include "Docs/BK ASM Hacking/PracticeMenu.asm" -------------------------------------------------------------------------------- /Docs/BK ASM Hacking/PracticeMenu (USA 1.0).asm: -------------------------------------------------------------------------------- 1 | //Boot map 2 | .org 0x8023DBAB 3 | .byte 0x91 4 | 5 | // HOOKS 6 | ;PAUSE MODE JUMP LOCATION: 0x802E47F4 7 | .org 0x802E47F4 8 | JAL PauseMode 9 | NOP 10 | 11 | ;NORMAL MODE JUMP LOCATION: 0x80334FFC 12 | .org 0x80334FFC 13 | JAL NormalModeCode 14 | NOP 15 | 16 | //ENUMERATIONS 17 | .include "Docs/BK ASM Hacking/BK_Enum.S" 18 | //EXISTING FUNCTIONS 19 | .include "Docs/BK ASM Hacking/BK_NTSC.S" 20 | 21 | //EXISTING VARIABLES 22 | [P1DPadUp]:0x8028115C 23 | [P1DPadDown]:0x80281160 24 | [P1DPadLeft]:0x80281164 25 | [P1DPadRight]:0x80281168 26 | [P1Start]:0x8028116C 27 | [PauseMenuData]:0x8036C4E0 28 | [PauseMenuState]:0x80383010 29 | 30 | .include "Docs/BK ASM Hacking/PracticeMenu.asm" -------------------------------------------------------------------------------- /Docs/BK ASM Hacking/RagDollBanjo.asm: -------------------------------------------------------------------------------- 1 | // Hook 2 | .org 0x80334FFC 3 | JAL 0x80400000 4 | 5 | //ENUMERATIONS 6 | .include "Docs/BK ASM Hacking/BK_Enum.S" 7 | //FUNCTIONS AND VARIABLES 8 | .include "Docs/BK ASM Hacking/BK_NTSC.S" 9 | 10 | //CODE 11 | .org 0x80400000 12 | PUSH ra 13 | PUSH a0 14 | PUSH a1 15 | PUSH a2 16 | PUSH at 17 | 18 | LA a0 @PlayerPointer 19 | LW a1 0(a0); // PlayerPtr 20 | LW a0 0(a1); // AnimationPtr 21 | LI a1 0x09; // DeathAnimation 22 | SW a1 0x10(a0); 23 | 24 | HouseKeeping: 25 | POP at 26 | POP a2 27 | POP a1 28 | POP a0 29 | POP ra 30 | JR 31 | NOP 32 | 33 | // See animation_types table in bk.lua for values 34 | // 0x09 death ***** 35 | // 0x0A climbing ***** 36 | -------------------------------------------------------------------------------- /Docs/BK ASM Hacking/SaveState.asm: -------------------------------------------------------------------------------- 1 | // Hook 2 | .org 0x8024EE90 3 | JAL 0x80400000 4 | 5 | [Return]: 0x8024E420 6 | 7 | [ReadStart]: 0x8037BF20 8 | [ReadEnd]: 0x8037C70C 9 | [WriteStart]: 0x80401000 10 | [WriteEnd]: 0x804017EC 11 | 12 | .org 0x80400000 13 | PUSH v0 // Read from 14 | PUSH t5 // Pointer check 15 | PUSH t6 // Controller input 16 | PUSH t7 // Holding Register 17 | PUSH t8 // Write to 18 | PUSH t9 // Write until 19 | 20 | Save: 21 | LI v0, @ReadStart 22 | LI t8, @WriteStart 23 | LI t9, @WriteEnd 24 | 25 | CheckController: 26 | LUI t6, 0x8028 27 | LH t6, 0x1250(t6) // Load controller input (0x80281250) 28 | ADDIU t7, r0, 0x0020 // L button 29 | BEQ t7, t6, Load 30 | NOP 31 | ADDIU t7, r0, 0x0010 // R Button 32 | BNE t7, t6, Return 33 | NOP 34 | 35 | SaveState: 36 | LW t7, 0x0000(v0) // Read word 37 | SW t7, 0x0000(t8) // Write word 38 | ADDIU v0, v0, 0x0004 // r += 4 39 | BNE t9, t8, SaveState 40 | ADDIU t8, t8, 0x0004 // w += 4 41 | B Return 42 | NOP 43 | 44 | Load: 45 | LI v0, @WriteStart 46 | LI t8, @ReadStart 47 | LI t9, @ReadEnd 48 | 49 | LI t5, 0x80000000 50 | LI t6, 0x80800000 51 | 52 | LoadState: 53 | LW t7, 0x0000(v0) // Read word 54 | 55 | BLT t7, t5, StoreWordLoad // if < 0x80000000 then store it 56 | NOP 57 | BLT t7, t6, PointerSkip // if < 0x80800000 then skip it 58 | NOP 59 | 60 | StoreWordLoad: 61 | SW t7, 0x0000(t8) // Write word 62 | 63 | PointerSkip: 64 | ADDIU v0, v0, 0x0004 // r += 4 65 | BNE t9, t8, LoadState 66 | ADDIU t8, t8, 0x0004 // w += 4 67 | 68 | Return: 69 | POP t9 70 | POP t8 71 | POP t7 72 | POP t6 73 | POP t5 74 | POP v0 75 | J @Return 76 | NOP 77 | -------------------------------------------------------------------------------- /Docs/BK ASM Hacking/Savestate (USA 1.0).asm: -------------------------------------------------------------------------------- 1 | //Boot map 2 | .org 0x8023DBAB 3 | .byte 0x91 4 | 5 | //intro cutscene skip 6 | //.org 0x8031C640 7 | //LI V0 0x01 8 | //JR ra 9 | //NOP 10 | 11 | //lair cutscene skip 12 | //.org 0x8031C688 13 | //LI V0 0x01 14 | //JR ra 15 | //NOP 16 | 17 | // HOOKS 18 | ;NORMAL MODE JUMP LOCATION: 0x80334FFC 19 | .org 0x8023de14 20 | JAL NormalModeCode 21 | NOP 22 | 23 | //ENUMERATIONS 24 | .include "Docs/BK ASM Hacking/BK_Enum.S" 25 | //EXISTING FUNCTIONS 26 | .include "Docs/BK ASM Hacking/BK_NTSC.S" 27 | 28 | //EXISTING VARIABLES 29 | [P1DPadUp]:0x8028115C 30 | [P1DPadDown]:0x80281160 31 | [P1DPadLeft]:0x80281164 32 | [P1DPadRight]:0x80281168 33 | [P1Start]:0x8028116C 34 | [PauseMenuData]:0x8036C4E0 35 | [PauseMenuState]:0x80383010 36 | 37 | .include "Docs/BK ASM Hacking/new_ss.asm" -------------------------------------------------------------------------------- /Docs/BK ASM Hacking/Simple Return.asm: -------------------------------------------------------------------------------- 1 | // Hook 2 | .org 0x8024EE90 3 | JAL 0x80400000 4 | 5 | [Print]: 0x802F7870 6 | [Return]: 0x8024E420 7 | 8 | .org 0x80400000 9 | PUSH ra 10 | 11 | // Code goes here 12 | 13 | POP ra 14 | J @Return 15 | NOP 16 | -------------------------------------------------------------------------------- /Docs/BK ASM Hacking/new_ss.asm: -------------------------------------------------------------------------------- 1 | //new_ss.asm 2 | 3 | [memcpy_fast]: 0x80254630 4 | [last_size]: 0x9CA70 5 | [game_update]:0x802e4424 6 | 7 | .org 0x80400100 8 | 9 | NormalModeCode: ;DO NOT CHANGE THIS NAME 10 | ADDIU sp -0x90 11 | SW ra 0x88(sp) 12 | SW a0 0x84(sp) 13 | SW a1 0x80(sp) 14 | SW a2 0x7C(sp) 15 | SW a3 0x78(sp) 16 | SW at 0x74(sp) 17 | SW v0 0x70(sp) 18 | SW v1 0x6C(sp) 19 | SW s0 0x68(sp) 20 | SW s1 0x64(sp) 21 | SW s2 0x60(sp) 22 | SW s3 0x5C(sp) 23 | SW s4 0x58(sp) 24 | SW s5 0x54(sp) 25 | SW s6 0x50(sp) 26 | SW s7 0x4C(sp) 27 | SW t0 0x48(sp) 28 | SW t1 0x44(sp) 29 | SW t2 0x40(sp) 30 | SW t3 0x3C(sp) 31 | SW t4 0x38(sp) 32 | SW t5 0x34(sp) 33 | SW t6 0x30(sp) 34 | SW t7 0x2C(sp) 35 | SW t8 0x28(sp) 36 | SW t9 0x24(sp) 37 | SW k0 0x20(sp) 38 | SW k1 0x1C(sp) 39 | SW gp 0x18(sp) 40 | SW fp 0x14(sp) 41 | 42 | JAL @osDisableInt 43 | NOP 44 | SW v0 int_save 45 | 46 | LB a0 save_state_set 47 | BEQ a0 zero NormalModeCode_save 48 | NOP 49 | 50 | //if D_Up load state 51 | LW a1 @P1NewlyPressedButtons 52 | LUI a2 0x0800 53 | AND a1 a1 a2 54 | BEQ a1 zero NormalModeCode_save 55 | NOP 56 | 57 | LI a0 @Heap_addr 58 | LA a1 save_data_space 59 | LI a2 @Heap_size 60 | JAL @memcpy_fast 61 | NOP 62 | 63 | LI a0 @Lib_Data_addr 64 | LI a2 @Lid_Data_size 65 | JAL @memcpy_fast 66 | NOP 67 | 68 | LI a0 @Game_Eng_Data_addr 69 | LI a2 @last_size 70 | JAL @memcpy_fast 71 | NOP 72 | 73 | 74 | normal_threads_started: 75 | 76 | 77 | //if D_down save state 78 | NormalModeCode_save: 79 | LW a1 @P1NewlyPressedButtons 80 | LUI a2 0x0400 81 | AND a1 a1 a2 82 | BEQ a1 zero NormalModeCode_Housekeeping 83 | NOP 84 | 85 | LI a1 @Heap_addr 86 | LA a0 save_data_space 87 | LI a2 @Heap_size 88 | JAL @memcpy_fast 89 | NOP 90 | 91 | 92 | LI a1 @Lib_Data_addr 93 | LI a2 @Lid_Data_size 94 | JAL @memcpy_fast 95 | NOP 96 | 97 | LI a1 @Game_Eng_Data_addr 98 | LI a2 @last_size 99 | JAL @memcpy_fast 100 | NOP 101 | 102 | LI a0 1 103 | SB a0 save_state_set 104 | SW sp stack_ptr_save 105 | 106 | NormalModeCode_Housekeeping: 107 | 108 | LW a0 int_save 109 | JAL @osRestoreInt 110 | NOP 111 | 112 | LW ra 0x88(sp) 113 | LW a0 0x84(sp) 114 | LW a1 0x80(sp) 115 | LW a2 0x7C(sp) 116 | LW a3 0x78(sp) 117 | LW at 0x74(sp) 118 | LW v0 0x70(sp) 119 | LW v1 0x6C(sp) 120 | LW s0 0x68(sp) 121 | LW s1 0x64(sp) 122 | LW s2 0x60(sp) 123 | LW s3 0x5C(sp) 124 | LW s4 0x58(sp) 125 | LW s5 0x54(sp) 126 | LW s6 0x50(sp) 127 | LW s7 0x4C(sp) 128 | LW t0 0x48(sp) 129 | LW t1 0x44(sp) 130 | LW t2 0x40(sp) 131 | LW t3 0x3C(sp) 132 | LW t4 0x38(sp) 133 | LW t5 0x34(sp) 134 | LW t6 0x30(sp) 135 | LW t7 0x2C(sp) 136 | LW t8 0x28(sp) 137 | LW t9 0x24(sp) 138 | LW k0 0x20(sp) 139 | LW k1 0x1C(sp) 140 | LW gp 0x18(sp) 141 | LW fp 0x14(sp) 142 | ADDIU sp 0x90 143 | J @game_update 144 | NOP 145 | 146 | .org 0x80410000 147 | stack_ptr_save: 148 | .word 0 149 | 150 | int_save: 151 | .word 0 152 | 153 | save_state_set: 154 | .byte 0 155 | 156 | .org 0x8042D500 157 | save_data_space: -------------------------------------------------------------------------------- /Docs/BT - Bonk RNG Values.txt: -------------------------------------------------------------------------------- 1 | Bonks: 2 | 3 | 0x12C770: 4 | 5 | From test 00000000-000000FF (Fire Eggs): 6 | 7 | 00000001 8 | 0000000A 9 | 0000001A 10 | 00000023 11 | 0000002C 12 | 00000033 13 | 0000003C 14 | 00000045 15 | 0000004C 16 | 00000055 17 | 0000005E 18 | 00000065 19 | 0000006E 20 | 00000077 21 | 00000087 22 | 00000090 23 | 000000A0 24 | 000000A9 25 | 000000B2 26 | 000000B9 27 | 000000C2 28 | 000000CB 29 | 000000D2 30 | 000000DB 31 | 000000E4 32 | 000000F4 33 | 000000FD 34 | 35 | 27/256 ~= 10.5% 36 | 37 | Done 38 | 39 | Test 00000000-0000FF00 (Fire Eggs): 40 | 41 | 00000200 42 | 00000D00 43 | 00001800 44 | 00001F00 45 | 00002A00 46 | 00003100 47 | 00003C00 48 | 00004700 49 | 00004E00 50 | 00005900 51 | 00006400 52 | 00006B00 53 | 00007600 54 | 00008100 55 | 00008800 56 | 00009300 57 | 00009E00 58 | 0000A500 59 | 0000B000 60 | 0000C200 61 | 0000CD00 62 | 0000D400 63 | 0000DF00 64 | 0000EA00 65 | 0000F100 66 | 0000FC00 67 | 68 | 26/256 ~= 10.1% 69 | 70 | Done 71 | 72 | Test 00000000-00FF0000 (Fire Eggs): 73 | 74 | 00110000 75 | 00140000 76 | 002A0000 77 | 002D0000 78 | 00300000 79 | 00430000 80 | 00460000 81 | 00490000 82 | 005C0000 83 | 005F0000 84 | 00620000 85 | 00780000 86 | 007B0000 87 | 00910000 88 | 00940000 89 | 00AA0000 90 | 00AD0000 91 | 00B00000 92 | 00C30000 93 | 00C60000 94 | 00C90000 95 | 00DC0000 96 | 00DF0000 97 | 00E20000 98 | 00F80000 99 | 00FB0000 100 | 101 | 26/256 ~= 10.1% 102 | 103 | Done 104 | 105 | Testing 00000000 - 000000FF (Egg Aim): 106 | 107 | 06 108 | 0A 109 | 0D 110 | 1A 111 | 5C 112 | 5E 113 | 63 114 | 6A 115 | 71 116 | 77 117 | 78 118 | 7F 119 | 90 120 | 91 121 | A5 122 | A6 123 | B2 124 | BA 125 | BB 126 | CB 127 | CC 128 | CF 129 | D0 130 | D3 131 | E5 132 | F9 133 | FA 134 | 135 | 27/256 ~= 10.5% 136 | 137 | Breegull Blaster testing 00000000-000000FF: 138 | 139 | 12 140 | 13 141 | 27 142 | 28 143 | 3C 144 | 3D 145 | 51 146 | 52 147 | 66 148 | 67 149 | 7B 150 | 7C 151 | 90 152 | 91 153 | A2 154 | A5 155 | A6 156 | BA 157 | BB 158 | CF 159 | D0 160 | E4 161 | E5 162 | F9 163 | FA 164 | 165 | 25/256 = ~9.7% -------------------------------------------------------------------------------- /Docs/BT GS Codes.txt: -------------------------------------------------------------------------------- 1 | [LOCK UNNEEDED REPLAY MENU OPTIONS] 2 | Created by Isotarge with help from TJ and Mittenz 3 | 4 | The replay menu state that this code provides is as follows: 5 | 6 | Mini-Game: 7 | - ToT 1 8 | - ToT 2 9 | - ToT 3 10 | 11 | Boss: 12 | - Klungo 1 13 | - Klungo 2 14 | - Klungo 3 15 | - Hag 1 16 | 17 | Cinema: 18 | - Opening Story 19 | - King Jingaling Gets Zapped 20 | - Bottles and Jingaling Restored 21 | - Credits 22 | 23 | This setup is suitable for Any%, 100%, and Cheato% with the current routes 24 | 25 | To force the game to save this menu setup to EEPROM: 26 | 1. Toggle widescreen on 27 | 2. Exit settings menu 28 | 3. Toggle widescreen off 29 | 4. Exit settings menu 30 | 31 | USA 32 | 8112C782 07F0 33 | 8012C785 0007 34 | 8112C786 0080 35 | 8012C788 005F 36 | 37 | Japan 38 | 81126952 07F0 39 | 80126955 0007 40 | 81126956 0080 41 | 80126958 005F 42 | 43 | Europe 44 | 81131792 07F0 45 | 80131795 0007 46 | 81131796 0080 47 | 80131798 005F 48 | 49 | Australia 50 | 81131502 07F0 51 | 80131505 0007 52 | 81131506 0080 53 | 80131508 005F 54 | 55 | [JINJO MANIPULATION FILE USED IN THE 3 MAJOR CATEGORIES] 56 | Created by Isotarge 57 | 58 | USA 59 | 8112C7F0 0000 60 | 8112C7F2 0006 61 | 62 | Japan 63 | 811269C0 0000 64 | 811269C2 0006 65 | 66 | Europe 67 | 81131800 0000 68 | 81131802 0006 69 | 70 | Australia 71 | 81131570 0000 72 | 81131572 0006 73 | 74 | Note: Do NOT do a run with these cheats active. It locks the RNG. This is only useful for getting a Jinjo Manipulation file. 75 | 76 | ---------------------------------- 77 | -- Technical details below here -- 78 | ---------------------------------- 79 | 80 | 0x2 > 0 Klungo 1 81 | 0x2 > 1 Klungo 2 82 | 0x2 > 2 Klungo 3 83 | 84 | 0x3 > 4 Hag 1 85 | 86 | 0x7 > 7 ToT 1 87 | 88 | 0x8 > 0 ToT 2 89 | 0x8 > 1 ToT 3 90 | 0x8 > 2 Opening Story 91 | 0x8 > 3 King Jingaling Gets Zapped 92 | 0x8 > 4 Bottles and Jingaling Restored 93 | 0x8 > 6 Credits 94 | 95 | Mingy Jongo Legit 96 | 97 | Opening Story 98 | King Jingaling Gets Zapped 99 | Klungo 1 100 | Klungo 2 101 | Mingy Jongo 102 | 103 | TODO: All Honeycombs 104 | Mingy -------------------------------------------------------------------------------- /Docs/BT Todo.txt: -------------------------------------------------------------------------------- 1 | Ok so I have a few "super" ideas but they will take me a while to type up and i'm leaving for work in 5 mins, but I can give you a couple of things to look into if you want. First one is very minor, we have a way around it. Second one is fucking weird. 2 | 3 | 1) In the Hoop Hurry minigame in WitchyWorld, the time when the game ends is random, unless you are standing in a ring. If you are not standing in a ring, the game can end instantly after the timer hits "0", one second after it hits "0", or two seconds after it hits "0". We have no idea why it does this, but standing in the hoop at the end makes it end instantly. It's not a big deal to look into since we have a way to determine this, but if you want to find out why it does this, be my guest. 4 | 5 | 2) In HFP, if you are in the igloo as solo Kazooie and slide out of the igloo while shooting a clockwork and manage to do a clockwork warp off of it, the game will "lose" Kazooie and you will only have solo Banjo. If you die as solo Banjo, solo Kazooie shows up on the pad and you "lose" solo Banjo. If you die as Kazooie, you enter this weird map state where you have full control but the map is way off in the distance. There is a Wumba loading zone nearby, but I've never been able to hit it on console. I'm sure with emulator you could make an input file that leads you directly to the loading zone blind. I've always wondered what hitting that loading zone would do. 6 | 7 | If you're confused about 2), here's a video http://www.twitch.tv/konditioner/v/11462259?t=1h09m53s -------------------------------------------------------------------------------- /Docs/DK64 - Kremling Kosh Layout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Docs/DK64 - Kremling Kosh Layout.png -------------------------------------------------------------------------------- /Docs/DK64 ASM Hacking/L to Skew.asm: -------------------------------------------------------------------------------- 1 | // Hook 2 | .org 0x807140BC 3 | 4 | jal 0x807FF500 5 | nop 6 | b 0x80714110 7 | nop 8 | 9 | [ControllerInput]: 0x80014DC4 10 | [KongObjectPointer]: 0x807FBB4C 11 | 12 | [Z_Rot]: 0xE8 13 | [L_Button]: 0x0020 14 | 15 | .org 0x807FF500 16 | LH t2, @ControllerInput 17 | ADDIU t3, r0, @L_Button 18 | BNE t2, t3, Return 19 | 20 | LW t0, @KongObjectPointer 21 | LI t3, 0x3C00 // Skew amount 22 | SH t3, @Z_Rot(t0) 23 | 24 | Return: 25 | JR ra 26 | NOP -------------------------------------------------------------------------------- /Docs/DK64 ASM Hacking/Moonjump 2.asm: -------------------------------------------------------------------------------- 1 | // Hook 2 | .org 0x807140BC 3 | 4 | jal 0x807FF500 5 | nop 6 | b 0x80714110 7 | nop 8 | 9 | // Controller stuff 10 | [ControllerInput]: 0x80014DC4 11 | 12 | [A_Button]: 0x8000 13 | [B_Button]: 0x4000 14 | [Z_Button]: 0x2000 15 | 16 | [L_Button]: 0x0020 17 | [R_Button]: 0x0010 18 | 19 | [DPAD_Up]: 0x0800 20 | [DPAD_Down]: 0x0400 21 | [DPAD_Left]: 0x0200 22 | [DPAD_Right]: 0x0100 23 | 24 | // Frame counters 25 | [Frames_Lag]: 0x8076AF10 26 | [Frames_Real]: 0x807F0560 27 | 28 | // Kong Object stuff 29 | [KongObjectPointer]: 0x807FBB4C 30 | 31 | [ModelPointer]: 0x00 32 | [BoneArrayPointer]: 0x04 33 | 34 | [X_Position]: 0x7C 35 | [Y_Position]: 0x80 36 | [Z_Position]: 0x84 37 | 38 | [Floor]: 0xA4 39 | 40 | [Y_Velocity]: 0xC0 41 | 42 | [X_Rotation]: 0xE4 43 | [Y_Rotation]: 0xE6 44 | [Z_Rotation]: 0xE8 45 | 46 | [Speed]: 0x4080 47 | 48 | .org 0x807FF500 49 | LUI t1, @Speed 50 | MTC1 t1, F10 51 | 52 | // Get controller input 53 | LH t2, @ControllerInput 54 | 55 | // Defererence Kong Object pointer 56 | LW t0, @KongObjectPointer 57 | 58 | // Check for L button 59 | LI t3, @L_Button 60 | // or BNEI t2, @L_Button 61 | BNE t2, t3, Up 62 | 63 | // Y Position += Speed 64 | LWC1 F8, @Y_Position(t0) 65 | ADD.S F8, F8, F10 66 | SWC1 F8, @Y_Position(t0) 67 | SW r0, @Y_Velocity(t0) 68 | 69 | // U +, + 70 | Up: 71 | LI t3, @DPAD_Up 72 | // or BNEI t2, @DPAD_Up 73 | BNE t2, t3, Down 74 | 75 | // X Position += Speed 76 | LWC1 F8, @X_Position(t0) 77 | ADD.S F8, F8, F10 78 | SWC1 F8, @X_Position(t0) 79 | 80 | // Z Position += Speed 81 | LWC1 F8, @Z_Position(t0) 82 | ADD.S F8, F8, F10 83 | SWC1 F8, @Z_Position(t0) 84 | 85 | // D -, - 86 | Down: 87 | LI t3, @DPAD_Down 88 | // or BNEI t2, @DPAD_Down 89 | BNE t2, t3, Left 90 | 91 | // X Position -= Speed 92 | LWC1 F8, @X_Position(t0) 93 | SUB.S F8, F8, F10 94 | SWC1 F8, @X_Position(t0) 95 | 96 | // Z Position -= Speed 97 | LWC1 F8, @Z_Position(t0) 98 | SUB.S F8, F8, F10 99 | SWC1 F8, @Z_Position(t0) 100 | 101 | // L +, - 102 | Left: 103 | LI t3, @DPAD_Left 104 | // or BNEI t2, @DPAD_Left 105 | BNE t2, t3, Right 106 | 107 | // X Position += Speed 108 | LWC1 F8, @X_Position(t0) 109 | ADD.S F8, F8, F10 110 | SWC1 F8, @X_Position(t0) 111 | 112 | // Z Position -= Speed 113 | LWC1 F8, @Z_Position(t0) 114 | SUB.S F8, F8, F10 115 | SWC1 F8, @Z_Position(t0) 116 | 117 | // R -, + 118 | Right: 119 | LI t3, @DPAD_Right 120 | // or BNEI t2, @DPAD_Right 121 | BNE t2, t3, Return 122 | 123 | // X Position -= Speed 124 | LWC1 F8, @X_Position(t0) 125 | SUB.S F8, F8, F10 126 | SWC1 F8, @X_Position(t0) 127 | 128 | // Z Position += Speed 129 | LWC1 F8, @Z_Position(t0) 130 | ADD.S F8, F8, F10 131 | SWC1 F8, @Z_Position(t0) 132 | 133 | Return: 134 | JR ra 135 | NOP -------------------------------------------------------------------------------- /Docs/DK64 ASM Hacking/Moonjump.asm: -------------------------------------------------------------------------------- 1 | // Hook 2 | .org 0x807140BC 3 | 4 | jal 0x807FF500 5 | nop 6 | b 0x80714110 7 | nop 8 | 9 | [ControllerInput]: 0x80014DC4 10 | [KongObjectPointer]: 0x807FBB4C 11 | 12 | [Y_Position]: 0x80 13 | [Y_Velocity]: 0xC0 14 | [L_Button]: 0x0020 15 | 16 | .org 0x807FF500 17 | LH t2, @ControllerInput 18 | ADDIU t3, r0, @L_Button 19 | BNE t2, t3, Return 20 | 21 | LW t0, @KongObjectPointer 22 | LWC1 F8, @Y_Position(t0) 23 | LUI t2, 0x4080 24 | MTC1 t2, f10 25 | ADD.S f8, f8, f10 26 | SWC1 f8, @Y_Position(t0) 27 | SW r0, @Y_Velocity(t0) 28 | 29 | Return: 30 | JR ra 31 | NOP -------------------------------------------------------------------------------- /Docs/DK64 ASM Hacking/Paper Kong 64.asm: -------------------------------------------------------------------------------- 1 | // Hook 2 | .org 0x807140BC 3 | 4 | jal 0x807FF500 5 | nop 6 | b 0x80714110 7 | nop 8 | 9 | // Kong Object stuff 10 | [KongObjectPointer]: 0x807FBB4C 11 | [RenderingParamsPointer]: 0x04 12 | 13 | [ScaleZ]: 0x3C 14 | [PaperScale]: 0x3C75C28F 15 | 16 | .org 0x807FF500 17 | 18 | // Defererence Kong Object pointer 19 | LW t0, @KongObjectPointer 20 | 21 | // Dereference Rendering Parameters 22 | LW t0, @RenderingParamsPointer(t0) 23 | 24 | LI t1, @PaperScale 25 | SW t1, @ScaleZ(t0) 26 | 27 | JR ra 28 | NOP 29 | -------------------------------------------------------------------------------- /Docs/DK64 ASM Hacking/Tag Anywhere.asm: -------------------------------------------------------------------------------- 1 | // Donkey Kong 64 - Tag Anywhere (V1) (U) 2 | // Made with love by Isotarge 3 | // With help from Tom Ballaam, 2dos, Mittenz, retroben, Kaze Emanuar, SubDrag, runehero123, Skill 4 | 5 | // See https://pastebin.com/m82XBvYm for more info & download 6 | 7 | // Note: Eventually we'll use Mittenz' Mr. Patcher to streamline this process dramatically 8 | // https://github.com/MittenzHugg/Mr.Patcher 9 | // It's very manual and hacky for now but it will improve 10 | 11 | // To turn this patch into a ROM hack: 12 | 13 | // You'll need: 14 | // - DK64 US ROM 15 | // - BizHawk + ScriptHawk 16 | // - Hex editor 17 | // - gedecompress 18 | // - Decompressed DK64 ROM files (specifically 0113F0_ZLib.bin) 19 | // - n64crc 20 | 21 | // Method: 22 | // TODO: Make this more readable and generalize it 23 | // Use ScriptHawk's loadASMPatch() to assemble this file into vanilla DK64 US running RDRAM 24 | // Copy the 4 patched bytes at the hook location into notepad or a hex editor, 0x60B0DC in RDRAM 25 | // Find the original hook location using surrounding bytes in the decompressed version of 0113F0_ZLib.bin 26 | // Overwrite the hook with the patched version 27 | // Recompress the patched 0113F0_ZLib.bin with gedecompress 28 | // If the recompressed 0113F0_ZLib.bin is smaller or the same size as the original (fits between 113F0 and C29D4 in ROM), overwrite it in ROM 29 | // If it's bigger, you're out of luck for now (will be possible when tools & knowledge improve), try and decrease the entropy of the patch so it's smaller when recompressed 30 | // Open BizHawk's hex editor and navigate to the main code in RDRAM at 0xED30 (chews up the missing Expansion Pak message) 31 | // Copy all the patched bytes upto the 0x00000000 (NOP) after the return 32 | // Overwrite the same bytes in ROM (it's uncompressed, near the start) 33 | // Navigate to 0x3154 in ROM and replace with 0x00000000, this disables the security(or is it error?) checks on compressed files 34 | // Save the patched ROM 35 | // Fix the patched ROM's CRCs with n64crc 36 | 37 | [ControllerInput]: 0x807ECD66 38 | [KongObjectPointer]: 0x807FBB4C 39 | [MysteryObjectPointer]: 0x807FC924 40 | 41 | [MysteryWriteOffset]: 0x29C 42 | [CurrentCharacter]: 0x36F 43 | [L_Button]: 0x0020 44 | 45 | .org 0x8060B0DC // retroben's hook 46 | J Start 47 | 48 | .org 0x8000ED30 // In the Expansion Pak error message text, TODO: Better place to put this 49 | Start: 50 | 51 | // Check if L is newly pressed 52 | LH t2, @ControllerInput 53 | ADDIU t3, r0, @L_Button 54 | BNE t2, t3, Return 55 | 56 | // Update Player Actor with new character value 57 | LW t2, @KongObjectPointer 58 | LB t3, @CurrentCharacter(t2) 59 | ADDIU t3, t3, 1 60 | SLTI t0, t3, 7 61 | BNEZ t0, WriteCharacter 62 | NOP 63 | LI t3, 2 64 | 65 | WriteCharacter: 66 | SB t3, @CurrentCharacter(t2) 67 | 68 | // Update Mystery Object (cause a tag) 69 | LW t2, @MysteryObjectPointer 70 | LI t3, 0x003B 71 | SH t3, @MysteryWriteOffset(t2) 72 | 73 | Return: 74 | J 0x8060B0E4 75 | NOP -------------------------------------------------------------------------------- /Docs/DK64 ASM Hacking/template.asm: -------------------------------------------------------------------------------- 1 | ;************************************ 2 | ; Template 3 | ;************************************ 4 | 5 | .org 0x805FC164 // retroben's hook but up a few functions 6 | J Start 7 | 8 | .org 0x8000DE88 // In the Expansion Pak pic, TODO: Better place to put this 9 | Start: 10 | // Run the code we replaced 11 | JAL 0x805FC2B0 12 | NOP 13 | 14 | .include "DK64Library.s" 15 | 16 | ;Check newly pressed 17 | LA ra, ReturnFromNewlyPressedCheck 18 | LA at, CheckNewlyPressed 19 | JR at 20 | NOP 21 | .align 22 | ReturnFromNewlyPressedCheck: 23 | BEQZ t1, Return 24 | NOP 25 | 26 | ;Check L+DDown 27 | LI t0, @L_Button 28 | LI t1, @D_Down 29 | OR t0, t0, t1 30 | LA ra, ReturnFromButtonCheck 31 | LA at, CheckInput 32 | JR at 33 | NOP 34 | .align 35 | ReturnFromButtonCheck: 36 | BEQZ t1, Return 37 | NOP 38 | 39 | ;Change Model 40 | LI t0, 0x06 ;kong index - chunky 41 | LI t1, 0x45 ;model - k lumsy 42 | LI t2, 0x07 ;behavior - krusha 43 | LA ra, Return 44 | J ChangeModel 45 | NOP 46 | 47 | Return: 48 | J 0x805FC15C // retroben's hook but up a few functions 49 | NOP 50 | -------------------------------------------------------------------------------- /Docs/Golden Axe Warrior Maps.txt: -------------------------------------------------------------------------------- 1 | 10 Chest - Torch 2 | 12 Chest - Ice Bell 3 | 15 Boss - Red Dragon 4 | 1D Chest - Golden Axe 5 | 1E Boss Rush - Magey Deathy Guy 6 | 44 Boss - Green Dragon 7 | 4C Boss - Red Knight 8 | 57 Chest - Speed Shoes 9 | 5E Boss Rush - Red Knight 10 | 71 Entrance - II 11 | 79 Boss - Fake Fire Thingy 12 | 80 Boss - Green Magey Deathy Guy 13 | A2 Chest - Canoe 14 | D5 Chest - ? 15 | DB Entrance - VII 16 | F0 Entrance - IV 17 | F4 Chest - Magic Rope 18 | F8 Entrance - III 19 | FC Entrance - IX -------------------------------------------------------------------------------- /Docs/LotS/LOTS JP TAS ROUTE.txt: -------------------------------------------------------------------------------- 1 | JP ROUTE 2 | 3 | Start 01 4 | Harfoot -> Wizard 5 | Wizard -> Varlin -> Ulmo 6 | Reset (to Amon) 7 | Amon -> Pharazon -> Namo 8 | Reset (to Pharazon?) 9 | Ithile -> Swamp Spirit 10 | Reset (to Ithile) 11 | Pharazon -> Lindon 12 | Dwarle -> Pirate 13 | Duels 14 | Reset (to Dwarle) 15 | Wizard 16 | Pharazon 17 | Pharazon boss 18 | Reset (to Pharazon) 19 | Pharazon 20 | Lindon 21 | Shagart 22 | Ra Goan 23 | Reset (to Shagart?) 24 | Varlin 25 | 26 | US Route 27 | 28 | Start 01 29 | Wizard 30 | Ulmo 31 | Reset 02 (demo glitch) 32 | Namo 33 | Reset 03 (map skip, no demo glitch) 34 | Don't talk to Pharazon 35 | Talk to Ithile 36 | Swamp Spirit 37 | Reset 04 (demo glitch) 38 | Don't talk to Dwarle 39 | Lindon 40 | Pirate 41 | Duels 42 | Reset 05 (demo glitch) 43 | Talk to Wizard 44 | Reset 06 (Amon map skip) 45 | Talk to Pharazon 46 | SKIPPED Reset 07 (Pharazon map skip due to continue shortage) 47 | Pharazon boss 48 | Reset 07 (dungeon skip) 49 | Talk to Pharazon 50 | Reset 08 (demo glitch) 51 | Lindon 52 | Shagart 53 | Ra Goan (Pause glitch) 54 | Reset 09 (demo glitch) 55 | Varlin -------------------------------------------------------------------------------- /Docs/LotS/Other Notes.txt: -------------------------------------------------------------------------------- 1 | Misc Lord of the Sword notes 2 | 3 | - Pirate has 30 health 4 | - Demon has 50 health 5 | 6 | - Warp to Harfoot, usable on actual hardware without memory editing or corruption. 7 | - Can be used to bypass long travel sections, ie. back from Ithile or back from Pirate/Castle Elder 8 | - Procedure: 9 | 1. Die or soft reset on any route 10 | 2. Wait for demo to begin 11 | 3. End demo by pressing a button 12 | 4. Press continue 13 | 5. You will respawn on the same route as the demo (1 route right of Harfoot) 14 | 15 | - Buildings (that don't heal fully) heal for 1/6 of the players health 16 | - Buildings that heal, cap the player at 47/48 health 17 | 18 | Enemy Damage: 19 | 20 | The flying sideways bats (the ones that don't swoop) 21 | - 02 damage (1/24 max health) 22 | The floating eyes 23 | - 08 damage (1/6 max health) 24 | The projectiles of the forest spitty things 25 | - 01 damage (1/48 max health) 26 | The body of the forest spitty green things 27 | - 03 damage (1/16 max health) 28 | The groudons 29 | - 06 damage (1/8 max health) -------------------------------------------------------------------------------- /Docs/Object Analysis Tools.txt: -------------------------------------------------------------------------------- 1 | How to use the Object Analysis Tools 2 | 3 | These tools allow you to list and examine details about the currently loaded objects. 4 | This guide was originally written for DK64, but the keybinds apply to several games. 5 | 6 | "List" shows all currently loaded objects from that model 7 | "Examine" shows all known details about the currently selected object 8 | 9 | Keyboard shortcuts: 10 | 11 | c = Cycle mode 12 | v = Grab an object (only works when examining/listing object model 1) 13 | b = Focus the camera on an object (only works when examining/listing object model 1) 14 | n = Previous object 15 | m = Next object 16 | z = Zip to selected object, works with both model 1 and model 2 17 | 18 | Model 1 contains Actors, for example: 19 | - Player 20 | - Camera 21 | - Enemies, Bosses, and NPC's 22 | - Blueprints & Kasplats 23 | - Boss keys (except Key 8) 24 | - Banana Fairies 25 | - Bonus Barrels 26 | - K. Rool Barrels 27 | - Tag Barrels 28 | - Kong specific barrels & crates 29 | - Objects you can carry 30 | - Boulders 31 | - Barrels 32 | - Kegs 33 | - Cannons & Vines 34 | - Rainbow coin pads 35 | - Cutscene and Bonus Barrel controllers 36 | - Text Boxes 37 | - Loading zone controller 38 | - Fake Kongs (caged, DK Rap, test room, cutscenes) 39 | - Balloons 40 | 41 | Model 2 contains lighter weight objects, for example: 42 | - Gold Bananas 43 | - Colored Bananas (singles & bunches) 44 | - Key 8 45 | - Banana coins 46 | - Ammo crates 47 | - Crystal coconuts 48 | - Bananaporters 49 | - Instrument pads 50 | - Kong Specific Pads 51 | - Bullet switches 52 | - Simian Slam switches 53 | - Gorilla Grab levers 54 | 55 | Even on maps with no Model 2 objects loaded, eg. main menu, the game still allocates the object model 2 array with a minimum capacity of 450 objects or 0x90 * 450 or 0xFD20 56 | Larger maps, eg. Japes, have object model 2 array sizes over 450 57 | 58 | It is currently unknown where the following objects are stored: 59 | - Butterflies 60 | - Fish 61 | - etc etc 62 | 63 | Butterflies use standard bone arrays to render 64 | 65 | Model 3 documentation 66 | Training grounds there is an object of size 0x60 (0x433A00, may change) containing: 67 | - Group Type (0x00) 68 | - 0x02 = Fish 69 | - 0x03 = Butterflies 70 | - Number of members (0x02) 71 | - Unknown Pointer (0x04) 72 | - Pointer to bone array (0x08) 73 | 74 | Stuff you can toggle with the lua console: 75 | 76 | encircle_enabled (boolean) - Circles objects from the currently selected object model around the player, warning: crashy & laggy 77 | rat_enabled (boolean) - Sets the animation timers for the player randomly 78 | hide_non_scripted (boolean) - Hides model 2 objects without special behavior scripts 79 | 80 | I'll probably add UI for this stuff in the future. -------------------------------------------------------------------------------- /Docs/TODO.md: -------------------------------------------------------------------------------- 1 | # ScriptHawk TODO list 2 | ## General 3 | - Better High DPI support 4 | - Editing ScriptHawk.UI.button_height does a [decent job](https://twitter.com/Isotarge/status/963992829746855937), but it's not perfect 5 | - Blank template that's more lightweight 6 | - Allow modules to save extra settings via UserPreferences system 7 | - Save and Load ScriptHawk settings using UserPreferences system 8 | - Joypad/Keyboard binds for D-Pad and L Button 9 | - Rounding precision 10 | - Rotation units 11 | - Mode? Arguable 12 | - Warnings/UITest? 13 | - Bulk support SMS games with new hitbox API 14 | - UI to load ASM patches, can currently only be done by calling loadASMPatch(filename, suppressprint) in the lua console 15 | 16 | ## Specific Modules 17 | - Balloon Fight: 18 | - Mine the [disassembly](https://github.com/LuigiBlood/balloonfight_dis) for info 19 | - DK64: 20 | - Finish flag documentation 21 | - Increase identifyMemory() coverage 22 | - Document the HUD object, perfect byte sized project for a quick context switch into and out of 23 | - ASM hook for other regions 24 | - Land of Illusion: 25 | - Game Gear support 26 | - Make Mickey draggable (Y works, X doesn't) 27 | - Draw slopes as triangles in collision viewer 28 | - Phantasy Star (SMS) 29 | - Mine the [disassembly](https://github.com/lory90/ps1disasm) for info 30 | - Rats! (GBC) 31 | - Hitboxes, we've got object positions just need camera data/screen size etc 32 | - Sonic 1 (SMS/GG) 33 | - Mine the [disassembly](https://github.com/Kroc/Sonic1-Z80-ASM) for info 34 | 35 | ## Low priority, recurring, or waiting: 36 | - Object Analysis Tools: 37 | - Find a decent object/struct format that has a good balance between documentation, useability, flexibility, and speed 38 | - Metatable? 39 | - Standardize the type names and getters between BK & SM64 40 | - Port Tetris Attack bot to other Puzzle League games 41 | - [List of Games](http://www.speedrun.com/puzzle_league) 42 | - [Pokémon Puzzle League Info here](https://github.com/mupen64plus/mupen64plus-user-issues/issues/567) 43 | - Keep [lips](https://github.com/notwa/lips) up to date 44 | - Experiment with APIHawk 45 | - Support MAME? 46 | - Support both BizHawk and m64p? 47 | - [Info here](https://github.com/notwa/mm/commit/90d30e218f3128fb130e54bd8662527bdd73f40f) -------------------------------------------------------------------------------- /Docs/Vile Map.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Docs/Vile Map.jpg -------------------------------------------------------------------------------- /Images/ChunkyFace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/ChunkyFace.png -------------------------------------------------------------------------------- /Images/DK64 Framebuffer/2dos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/DK64 Framebuffer/2dos.png -------------------------------------------------------------------------------- /Images/DK64 Framebuffer/Tag Barrel/ButWhereWasMumbo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/DK64 Framebuffer/Tag Barrel/ButWhereWasMumbo.png -------------------------------------------------------------------------------- /Images/DK64 Framebuffer/Tag Barrel/ButWhereWasMumbo_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/DK64 Framebuffer/Tag Barrel/ButWhereWasMumbo_left.png -------------------------------------------------------------------------------- /Images/DK64 Framebuffer/Tag Barrel/ButWhereWasMumbo_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/DK64 Framebuffer/Tag Barrel/ButWhereWasMumbo_light.png -------------------------------------------------------------------------------- /Images/DK64 Framebuffer/Tag Barrel/ExpansionPak.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/DK64 Framebuffer/Tag Barrel/ExpansionPak.png -------------------------------------------------------------------------------- /Images/DK64 Framebuffer/Tag Barrel/ExpansionPak_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/DK64 Framebuffer/Tag Barrel/ExpansionPak_left.png -------------------------------------------------------------------------------- /Images/DK64 Framebuffer/Tag Barrel/ExpansionPak_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/DK64 Framebuffer/Tag Barrel/ExpansionPak_right.png -------------------------------------------------------------------------------- /Images/DK64 Framebuffer/Tag Barrel/dosPapoosed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/DK64 Framebuffer/Tag Barrel/dosPapoosed.png -------------------------------------------------------------------------------- /Images/DK64 Framebuffer/Tag Barrel/dosPapoosed_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/DK64 Framebuffer/Tag Barrel/dosPapoosed_left.png -------------------------------------------------------------------------------- /Images/DK64 Framebuffer/Tag Barrel/dosPapoosed_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/DK64 Framebuffer/Tag Barrel/dosPapoosed_right.png -------------------------------------------------------------------------------- /Images/DK64 Framebuffer/Tag Barrel/dosWink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/DK64 Framebuffer/Tag Barrel/dosWink.png -------------------------------------------------------------------------------- /Images/DK64 Framebuffer/Tag Barrel/dosWink_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/DK64 Framebuffer/Tag Barrel/dosWink_left.png -------------------------------------------------------------------------------- /Images/DK64 Framebuffer/Tag Barrel/dosWink_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/DK64 Framebuffer/Tag Barrel/dosWink_right.png -------------------------------------------------------------------------------- /Images/DK64 Framebuffer/Tag Barrel/miniOven.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/DK64 Framebuffer/Tag Barrel/miniOven.png -------------------------------------------------------------------------------- /Images/DK64 Framebuffer/Tag Barrel/miniOven_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/DK64 Framebuffer/Tag Barrel/miniOven_left.png -------------------------------------------------------------------------------- /Images/DK64 Framebuffer/Tag Barrel/miniOven_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/DK64 Framebuffer/Tag Barrel/miniOven_right.png -------------------------------------------------------------------------------- /Images/DK64 Framebuffer/info.txt: -------------------------------------------------------------------------------- 1 | Custom DK64 FB image how to: 2 | 3 | - Open BizHawk + DK64 4 | - Ensure "Copy framebuffer to RDRAM" (or a similarly named option) is disabled 5 | - Reboot core (if necessary) 6 | - Open ScriptHawk 7 | - Call fillFB() from the lua console 8 | - Load your 320*240 png file in the open file dialog that pops up 9 | - Pause the game, start a file or take a photo to see it -------------------------------------------------------------------------------- /Images/DKFace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/DKFace.png -------------------------------------------------------------------------------- /Images/DiddyFace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/DiddyFace.png -------------------------------------------------------------------------------- /Images/IM/01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/01.png -------------------------------------------------------------------------------- /Images/IM/02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/02.png -------------------------------------------------------------------------------- /Images/IM/03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/03.png -------------------------------------------------------------------------------- /Images/IM/04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/04.png -------------------------------------------------------------------------------- /Images/IM/05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/05.png -------------------------------------------------------------------------------- /Images/IM/06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/06.png -------------------------------------------------------------------------------- /Images/IM/07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/07.png -------------------------------------------------------------------------------- /Images/IM/08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/08.png -------------------------------------------------------------------------------- /Images/IM/09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/09.png -------------------------------------------------------------------------------- /Images/IM/0A.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/0A.png -------------------------------------------------------------------------------- /Images/IM/0B.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/0B.png -------------------------------------------------------------------------------- /Images/IM/0C.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/0C.png -------------------------------------------------------------------------------- /Images/IM/0D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/0D.png -------------------------------------------------------------------------------- /Images/IM/0E.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/0E.png -------------------------------------------------------------------------------- /Images/IM/0F.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/0F.png -------------------------------------------------------------------------------- /Images/IM/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/10.png -------------------------------------------------------------------------------- /Images/IM/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/11.png -------------------------------------------------------------------------------- /Images/IM/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/12.png -------------------------------------------------------------------------------- /Images/IM/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/13.png -------------------------------------------------------------------------------- /Images/IM/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/14.png -------------------------------------------------------------------------------- /Images/IM/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/15.png -------------------------------------------------------------------------------- /Images/IM/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/16.png -------------------------------------------------------------------------------- /Images/IM/17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/17.png -------------------------------------------------------------------------------- /Images/IM/18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/18.png -------------------------------------------------------------------------------- /Images/IM/19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/19.png -------------------------------------------------------------------------------- /Images/IM/1A.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/1A.png -------------------------------------------------------------------------------- /Images/IM/1B.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/1B.png -------------------------------------------------------------------------------- /Images/IM/1C.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/1C.png -------------------------------------------------------------------------------- /Images/IM/1D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/1D.png -------------------------------------------------------------------------------- /Images/IM/1E.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/1E.png -------------------------------------------------------------------------------- /Images/IM/1F.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/IM/1F.png -------------------------------------------------------------------------------- /Images/LankyFace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/LankyFace.png -------------------------------------------------------------------------------- /Images/Promo/bk_ui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/Promo/bk_ui.png -------------------------------------------------------------------------------- /Images/Promo/dk64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/Promo/dk64.png -------------------------------------------------------------------------------- /Images/Promo/dk64_ui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/Promo/dk64_ui.png -------------------------------------------------------------------------------- /Images/Promo/dkr_ui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/Promo/dkr_ui.png -------------------------------------------------------------------------------- /Images/Promo/smash64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/Promo/smash64.png -------------------------------------------------------------------------------- /Images/Promo/smash64_ui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/Promo/smash64_ui.png -------------------------------------------------------------------------------- /Images/TinyFace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/TinyFace.png -------------------------------------------------------------------------------- /Images/TinyFaceEdited.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/TinyFaceEdited.png -------------------------------------------------------------------------------- /Images/WBIII/Armor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/WBIII/Armor.png -------------------------------------------------------------------------------- /Images/WBIII/Arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/WBIII/Arrow.png -------------------------------------------------------------------------------- /Images/WBIII/Boomerang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/WBIII/Boomerang.png -------------------------------------------------------------------------------- /Images/WBIII/CharmStone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/WBIII/CharmStone.png -------------------------------------------------------------------------------- /Images/WBIII/Fireball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/WBIII/Fireball.png -------------------------------------------------------------------------------- /Images/WBIII/Key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/WBIII/Key.png -------------------------------------------------------------------------------- /Images/WBIII/Shield.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/WBIII/Shield.png -------------------------------------------------------------------------------- /Images/WBIII/Sword.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/WBIII/Sword.png -------------------------------------------------------------------------------- /Images/WBIII/Thunder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/WBIII/Thunder.png -------------------------------------------------------------------------------- /Images/WBIII/Tornado.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/WBIII/Tornado.png -------------------------------------------------------------------------------- /Images/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/down.png -------------------------------------------------------------------------------- /Images/down_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/down_left.png -------------------------------------------------------------------------------- /Images/down_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/down_right.png -------------------------------------------------------------------------------- /Images/jack_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/jack_icon.png -------------------------------------------------------------------------------- /Images/kko_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/kko_icon.png -------------------------------------------------------------------------------- /Images/kko_map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/kko_map.png -------------------------------------------------------------------------------- /Images/left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/left.png -------------------------------------------------------------------------------- /Images/question-mark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/question-mark.png -------------------------------------------------------------------------------- /Images/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/right.png -------------------------------------------------------------------------------- /Images/switch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/switch.png -------------------------------------------------------------------------------- /Images/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/up.png -------------------------------------------------------------------------------- /Images/up_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/up_left.png -------------------------------------------------------------------------------- /Images/up_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/Images/up_right.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Isaac Miell 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /ScriptHawk (TAS Safe).lua: -------------------------------------------------------------------------------- 1 | TASSafe = true; 2 | local function writeblock(...) 3 | --print("Memory write blocked! Your TAS is safe!"); 4 | end 5 | 6 | emu.setregister = writeblock; 7 | nes.addgamegenie = writeblock; 8 | 9 | mainmemory.writebyte = writeblock; 10 | mainmemory.writebyterange = writeblock; 11 | mainmemory.write_u8 = writeblock; 12 | mainmemory.writefloat = writeblock; 13 | mainmemory.write_s8 = writeblock; 14 | mainmemory.write_u8 = writeblock; 15 | mainmemory.write_s16_le = writeblock; 16 | mainmemory.write_s16_be = writeblock; 17 | mainmemory.write_u16_le = writeblock; 18 | mainmemory.write_u16_be = writeblock; 19 | mainmemory.write_s24_le = writeblock; 20 | mainmemory.write_s24_be = writeblock; 21 | mainmemory.write_u24_le = writeblock; 22 | mainmemory.write_u24_be = writeblock; 23 | mainmemory.write_s32_le = writeblock; 24 | mainmemory.write_s32_be = writeblock; 25 | mainmemory.write_u32_le = writeblock; 26 | mainmemory.write_u32_be = writeblock; 27 | 28 | memory.writebyte = writeblock; 29 | memory.writebyterange = writeblock; 30 | memory.write_u8 = writeblock; 31 | memory.writefloat = writeblock; 32 | memory.write_s8 = writeblock; 33 | memory.write_u8 = writeblock; 34 | memory.write_s16_le = writeblock; 35 | memory.write_s16_be = writeblock; 36 | memory.write_u16_le = writeblock; 37 | memory.write_u16_be = writeblock; 38 | memory.write_s24_le = writeblock; 39 | memory.write_s24_be = writeblock; 40 | memory.write_u24_le = writeblock; 41 | memory.write_u24_be = writeblock; 42 | memory.write_s32_le = writeblock; 43 | memory.write_s32_be = writeblock; 44 | memory.write_u32_le = writeblock; 45 | memory.write_u32_be = writeblock; 46 | 47 | local result = require("ScriptHawk"); 48 | 49 | if result == true then 50 | print("This is a special version of ScriptHawk designed to be used while TASing"); 51 | print("All memory writes are blocked"); 52 | print("Some features may be unavailable in this mode"); 53 | ScriptHawk.mode = "TAS"; 54 | while true do 55 | if client.ispaused() then 56 | gui.cleartext(); 57 | --gui.clearGraphics(); 58 | ScriptHawk.UI:updateReadouts(); 59 | ScriptHawk.modifyOSDUI:updateReadouts(); 60 | ScriptHawk.drawHitboxes(); 61 | ScriptHawk.drawHeap(); 62 | Game.drawUI(); 63 | end 64 | ScriptHawk.processKeybinds(ScriptHawk.keybindsRealtime); 65 | ScriptHawk.processJoypadBinds(ScriptHawk.joypadBindsRealtime); 66 | ScriptHawk.processMouseBinds(ScriptHawk.mouseBinds); 67 | Game.realTime(); 68 | emu.yield(); 69 | end 70 | end -------------------------------------------------------------------------------- /Watch/Alex Kidd in Miracle World (UE) (Rev 1).wch: -------------------------------------------------------------------------------- 1 | SystemID SMS 2 | 0020 b h 0 Main RAM Score (3) 3 | 0021 b h 0 Main RAM Score (2) 4 | 0022 b h 0 Main RAM Score (1) 5 | 0023 b u 0 Main RAM Level 6 | 0025 b h 0 Main RAM Lives 7 | 0030 w h 0 Main RAM Money 8 | 0046 b h 0 Main RAM Inventory: miniAlex Turret 9 | 0047 b h 0 Main RAM Inventory: Shield 10 | 0048 b h 0 Main RAM Inventory: Janken Reveal 11 | 0049 b h 0 Main RAM Inventory: Cane 12 | 004A b h 0 Main RAM Inventory: Invincibility 13 | 004B b h 0 Main RAM Inventory: Yellow Jewel 14 | 004C b h 0 Main RAM Inventory: Scroll 15 | 004D b h 0 Main RAM Inventory: Ring 16 | 004E b h 0 Main RAM Inventory: Crown Code 17 | 0054 b h 0 Main RAM Invincibility state 18 | 005A w u 0 Main RAM Invincibility timer 19 | 007E w u 0 Main RAM Game Over Timer 20 | 00B0 b h 0 Main RAM Horizontal Screen Scroll 21 | 00B6 w u 1 Main RAM Horizontal Viewport Position 22 | 00BE b h 0 Main RAM Vertical Screen Scroll 23 | 00C4 w u 1 Main RAM Vertical Viewport Position 24 | 030C b u 0 Main RAM X Position (Screen) 25 | 030E b u 0 Main RAM Y Position (Screen) 26 | 0310 b s 0 Main RAM X Velocity 27 | 0312 b s 0 Main RAM Y Velocity 28 | 0319 b u 0 Main RAM Punch Timer 29 | 0F8C b u 0 Main RAM Pause arrow position (X) 30 | 0F8E b h 0 Main RAM Pause arrow position (Y) 31 | 0F90 b s 0 Main RAM Pause arrow velocity? 32 | 0FAC b u 0 Main RAM Pause arrow map position (X) 33 | 0FAE b u 0 Main RAM Pause arrow map position (Y) 34 | 35 | -------------------------------------------------------------------------------- /Watch/Balloon Fight.wch: -------------------------------------------------------------------------------- 1 | SystemID NES 2 | 0091 b u 0 RAM P1 X 3 | 0400 b u 0 RAM P1 Sub-X 4 | 009A b u 0 RAM P1 Y 5 | 0409 b u 0 RAM P1 Sub-Y 6 | 0424 b u 0 RAM P1 X Speed 7 | 007F b u 0 RAM P1 State 8 | 0 S _ 1 9 | 0092 b u 0 RAM P2 X 10 | 0401 b u 0 RAM P2 Sub-X 11 | 009B b u 0 RAM P2 Y 12 | 040A b u 0 RAM P2 Sub-Y 13 | 0425 b u 0 RAM P2 X Speed 14 | 0080 b u 0 RAM P2 State 15 | 0 S _ 1 16 | 0093 b u 0 RAM E1 X 17 | 009C b u 0 RAM E1 Y 18 | 0081 b u 0 RAM E1 State 19 | 045C b u 0 RAM E1 Counter 20 | 0 S _ 1 21 | 0094 b u 0 RAM E2 X 22 | 009D b u 0 RAM E2 Y 23 | 0082 b u 0 RAM E2 State 24 | 045D b u 0 RAM E2 Counter 25 | 0 S _ 1 26 | 0095 b u 0 RAM E3 X 27 | 009E b u 0 RAM E3 Y 28 | 0083 b u 0 RAM E3 State 29 | 045E b u 0 RAM E3 Counter 30 | 0 S _ 1 31 | 0096 b u 0 RAM E4 X 32 | 009F b u 0 RAM E4 Y 33 | 0084 b u 0 RAM E4 State 34 | 045F b u 0 RAM E4 Counter 35 | 0 S _ 1 36 | 0097 b u 0 RAM E5 X 37 | 00A0 b u 0 RAM E5 Y 38 | 0085 b u 0 RAM E5 State 39 | 0460 b u 0 RAM E5 Counter 40 | 0 S _ 1 41 | 0098 b u 0 RAM E6 X 42 | 00A1 b u 0 RAM E6 Y 43 | 0086 b u 0 RAM E6 State 44 | 0461 b u 0 RAM E6 Counter 45 | 0 S _ 1 46 | 004C b u 0 RAM Paused 47 | 0019 b u 0 RAM Counter 48 | 49 | -------------------------------------------------------------------------------- /Watch/Banjo-Kazooie EEPROM.wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 0074 d h 0 EEPROM EEPROM Checksum 1 3 | 00EC d h 0 EEPROM EEPROM Checksum 2 4 | 014A w u 1 EEPROM FF RNG 5 | 0164 d h 0 EEPROM EEPROM Checksum 3 6 | 01C2 w u 1 EEPROM FF RNG 7 | 01DC d h 0 EEPROM EEPROM Checksum 4 8 | 01FC d h 0 EEPROM EEPROM Checksum 5 (Global flags?) 9 | 10 | -------------------------------------------------------------------------------- /Watch/Conker's Bad Fur Day (Europe).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 0BE7FE w h 1 RDRAM Map 3 | 0BE800 b h 1 RDRAM Exit 4 | 0CC704 d f 1 RDRAM X Position 5 | 0CC708 d f 1 RDRAM Y Position 6 | 0CC70C d f 1 RDRAM Z Position 7 | 0CC710 d f 1 RDRAM Y Velocity 8 | 0CC72C d f 1 RDRAM Velocity 9 | 0CC766 w u 1 RDRAM Moving Angle 10 | 0CC76A w u 1 RDRAM Facing Angle 11 | 12 | -------------------------------------------------------------------------------- /Watch/Conker's Bad Fur Day (USA).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 0BE3DE w h 1 RDRAM Map 3 | 0BE3E0 b h 1 RDRAM Exit 4 | 0CC2E4 d f 1 RDRAM X Position 5 | 0CC2E8 d f 1 RDRAM Y Position 6 | 0CC2EC d f 1 RDRAM Z Position 7 | 0CC2F0 d f 1 RDRAM Y Velocity 8 | 0CC30C d f 1 RDRAM Velocity 9 | 0CC346 w u 1 RDRAM Moving Angle 10 | 0CC34A w u 1 RDRAM Facing Angle 11 | 12 | -------------------------------------------------------------------------------- /Watch/Crash Bandicoot (Europe).wch: -------------------------------------------------------------------------------- 1 | SystemID PSX 2 | 056390 d h 0 MainRAM Player Pointer 3 | 057600 d u 0 MainRAM Level Progress 4 | 057640 d u 0 MainRAM Global Timer 5 | 0615AC d h 0 MainRAM Aku Aku Object Pointer 6 | 0615BC d u 0 MainRAM Level 7 | 061664 d h 0 MainRAM Boxes Smashed 8 | 9 | -------------------------------------------------------------------------------- /Watch/Crash Bandicoot (Japan).wch: -------------------------------------------------------------------------------- 1 | SystemID PSX 2 | 056698 d h 0 MainRAM Player Pointer 3 | 057908 d u 0 MainRAM Level Progress 4 | 057948 d u 0 MainRAM Global Timer 5 | 0618B4 d h 0 MainRAM Aku Aku Object Pointer 6 | 0618C4 d u 0 MainRAM Level 7 | 06196C d h 0 MainRAM Boxes Smashed 8 | 9 | -------------------------------------------------------------------------------- /Watch/Crash Bandicoot (USA).wch: -------------------------------------------------------------------------------- 1 | SystemID PSX 2 | 0566B4 d h 0 MainRAM Player Pointer 3 | 057920 d u 0 MainRAM Level Progress 4 | 057960 d u 0 MainRAM Global Timer 5 | 0618CC d h 0 MainRAM Aku Aku Object Pointer 6 | 0618DC d u 0 MainRAM Level 7 | 061984 d h 0 MainRAM Boxes Smashed 8 | 9 | -------------------------------------------------------------------------------- /Watch/Crash Bandicoot - Warped (USA).wch: -------------------------------------------------------------------------------- 1 | SystemID PSX 2 | 060A18 d u 0 MainRAM SFX Volume 3 | 060A90 d h 0 MainRAM Player Pointer 4 | 060AA4 d h 0 MainRAM Map Geometry Pointer 5 | 065D70 d u 0 MainRAM Level Progress 6 | 065D74 d u 0 MainRAM Max Level Progress 7 | 068F38 d h 0 MainRAM Aku Aku Object Pointer 8 | 068F80 d u 0 MainRAM SFX Volume 9 | 069034 d s 0 MainRAM Global Timer 10 | 069148 d h 0 MainRAM Total Boxes 11 | 12 | -------------------------------------------------------------------------------- /Watch/Crash Bandicoot 2 - Cortex Strikes Back (Europe) (En,Fr,De,Es,It).wch: -------------------------------------------------------------------------------- 1 | SystemID PSX 2 | 05F624 d h 0 MainRAM Player Pointer 3 | 060B78 d u 0 MainRAM Level Progress 4 | 060B7C d u 0 MainRAM Max Level Progress 5 | 060B80 d u 0 MainRAM Level Progress 6 | 060B84 d u 0 MainRAM Max Level Progress 7 | 060BDC d u 0 MainRAM Global Timer 8 | 06CE48 d h 0 MainRAM Aku Aku Object Pointer 9 | 06D058 d h 0 MainRAM Total Boxes 10 | 11 | -------------------------------------------------------------------------------- /Watch/Crash Bandicoot 2 - Cortex Strikes Back (USA).wch: -------------------------------------------------------------------------------- 1 | SystemID PSX 2 | 05F38C d h 0 MainRAM Player Pointer 3 | 0608E0 d u 0 MainRAM Level Progress 4 | 0608E4 d u 0 MainRAM Max Level Progress 5 | 0608E8 d u 0 MainRAM Level Progress 6 | 0608EC d u 0 MainRAM Max Level Progress 7 | 060944 d u 0 MainRAM Global Timer 8 | 06CBB0 d h 0 MainRAM Aku Aku Object Pointer 9 | 06CDC0 d h 0 MainRAM Total Boxes 10 | 11 | -------------------------------------------------------------------------------- /Watch/Crash Bandicoot 2 - Cortex no Gyakushuu! (Japan).wch: -------------------------------------------------------------------------------- 1 | SystemID PSX 2 | 0614F0 d h 0 MainRAM Player Pointer 3 | 062D34 d u 0 MainRAM Level Progress 4 | 062D38 d u 0 MainRAM Max Level Progress 5 | 062D3C d u 0 MainRAM Level Progress 6 | 062D40 d u 0 MainRAM Max Level Progress 7 | 062D98 d u 0 MainRAM Global Timer 8 | 06D9AC d h 0 MainRAM Aku Aku Object Pointer 9 | 06DBBC d h 0 MainRAM Total Boxes 10 | 11 | -------------------------------------------------------------------------------- /Watch/Crash Bandicoot 3 - Buttobi! Sekai Isshuu (Japan).wch: -------------------------------------------------------------------------------- 1 | SystemID PSX 2 | 060E90 d h 0 MainRAM Player Pointer 3 | 060EA4 d h 0 MainRAM Map Geometry Pointer 4 | 066170 d u 0 MainRAM Level Progress 5 | 066174 d u 0 MainRAM Max Level Progress 6 | 069388 d h 0 MainRAM Aku Aku Object Pointer 7 | 069484 d s 0 MainRAM Global Timer 8 | 069598 d h 0 MainRAM Total Boxes 9 | 10 | -------------------------------------------------------------------------------- /Watch/Crash Bandicoot 3 - Warped (Europe) (En,Fr,De,Es,It).wch: -------------------------------------------------------------------------------- 1 | SystemID PSX 2 | 060BF0 d h 0 MainRAM Player Pointer 3 | 060C04 d h 0 MainRAM Map Geometry Pointer 4 | 065ED0 d u 0 MainRAM Level Progress 5 | 065ED4 d u 0 MainRAM Max Level Progress 6 | 0690E8 d h 0 MainRAM Aku Aku Object Pointer 7 | 0691E4 d s 0 MainRAM Global Timer 8 | 0692F8 d h 0 MainRAM Total Boxes 9 | 10 | -------------------------------------------------------------------------------- /Watch/DK64sound.wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 76D4D0 d h 1 RDRAM points to the blocks 3 | 79E168 d h 1 RDRAM points to the blocks 4 | 79E168 d h 1 RDRAM points to the blocks 5 | 79F038 d h 1 RDRAM points to the blocks 6 | 79F038 d h 1 RDRAM points to the blocks 7 | 767938 d h 1 RDRAM points to the blocks 8 | 79D298 d h 1 RDRAM points to the blocks 9 | 79E120 d h 1 RDRAM points to block 3 10 | 79E190 d h 1 RDRAM block 3 11 | 791250 d h 1 RDRAM block 2 12 | 797250 d h 1 RDRAM block 1 13 | 76C000 d h 1 RDRAM isles - melody 14 | 7DDFE8 d h 1 RDRAM start of HUGE pointer block 15 | 7E0110 d h 1 RDRAM start of midi file? 16 | 7E1BA8 d h 1 RDRAM end of midi file? 17 | 18 | -------------------------------------------------------------------------------- /Watch/Diddy Kong Racing (Europe) (En,Fr,De) (Rev A).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 0E03A8 d h 1 RDRAM Cheats Enabled 3 | 0E03AC d h 1 RDRAM Cheat Menu 4 | 11B3C3 b u 1 RDRAM Get Ready 5 | 11B468 d h 1 RDRAM Object Pointer List 6 | 11B46C d u 1 RDRAM Number of Objects 7 | 121777 b h 1 RDRAM Map 8 | 123B07 b h 1 RDRAM Map 9 | 123B20 d h 1 RDRAM Game Settings Pointer 10 | 123B25 b u 1 RDRAM Is Paused 11 | 123B26 b u 1 RDRAM Show Results Screen 12 | 126A18 b u 1 RDRAM Character P1 13 | 126A19 b u 1 RDRAM Character P2 14 | 126A1A b u 1 RDRAM Character P3 15 | 126A1B b u 1 RDRAM Character P4 16 | 127010 b u 1 RDRAM Vehicle P1 17 | 127011 b u 1 RDRAM Vehicle P2 18 | 127012 b u 1 RDRAM Vehicle P3 19 | 127013 b u 1 RDRAM Vehicle P4 20 | 20886C w u 1 RDRAM Balloons 21 | 3FFFC0 d h 1 RDRAM Player Object Pointer 22 | 23 | -------------------------------------------------------------------------------- /Watch/Diddy Kong Racing (Europe) (En,Fr,De).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 0DFE28 d h 1 RDRAM Cheats Enabled 3 | 0DFE2C d h 1 RDRAM Cheat Menu 4 | 11AE43 b u 1 RDRAM Get Ready 5 | 11AEE8 d h 1 RDRAM Object Pointer List 6 | 11AEEC d u 1 RDRAM Number of Objects 7 | 11AF3B b u 1 RDRAM Map 8 | 1211F7 b u 1 RDRAM Map 9 | 1212E2 b u 1 RDRAM Map 10 | 123587 b u 1 RDRAM Map 11 | 1235A0 d h 1 RDRAM Game Settings Pointer 12 | 1235A5 b u 1 RDRAM Is Paused 13 | 1235A6 b u 1 RDRAM Show Results Screen 14 | 126478 b u 1 RDRAM Character P1 15 | 126479 b u 1 RDRAM Character P2 16 | 12647A b u 1 RDRAM Character P3 17 | 12647B b u 1 RDRAM Character P4 18 | 126A50 b u 1 RDRAM Vehicle P1 19 | 126A51 b u 1 RDRAM Vehicle P2 20 | 126A52 b u 1 RDRAM Vehicle P3 21 | 126A53 b u 1 RDRAM Vehicle P4 22 | 206BB5 b u 1 RDRAM Map 23 | 206C3B b u 1 RDRAM Map 24 | 20807C w u 1 RDRAM Balloons 25 | 3FFFC0 d h 1 RDRAM Player Object Pointer 26 | 27 | -------------------------------------------------------------------------------- /Watch/Diddy Kong Racing (Japan).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 0519B4 d h 1 RDRAM Velocity Scale (Cap) Write 3 | 051EC0 d h 1 RDRAM Forward Velocity Write 4 | 051F2C d h 1 RDRAM Pipsy Unknown Velocity Write 5 | 0520D0 d h 1 RDRAM Pipsy Unknown Velocity Write 6 | 0DEAE8 d h 1 RDRAM VI Register Value 7 | 0DEAF0 d h 1 RDRAM VI Register Value 8 | 0DEDD4 d h 1 RDRAM RNG 9 | 0E17F8 d h 1 RDRAM Cheats Enabled 10 | 0E17FC d h 1 RDRAM Cheat Menu 11 | 0E4234 b h 1 RDRAM Map/Speedometer Toggle 12 | 0E4235 b h 1 RDRAM Map Toggle Multiplayer? 13 | 0E81F0 d f 1 RDRAM Brake Force 14 | 11C823 b u 1 RDRAM Get Ready (real) 15 | 11C8C8 d h 1 RDRAM Object Pointer List 16 | 11C8CC d u 1 RDRAM Number of Objects 17 | 11C91B b u 1 RDRAM Map (actual?) 18 | 122BD7 b u 1 RDRAM Map? 19 | 122CC2 b u 1 RDRAM Map? 20 | 124F60 b u 1 RDRAM Map? 21 | 124F67 b u 1 RDRAM Map (Restart) 22 | 124F80 d h 1 RDRAM Game Settings Pointer 23 | 124F85 b u 1 RDRAM Is Paused 24 | 124F86 b u 1 RDRAM Show Results Screen 25 | 127F18 b u 1 RDRAM Character P1 26 | 127F19 b u 1 RDRAM Character P2 27 | 127F1A b u 1 RDRAM Character P3 28 | 127F1B b u 1 RDRAM Character P4 29 | 128508 b u 1 RDRAM Vehicle P1 30 | 128509 b u 1 RDRAM Vehicle P2 31 | 12850A b u 1 RDRAM Vehicle P3 32 | 12850B b u 1 RDRAM Vehicle P4 33 | 128538 d h 1 RDRAM Map Name Pointer 34 | 1287BC d u 1 RDRAM HUD Settings Index? 35 | 1DB388 d h 1 RDRAM TT Interaction State (Dino Domain) 36 | 1DB38C d u 1 RDRAM TT Activation timer (Dino Domain) 37 | 1E4C24 d f 1 RDRAM 38 | 1E4CC4 d f 1 RDRAM 39 | 1FD4A5 b u 1 RDRAM Map? 40 | 1FD52B b u 1 RDRAM Map? 41 | 1FE6E8 w b 1 RDRAM Keys Collected 42 | 1FE6ED b b 1 RDRAM Bosses Beaten 43 | 1FE6EE w b 1 RDRAM Trophies Collected 44 | 1FE6F6 b u 1 RDRAM TT Amulet Pieces 45 | 1FE6F7 b u 1 RDRAM Wizpig Amulet Pieces 46 | 1FE8FC w u 1 RDRAM Balloons 47 | 3FFFC0 d h 1 RDRAM Player object pointer 48 | 49 | -------------------------------------------------------------------------------- /Watch/Diddy Kong Racing (USA) (En,Fr) (Rev A).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 0E0318 d h 1 RDRAM Cheats Enabled 3 | 0E031C d h 1 RDRAM Cheat Menu 4 | 11B333 b u 1 RDRAM Get Ready 5 | 11B3D8 d h 1 RDRAM Object Pointer List 6 | 11B3DC d u 1 RDRAM Number of Objects 7 | 1216E7 b h 1 RDRAM Map 8 | 123A77 b h 1 RDRAM Map 9 | 123A90 d h 1 RDRAM Game Settings Pointer 10 | 123A95 b u 1 RDRAM Is Paused 11 | 123A96 b u 1 RDRAM Show Results Screen 12 | 126988 b u 1 RDRAM Character P1 13 | 126989 b u 1 RDRAM Character P2 14 | 12698A b u 1 RDRAM Character P3 15 | 12698B b u 1 RDRAM Character P4 16 | 126F80 b u 1 RDRAM Vehicle P1 17 | 126F81 b u 1 RDRAM Vehicle P2 18 | 126F82 b u 1 RDRAM Vehicle P3 19 | 126F83 b u 1 RDRAM Vehicle P4 20 | 1FD3DC w u 1 RDRAM Balloons 21 | 3FFFC0 d h 1 RDRAM Player Object Pointer 22 | 23 | -------------------------------------------------------------------------------- /Watch/Diddy Kong Racing (USA) (En,Fr).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 04687A w h 1 RDRAM Hovercraft Max Speed? 3 | 046882 w h 1 RDRAM Hovercraft Drag 4 | 04A1D6 w h 1 RDRAM Plane Max Speed? 5 | 0A39BE w h 1 RDRAM Speedometer Offset 6 | 0DF4C7 b h 1 RDRAM Track List Map Modifier 7 | 0DFD98 d h 1 RDRAM Cheats Enabled 8 | 0DFD9C d h 1 RDRAM Cheat Menu 9 | 11ADB3 b u 1 RDRAM Get Ready 10 | 11AE58 d h 1 RDRAM Object Pointer List 11 | 11AE5C d u 1 RDRAM Number of Objects 12 | 121167 b h 1 RDRAM Map 13 | 121252 b h 1 RDRAM Map 14 | 1234F7 b h 1 RDRAM Map 15 | 123510 d h 1 RDRAM Game Settings Pointer 16 | 123515 b u 1 RDRAM Is Paused 17 | 123516 b u 1 RDRAM Show Results Screen 18 | 126309 b h 1 RDRAM FPS Nonsense 19 | 126310 b h 1 RDRAM FPS Nonsense 20 | 1263E8 b u 1 RDRAM Character P1 21 | 1263E9 b u 1 RDRAM Character P2 22 | 1263EA b u 1 RDRAM Character P3 23 | 1263EB b u 1 RDRAM Character P4 24 | 1269C0 b u 1 RDRAM Vehicle P1 25 | 1269C1 b u 1 RDRAM Vehicle P2 26 | 1269C2 b u 1 RDRAM Vehicle P3 27 | 1269C3 b u 1 RDRAM Vehicle P4 28 | 1FCBEC w u 1 RDRAM Balloons 29 | 3FFFC0 d h 1 RDRAM Player Object Pointer 30 | 31 | -------------------------------------------------------------------------------- /Watch/Donkey Kong 64 (USA) - Quick Kill Science.wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 462C4C d h 1 RDRAM Dogadon Lock Method 1 3 | 462C64 b h 1 RDRAM Dogadon Control State 4 | 462C65 b h 1 RDRAM Dogadon Control + 1 5 | 48B10C d h 1 RDRAM TNT Lock Method 1 6 | 48B124 b h 1 RDRAM TNT Barrel Control State 7 | 48B125 b h 1 RDRAM TNT Control + 1 8 | 4AA7CC d h 1 RDRAM Diddy Lock Method 1 9 | 4AA7E4 b h 1 RDRAM Diddy Control State 10 | 4AA7E5 b h 1 RDRAM Diddy Control + 1 11 | 12 | -------------------------------------------------------------------------------- /Watch/Elmo's Letter Adventure (USA).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 106888 d h 1 RDRAM Elmo pointer 3 | 4 | -------------------------------------------------------------------------------- /Watch/Elmo's Number Journey (USA).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 07BFF4 d h 1 RDRAM Elmo pointer? 3 | 106C84 d h 1 RDRAM Elmo pointer? 4 | 5 | -------------------------------------------------------------------------------- /Watch/Enduro Racer (J).wch: -------------------------------------------------------------------------------- 1 | SystemID SMS 2 | 0322 w h 1 Main RAM Velocity 3 | 0391 b u 0 Main RAM Time (Frames) 4 | 0392 b h 0 Main RAM Time (Seconds) 5 | 0396 b h 0 Main RAM Damage 6 | 040F b u 0 Main RAM X Position 7 | 8 | -------------------------------------------------------------------------------- /Watch/Esper Dream 2 - Aratanaru Tatakai (J).wch: -------------------------------------------------------------------------------- 1 | SystemID NES 2 | 0520 b h 0 RAM Game Speed 3 | 0521 b u 0 RAM Level 4 | 0522 b h 0 RAM Name Char 1 5 | 0523 b h 0 RAM Name Char 2 6 | 0524 b h 0 RAM Name Char 3 7 | 0525 b h 0 RAM Name Char 4 8 | 0527 w u 0 RAM Gold 9 | 0537 w u 0 RAM EXP 10 | 0539 w u 0 RAM Max EXP 11 | 053B b u 0 RAM Current Weapon 12 | 053D b u 0 RAM Current Armour 13 | 053F b u 0 RAM Current Medicine 14 | 0541 b u 0 RAM Current ESP Ability 15 | 05D4 b u 0 RAM Damage Cooldown 16 | 17 | -------------------------------------------------------------------------------- /Watch/Gex 64 - Enter the Gecko (USA).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 14E8A0 w 1 1 RDRAM X Position 3 | 14E8A2 w 1 1 RDRAM Z Position 4 | 14E8A4 w 1 1 RDRAM Y Position 5 | 6 | -------------------------------------------------------------------------------- /Watch/Golden Axe Warrior (UE).wch: -------------------------------------------------------------------------------- 1 | SystemID SMS 2 | 00A2 b u 0 Main RAM Number of Enemies 3 | 00B9 b h 0 Main RAM Map Index 4 | 00BA b u 0 Main RAM Map Type 5 | 00CF b h 0 Main RAM Crystal 1 Collected 6 | 00D0 b h 0 Main RAM Crystal 2 Collected 7 | 00D1 b h 0 Main RAM Crystal 3 Collected 8 | 00D2 b h 0 Main RAM Crystal 4 Collected 9 | 00D3 b h 0 Main RAM Crystal 5 Collected 10 | 00D4 b h 0 Main RAM Crystal 6 Collected 11 | 00D5 b h 0 Main RAM Crystal 7 Collected 12 | 00D6 b h 0 Main RAM Crystal 8 Collected 13 | 00D7 b h 0 Main RAM Crystal 9 Collected 14 | 00DA b u 0 Main RAM Max HP 15 | 00DB b u 0 Main RAM Magic 16 | 00DC b u 0 Main RAM Max Magic 17 | 00DD b u 0 Main RAM Horns 18 | 00DE b u 0 Main RAM Keys 19 | 00DF b u 0 Main RAM Equipped Weapon 20 | 00E0 b u 0 Main RAM Inventory: Sword 21 | 00E1 b u 0 Main RAM Inventory: Axe 22 | 00E2 b u 0 Main RAM Inventory: Magic Oil 23 | 00E3 b u 0 Main RAM Inventory: Flame 24 | 00E4 b u 0 Main RAM Inventory: Thunder Magic Scroll 25 | 00E5 b u 0 Main RAM Inventory: Earth Magic Scroll 26 | 00E6 b u 0 Main RAM Inventory: Fire Magic Scroll 27 | 00E7 b u 0 Main RAM Inventory: Water Magic Scroll 28 | 00E8 b u 0 Main RAM Inventory: Golden Apple 29 | 00E9 b u 0 Main RAM Inventory: Magic Feather 30 | 00EA b u 0 Main RAM Inventory: Ice Bell 31 | 00EB b u 0 Main RAM Inventory: Balloon 32 | 00EC b u 0 Main RAM Inventory: Canoe 33 | 00ED b u 0 Main RAM Inventory: Magic Rope 34 | 00EE b u 0 Main RAM Inventory: Speed Shoes 35 | 00EF b u 0 Main RAM Inventory: Thief's Key 36 | 00F0 b u 0 Main RAM Inventory: Ship 37 | 00F1 b u 0 Main RAM Equipped Armor 38 | 00F2 b u 0 Main RAM Equipped Shield 39 | 0311 b h 0 Main RAM Y 40 | 0313 b u 0 Main RAM X 41 | 0318 b u 0 Main RAM HP 42 | 0618 b u 0 Main RAM Boss HP 43 | 44 | -------------------------------------------------------------------------------- /Watch/Golvellius (UE).wch: -------------------------------------------------------------------------------- 1 | SystemID SMS 2 | 0101 b u 0 Main RAM Y Position 3 | 0102 b u 0 Main RAM X Position 4 | 0109 b s 0 Main RAM Y Velocity 5 | 010B b s 0 Main RAM X Velocity 6 | 0808 b h 0 Main RAM Screen Y 7 | 0809 b h 0 Main RAM Screen X 8 | 080D b h 0 Main RAM Map Index 9 | 0836 b h 0 Main RAM Health Orbs 10 | 083F b h 0 Main RAM Gold 100000s 11 | 0840 b h 0 Main RAM Gold 1000s 12 | 0841 b h 0 Main RAM Gold 10s 13 | 0842 b h 0 Main RAM Max Gold 100000s 14 | 0843 b h 0 Main RAM Max Gold 1000s 15 | 0844 b h 0 Main RAM Max Gold 10s 16 | 0846 b b 0 Main RAM Item Bitfield 17 | 0847 b b 0 Main RAM Crystal Bitfield 18 | 0848 b u 0 Main RAM Sword Damage 19 | 086F b b 0 Main RAM Bible Bitfield 20 | 0870 b b 0 Main RAM Bible Bitfield 21 | 0AD2 b h 0 Main RAM Hole Tile Index 22 | 23 | -------------------------------------------------------------------------------- /Watch/Gran Turismo 2 (Europe) (En,Fr,De,Es,It) (Disc 2) (Gran Turismo Mode).wch: -------------------------------------------------------------------------------- 1 | SystemID PSX 2 | 0AF260 b u 0 MainRAM Map 3 | 0AF261 b u 0 MainRAM Number of Racers 4 | 1CD584 b u 0 MainRAM Number of Cars in Garage 5 | 1D1598 d u 0 MainRAM Cash 6 | 1D159C w u 0 MainRAM Current Car 7 | 8 | -------------------------------------------------------------------------------- /Watch/Gran Turismo 2 (Japan) (Disc 2) (Gran Turismo) (v1.0).wch: -------------------------------------------------------------------------------- 1 | SystemID PSX 2 | 0AFA30 b u 0 MainRAM Map 3 | 0AFA31 b u 0 MainRAM Number of Racers 4 | 1CD9B4 b u 0 MainRAM Number of Cars in Garage 5 | 1D19C8 d u 0 MainRAM Cash 6 | 1D19CC w u 0 MainRAM Current Car 7 | 8 | -------------------------------------------------------------------------------- /Watch/Gran Turismo 2 (Japan) (Disc 2) (Gran Turismo) (v1.1).wch: -------------------------------------------------------------------------------- 1 | SystemID PSX 2 | 0AF090 b u 0 MainRAM Map 3 | 0AF091 b u 0 MainRAM Number of Racers 4 | 1CD3B4 b u 0 MainRAM Number of Cars in Garage 5 | 1D13C8 d u 0 MainRAM Cash 6 | 1D13CC w u 0 MainRAM Current Car 7 | 8 | -------------------------------------------------------------------------------- /Watch/Gran Turismo 2 (USA) (Simulation Mode) (v1.0).wch: -------------------------------------------------------------------------------- 1 | SystemID PSX 2 | 0AEF20 b u 0 MainRAM Map 3 | 0AEF21 b u 0 MainRAM Number of Racers 4 | 1CCFB4 b u 0 MainRAM Number of Cars in Garage 5 | 1D0FC8 d u 0 MainRAM Cash 6 | 1D0FCC w u 0 MainRAM Current Car 7 | 8 | -------------------------------------------------------------------------------- /Watch/Gran Turismo 2 (USA) (Simulation Mode) (v1.1).wch: -------------------------------------------------------------------------------- 1 | SystemID PSX 2 | 0AEFD0 b u 0 MainRAM Map 3 | 0AEFD1 b u 0 MainRAM Number of Racers 4 | 1CD324 b u 0 MainRAM Number of Cars in Garage 5 | 1D1338 d u 0 MainRAM Cash 6 | 1D133C w u 0 MainRAM Current Car 7 | 8 | -------------------------------------------------------------------------------- /Watch/Gran Turismo 2 (USA) (Simulation Mode) (v1.2).wch: -------------------------------------------------------------------------------- 1 | SystemID PSX 2 | 0AF230 b u 0 MainRAM Map 3 | 0AF231 b u 0 MainRAM Number of Racers 4 | 1CD554 b u 0 MainRAM Number of Cars in Garage 5 | 1D1568 d u 0 MainRAM Cash 6 | 1D156C w u 0 MainRAM Current Car 7 | 8 | -------------------------------------------------------------------------------- /Watch/Impossible Mission (E).wch: -------------------------------------------------------------------------------- 1 | SystemID SMS 2 | 0097 b h 0 Main RAM Current Map Index 3 | 0098 b u 0 Main RAM Horizontal Map Position 4 | 0099 w u 0 Main RAM Elevator Y 5 | 00A5 b u 0 Main RAM Memory Selected 6 | 00B5 b u 0 Main RAM Lift Resets 7 | 00B6 b u 0 Main RAM Snoozes 8 | 00B7 b u 0 Main RAM Snooze Cooldown Timer 9 | 00C7 b u 0 Main RAM Tile Arrow Selected 10 | 00C8 b u 0 Main RAM Tile Arrow Selected 11 | 00CA b h 0 Main RAM Hours 12 | 00CB b h 0 Main RAM Minutes 13 | 00CC b h 0 Main RAM Seconds 14 | 00CD b u 0 Main RAM Centiseconds 15 | 0180 b u 0 Main RAM Player X 16 | 0181 b u 0 Main RAM Player Y 17 | 0186 b u 0 Main RAM Player Facing Direction 18 | 1B12 d h 1 Main RAM Puzzle Solution 0 Rotation & Colour 19 | 1B16 d h 1 Main RAM Puzzle Solution 1 Rotation & Colour 20 | 1B1A d h 1 Main RAM Puzzle Solution 2 Rotation & Colour 21 | 1B1E d h 1 Main RAM Puzzle Solution 3 Rotation & Colour 22 | 1B22 d h 1 Main RAM Puzzle Solution 4 Rotation & Colour 23 | 1B26 d h 1 Main RAM Puzzle Solution 5 Rotation & Colour 24 | 1B2A d h 1 Main RAM Puzzle Solution 6 Rotation & Colour 25 | 1B2E d h 1 Main RAM Puzzle Solution 7 Rotation & Colour 26 | 1B32 d h 1 Main RAM Puzzle Solution 8 Rotation & Colour 27 | 1B36 d h 1 Main RAM Puzzle Memory 0-3 Piece 28 | 1B3A d h 1 Main RAM Puzzle Memory 4-7 Piece 29 | 1B3E d h 1 Main RAM Puzzle Memory 8-11 Piece 30 | 1B42 d h 1 Main RAM Puzzle Memory 12-15 Piece 31 | 1B46 d h 1 Main RAM Puzzle Memory 16-19 Piece 32 | 1B4A d h 1 Main RAM Puzzle Memory 20-23 Piece 33 | 1B4E d h 1 Main RAM Puzzle Memory 24-27 Piece 34 | 1B52 d h 1 Main RAM Puzzle Memory 28-31 Piece 35 | 1B56 d h 1 Main RAM Puzzle Memory 32-35 Piece 36 | 37 | -------------------------------------------------------------------------------- /Watch/Legend of Galahad, The (UE) [!].wch: -------------------------------------------------------------------------------- 1 | SystemID GEN 2 | 0566 w s 1 68K RAM Screen X Position 3 | 0568 w s 1 68K RAM Screen Y Position 4 | 058A b s 1 68K RAM Screen X Velocity 5 | 058B b s 1 68K RAM Screen Y Velocity 6 | 0F25 b u 1 68K RAM LTUS Code Active 7 | 0F41 b u 1 68K RAM Player is in cave 8 | 0F43 b s 1 68K RAM Player X Velocity 9 | 0F44 b s 1 68K RAM Player Y Velocity 10 | 0F4F b u 1 68K RAM Player is on moving platform? 11 | 0F78 w h 1 68K RAM Player Respawn Chunk X 12 | 0F7C b h 1 68K RAM Player Respawn Chunk Y 13 | 13E0 w h 0 68K RAM Score 1 & 2 14 | 13E2 w h 0 68K RAM Score 3 & 4 15 | 13E4 w h 0 68K RAM Score 5 & 6 16 | 13E6 w u 1 68K RAM Lives 17 | 13FB b h 1 68K RAM Charge 1 18 | 13FC b h 1 68K RAM Charge 2 19 | 1428 b u 0 68K RAM Got Key 20 | 1432 w u 1 68K RAM Stage 21 | 145D b u 1 68K RAM Shop Item Index 22 | 145E b u 1 68K RAM Shop Item Switch Timer 23 | 1464 b h 1 68K RAM Shop Text Index 24 | 146A w u 1 68K RAM Bombs 25 | 146C w u 1 68K RAM Coins 26 | 1471 b u 0 68K RAM Health 27 | 1474 w u 1 68K RAM Armour Type 28 | 147C w u 1 68K RAM Sword Type 29 | 14D4 d h 1 68K RAM Start World Code 30 | 14D8 w u 1 68K RAM Control Type 31 | 14DE w u 1 68K RAM Credits 32 | 14E2 w u 1 68K RAM Difficulty 33 | 14EA w u 1 68K RAM Music Test 34 | 14EC w u 1 68K RAM FX Test 35 | 14EE w u 1 68K RAM Lives (Menu) 36 | 1512 b u 1 68K RAM Y Sub Chunk 37 | 1517 b u 1 68K RAM X Sub Chunk 38 | 151C w u 1 68K RAM Level Chunk X 39 | 1520 w u 1 68K RAM Object y 40 | 1526 d s 1 68K RAM X 41 | 42 | -------------------------------------------------------------------------------- /Watch/Legend of Zelda, The - Majora's Mask (Europe) (En,Fr,De,Es) (Rev A).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 3F7614 d f 1 RDRAM X Position 3 | 3F7618 d f 1 RDRAM Y Position 4 | 3F761C d f 1 RDRAM Z Position 5 | 3F76AC w u 1 RDRAM X Rotation 6 | 3F76AE w u 1 RDRAM Facing angle 7 | 3F76B0 w u 1 RDRAM Z Rotation 8 | 9 | -------------------------------------------------------------------------------- /Watch/Legend of Zelda, The - Majora's Mask (Europe) (En,Fr,De,Es).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 3F7274 d f 1 RDRAM X Position 3 | 3F7278 d f 1 RDRAM Y Position 4 | 3F727C d f 1 RDRAM Z Position 5 | 3F730E w u 1 RDRAM Facing angle 6 | 7 | -------------------------------------------------------------------------------- /Watch/Legend of Zelda, The - Majora's Mask (USA).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 3FFDD4 d f 1 RDRAM X Position 3 | 3FFDD8 d f 1 RDRAM Y Position 4 | 3FFDDC d f 1 RDRAM Z Position 5 | 3FFE6E w u 1 RDRAM Facing angle 6 | 7 | -------------------------------------------------------------------------------- /Watch/Legend of Zelda, The - Ocarina of Time (Europe) (En,Fr,De) (Rev A).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 1D8AD4 d f 1 RDRAM X Position 3 | 1D8AD8 d f 1 RDRAM Y Position 4 | 1D8ADC d f 1 RDRAM Z Position 5 | 1D8B64 w u 1 RDRAM X Rotation 6 | 1D8B66 w u 1 RDRAM Facing Angle 7 | 1D8B68 w u 1 RDRAM Z Rotation 8 | 9 | -------------------------------------------------------------------------------- /Watch/Legend of Zelda, The - Ocarina of Time (Europe) (En,Fr,De).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 1D8A94 d f 1 RDRAM X Position 3 | 1D8A98 d f 1 RDRAM Y Position 4 | 1D8A9C d f 1 RDRAM Z Position 5 | 1D8B26 w u 1 RDRAM Facing angle 6 | 7 | -------------------------------------------------------------------------------- /Watch/Legend of Zelda, The - Ocarina of Time (USA) (Rev A).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 1DAC14 d f 1 RDRAM X Position 3 | 1DAC18 d f 1 RDRAM Y Position 4 | 1DAC1C d f 1 RDRAM Z Position 5 | 1DACA4 w u 1 RDRAM X Rotation 6 | 1DACA6 w u 1 RDRAM Facing Angle 7 | 1DACA8 w u 1 RDRAM Z Rotation 8 | 9 | -------------------------------------------------------------------------------- /Watch/Legend of Zelda, The - Ocarina of Time (USA) (Rev B).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 1DB314 d f 1 RDRAM X Position 3 | 1DB318 d f 1 RDRAM Y Position 4 | 1DB31C d f 1 RDRAM Z Position 5 | 1DB3A6 w u 1 RDRAM Facing angle 6 | 7 | -------------------------------------------------------------------------------- /Watch/Legend of Zelda, The - Ocarina of Time (USA).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 1DAA54 d f 1 RDRAM X Position 3 | 1DAA58 d f 1 RDRAM Y Position 4 | 1DAA5C d f 1 RDRAM Z Position 5 | 1DAAE4 w u 1 RDRAM X Rotation 6 | 1DAAE6 w u 1 RDRAM Facing Angle 7 | 1DAAE8 w u 1 RDRAM Z Rotation 8 | 9 | -------------------------------------------------------------------------------- /Watch/Legend of Zelda, The - Ocarina of Time - Master Quest (E) (GC) [!].wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 1D9394 d f 1 RDRAM X Position 3 | 1D9398 d f 1 RDRAM Y Position 4 | 1D939C d f 1 RDRAM Z Position 5 | 1D9426 w u 1 RDRAM Facing angle 6 | 7 | -------------------------------------------------------------------------------- /Watch/Lord of the Sword (J).wch: -------------------------------------------------------------------------------- 1 | SystemID SMS 2 | 040A b u 0 Main RAM X Position (Screen) 3 | 0414 w s 0 Main RAM X Velocity 4 | 5 | -------------------------------------------------------------------------------- /Watch/Lord of the Sword (UE).wch: -------------------------------------------------------------------------------- 1 | SystemID SMS 2 | 0098 b h 1 Main RAM Current map checkpoint 3 | 00A0 b h 0 Main RAM Map Status 4 | 00A1 b h 0 Main RAM Building Status 5 | 0104 w u 0 Main RAM Start Demo Timer 6 | 010A b u 0 Main RAM Screen X Position (Tiles) 7 | 0129 b u 1 Main RAM Player Health 8 | 012B b u 1 Main RAM Recovery Status 9 | 012C w u 0 Main RAM Recovery Timer 10 | 017E w u 0 Main RAM Demo Timer 11 | 0401 b h 0 Main RAM Player Movement State 12 | 0407 b u 0 Main RAM Player Y Location (Screen) 13 | 040A b u 0 Main RAM Player X Position (Screen) 14 | 0411 b s 0 Main RAM Player Y Velocity 15 | 0413 w s 0 Main RAM Player X Velocity 16 | 0414 b s 0 Main RAM Chain Length (Roughly) 17 | 0421 b u 0 Main RAM Player Facing Direction 18 | 0422 b u 0 Main RAM Player is in air 19 | 044A b u 0 Main RAM Arrow X Position (Screen) 20 | 0507 b u 0 Main RAM Boss Y Position (Screen) 21 | 050A b u 0 Main RAM Boss X Position (Screen) 22 | 0511 b s 0 Main RAM Boss Y Velocity 23 | 0522 b u 0 Main RAM Boss Teleport Timer 24 | 0524 b u 0 Main RAM Boss Flash Timer 25 | 0534 b u 0 Main RAM Boss Health 26 | 0591 b s 0 Main RAM Skeleton Y Velocity 27 | 05B4 b u 0 Main RAM Boss Minion Health 28 | 0CA0 b u 0 Main RAM Book is burnable 29 | 0CA8 b u 0 Main RAM Sword damage 30 | 0CA9 b u 0 Main RAM Bow damage 31 | 0CAE b h 0 Main RAM Continue Warp Byte 32 | 0CAF b u 0 Main RAM Continues Used 33 | 34 | -------------------------------------------------------------------------------- /Watch/Mercs (E).wch: -------------------------------------------------------------------------------- 1 | SystemID SMS 2 | 0B7A w u 0 Main RAM X Position 3 | 0B7C w u 0 Main RAM Y Position 4 | 0DD9 w u 0 Main RAM Screen X 5 | 0DDB w u 0 Main RAM Screen Y 6 | 0F9C b u 0 Main RAM Mission 7 | 10A2 b u 0 Main RAM Gun Type 8 | 1240 b u 0 Main RAM Level 1 House Health 9 | 1241 b u 0 Main RAM Level 1 Tree Health 10 | 138D b u 0 Main RAM Level 1 Boss Health 11 | 139C b u 0 Main RAM Bombs 12 | 13B2 b u 0 Main RAM Health 13 | 14 | -------------------------------------------------------------------------------- /Watch/Metroid.wch: -------------------------------------------------------------------------------- 1 | SystemID NES 2 | 030E b h 0 RAM X1 3 | 0311 b h 0 RAM X2 4 | 030D b h 0 RAM Y1 5 | 0310 b h 0 RAM Y2 6 | 0107 b u 0 RAM HP1 7 | 00FF b h 0 RAM Other Y 8 | 00FC b u 0 RAM Screen Y 9 | 040B b u 0 RAM 10 | 002C b u 0 RAM Frame Rule 11 | 0029 b h 0 RAM Sub Frame Rule 12 | 0451 b u 0 RAM Bug X 13 | 002D b u 0 RAM Bug Timer 14 | 03BF b u 0 RAM Door Timer 15 | 042B b u 0 RAM 16 | 0401 b u 0 RAM 17 | 0308 b u 0 RAM Y Vel 18 | 0312 b h 0 RAM Y Vel sub 19 | 0309 b h 0 RAM X Vel 20 | 0313 b u 0 RAM X vel sub 21 | 039F b u 0 RAM 22 | 042D b h 0 RAM Freeze 23 | 0421 b h 0 RAM 24 | 0420 b h 0 RAM 25 | 26 | -------------------------------------------------------------------------------- /Watch/Mischief Makers (USA).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 0ED088 w s 0 RDRAM X Relative to Center of Screen 3 | 0ED08C w s 0 RDRAM Y Relative to Center of Screen 4 | 0BC548 w s 1 RDRAM Screen X Position 5 | 0BC54C w s 1 RDRAM Screen Y Position 6 | 7 | -------------------------------------------------------------------------------- /Watch/Mr. Driller 2 (USA).wch: -------------------------------------------------------------------------------- 1 | SystemID GBA 2 | 1136 w u 0 IWRAM X Position 3 | 113C w u 0 IWRAM Y Position 4 | 1148 b h 0 IWRAM Facing Direction 5 | 114E b u 0 IWRAM Air 6 | 114F b u 0 IWRAM Air Countdown Timer 7 | 4320 d h 0 IWRAM RNG 8 | 9 | -------------------------------------------------------------------------------- /Watch/Nintendo All-Star! Dairantou Smash Brothers (Japan).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 098BD3 b u 1 RDRAM Music 3 | 0A28F4 d h 1 RDRAM Unlocked Stuff 4 | 0A28F8 d h 1 RDRAM Unlocked Stuff 5 | 0A30A8 d h 1 RDRAM Match Settings Pointer 6 | 7 | -------------------------------------------------------------------------------- /Watch/Panel de Pon (Japan).wch: -------------------------------------------------------------------------------- 1 | SystemID SNES 2 | 0003A6 b u 0 WRAM P1 Cursor Left X 3 | 0003A8 b u 0 WRAM P2 Cursor Left X 4 | 0003AA b u 0 WRAM P1 Cursor Left Y 5 | 0003AC b u 0 WRAM P2 Cursor Left Y 6 | 0003AE b u 0 WRAM P1 Cursor Right X 7 | 0003B0 b u 0 WRAM P2 Cursor Right X 8 | 0003B2 b u 0 WRAM P1 Cursor Right Y 9 | 0003B4 b u 0 WRAM P2 Cursor Right Y 10 | 000406 b u 0 WRAM P1 Row Height Ticker 11 | 000408 b u 0 WRAM P2 Row Height Ticker 12 | 13 | -------------------------------------------------------------------------------- /Watch/Paper Mario (USA).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 09A5DC d h 1 RDRAM Framebuffer Pointer 3 | 4 | -------------------------------------------------------------------------------- /Watch/Penguin Land (UE).wch: -------------------------------------------------------------------------------- 1 | SystemID SMS 2 | 010B b u 0 Main RAM Round 3 | 0113 b h 0 Main RAM Movement State 4 | 0119 b u 0 Main RAM Egg Lives 5 | 011C w u 0 Main RAM Level timer (precise) 6 | 011D b u 0 Main RAM Level timer (on screen value) 7 | 015A b u 0 Main RAM Is Screen Scrolling? 8 | 015C b u 0 Main RAM Level Y 9 | 0170 b h 0 Main RAM Death transition timer 10 | 0181 w u 0 Main RAM Bird spawn timer 11 | 02A7 b h 0 Main RAM > 0x00 for Smoking penguin and reversed controls? 12 | 0406 b u 0 Main RAM Penguin Y Position (Screen) 13 | 0408 b u 0 Main RAM Penguin X Position (Screen) 14 | 0446 b h 0 Main RAM Egg Y Position (Screen) 15 | 0448 b u 0 Main RAM Egg X Position (Screen) 16 | 17 | -------------------------------------------------------------------------------- /Watch/Rayman 2 - The Great Escape (Europe) (En,Fr,De,Es,It).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 1BC54D b u 1 RDRAM Health 3 | 1C68BC d f 1 RDRAM Sine 4 | 1C68C0 d f 1 RDRAM Cosine 5 | 1C68C8 d f 1 RDRAM Inverse Cosine 6 | 1C68CC d f 1 RDRAM Sine Mirror 7 | 1C69F4 d f 1 RDRAM X Velocity 8 | 1C69F8 d f 1 RDRAM Z Velocity 9 | 1C69FC d f 1 RDRAM Y Velocity 10 | 1C6A34 d f 1 RDRAM X Position 11 | 1C6A38 d f 1 RDRAM Z Position 12 | 1C6A3C d f 1 RDRAM Y Position 13 | 14 | -------------------------------------------------------------------------------- /Watch/Rayman 2 - The Great Escape (USA) (En,Fr,De,Es,It).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 1BC64D b u 1 RDRAM Health 3 | 1C69BC d f 1 RDRAM Sine 4 | 1C69C0 d f 1 RDRAM Cosine 5 | 1C69C8 d f 1 RDRAM Inverse Cosine 6 | 1C69CC d f 1 RDRAM Sine Mirror 7 | 1C6AF4 d f 1 RDRAM X Velocity 8 | 1C6AF8 d f 1 RDRAM Z Velocity 9 | 1C6AFC d f 1 RDRAM Y Velocity 10 | 1C6B34 d f 1 RDRAM X Position 11 | 1C6B38 d f 1 RDRAM Z Position 12 | 1C6B3C d f 1 RDRAM Y Position 13 | 14 | -------------------------------------------------------------------------------- /Watch/San Francisco Rush 2049 (Europe) (En,Fr,De,Es,It,Nl).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 118E84 d h 1 RDRAM Cheats Unlocked 3 | 118E88 d h 1 RDRAM Cheats Unlocked 4 | 118E8C d h 1 RDRAM Cheats Unlocked 5 | 118E90 d h 1 RDRAM Cheats Unlocked 6 | 118E94 d h 1 RDRAM Cheats Unlocked 7 | 118E98 d h 1 RDRAM Cheats Unlocked 8 | 170D70 d f 1 RDRAM Velocity 9 | 170F54 d f 1 RDRAM X Position 10 | 170F58 d f 1 RDRAM Y Position 11 | 170F5C d f 1 RDRAM Z Position 12 | 13 | -------------------------------------------------------------------------------- /Watch/San Francisco Rush 2049 (USA).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 11648C d h 1 RDRAM Cheats Unlocked 3 | 116490 d h 1 RDRAM Cheats Unlocked 4 | 116494 d h 1 RDRAM Cheats Unlocked 5 | 116498 d h 1 RDRAM Cheats Unlocked 6 | 11649C d h 1 RDRAM Cheats Unlocked 7 | 1164A0 w h 1 RDRAM Cheats Unlocked 8 | 13A0B4 d h 1 RDRAM Coin Collected Thingy 9 | 13A110 d h 1 RDRAM Coin Collected Thingy 10 | 13A350 d h 1 RDRAM Coin Collected Thingy 11 | 14978C b h 1 RDRAM Map Index? 12 | 14A298 d f 1 RDRAM Velocity 13 | 14A47C d f 1 RDRAM X Position 14 | 14A480 d f 1 RDRAM Y Position 15 | 14A484 d f 1 RDRAM Z Position 16 | 14A53C d f 1 RDRAM Rotation? 17 | 14A540 d f 1 RDRAM Rotation? 18 | 14A544 d f 1 RDRAM Rotation? 19 | 14A548 d f 1 RDRAM Rotation? 20 | 14A54C d f 1 RDRAM Rotation? 21 | 14A550 d f 1 RDRAM Rotation? 22 | 14A554 d f 1 RDRAM Rotation? 23 | 14A558 d f 1 RDRAM Rotation? 24 | 14A55C d f 1 RDRAM Rotation? 25 | 15201C d h 1 RDRAM Map Collision Data Pointer 26 | 27 | -------------------------------------------------------------------------------- /Watch/Sonic The Hedgehog (W) (Rev 1) (Game Gear).wch: -------------------------------------------------------------------------------- 1 | SystemID SMS 2 | 1240 b h 0 Main RAM Lives 3 | 12A9 b h 0 Main RAM Rings 4 | 12CF b h 0 Main RAM Game Time (Minutes) 5 | 12D0 b h 0 Main RAM Game Time (Seconds) 6 | 12D1 b u 0 Main RAM Game Time (Frames) 7 | 1404 b h 0 Main RAM X Velocity (Minor) 8 | 1405 w s 0 Main RAM X Velocity 9 | 1407 b h 0 Main RAM Y Velocity (Minor) 10 | 1408 w s 0 Main RAM Y Velocity 11 | 12 | -------------------------------------------------------------------------------- /Watch/Sonic the Hedgehog (UE) (SMS).wch: -------------------------------------------------------------------------------- 1 | SystemID SMS 2 | 1208 b h 0 Main RAM Invuln. State 3 | 123E b h 0 Main RAM Level 4 | 1246 b u 0 Main RAM Lives 5 | 125A w s 0 Main RAM Viewport X 6 | 125D w u 0 Main RAM Viewport Y 7 | 126F w s 0 Main RAM Viewport X2 8 | 128D b u 0 Main RAM Invulnerability Timer 9 | 12AA b h 0 Main RAM Rings 10 | 12CE b h 0 Main RAM Game Time (Minutes) 11 | 12CF b h 0 Main RAM Game Time (Seconds) 12 | 12D0 b u 0 Main RAM Game Time (Frames) 13 | 1403 b h 0 Main RAM X Velocity (Minor) 14 | 1404 w s 0 Main RAM X Velocity 15 | 1406 b h 0 Main RAM Y Velocity (Minor) 16 | 1407 w s 0 Main RAM Y Velocity 17 | 1410 b h 0 Main RAM Movement State? 18 | 1411 b u 0 Main RAM Speed Shoes timer 19 | 1414 b h 0 Main RAM Floor Check 20 | 1CE1 b u 0 Main RAM Unknown 21 | 22 | -------------------------------------------------------------------------------- /Watch/SpaceStation Silicon Valley (USA).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 3F28E8 d h 1 RDRAM Camera X Pos 3 | 3F28EC d f 1 RDRAM Camera Y Pos 4 | 3F28F0 d f 1 RDRAM Camera Z Pos 5 | 3F2900 d f 1 RDRAM Camera Z Rotation 6 | 3F2904 d f 1 RDRAM Target Camera Z Rotation 7 | 3F2D30 d h 1 RDRAM Score 8 | 3D5534 w u 1 RDRAM CurrentAnimalObject 9 | 10 | -------------------------------------------------------------------------------- /Watch/Super Mario 64 (Europe) (En,Fr,De).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 0EC8C4 d u 1 RDRAM Title screen zoom 3 | 1A7530 b u 1 RDRAM Selected star 4 | 1B8E42 b u 1 RDRAM Available stars 5 | 2F9744 b u 1 RDRAM Sound display enabled 6 | 2F9748 d u 1 RDRAM Debug display enabled 7 | 2F9794 d h 1 RDRAM 1P Controller pointer 8 | 2F9798 d h 1 RDRAM 2P Controller pointer 9 | 2F9D00 w u 1 RDRAM Screen width (credits) 10 | 2F9D02 w u 1 RDRAM Screen height (credits) 11 | 2F9D08 w u 1 RDRAM Screen X (credits) 12 | 2F9D0A w u 1 RDRAM Screen Y (credits) 13 | 2F9F94 d h 1 RDRAM Graphic structures pointer 14 | 2F9FB0 d h 1 RDRAM Unused screen colour (credits) 15 | 2F9FC8 w u 1 RDRAM Map 16 | 2FA0F0 w u 1 RDRAM Sound display type 17 | 2FD054 b u 1 RDRAM Debug display type 18 | 2FD644 w h 1 RDRAM Message index 19 | 30946C d f 1 RDRAM X Position 20 | 309470 d f 1 RDRAM Y Position 21 | 309474 d f 1 RDRAM Z Position 22 | 30947C d f 1 RDRAM Y Velocity 23 | 309484 d f 1 RDRAM Velocity 24 | 3094DA w u 1 RDRAM Star count 25 | 3094DD b u 1 RDRAM Lives 26 | 3094DE w u 1 RDRAM Health 27 | 309BD4 d h 1 RDRAM Level collision pointer 28 | 309C04 w h 1 RDRAM Music 29 | 30A7FE w u 1 RDRAM Camera control type 30 | 30AE90 d u 1 RDRAM Debug display 2 enable 31 | 30AF0E w u 1 RDRAM Spawn debug mode enable 32 | 30B0B0 d u 1 RDRAM Behaviour update enabled 33 | 32ED88 d h 1 RDRAM Mario object pointer 34 | 32ED90 d h 1 RDRAM Current object pointer 35 | 32ED94 d h 1 RDRAM Behaviour script pointer 36 | 386BA8 d h 1 RDRAM Current level command pointer 37 | 38 | -------------------------------------------------------------------------------- /Watch/Super Mario 64 (Japan) (Rev A) (Shindou Edition).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 30D528 w u 1 RDRAM Map 3 | 31D9E4 w u 1 RDRAM Mario Angle (Movement) 4 | 31D9EE w u 1 RDRAM Mario Angle (Facing) 5 | 31D9FC d f 1 RDRAM Mario X Position 6 | 31DA00 d f 1 RDRAM Mario Y Position 7 | 31DA04 d f 1 RDRAM Mario Z Position 8 | 31DA0C d f 1 RDRAM Mario Y Velocity 9 | 31DA14 d f 1 RDRAM Mario Velocity 10 | 11 | -------------------------------------------------------------------------------- /Watch/Super Mario 64 (Japan).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 0EB1E0 d h 1 RDRAM Pointer to Debug Function 3 | 1A7AF0 w h 1 RDRAM Demo Timer 4 | 1A8010 b u 1 RDRAM Highlighted Star (Visual) 5 | 1A8014 b u 1 RDRAM Highlighted Star (Controls) 6 | 32C640 d u 1 RDRAM V/I Timer 7 | 32C694 d u 1 RDRAM Input Timer 8 | 32CE20 b u 1 RDRAM Related to Keys 9 | 32CE98 w u 1 RDRAM Map 10 | 32FF60 b u 1 RDRAM Border Star Fade Counter 11 | 32FFDC d f 1 RDRAM Painting Entrance Height 12 | 3305C4 d h 1 RDRAM Save and Continue/Quit Screen Timer 13 | 3305CA w u 1 RDRAM Score Screen Coin Counter 14 | 339C30 w u 1 RDRAM Current Input 15 | 339E0C d u 1 RDRAM Mario Animation 16 | 339E24 w u 1 RDRAM Mario Movement Angle 17 | 339E2C w u 1 RDRAM Mario Facing Angle 18 | 339E3C d f 1 RDRAM Mario X Position 19 | 339E40 d f 1 RDRAM Mario Y Position 20 | 339E44 d f 1 RDRAM Mario Z Position 21 | 339E54 d f 1 RDRAM Mario Speed 22 | 339E6C d f 1 RDRAM Ceiling Height 23 | 339EA8 w u 1 RDRAM Coins 24 | 339EAA w u 1 RDRAM Stars 25 | 339EAC b h 1 RDRAM Keys 26 | 339EAD b u 1 RDRAM Lives 27 | 339EAE b u 1 RDRAM Health 28 | 339EAF b u 1 RDRAM Health Countdown 29 | 339EB0 w h 1 RDRAM Height of Mario Model 30 | 339EB2 b h 1 RDRAM Damage Trigger 31 | 339EB3 b h 1 RDRAM Damage Related 32 | 339EB4 b h 1 RDRAM Damage Squished Animation Timer 33 | 339EB6 w u 1 RDRAM Cap Timer 34 | 339EB9 b h 1 RDRAM related to star counter 35 | 339EC8 w u 1 RDRAM Star Select 36 | 339EC9 b h 1 RDRAM Type of Menu (?) 37 | 339ECC w h 1 RDRAM this goes FFFF when paused 38 | 339ED8 b h 1 RDRAM Level Reset 39 | 339ED9 b h 1 RDRAM Level 40 | 339EDA b u 1 RDRAM Sublevel 41 | 339EDB b h 1 RDRAM Level Entrance 42 | 339EEE b h 1 RDRAM Timer Ticking 43 | 339EF0 w u 1 RDRAM Lives (Incremental) 44 | 339EF2 w u 1 RDRAM Coins (Incremental) 45 | 339EF4 w u 1 RDRAM Stars 2 46 | 339EFA w h 1 RDRAM HUD Flags 47 | 339EFC w u 1 RDRAM Timer 48 | 33B364 b u 1 RDRAM Camera Type 49 | 33B365 b u 1 RDRAM Camera Type Entered With (???) 50 | 33BF03 b u 1 RDRAM Objects 51 | 33DC2F b u 1 RDRAM THI Red Coin Counter 52 | 33EA6F b u 1 RDRAM SA Red Coin Counter 53 | 33FB0F b u 1 RDRAM CotMC Red Coin Counter 54 | 34048F b u 1 RDRAM DDD Red Coin Counter 55 | 341C4F b u 1 RDRAM VCutM Red Coin Counter 56 | 34282F b u 1 RDRAM WDW Red Coin Counter 57 | 3438CF b u 1 RDRAM WF Red Coin Counter 58 | 343B2F b u 1 RDRAM ToTWC Red Coin Counter 59 | 343D8F b u 1 RDRAM LLL Red Coin Counter 60 | 343D8F b u 1 RDRAM SSL Red Coin Counter 61 | 344E2F b u 1 RDRAM CCM Red Coin Counter 62 | 344FD8 w h 1 RDRAM Mario Animation Timer 63 | 344FDC w u 1 RDRAM Mario Animation Timer(useless) 64 | 3452EF b u 1 RDRAM BBH Red Coin Counter 65 | 34554F b u 1 RDRAM SL Red Coin Counter 66 | 3457AF b u 1 RDRAM BitFS Red Coin Counter 67 | 345A0F b u 1 RDRAM JRB Red Coin Counter 68 | 34684F b u 1 RDRAM TTM Red Coin Counter 69 | 347368 d u 1 RDRAM BitDW Switch Related 70 | 3473C3 b u 1 RDRAM BBH Merry Ghost Counter 71 | 3478EF b u 1 RDRAM BitS Red Coin Counter 72 | 34826F b u 1 RDRAM BitDW Red Coin Counter 73 | 348BEF b u 1 RDRAM RR Red Coin Counter 74 | 34AF8F b u 1 RDRAM HMC Red Coin Counter 75 | 34C74F b u 1 RDRAM TTC Red Coin Counter 76 | 34CC0F b u 1 RDRAM BoB Red Coin Counter 77 | 35FEE8 w u 1 RDRAM TTC Clock Speed 78 | 36008E b u 1 RDRAM Global Red Coin Counter 79 | 3600A4 w u 1 RDRAM CCM/SL Snowfall 80 | 38EEE0 w u 1 RDRAM RNG 81 | 82 | -------------------------------------------------------------------------------- /Watch/Super Mario 64 (USA).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 1A7D14 b u 1 RDRAM Menu Select Mode? 3 | 1A7D30 b u 1 RDRAM File Being Selected 4 | 1A7D34 b u 1 RDRAM Menu Select Text Directive Flag Toggle 5 | 32D594 b u 1 RDRAM Sound display enabled 6 | 32D598 b u 1 RDRAM Debug display enabled 7 | 32D5E4 d h 1 RDRAM 1P Controller pointer 8 | 32D5E8 d h 1 RDRAM 2P Controller pointer 9 | 32DB30 w u 1 RDRAM Screen width (credits) 10 | 32DB32 w u 1 RDRAM Screen height (credits) 11 | 32DB38 w u 1 RDRAM Screen X (credits) 12 | 32DB3A w u 1 RDRAM Screen Y (credits) 13 | 32DDE0 d h 1 RDRAM Unused screen area color (credits) 14 | 32DDF8 w u 1 RDRAM Map 15 | 330E94 b u 1 RDRAM Debug 2 display type 16 | 33B174 d h 1 RDRAM Hat State 17 | 33B194 w u 1 RDRAM Mario Angle (Movement) 18 | 33B19C w s 1 RDRAM Mario Rotation (Swimming X) 19 | 33B19E w u 1 RDRAM Mario Angle (Facing) 20 | 33B1A4 w s 1 RDRAM Mario Rotation (Swimming Z) 21 | 33B1AC d f 1 RDRAM Mario X Position 22 | 33B1B0 d f 1 RDRAM Mario Y Position 23 | 33B1B4 d f 1 RDRAM Mario Z Position 24 | 33B1BC d f 1 RDRAM Mario Vertical Velocity 25 | 33B1C4 d f 1 RDRAM Mario Horizontal Velocity 26 | 33B1F8 d h 1 RDRAM Mario object pointer 27 | 33B218 w u 1 RDRAM Coins 28 | 33B21A w u 1 RDRAM Stars 29 | 33B21D b u 1 RDRAM Lives 30 | 33B21E b u 1 RDRAM Health 31 | 33B228 w u 1 RDRAM Star Select 32 | 33B249 b u 1 RDRAM Level 33 | 33B24B b u 1 RDRAM Entrance 34 | 33B262 w u 1 RDRAM Coins (Incremental) 35 | 33B26C w u 1 RDRAM Timer (In Game) 36 | 33B3C8 d f 1 RDRAM HOLP Y 37 | 33B3CC d f 1 RDRAM HOLP Z 38 | 33B3D0 d f 1 RDRAM HOLP X 39 | 33B944 w u 1 RDRAM Music 40 | 33C6A4 d f 1 RDRAM Camera Y 41 | 33C6A8 d f 1 RDRAM Camera Z 42 | 33C6AC d f 1 RDRAM Camera X 43 | 33C6D4 b u 1 RDRAM Camera Type 44 | 33D260 d u 1 RDRAM Debug 2 display enabled 45 | 33D273 b u 1 RDRAM Object (Incremental) 46 | 33D2DE w u 1 RDRAM Spawn debug mode enabled 47 | 33D480 d h 1 RDRAM Behavior update enabled 48 | 348730 b u 1 RDRAM BBH Merry Ghost Counter 49 | 361160 d h 1 RDRAM Current object pointer 50 | 367054 b u 1 RDRAM Joystick Vertical Tilt 51 | 367055 b u 1 RDRAM Joystick Horizontal Tilt 52 | 38BE28 d h 1 RDRAM Current level command pointer 53 | 54 | -------------------------------------------------------------------------------- /Watch/Super Smash Bros. (Australia).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 099833 b u 1 RDRAM Music 3 | 0A5074 d h 1 RDRAM Unlocked Stuff 4 | 0A5078 d h 1 RDRAM Unlocked Stuff 5 | 0A54B4 d u 1 RDRAM P1 Damage VS 6 | 0A5528 d u 1 RDRAM P2 Damage VS 7 | 0A5828 d h 1 RDRAM Match Settings Pointer 8 | 131594 d h 1 RDRAM P1 Pointer 9 | 131E17 b u 1 RDRAM P2 Damage (UI) 10 | 11 | -------------------------------------------------------------------------------- /Watch/Super Smash Bros. (Europe) (En,Fr,De).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 0A2E63 b u 1 RDRAM Music 3 | 0AD194 d h 1 RDRAM Unlocked Stuff 4 | 0AD198 d h 1 RDRAM Unlocked Stuff 5 | 0AD948 d h 1 RDRAM Match Settings Pointer 6 | 139A74 d h 1 RDRAM P1 Pointer 7 | 8 | -------------------------------------------------------------------------------- /Watch/Super Smash Bros. (USA).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 099113 b u 1 RDRAM Music 3 | 0A4934 d h 1 RDRAM Unlocked Stuff 4 | 0A4938 d h 1 RDRAM Unlocked Stuff 5 | 0A4B38 b h 1 RDRAM P1 Default CPU Level 1 Player Mode 6 | 0A4B39 b h 1 RDRAM P1 Default CPU Handicap 1 Player Mode 7 | 0A4B3A b h 1 RDRAM P1 Controlled By 1 Player Mode 8 | 0A4B3B b h 1 RDRAM P1 Character 1 Player Mode 9 | 0A4BAC b h 1 RDRAM P2 Default CPU Level 1 Player Mode 10 | 0A4BAD b h 1 RDRAM P2 Default CPU Handicap 1 Player Mode 11 | 0A4BAE b h 1 RDRAM P2 Controlled By 1 Player Mode 12 | 0A4BAF b h 1 RDRAM P2 Character 1 Player Mode 13 | 0A4C20 b h 1 RDRAM P3 Default CPU Level 1 Player Mode 14 | 0A4C21 b h 1 RDRAM P3 Default CPU Handicap 1 Player Mode 15 | 0A4C22 b h 1 RDRAM P3 Controlled By 1 Player Mode 16 | 0A4C23 b h 1 RDRAM P3 Character 1 Player Mode 17 | 0A4C94 b h 1 RDRAM P4 Default CPU Level 1 Player Mode 18 | 0A4C95 b h 1 RDRAM P4 Default CPU Handicap 1 Player Mode 19 | 0A4C96 b h 1 RDRAM P4 Controlled By 1 Player Mode 20 | 0A4C97 b h 1 RDRAM P4 Character 1 Player Mode 21 | 0A50E8 d h 1 RDRAM Match Settings Pointer 22 | 0D7A6E w u 1 RDRAM Max Shield On Spawn 23 | 0E624A w u 1 RDRAM Max Shield Recovery 24 | 12B820 d f 1 RDRAM Stale Damage Multiplier 25 | 12B824 d f 1 RDRAM Level 1 Multiplier 26 | 12B828 d f 1 RDRAM Level 2 Multiplier 27 | 12B82C d f 1 RDRAM Level 3 Multiplier 28 | 12FE8C d f 1 RDRAM Crouch Cancel Knockback Multiplier 29 | 12FF50 d f 1 RDRAM Hitlag Multiplier 30 | 130D84 d h 1 RDRAM P1 Pointer 31 | 131464 d f 1 RDRAM Camera Rot 32 | 131468 d f 1 RDRAM Camera Rot 33 | 13159A w u 1 RDRAM P1 Damage (UI) 34 | 131606 w u 1 RDRAM P2 Damage (UI) 35 | 131672 w u 1 RDRAM P3 Damage (UI) 36 | 1316DE w u 1 RDRAM P4 Damage (UI) 37 | 1317C8 d h 1 RDRAM Timer 38 | 1317CC b u 1 RDRAM P1 Stock (UI) 39 | 1317CD b u 1 RDRAM P2 Stock (UI) 40 | 1317CE b u 1 RDRAM P3 Stock (UI) 41 | 1317CF b u 1 RDRAM P4 Stock (UI) 42 | 13434A w u 1 RDRAM Sound Test Music 43 | 13434E w u 1 RDRAM Sound Test Sound 44 | 134352 w u 1 RDRAM Sound Test Voice 45 | 13D503 b u 1 RDRAM Invincibility Timer After Respawn 46 | 144773 b u 1 RDRAM Tech Frame Window 47 | 150A3F b u 1 RDRAM Z Cancel Frame Window 48 | 18C1E0 d f 1 RDRAM Shield Size Multiplier 49 | 50 | -------------------------------------------------------------------------------- /Watch/Taz-Mania (E).wch: -------------------------------------------------------------------------------- 1 | SystemID SMS 2 | 000F b u 0 Main RAM P1 Input 3 | 00F9 b u 0 Main RAM Player Has Control 4 | 0100 b s 0 Main RAM Lives 5 | 0103 b u 0 Main RAM L Meter 6 | 0105 b u 0 Main RAM L Meter 7 | 0106 b u 0 Main RAM P Meter 8 | 0110 b s 0 Main RAM Aerial X Velocity 9 | 0111 b s 0 Main RAM Ground X Velocity 10 | 0112 b s 1 Main RAM Velocity (Ground) 11 | 0113 b s 1 Main RAM Velocity 12 | 0120 w u 0 Main RAM Viewport X Position 13 | 0122 w u 0 Main RAM Viewport Y Position 14 | 0126 w u 0 Main RAM 15 | 0139 b u 0 Main RAM Player Cooldown Timer 16 | 0141 b u 0 Main RAM Jump Height 17 | 0150 w s 0 Main RAM X Position (Screen) 18 | 0152 w s 0 Main RAM Y Position (Screen) 19 | 0189 b u 0 Main RAM Related to current Level 20 | 01A0 w u 0 Main RAM Score 21 | 01A2 w u 0 Main RAM Score 22 | 01A4 w u 0 Main RAM Game time (Level) 23 | 0F00 b u 0 Main RAM Level 24 | 1120 b u 0 Main RAM Boss HP 25 | 1121 b u 0 Main RAM Boss HP (2) 26 | 1130 b u 0 Main RAM Boss Cooldown Timer 27 | 1131 b u 0 Main RAM Boss Cooldown Timer (2) 28 | 29 | -------------------------------------------------------------------------------- /Watch/Tetris Attack (Europe) (En,Ja).wch: -------------------------------------------------------------------------------- 1 | SystemID SNES 2 | 0003A6 b u 0 WRAM P1 Cursor Left X 3 | 0003A8 b u 0 WRAM P2 Cursor Left X 4 | 0003AA b u 0 WRAM P1 Cursor Left Y 5 | 0003AC b u 0 WRAM P2 Cursor Left Y 6 | 0003AE b u 0 WRAM P1 Cursor Right X 7 | 0003B0 b u 0 WRAM P2 Cursor Right X 8 | 0003B2 b u 0 WRAM P1 Cursor Right Y 9 | 0003B4 b u 0 WRAM P2 Cursor Right Y 10 | 000406 b u 0 WRAM P1 Row Height Ticker 11 | 000408 b u 0 WRAM P2 Row Height Ticker 12 | 13 | -------------------------------------------------------------------------------- /Watch/Tetris Attack (USA) (En,Ja).wch: -------------------------------------------------------------------------------- 1 | SystemID SNES 2 | 0002C2 d u 0 WRAM P1 Score (Single Player) 3 | 00030E w u 0 WRAM P1 Score 4 | 000312 w u 0 WRAM P2 Score 5 | 000316 w u 0 WRAM P1 Score 6 | 000318 w u 0 WRAM P2 Score 7 | 000333 w u 1 WRAM Game time (Minutes) 8 | 000335 w u 1 WRAM Game time (Seconds) 9 | 0003A4 b u 0 WRAM P1 Cursor Left X 10 | 0003A6 b u 0 WRAM P2 Cursor Left X 11 | 0003A8 b u 0 WRAM P1 Cursor Left Y 12 | 0003AA b u 0 WRAM P2 Cursor Left Y 13 | 0003AC b u 0 WRAM P1 Cursor Right X 14 | 0003AE b u 0 WRAM P2 Cursor Right X 15 | 0003B0 b u 0 WRAM P1 Cursor Right Y 16 | 0003B2 b u 0 WRAM P2 Cursor Right Y 17 | 000404 b u 0 WRAM P1 Row Height Ticker 18 | 000406 b u 0 WRAM P2 Row Height Ticker 19 | 20 | -------------------------------------------------------------------------------- /Watch/The Ninja (UE).wch: -------------------------------------------------------------------------------- 1 | SystemID SMS 2 | 0D2B w u 0 Main RAM Level Y Position 3 | 0D62 w u 0 Main RAM Demo Timer 4 | 0D72 w u 0 Main RAM Level X Position? 5 | 0DC0 b u 0 Main RAM Lives 6 | 0DC4 b u 0 Main RAM Hits 7 | 0DC6 w u 0 Main RAM Shots 8 | 0DC8 b u 0 Main RAM Level 9 | 0DDB b h 0 Main RAM Green Scroll Flag 10 | 0DDC b h 0 Main RAM Green Scroll Flag 11 | 0DDD b h 0 Main RAM Green Scroll Flag 12 | 0DDE b h 0 Main RAM Green Scroll Flag 13 | 0DDF b h 0 Main RAM Green Scroll Flag 14 | 0DE1 b u 0 Main RAM Statue Shots (Level 10) 15 | 0DF0 b h 0 Main RAM Easter Egg Flag (Level 1) 16 | 0DF1 b h 0 Main RAM Easter Egg Flag (Level 2) 17 | 0DF3 b h 0 Main RAM Easter Egg Flag (Level 4) 18 | 0DF4 b h 0 Main RAM Easter Egg Flag (Level 5) 19 | 0DF6 b h 0 Main RAM Easter Egg Flag (Level 7) 20 | 0DF8 b h 0 Main RAM Easter Egg Flag (Level 9) 21 | 0EAF w s 0 Main RAM Y Position (Screen) 22 | 0EB2 w s 0 Main RAM X Position (Screen) 23 | 0EC2 b h 0 Main RAM Player Projectile 24 | 0EE3 b h 0 Main RAM Player Projectile 25 | 0F04 b h 0 Main RAM Player Projectile 26 | 0F25 b h 0 Main RAM Boss 27 | 0F43 b u 0 Main RAM Boss Health 28 | 0F46 b h 0 Main RAM Enemy 29 | 0F67 b h 0 Main RAM Enemy 30 | 0F88 b h 0 Main RAM Enemy 31 | 0FA9 b h 0 Main RAM Enemy 32 | 0FCA b h 0 Main RAM Enemy 33 | 0FEB b h 0 Main RAM Enemy 34 | 100C b h 0 Main RAM Enemy 35 | 102D b h 0 Main RAM Projectile 36 | 104E b h 0 Main RAM Projectile 37 | 106F b h 0 Main RAM Projectile 38 | 1090 b h 0 Main RAM Projectile 39 | 10B1 b h 0 Main RAM Projectile 40 | 10D2 b h 0 Main RAM Projectile 41 | 10F3 b h 0 Main RAM Projectile 42 | 1114 b h 0 Main RAM Projectile 43 | 11B6 b u 0 Main RAM Statue Health 44 | 11D7 b u 0 Main RAM Statue Health (JP) 45 | 46 | -------------------------------------------------------------------------------- /Watch/Tom and Jerry - The Movie (E).wch: -------------------------------------------------------------------------------- 1 | SystemID SMS 2 | 0401 b u 0 Main RAM Tom X 3 | 0403 b u 0 Main RAM Tom Y 4 | 042B b h 0 Main RAM Invulnerability Timer 5 | 0439 b h 0 Main RAM Health 6 | 0441 b u 0 Main RAM Jerry X 7 | 0B0F b u 0 Main RAM Stage 8 | 0B13 b u 1 Main RAM Screen X 9 | 0B80 b u 0 Main RAM Continues 10 | 11 | -------------------------------------------------------------------------------- /Watch/Toy Story 2 - Buzz Lightyear to the Rescue! (Europe).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 0BB460 d s 1 RDRAM X Position 3 | 0BB464 d s 1 RDRAM Y Position 4 | 0BB468 d s 1 RDRAM Z Position 5 | 0BB46E w u 1 RDRAM Rotation 6 | 0BB4A8 w u 1 RDRAM Rotation 7 | 0BB4BA w u 1 RDRAM Rotation 8 | 0BB4C8 d s 1 RDRAM X Velocity 9 | 0BB4CC d s 1 RDRAM Y Velocity 10 | 0BB4D0 d s 1 RDRAM Z Velocity 11 | 12 | -------------------------------------------------------------------------------- /Watch/Toy Story 2 - Buzz Lightyear to the Rescue! (USA).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 0B86E8 w h 1 RDRAM Special Weapon State 3 | 0BB070 d s 1 RDRAM X Position 4 | 0BB074 d s 1 RDRAM Y Position 5 | 0BB078 d s 1 RDRAM Z Position 6 | 0BB07E w u 1 RDRAM Rotation 7 | 0BB0B8 w u 1 RDRAM Rotation 8 | 0BB0CA w u 1 RDRAM Rotation 9 | 0BB0D8 d s 1 RDRAM X Velocity 10 | 0BB0DC d s 1 RDRAM Y Velocity 11 | 0BB0E0 d s 1 RDRAM Z Velocity 12 | 0BB0FC w h 1 RDRAM Jump State 13 | 0BB106 w u 1 RDRAM Battery 14 | 0BB10A w u 1 RDRAM Lives 15 | 0BB10E w s 1 RDRAM Coins 16 | 17 | -------------------------------------------------------------------------------- /Watch/Toy Story 2 - Buzz l'Eclair a la Rescousse! (France).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 0BBB40 d s 1 RDRAM X Position 3 | 0BBB44 d s 1 RDRAM Y Position 4 | 0BBB48 d s 1 RDRAM Z Position 5 | 0BBB4E w u 1 RDRAM Rotation 6 | 0BBB88 w u 1 RDRAM Rotation 7 | 0BBB9A w u 1 RDRAM Rotation 8 | 0BBBA8 d s 1 RDRAM X Velocity 9 | 0BBBAC d s 1 RDRAM Y Velocity 10 | 0BBBB0 d s 1 RDRAM Z Velocity 11 | 12 | -------------------------------------------------------------------------------- /Watch/Toy Story 2 - Captain Buzz Lightyear auf Rettungsmission! (Germany) (Rev A).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 0BBB60 d s 1 RDRAM X Position 3 | 0BBB64 d s 1 RDRAM Y Position 4 | 0BBB68 d s 1 RDRAM Z Position 5 | 0BBB6E w u 1 RDRAM Rotation 6 | 0BBBA8 w u 1 RDRAM Rotation 7 | 0BBBBA w u 1 RDRAM Rotation 8 | 0BBBC8 d s 1 RDRAM X Velocity 9 | 0BBBCC d s 1 RDRAM X Velocity 10 | 0BBBD0 d s 1 RDRAM X Velocity 11 | 12 | -------------------------------------------------------------------------------- /Watch/Toy Story 2 - Captain Buzz Lightyear auf Rettungsmission! (Germany).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 0BBB40 d s 1 RDRAM X Position 3 | 0BBB44 d s 1 RDRAM Y Position 4 | 0BBB48 d s 1 RDRAM Z Position 5 | 0BBB4E w u 1 RDRAM Rotation 6 | 0BBB88 w u 1 RDRAM Rotation 7 | 0BBB9A w u 1 RDRAM Rotation 8 | 0BBBA8 d s 1 RDRAM X Velocity 9 | 0BBBAC d s 1 RDRAM Y Velocity 10 | 0BBBB0 d s 1 RDRAM Z Velocity 11 | 12 | -------------------------------------------------------------------------------- /Watch/Tyrants - Fight Through Time (U) [!].wch: -------------------------------------------------------------------------------- 1 | SystemID GEN 2 | 00156A w u 1 68K RAM Help Enabled 3 | 00156E w u 1 68K RAM Population Available For Battle 4 | 00157A w u 1 68K RAM Speech Enabled 5 | 00157C w u 1 68K RAM SFX Enabled 6 | 00157E w u 1 68K RAM Music Enabled 7 | 001588 w s 1 68K RAM Island Index 8 | 001590 w s 1 68K RAM Epoch Index 9 | 002300 w u 1 68K RAM Cursor Color 10 | 00A754 b h 1 68K RAM Alliance 11 | 00A760 b b 1 68K RAM Opponents 12 | 00B364 w u 1 68K RAM Character 13 | 00B394 w u 1 68K RAM Counter Held Duration 14 | 00B396 b u 1 68K RAM Counter Speed 1 15 | 00B397 b u 1 68K RAM Counter Speed 2 16 | 00B410 w u 1 68K RAM Cursor X Position 17 | 00B412 w u 1 68K RAM Cursor Y Position 18 | 00B50E w h 1 68K RAM RNG 19 | 00B5B4 w h 1 68K RAM Selected Sector Pointer 20 | 00B5BC w u 1 68K RAM Paused 21 | 00B5C0 w u 1 68K RAM Game Speed 22 | 00B602 w u 1 68K RAM Men allocated to Battle 23 | 24 | -------------------------------------------------------------------------------- /Watch/Wonder Boy III - The Dragon's Trap (UE).wch: -------------------------------------------------------------------------------- 1 | SystemID SMS 2 | 0243 w u 0 Main RAM X Position 3 | 0246 w u 0 Main RAM Y Position 4 | 0248 w s 0 Main RAM X Velocity 5 | 024B b s 0 Main RAM Y Velocity 6 | 024F b u 0 Main RAM Current Transformation 7 | 026F b u 0 Main RAM Door Timer 8 | 0F20 b h 0 Main RAM Sword State - Legendary 9 | 0F21 b h 0 Main RAM Sword State - Ivory 10 | 0F22 b h 0 Main RAM Sword State - Mithril 11 | 0F23 b h 0 Main RAM Sword State - Shogun 12 | 0F24 b h 0 Main RAM Sword State - Crystal 13 | 0F25 b h 0 Main RAM Sword State - Thunder 14 | 0F26 b h 0 Main RAM Sword State - Magical 15 | 0F27 b h 0 Main RAM Sword State - Lucky 16 | 0F28 b h 0 Main RAM Sword State - Muramasa 17 | 0F29 b h 0 Main RAM Sword State - Tasmanian 18 | 0F2A b h 0 Main RAM Shield State - Legendary 19 | 0F2B b h 0 Main RAM Shield State - Ivory 20 | 0F2C b h 0 Main RAM Shield State - Mithril 21 | 0F2D b h 0 Main RAM Shield State - Shogun 22 | 0F2E b h 0 Main RAM Shield State - Crystal 23 | 0F2F b h 0 Main RAM Shield State - Knight 24 | 0F30 b h 0 Main RAM Shield State - Dancing 25 | 0F31 b h 0 Main RAM Shield State - Aqua 26 | 0F32 b h 0 Main RAM Shield State - Master 27 | 0F33 b h 0 Main RAM Shield State - Heavenly 28 | 0F34 b h 0 Main RAM Armor State - Legendary 29 | 0F35 b h 0 Main RAM Armor State - Ivory 30 | 0F36 b h 0 Main RAM Armor State - Mithril 31 | 0F37 b h 0 Main RAM Armor State - Shogun 32 | 0F38 b h 0 Main RAM Armor State - Crystal 33 | 0F39 b h 0 Main RAM Armor State - Goblin 34 | 0F3A b h 0 Main RAM Armor State - Samurai 35 | 0F3B b h 0 Main RAM Armor State - Dragon 36 | 0F3C b h 0 Main RAM Armor State - Prince 37 | 0F3D b h 0 Main RAM Armor State - Hades 38 | 0F3E b u 0 Main RAM Fire Ball 39 | 0F3F b u 0 Main RAM Tornado 40 | 0F40 b u 0 Main RAM Arrow 41 | 0F41 b u 0 Main RAM Boomerang 42 | 0F42 b u 0 Main RAM Thunder 43 | 0F48 b u 0 Main RAM Stone 44 | 0F4A b u 0 Main RAM Lives 45 | 0F52 w 1 0 Main RAM Health 46 | 0F55 b u 0 Main RAM Gold (Ones) 47 | 0F56 b u 0 Main RAM Gold (Tens) 48 | 0F57 b u 0 Main RAM Gold (Hundreds) 49 | 0F58 b u 0 Main RAM Gold (Thousands) 50 | 0F59 b u 0 Main RAM Gold (Ten Thousands) 51 | 0F5A b u 0 Main RAM Gold (Hundred Thousands) 52 | 0F5B b u 0 Main RAM Maximum Transformation Unlocked 53 | 0F69 b h 0 Main RAM Selected Power Up 54 | 0F86 b h 0 Main RAM Pause Menu Init 55 | 111C b u 0 Main RAM Menu Index 56 | 111E b u 0 Main RAM Lives Hud Digit (Ones) 57 | 111F b u 0 Main RAM Lives Hud Digit (Tens) 58 | 116A w 1 0 Main RAM Boss Health 59 | 1150 w 1 0 Main RAM Boss X Position 60 | 61 | -------------------------------------------------------------------------------- /Watch/Ys - The Vanished Omens (UE).wch: -------------------------------------------------------------------------------- 1 | SystemID SMS 2 | 0191 b u 0 Main RAM Enemy 1 HP 3 | 01A0 b u 0 Main RAM Level 4 | 0210 b u 0 Main RAM Y-Position (on screen) 5 | 0211 b u 0 Main RAM X-Position (on screen) 6 | 0222 b u 0 Main RAM HP Left 7 | 0223 b u 0 Main RAM Strength 8 | 0224 b u 0 Main RAM Defense 9 | 0225 w u 0 Main RAM Gold 10 | 0227 w u 0 Main RAM EXP 11 | 022A b u 0 Main RAM HP Total 12 | 0480 b u 0 Main RAM Enemy 1 Y-Position 13 | 0481 b u 0 Main RAM Enemy 1 X-Position 14 | 04C2 b u 0 Main RAM Enemy 2 HP 15 | 04E0 b u 0 Main RAM Enemy 2 Y-Position 16 | 04E1 b u 0 Main RAM Enemy 2 X-Position 17 | 04F2 b u 0 Main RAM Enemy 3 HP 18 | 19 | -------------------------------------------------------------------------------- /Watch/Zelda no Densetsu - Mujura no Kamen (Japan) (Rev A).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 400284 d f 1 RDRAM X Position 3 | 400288 d f 1 RDRAM Y Position 4 | 40028C d f 1 RDRAM Z Position 5 | 40031C w u 1 RDRAM X Rot 6 | 40031E w u 1 RDRAM Facing Angle 7 | 400320 w u 1 RDRAM Z Rot 8 | 9 | -------------------------------------------------------------------------------- /Watch/Zelda no Densetsu - Mujura no Kamen (Japan).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 3FFFC4 d f 1 RDRAM X Position 3 | 3FFFC8 d f 1 RDRAM Y Position 4 | 3FFFCC d f 1 RDRAM Z Position 5 | 40005C w u 1 RDRAM X Rotation 6 | 40005E w u 1 RDRAM Facing direction 7 | 400060 w u 1 RDRAM Z Rotation 8 | 9 | -------------------------------------------------------------------------------- /Watch/Zelda no Densetsu - Toki no Ocarina (Japan) (Rev A).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 1DAC14 d f 1 RDRAM X Position 3 | 1DAC18 d f 1 RDRAM Y Position 4 | 1DAC1C d f 1 RDRAM Z Position 5 | 1DACA4 w u 1 RDRAM X Rotation 6 | 1DACA6 w u 1 RDRAM Facing Angle 7 | 1DACA8 w u 1 RDRAM Z Rotation 8 | 9 | -------------------------------------------------------------------------------- /Watch/Zelda no Densetsu - Toki no Ocarina (Japan) (Rev B).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 1DB314 d f 1 RDRAM X Position 3 | 1DB318 d f 1 RDRAM Y Position 4 | 1DB31C d f 1 RDRAM Z Position 5 | 1DB3A4 w u 1 RDRAM X Rotation 6 | 1DB3A6 w u 1 RDRAM Facing Angle 7 | 1DB3A8 w u 1 RDRAM Z Rotation 8 | 9 | -------------------------------------------------------------------------------- /Watch/Zelda no Densetsu - Toki no Ocarina (Japan).wch: -------------------------------------------------------------------------------- 1 | SystemID N64 2 | 1DAA54 d f 1 RDRAM X Position 3 | 1DAA58 d f 1 RDRAM Y Position 4 | 1DAA5C d f 1 RDRAM Z Position 5 | 1DAAE4 w u 1 RDRAM X Rotation 6 | 1DAAE6 w u 1 RDRAM Facing Angle 7 | 1DAAE8 w u 1 RDRAM Z Rotation 8 | 9 | -------------------------------------------------------------------------------- /Watch/flappo.wch: -------------------------------------------------------------------------------- 1 | SystemID A26 2 | 00 b u 0 Main RAM X Position 3 | 5E b s 0 Main RAM Y Velocity 4 | 70 b h 0 Main RAM Game Mode 5 | 5C b h 0 Main RAM Screen Type 6 | 05 b h 0 Main RAM 7 | 8 | -------------------------------------------------------------------------------- /games/balloon_fight.lua: -------------------------------------------------------------------------------- 1 | if type(ScriptHawk) ~= "table" then 2 | print("This script is not designed to run by itself"); 3 | print("Please run ScriptHawk.lua from the parent directory instead"); 4 | print("Thanks for using ScriptHawk :)"); 5 | return; 6 | end 7 | 8 | local Game = { 9 | OSD = {}, -- TODO 10 | }; 11 | 12 | -- Game state 13 | local object_array_capacity = 6; 14 | local object_fields = { 15 | object_type = 0x7F, -- Byte 16 | object_types = { 17 | -- TODO 18 | }, 19 | x_position = 0x91, -- u8 20 | y_position = 0x9A, -- u8 21 | }; 22 | 23 | local projectile_array_capacity = 4; 24 | local projectile_fields = { 25 | x_position = 0x490, -- u8 26 | y_position = 0x4A4, -- u8 27 | }; 28 | 29 | function Game.detectVersion(romName, romHash) 30 | ScriptHawk.dpad.joypad.enabled = false; 31 | ScriptHawk.dpad.key.enabled = false; 32 | ScriptHawk.hitboxDefaultColor = colors.white; 33 | ScriptHawk.hitboxDefaultXOffset = 0; 34 | ScriptHawk.hitboxDefaultYOffset = 0; 35 | ScriptHawk.hitboxDefaultWidth = 16; 36 | ScriptHawk.hitboxDefaultHeight = 16; 37 | return true; 38 | end 39 | 40 | function Game.getHitboxes() 41 | local hitboxes = {}; 42 | 43 | for i = 0, object_array_capacity do 44 | table.insert(hitboxes, { 45 | xPosAddress = object_fields.x_position + i, 46 | yPosAddress = object_fields.y_position + i, 47 | typeValue = mainmemory.readbyte(object_fields.object_type + i), 48 | }); 49 | end 50 | 51 | for i = 0, projectile_array_capacity do 52 | table.insert(hitboxes, { 53 | xPosAddress = projectile_fields.x_position + i, 54 | yPosAddress = projectile_fields.y_position + i, 55 | typeValue = 1, -- TODO: need to find this 56 | }); 57 | end 58 | 59 | for i = 1, #hitboxes do 60 | local hitbox = hitboxes[i]; 61 | hitbox.type = "Unknown ("..toHexString(hitbox.typeValue)..")"; 62 | hitbox.x = mainmemory.read_u8(hitbox.xPosAddress); 63 | hitbox.y = mainmemory.read_u8(hitbox.yPosAddress); 64 | hitbox.index = i; 65 | hitbox.dragTag = i; 66 | 67 | if type(object_fields.object_types[hitbox.typeValue]) == "table" then 68 | local objectTypeTable = object_fields.object_types[hitbox.typeValue]; 69 | hitbox.color = objectTypeTable.color; 70 | hitbox.xOffset = objectTypeTable.hitbox_x_offset; 71 | hitbox.yOffset = objectTypeTable.hitbox_y_offset; 72 | hitbox.width = objectTypeTable.hitbox_width; 73 | hitbox.height = objectTypeTable.hitbox_height; 74 | 75 | if type(objectTypeTable.name) == "string" then 76 | hitbox.type = object_fields.object_types[hitbox.typeValue].name.." "..toHexString(hitbox.typeValue); 77 | end 78 | end 79 | end 80 | return hitboxes; 81 | end 82 | 83 | function Game.getHitboxMouseOverText(hitbox) 84 | return { 85 | hitbox.type, 86 | hitbox.index..": "..hitbox.x..","..hitbox.y, 87 | }; 88 | end 89 | 90 | function Game.setHitboxPosition(hitbox, x, y) 91 | mainmemory.write_u8(hitbox.xPosAddress, x); 92 | mainmemory.write_u8(hitbox.yPosAddress, y); 93 | end 94 | 95 | return Game; -------------------------------------------------------------------------------- /games/elmo.lua: -------------------------------------------------------------------------------- 1 | if type(ScriptHawk) ~= "table" then 2 | print("This script is not designed to run by itself"); 3 | print("Please run ScriptHawk.lua from the parent directory instead"); 4 | print("Thanks for using ScriptHawk :)"); 5 | return; 6 | end 7 | 8 | local Game = { 9 | squish_memory_table = true, 10 | Memory = { 11 | -- Version order: 12 | -- 1: Number Journey, N64, USA 13 | -- 2: Letter Adventure, N64, USA 14 | elmo_pointer = {0x106C84, 0x106888}, 15 | }, 16 | speedy_speeds = { .001, .01, .1, 1, 5, 10, 20, 50, 100 }, 17 | speedy_index = 7, 18 | rot_speed = 0.1, 19 | max_rot_units = 2, 20 | }; 21 | 22 | local player_fields = { 23 | x_pos = 0x24, 24 | y_pos = 0x28, 25 | z_pos = 0x2C, 26 | facing_angle = 0x1B8, 27 | }; 28 | 29 | -------------- 30 | -- Position -- 31 | -------------- 32 | 33 | function Game.getXPosition() 34 | local elmoObject = dereferencePointer(Game.Memory.elmo_pointer); 35 | if isRDRAM(elmoObject) then 36 | return mainmemory.readfloat(elmoObject + player_fields.x_pos, true); 37 | end 38 | return 0; 39 | end 40 | 41 | function Game.getYPosition() 42 | local elmoObject = dereferencePointer(Game.Memory.elmo_pointer); 43 | if isRDRAM(elmoObject) then 44 | return mainmemory.readfloat(elmoObject + player_fields.y_pos, true); 45 | end 46 | return 0; 47 | end 48 | 49 | function Game.getZPosition() 50 | local elmoObject = dereferencePointer(Game.Memory.elmo_pointer); 51 | if isRDRAM(elmoObject) then 52 | return mainmemory.readfloat(elmoObject + player_fields.z_pos, true); 53 | end 54 | return 0; 55 | end 56 | 57 | function Game.setXPosition(value) 58 | local elmoObject = dereferencePointer(Game.Memory.elmo_pointer); 59 | if isRDRAM(elmoObject) then 60 | mainmemory.writefloat(elmoObject + player_fields.x_pos, value, true); 61 | end 62 | end 63 | 64 | function Game.setYPosition(value) 65 | local elmoObject = dereferencePointer(Game.Memory.elmo_pointer); 66 | if isRDRAM(elmoObject) then 67 | mainmemory.writefloat(elmoObject + player_fields.y_pos, value, true); 68 | end 69 | end 70 | 71 | function Game.setZPosition(value) 72 | local elmoObject = dereferencePointer(Game.Memory.elmo_pointer); 73 | if isRDRAM(elmoObject) then 74 | mainmemory.writefloat(elmoObject + player_fields.z_pos, value, true); 75 | end 76 | end 77 | 78 | -------------- 79 | -- Rotation -- 80 | -------------- 81 | 82 | function Game.getYRotation() 83 | local elmoObject = dereferencePointer(Game.Memory.elmo_pointer); 84 | if isRDRAM(elmoObject) then 85 | return mainmemory.readfloat(elmoObject + player_fields.facing_angle, true) + 1; 86 | end 87 | return 0; 88 | end 89 | 90 | function Game.setYRotation(value) 91 | local elmoObject = dereferencePointer(Game.Memory.elmo_pointer); 92 | if isRDRAM(elmoObject) then 93 | return mainmemory.writefloat(elmoObject + player_fields.facing_angle, value - 1, true); 94 | end 95 | end 96 | 97 | return Game; -------------------------------------------------------------------------------- /games/metroid.lua: -------------------------------------------------------------------------------- 1 | if type(ScriptHawk) ~= "table" then 2 | print("This script is not designed to run by itself"); 3 | print("Please run ScriptHawk.lua from the parent directory instead"); 4 | print("Thanks for using ScriptHawk :)"); 5 | return; 6 | end 7 | 8 | local Game = { 9 | Memory = { 10 | frame_rule = 0x2C, 11 | frame_rule_2 = 0x29, 12 | frame_rule_3 = 0x2D, 13 | door_timer = 0x3BF, 14 | x_position = 0x30E, x_position_sub = 0x311, 15 | y_position = 0x30D, y_position_sub = 0x310, 16 | x_velocity = 0x309, x_velocity_sub = 0x313, 17 | y_velocity = 0x308, y_velocity_sub = 0x312, 18 | screen_y = 0xFC, 19 | }, 20 | }; 21 | 22 | function Game.detectVersion(romName, romHash) 23 | ScriptHawk.dpad.joypad.enabled = false; 24 | ScriptHawk.dpad.key.enabled = false; 25 | return true; 26 | end 27 | 28 | function Game.getXPosition() 29 | return mainmemory.readbyte(Game.Memory.x_position) + mainmemory.readbyte(Game.Memory.x_position_sub) / 256; 30 | end 31 | 32 | function Game.getYPosition() 33 | return mainmemory.readbyte(Game.Memory.y_position) + mainmemory.readbyte(Game.Memory.y_position_sub) / 256; 34 | end 35 | 36 | function Game.getXVelocity() 37 | return mainmemory.read_s8(Game.Memory.x_velocity) + mainmemory.readbyte(Game.Memory.x_velocity_sub) / 256; 38 | end 39 | 40 | function Game.getYVelocity() 41 | return mainmemory.read_s8(Game.Memory.y_velocity) + mainmemory.readbyte(Game.Memory.y_velocity_sub) / 256; 42 | end 43 | 44 | function Game.getScreenY() 45 | return mainmemory.readbyte(Game.Memory.screen_y); 46 | end 47 | 48 | function Game.getFrameRule() 49 | return mainmemory.readbyte(Game.Memory.frame_rule); 50 | end 51 | 52 | function Game.getFrameRule2() 53 | return mainmemory.readbyte(Game.Memory.frame_rule_2); 54 | end 55 | 56 | function Game.getFrameRule3() 57 | return mainmemory.readbyte(Game.Memory.frame_rule_3); 58 | end 59 | 60 | function Game.getDoorTimer() 61 | return mainmemory.readbyte(Game.Memory.door_timer); 62 | end 63 | 64 | Game.OSD = { 65 | {"Screen Y", Game.getScreenY, category="screenPosition"}, 66 | {"X", category="position"}, 67 | {"Y", category="position"}, 68 | {"X Velocity", Game.getXVelocity, category="speed"}, 69 | {"Y Velocity", Game.getYVelocity, category="speed"}, 70 | {"dX", category="positionStats"}, 71 | {"dY", category="positionStats"}, 72 | {"Separator"}, 73 | {"Frame Rule", Game.getFrameRule, category="frameRule"}, 74 | {"Frame Rule", Game.getFrameRule2, category="frameRule"}, 75 | {"Frame Rule", Game.getFrameRule3, category="frameRule"}, 76 | {"Door Timer", Game.getDoorTimer, category="doorTimer"}, 77 | }; 78 | 79 | return Game; -------------------------------------------------------------------------------- /games/rush_2049.lua: -------------------------------------------------------------------------------- 1 | if type(ScriptHawk) ~= "table" then 2 | print("This script is not designed to run by itself"); 3 | print("Please run ScriptHawk.lua from the parent directory instead"); 4 | print("Thanks for using ScriptHawk :)"); 5 | return; 6 | end 7 | 8 | local Game = { 9 | speedy_speeds = { .001, .01, .1, 1, 5, 10, 20, 50, 100 }, 10 | speedy_index = 7, 11 | rot_speed = 100, 12 | max_rot_units = 65535, 13 | squish_memory_table = true, 14 | Memory = { -- Version order: N64 USA, N64 PAL 15 | cheat_base = {0x11648C, 0x118E84}, 16 | number_of_cheats = {22, 24}, 17 | velocity = {0x14A298, 0x170D70}, 18 | x_position = {0x14A47C, 0x170F54}, 19 | y_position = {0x14A480, 0x170F58}, 20 | z_position = {0x14A484, 0x170F5C}, 21 | }, 22 | }; 23 | 24 | function Game.unlockCheats() 25 | for i = 1, Game.Memory.number_of_cheats do 26 | mainmemory.writebyte(Game.Memory.cheat_base + i - 1, 0x01); 27 | end 28 | end 29 | 30 | function Game.getXPosition() 31 | return mainmemory.readfloat(Game.Memory.x_position, true); 32 | end 33 | 34 | function Game.getYPosition() 35 | return mainmemory.readfloat(Game.Memory.y_position, true); 36 | end 37 | 38 | function Game.getZPosition() 39 | return mainmemory.readfloat(Game.Memory.z_position, true); 40 | end 41 | 42 | function Game.setXPosition(value) 43 | return mainmemory.writefloat(Game.Memory.x_position, value, true); 44 | end 45 | 46 | function Game.setYPosition(value) 47 | return mainmemory.writefloat(Game.Memory.y_position, value, true); 48 | end 49 | 50 | function Game.setZPosition(value) 51 | return mainmemory.writefloat(Game.Memory.z_position, value, true); 52 | end 53 | 54 | function Game.getVelocity() 55 | return mainmemory.readfloat(Game.Memory.velocity, true); 56 | end 57 | 58 | function Game.setVelocity(value) 59 | return mainmemory.writefloat(Game.Memory.velocity, value, true); 60 | end 61 | 62 | function Game.initUI() 63 | if not TASSafe then 64 | ScriptHawk.UI:button(10, 0, {4, 10}, nil, nil, "Unlock Cheats", Game.unlockCheats); 65 | end 66 | end 67 | 68 | Game.OSD = { 69 | {"X", category="position"}, 70 | {"Y", category="position"}, 71 | {"Z", category="position"}, 72 | {"Separator"}, 73 | {"Velocity", Game.getVelocity, category="speed"}, 74 | {"dY", category="positionStats"}, 75 | {"dXZ", category="positionStats"}, 76 | {"Separator"}, 77 | {"Max dY", category="positionStatsMore"}, 78 | {"Max dXZ", category="positionStatsMore"}, 79 | {"Odometer", category="positionStatsMore"}, 80 | }; 81 | 82 | return Game; -------------------------------------------------------------------------------- /games/ts2.lua: -------------------------------------------------------------------------------- 1 | if type(ScriptHawk) ~= "table" then 2 | print("This script is not designed to run by itself"); 3 | print("Please run ScriptHawk.lua from the parent directory instead"); 4 | print("Thanks for using ScriptHawk :)"); 5 | return; 6 | end 7 | 8 | local Game = { 9 | squish_memory_table = true, 10 | Memory = { -- Version order: France, Europe, USA, German 1.1, German 1.0 11 | global_timer = {0x0A3A00, 0x0A3360, 0x0A3040, 0x0A3A20, 0x0A3A00}, -- u32_be 12 | x_position = {0x0BBB40, 0x0BB460, 0x0BB070, 0x0BBB60, 0x0BBB40}, -- s32_be 13 | y_position = {0x0BBB44, 0x0BB464, 0x0BB074, 0x0BBB64, 0x0BBB44}, -- s32_be 14 | z_position = {0x0BBB48, 0x0BB468, 0x0BB078, 0x0BBB68, 0x0BBB48}, -- s32_be 15 | facing_angle = {0x0BBB88, 0x0BB4A8, 0x0BB0B8, 0x0BBBA8, 0x0BBB88}, -- u16_be 16 | }, 17 | speedy_speeds = { 100, 1000, 2000, 5000, 7500, 10000, 20000, 50000, 100000 }, 18 | speedy_index = 4, 19 | speedy_invert_LR = true, 20 | speedy_invert_Y = true, 21 | rot_speed = 10, 22 | max_rot_units = 4096, 23 | }; 24 | 25 | ------------------- 26 | -- Physics/Scale -- 27 | ------------------- 28 | 29 | local global_timer = { 30 | previous = -1, 31 | current = -1, 32 | }; 33 | 34 | function Game.isPhysicsFrame() 35 | return global_timer.current ~= global_timer.previous; 36 | end 37 | 38 | -------------- 39 | -- Position -- 40 | -------------- 41 | 42 | function Game.getXPosition() 43 | return mainmemory.read_s32_be(Game.Memory.x_position); 44 | end 45 | 46 | function Game.getYPosition() 47 | return mainmemory.read_s32_be(Game.Memory.y_position); 48 | end 49 | 50 | function Game.getZPosition() 51 | return mainmemory.read_s32_be(Game.Memory.z_position); 52 | end 53 | 54 | function Game.setXPosition(value) 55 | mainmemory.write_s32_be(Game.Memory.x_position, value); 56 | end 57 | 58 | function Game.setYPosition(value) 59 | mainmemory.write_s32_be(Game.Memory.y_position, value); 60 | end 61 | 62 | function Game.setZPosition(value) 63 | mainmemory.write_s32_be(Game.Memory.z_position, value); 64 | end 65 | 66 | -------------- 67 | -- Rotation -- 68 | -------------- 69 | 70 | function Game.getYRotation() 71 | return mainmemory.read_u16_be(Game.Memory.facing_angle); 72 | end 73 | 74 | function Game.setYRotation(value) 75 | mainmemory.write_u16_be(Game.Memory.facing_angle, value); 76 | end 77 | 78 | function Game.eachFrame() 79 | global_timer.previous = global_timer.current; 80 | global_timer.current = mainmemory.read_u32_be(Game.Memory.global_timer); 81 | end 82 | 83 | Game.OSD = { 84 | {"X", category="position"}, 85 | {"Y", category="position"}, 86 | {"Z", category="position"}, 87 | {"Separator"}, 88 | {"dY", category="positionStats"}, 89 | {"dXZ", category="positionStats"}, 90 | {"Separator"}, 91 | {"Max dY", category="positionStatsMore"}, 92 | {"Max dXZ", category="positionStatsMore"}, 93 | {"Odometer", category="positionStatsMore"}, 94 | {"Separator"}, 95 | {"Facing", Game.getYRotation, category="angle"}, 96 | }; 97 | 98 | return Game; -------------------------------------------------------------------------------- /lib/Stats.lua: -------------------------------------------------------------------------------- 1 | ---------------------------------------------- 2 | -- Small stats library -- 3 | ---------------------------------------------- 4 | -- Version History -- 5 | -- 1.0 First written. 6 | 7 | -- Tables supplied as arguments are not changed. 8 | 9 | -- Table to hold statistical functions 10 | local stats={}; 11 | 12 | -- Get the mean value of a table 13 | function stats.mean(t) 14 | local sum = 0; 15 | local count = 0; 16 | 17 | for k, v in pairs(t) do 18 | if type(v) == 'number' then 19 | sum = sum + v; 20 | count = count + 1; 21 | end 22 | end 23 | 24 | return (sum / count); 25 | end 26 | 27 | -- Get the mode of a table. Returns a table of values. 28 | -- Works on anything (not just numbers). 29 | function stats.mode(t) 30 | local counts = {}; 31 | 32 | for k, v in pairs(t) do 33 | if counts[v] == nil then 34 | counts[v] = 1; 35 | else 36 | counts[v] = counts[v] + 1; 37 | end 38 | end 39 | 40 | local biggestCount = 0; 41 | 42 | for k, v in pairs(counts) do 43 | if v > biggestCount then 44 | biggestCount = v; 45 | end 46 | end 47 | 48 | local temp = {}; 49 | 50 | for k, v in pairs(counts) do 51 | if v == biggestCount then 52 | table.insert(temp, k); 53 | end 54 | end 55 | 56 | return temp; 57 | end 58 | 59 | -- Get the median of a table. 60 | function stats.median(t) 61 | local temp = {}; 62 | 63 | -- deep copy table so that when we sort it, the original is unchanged 64 | -- also weed out any non numbers 65 | for k, v in pairs(t) do 66 | if type(v) == 'number' then 67 | table.insert(temp, v); 68 | end 69 | end 70 | 71 | table.sort(temp); 72 | 73 | -- If we have an even number of table elements or odd. 74 | if math.fmod(#temp,2) == 0 then 75 | -- return mean value of middle two elements 76 | return (temp[#temp / 2] + temp[(#temp / 2) + 1]) / 2; 77 | else 78 | -- return middle element 79 | return temp[math.ceil(#temp / 2)]; 80 | end 81 | end 82 | 83 | -- Get the standard deviation of a table 84 | function stats.standardDeviation(t) 85 | local m; 86 | local vm; 87 | local sum = 0; 88 | local count = 0; 89 | local result; 90 | 91 | m = stats.mean(t); 92 | 93 | for k,v in pairs(t) do 94 | if type(v) == 'number' then 95 | vm = v - m; 96 | sum = sum + (vm * vm); 97 | count = count + 1; 98 | end 99 | end 100 | 101 | result = math.sqrt(sum / (count - 1)); 102 | 103 | return result; 104 | end 105 | 106 | -- Get the max and min for a table 107 | function stats.maxmin(t) 108 | local max = -math.huge; 109 | local min = math.huge; 110 | 111 | for k, v in pairs(t) do 112 | if type(v) == 'number' then 113 | max = math.max(max, v); 114 | min = math.min(min, v); 115 | end 116 | end 117 | 118 | return max, min; 119 | end 120 | 121 | return stats; -------------------------------------------------------------------------------- /lib/pngLua/30log.lua: -------------------------------------------------------------------------------- 1 | local assert, pairs, type, tostring, baseMt, _instances, _classes, class = assert, pairs, type, tostring, {}, {}, {} 2 | local function deep_copy(t, dest, aType) 3 | local t, r = t or {}, dest or {} 4 | for k,v in pairs(t) do 5 | if aType and type(v)==aType then r[k] = v elseif not aType then 6 | if type(v) == 'table' and k ~= "__index" then r[k] = deep_copy(v) else r[k] = v end 7 | end 8 | end; return r 9 | end 10 | local function instantiate(self,...) 11 | local instance = deep_copy(self) ; _instances[instance] = tostring(instance); setmetatable(instance,self) 12 | if self.__init then 13 | if type(self.__init) == 'table' then deep_copy(self.__init, instance) else self.__init(instance, ...) end 14 | end 15 | return instance 16 | end 17 | local function extends(self,extra_params) 18 | local heirClass = deep_copy(self, class(extra_params)); heirClass.__index, heirClass.super = heirClass, self 19 | return setmetatable(heirClass,self) 20 | end 21 | baseMt = { __call = function (self,...) return self:new(...) end, 22 | __tostring = function(self,...) 23 | if _instances[self] then return ('object (of %s): <%s>'):format((rawget(getmetatable(self),'__name') or 'Unnamed'), _instances[self]) end 24 | return _classes[self] and ('class (%s): <%s>'):format((rawget(self,'__name') or 'Unnamed'),_classes[self]) or self 25 | end} 26 | class = function(attr) 27 | local c = deep_copy(attr) ; _classes[c] = tostring(c); 28 | c.with = function(self,include) assert(_classes[self], 'Mixins can only be used on classes') return deep_copy(include, self, 'function') end 29 | c.new, c.extends, c.__index, c.__call, c.__tostring = instantiate, extends, c, baseMt.__call, baseMt.__tostring; return setmetatable(c,baseMt) 30 | end; return class -------------------------------------------------------------------------------- /lib/pngLua/30logLICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 - 2013 Roland Yonaba 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a 4 | copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included 12 | in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 17 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 18 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 19 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 20 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /lib/pngLua/Example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/lib/pngLua/Example.png -------------------------------------------------------------------------------- /lib/pngLua/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 DelusionalLogic 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /lib/pngLua/README.md: -------------------------------------------------------------------------------- 1 | ![pngLua logo](/logo.png?raw=true) 2 | 3 | A pure lua implementation of a PNG decoder 4 | 5 | Usage 6 | ----- 7 | 8 | To initialize a new png image: 9 | 10 | img = pngImage(, newRowCallback) 11 | 12 | The image will then be decoded. The available data from the image is as follows 13 | ``` 14 | img.width = 0 15 | img.height = 0 16 | img.depth = 0 17 | img.colorType = 0 18 | 19 | img:getPixel(x, y) 20 | ``` 21 | Decoding the image is synchronous, and will take a long time for large images. 22 | 23 | Support 24 | ------- 25 | 26 | The supported colortypes are as follows: 27 | 28 | - Grayscale 29 | - Truecolor 30 | - Indexed 31 | - Greyscale/alpha 32 | - Truecolor/alpha 33 | 34 | So far the module only supports 256 Colors in png-8, png-24 as well as png-32 files. and no ancillary chunks. 35 | 36 | More than 256 colors might be supported (Bit-depths over 8) as long as they align with whole bytes. These have not been tested. 37 | 38 | Multiple IDAT chunks of arbitrary lengths are supported, as well as all filters. 39 | 40 | Errors 41 | ------- 42 | So far no error-checking has been implemented. No crc32 checks are done. 43 | -------------------------------------------------------------------------------- /lib/pngLua/deflateLICENSE: -------------------------------------------------------------------------------- 1 | lua-compress-deflatelua License 2 | 3 | =============================================================================== 4 | 5 | Copyright (C) 2008, David Manura. 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | 25 | =============================================================================== -------------------------------------------------------------------------------- /lib/pngLua/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Isotarge/ScriptHawk/31b51aa14d074c529c65c1b1df9c5f2403f28d47/lib/pngLua/logo.png -------------------------------------------------------------------------------- /lib/pngLua/numberluaLICENSE: -------------------------------------------------------------------------------- 1 | lua-bit-numberlua License 2 | 3 | =============================================================================== 4 | 5 | Copyright (C) 2008, David Manura. 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | 25 | =============================================================================== -------------------------------------------------------------------------------- /lib/pngLua/stream.lua: -------------------------------------------------------------------------------- 1 | class = require 'lib.pngLua.30log' 2 | Stream = class() 3 | Stream.data = {} 4 | Stream.position = 1 5 | Stream.__name = "Stream" 6 | 7 | function Stream:bsRight(num, pow) 8 | return math.floor(num / 2^pow) 9 | end 10 | 11 | function Stream:bsLeft(num, pow) 12 | return math.floor(num * 2^pow) 13 | end 14 | 15 | function Stream:bytesToNum(bytes) 16 | local n = 0 17 | for k,v in ipairs(bytes) do 18 | n = self:bsLeft(n, 8) + v 19 | end 20 | n = (n > 2147483647) and (n - 4294967296) or n 21 | return n 22 | end 23 | 24 | function Stream:__init(param) 25 | local str = "" 26 | if (param.inputF ~= nil) then 27 | str = io.open(param.inputF, "rb"):read("*all") 28 | end 29 | if (param.input ~= nil) then 30 | str = param.input 31 | end 32 | 33 | for i=1,#str do 34 | self.data[i] = str:byte(i, i) 35 | end 36 | end 37 | 38 | function Stream:seek(amount) 39 | self.position = self.position + amount 40 | end 41 | 42 | function Stream:readByte() 43 | if self.position <= 0 then self:seek(1) return nil end 44 | local byte = self.data[self.position] 45 | self:seek(1) 46 | return byte 47 | end 48 | 49 | function Stream:readChars(num) 50 | if self.position <= 0 then self:seek(1) return nil end 51 | local str = "" 52 | local i = 1 53 | while i <= num do 54 | str = str .. self:readChar() 55 | i = i + 1 56 | end 57 | return str, i-1 58 | end 59 | 60 | function Stream:readChar() 61 | if self.position <= 0 then self:seek(1) return nil end 62 | return string.char(self:readByte()) 63 | end 64 | 65 | function Stream:readBytes(num) 66 | if self.position <= 0 then self:seek(1) return nil end 67 | local tabl = {} 68 | local i = 1 69 | while i <= num do 70 | local curByte = self:readByte() 71 | if curByte == nil then break end 72 | tabl[i] = curByte 73 | i = i + 1 74 | end 75 | return tabl, i-1 76 | end 77 | 78 | function Stream:readInt(num) 79 | if self.position <= 0 then self:seek(1) return nil end 80 | num = num or 4 81 | local bytes, count = self:readBytes(num) 82 | return self:bytesToNum(bytes), count 83 | end 84 | 85 | function Stream:writeByte(byte) 86 | if self.position <= 0 then self:seek(1) return end 87 | self.data[self.position] = byte 88 | self:seek(1) 89 | end 90 | 91 | function Stream:writeChar(char) 92 | if self.position <= 0 then self:seek(1) return end 93 | self:writeByte(string.byte(char)) 94 | end 95 | 96 | function Stream:writeBytes(buffer) 97 | if self.position <= 0 then self:seek(1) return end 98 | local str = "" 99 | for k,v in pairs(buffer) do 100 | str = str .. string.char(v) 101 | end 102 | writeChars(str) 103 | end 104 | -------------------------------------------------------------------------------- /lib/pngLua/test.lua: -------------------------------------------------------------------------------- 1 | require 'png' 2 | 3 | function printProg(line, totalLine) 4 | print(line .. " of " .. totalLine) 5 | end 6 | 7 | img = pngImage("Example.png", printProg) 8 | print("Width: " .. img.width) 9 | print("Height: " .. img.height) 10 | print("Depth: " .. img.depth) 11 | 12 | print("Color of pixel (10, 10): " .. img:getPixel(10,10):format()) -------------------------------------------------------------------------------- /lips/Base.lua: -------------------------------------------------------------------------------- 1 | -- mostly just semantics over knife.base 2 | -- https://github.com/airstruck/knife/blob/master/knife/base.lua 3 | return { 4 | extend = function(self, subtype) 5 | subtype = subtype or {} 6 | local meta = { __index = subtype } 7 | return setmetatable(subtype, { 8 | __index = self, 9 | __call = function(self, ...) 10 | local obj = setmetatable({}, meta) 11 | return obj, obj:init(...) 12 | end 13 | }) 14 | end, 15 | 16 | init = function() end, 17 | } 18 | -------------------------------------------------------------------------------- /lips/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2015,2016 Connor Olding 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation 5 | files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, 7 | copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /lips/Parser.lua: -------------------------------------------------------------------------------- 1 | local insert = table.insert 2 | 3 | local path = string.gsub(..., "[^.]+$", "") 4 | local Base = require(path.."Base") 5 | local Token = require(path.."Token") 6 | local Lexer = require(path.."Lexer") 7 | local Collector = require(path.."Collector") 8 | local Preproc = require(path.."Preproc") 9 | local Dumper = require(path.."Dumper") 10 | 11 | local Parser = Base:extend() 12 | function Parser:init(writer, fn, options) 13 | self.writer = writer 14 | self.fn = fn or '(string)' 15 | self.main_fn = self.fn 16 | self.options = options or {} 17 | end 18 | 19 | function Parser:tokenize(asm) 20 | local lexer = Lexer(asm, self.main_fn, self.options) 21 | local tokens = {} 22 | 23 | local loop = true 24 | while loop do 25 | lexer:lex(function(tt, tok, fn, line) 26 | assert(tt, 'Internal Error: missing token') 27 | local t = Token(fn, line, tt, tok) 28 | insert(tokens, t) 29 | -- don't break if this is an included file's EOF 30 | if tt == 'EOF' and fn == self.main_fn then 31 | loop = false 32 | end 33 | end) 34 | end 35 | 36 | -- the lexer guarantees an EOL and EOF for a blank file 37 | assert(#tokens > 0, 'Internal Error: no tokens after preprocessing') 38 | 39 | local collector = Collector(self.options) 40 | self.statements = collector:collect(tokens, self.main_fn) 41 | end 42 | 43 | function Parser:debug_dump() 44 | local boring = { 45 | tt = true, 46 | tok = true, 47 | fn = true, 48 | line = true, 49 | } 50 | for i, s in ipairs(self.statements) do 51 | local values = '' 52 | for j, t in ipairs(s) do 53 | local tok = t.tok 54 | if type(tok) == 'number' then 55 | tok = ("$%X"):format(tok) 56 | end 57 | values = values..'\t'..t.tt..'('..tostring(tok)..')' 58 | for k, v in pairs(t) do 59 | if not boring[k] then 60 | values = values..'['..k..'='..tostring(v)..']' 61 | end 62 | end 63 | end 64 | values = values:sub(2) 65 | print(s.line, s.type, values) 66 | end 67 | end 68 | 69 | function Parser:parse(asm) 70 | self:tokenize(asm) 71 | 72 | if self.options.debug_token then self:debug_dump() end 73 | 74 | local preproc = Preproc(self.options) 75 | self.statements = preproc:process(self.statements) 76 | 77 | if self.options.debug_pre then self:debug_dump() end 78 | 79 | self.statements = preproc:expand(self.statements) 80 | 81 | if self.options.debug_post then self:debug_dump() end 82 | 83 | local dumper = Dumper(self.writer, self.options) 84 | self.statements = dumper:load(self.statements) 85 | 86 | if self.options.debug_asm then self:debug_dump() end 87 | 88 | if self.options.labels then 89 | dumper:export_labels(self.options.labels) 90 | end 91 | return dumper:dump() 92 | end 93 | 94 | return Parser 95 | -------------------------------------------------------------------------------- /lips/Reader.lua: -------------------------------------------------------------------------------- 1 | local path = string.gsub(..., "[^.]+$", "") 2 | local Base = require(path.."Base") 3 | local Token = require(path.."Token") 4 | 5 | local Reader = Base:extend() 6 | -- no base init method 7 | 8 | -- Reader expects self.s to be set to a statement, and self.i to a token index 9 | 10 | function Reader:error(msg, got) 11 | if got ~= nil then 12 | msg = msg..', got '..tostring(got) 13 | end 14 | error(('%s:%d: Error: %s'):format(self.fn, self.line, msg), 2) 15 | end 16 | 17 | function Reader:token(t, ...) 18 | local new 19 | if type(t) == 'table' then 20 | new = Token(t, ...) 21 | else 22 | new = Token(self.fn, self.line, t, ...) 23 | end 24 | return new 25 | end 26 | 27 | function Reader:expect(tts) 28 | local t = self.s[self.i] 29 | if t == nil then 30 | local err = ("expected another argument for %s at position %i"):format(self.s.type, self.i) 31 | self:error(err) 32 | end 33 | 34 | self.fn = t.fn 35 | self.line = t.line 36 | 37 | for _, tt in pairs(tts) do 38 | if t.tt == tt then 39 | return t.ok 40 | end 41 | end 42 | 43 | local err 44 | if #tts == 1 then 45 | err = ("argument %i of %s expected type %s"):format(self.i, self.s.type, tts[1]) 46 | else 47 | err = ("unexpected type for argument %i of %s"):format(self.i, self.s.type) 48 | end 49 | self:error(err, t.tt) 50 | end 51 | 52 | function Reader:register(registers) 53 | self:expect{'REG'} 54 | local t = self.s[self.i] 55 | local numeric = registers[t.tok] 56 | if not numeric then 57 | self:error('wrong type of register', t.tok) 58 | end 59 | local new = Token(t) 60 | return new 61 | end 62 | 63 | function Reader:const(relative, no_label) 64 | self:expect{'NUM', 'LABELSYM', 'LABELREL'} 65 | local t = self.s[self.i] 66 | -- overrides will want to LUI a label; let portioned labels pass 67 | if no_label and not t.portion then 68 | self:expect{'NUM', 'LABELREL'} 69 | end 70 | local new = Token(t) 71 | if relative then -- you probably shouldn't use this in Preproc 72 | if t.tt == 'LABELSYM' then 73 | new.tt = 'LABELREL' 74 | elseif t.tt == 'NUM' then 75 | new.tt = 'REL' 76 | end 77 | end 78 | return new 79 | end 80 | 81 | function Reader:deref() 82 | self:expect{'DEREF'} 83 | local t = self.s[self.i] 84 | local new = Token(t) 85 | --new.tt = 'REG' 86 | return new 87 | end 88 | 89 | function Reader:peek(tt) 90 | local t = self.s[self.i] 91 | local seen = t and t.tt or nil 92 | if tt ~= nil then 93 | return seen == tt 94 | end 95 | return t 96 | end 97 | 98 | return Reader 99 | -------------------------------------------------------------------------------- /lips/Statement.lua: -------------------------------------------------------------------------------- 1 | local path = string.gsub(..., "[^.]+$", "") 2 | local util = require(path.."util") 3 | local Base = require(path.."Base") 4 | local Token = require(path.."Token") 5 | 6 | local Statement = Base:extend() 7 | function Statement:init(...) 8 | local args = {...} 9 | if #args == 1 then 10 | local t = args[1] 11 | if util.parent(t) ~= Statement then 12 | error('Internal Error: 1-arg Statement:init expected a Statement', 3) 13 | end 14 | if type(t) == 'table' then 15 | for k, v in pairs(t) do 16 | self[k] = v 17 | end 18 | end 19 | elseif #args >= 3 then 20 | self.fn = args[1] 21 | self.line = args[2] 22 | self.type = args[3] 23 | for i, v in ipairs(args) do 24 | if i > 3 then 25 | self[i - 3] = v 26 | end 27 | end 28 | else 29 | error('Internal Error: Statement:init takes 1 or 3+ arguments', 3) 30 | end 31 | self:validate(1) 32 | return self 33 | end 34 | 35 | function Statement:validate(n) 36 | n = (n or 0) + 3 -- depth for error message 37 | if not self.fn then 38 | error('Internal Error: statements require a filename', n) 39 | end 40 | if not self.line then 41 | error('Internal Error: statements require a line number', n) 42 | end 43 | if not self.type then 44 | error('Internal Error: statement is missing a type', n) 45 | end 46 | for i, v in ipairs(self) do 47 | if util.parent(v) ~= Token then 48 | self[i] = Token(self.fn, self.line, v) 49 | end 50 | end 51 | end 52 | 53 | return Statement 54 | -------------------------------------------------------------------------------- /lips/TODO: -------------------------------------------------------------------------------- 1 | add basic command-line interface (patch.lua) 2 | 3 | document options 4 | maybe deprecate options.unsafe 5 | 6 | add delay slot warnings 7 | 8 | add arithmetic (using %() syntax?) 9 | add macros 10 | implement push/pop/jpop as macros 11 | be able to point to specific args of push/pop using variables 12 | add file-reading directives (e.g. for automatic hook injection macros) 13 | allow generation of shared object files (zelda overlays specifically) 14 | 15 | don't require colons for +/- labels (this shouldn't break anything right?) 16 | 17 | write tests for everything (try to focus on code paths) 18 | test unary tokens 19 | -------------------------------------------------------------------------------- /lips/init.lua: -------------------------------------------------------------------------------- 1 | local lips = { 2 | _DESCRIPTION = 'Assembles MIPS assembly files for the R4300i CPU.', 3 | _URL = 'https://github.com/notwa/lips/', 4 | _LICENSE = [[ 5 | Copyright (C) 2015,2016 Connor Olding 6 | 7 | This program is licensed under the terms of the MIT License, and 8 | is distributed without any warranty. You should have received a 9 | copy of the license along with this program; see the file LICENSE. 10 | ]], 11 | } 12 | 13 | local path = string.gsub(..., "%.init$", "").."." 14 | local util = require(path.."util") 15 | local Parser = require(path.."Parser") 16 | 17 | lips.writers = require(path.."writers") 18 | 19 | function lips.assemble(fn_or_asm, writer, options) 20 | -- assemble MIPS R4300i assembly code. 21 | -- if fn_or_asm contains a newline; treat as assembly, otherwise load file. 22 | -- returns error message on error, or nil on success. 23 | fn_or_asm = tostring(fn_or_asm) 24 | local default_writer = not writer 25 | writer = writer or lips.writers.make_word() 26 | options = options or {} 27 | 28 | local function main() 29 | if options.offset then 30 | if options.origin or options.base then 31 | error('offset and origin/base options are mutually exclusive') 32 | end 33 | io.stderr:write('Warning: options.offset is deprecated.\n') 34 | options.origin = options.offset 35 | options.base = 0 36 | else 37 | options.origin = options.origin or 0 38 | options.base = options.base or 0x80000000 39 | end 40 | 41 | local fn = nil 42 | local asm 43 | if fn_or_asm:find('[\r\n]') then 44 | asm = fn_or_asm 45 | else 46 | fn = fn_or_asm 47 | asm = util.readfile(fn) 48 | options.path = fn:match(".*/") 49 | end 50 | 51 | local parser = Parser(writer, fn, options) 52 | parser:parse(asm) 53 | 54 | if default_writer then 55 | writer() 56 | end 57 | end 58 | 59 | if options.unsafe then 60 | return main() 61 | else 62 | local ok, err = pcall(main) 63 | return err 64 | end 65 | end 66 | 67 | return setmetatable(lips, { 68 | __call = function(self, ...) 69 | return self.assemble(...) 70 | end, 71 | }) 72 | -------------------------------------------------------------------------------- /lips/util.lua: -------------------------------------------------------------------------------- 1 | local floor = math.floor 2 | local open = io.open 3 | 4 | local function readfile(fn, binary) 5 | local mode = binary and 'rb' or 'r' 6 | local f = open(fn, mode) 7 | if not f then 8 | local kind = binary and 'binary' or 'assembly' 9 | error('could not open '..kind..' file for reading: '..tostring(fn), 2) 10 | end 11 | local data = f:read('*a') 12 | f:close() 13 | return data 14 | end 15 | 16 | local function bitrange(x, lower, upper) 17 | return floor(x/2^lower) % 2^(upper - lower + 1) 18 | end 19 | 20 | local function parent(t) 21 | local mt = getmetatable(t) 22 | if mt == nil then 23 | return nil 24 | end 25 | return mt.__index 26 | end 27 | 28 | -- http://stackoverflow.com/a/9279009 29 | local loadcode 30 | if setfenv and loadstring then -- 5.1, JIT 31 | loadcode = function(code, environment) 32 | local f = assert(loadstring(code)) 33 | setfenv(f, environment) 34 | return f 35 | end 36 | else -- 5.2, 5.3 37 | loadcode = function(code, environment) 38 | return assert(load(code, nil, 't', environment)) 39 | end 40 | end 41 | 42 | local data_sizes = { 43 | BYTE = 1, 44 | HALFWORD = 2, 45 | WORD = 4, 46 | } 47 | 48 | local function measure_data(s) 49 | assert(s and s.type == '!DATA', 'Internal Error: expected !DATA statement') 50 | local n = 0 51 | for i, t in ipairs(s) do 52 | if t.tt == 'LABELSYM' then 53 | n = n + 4 54 | elseif t.tt == 'NUM' then 55 | if t.size == nil then 56 | error('Internal Error: unspecified data size in NUM') 57 | end 58 | local size = data_sizes[t.size] 59 | if size == nil then 60 | error('Internal Error: unknown data size in NUM, got '..tostring(t.size)) 61 | end 62 | n = n + size 63 | elseif t.tt == 'WORDS' then 64 | n = n + #t.tok * 4 65 | elseif t.tt == 'HALFWORDS' then 66 | n = n + #t.tok * 2 67 | elseif t.tt == 'BYTES' then 68 | n = n + #t.tok * 1 69 | else 70 | error('Internal Error: unknown data type in !DATA, got '..tostring(t.tt)) 71 | end 72 | end 73 | return n 74 | end 75 | 76 | return { 77 | readfile = readfile, 78 | bitrange = bitrange, 79 | parent = parent, 80 | loadcode = loadcode, 81 | measure_data = measure_data, 82 | } 83 | -------------------------------------------------------------------------------- /lips/writers.lua: -------------------------------------------------------------------------------- 1 | local writers = {} 2 | 3 | function writers.make_word() 4 | local buff = {} 5 | local max = -1 6 | return function(pos, b) 7 | if pos then 8 | buff[pos] = ("%02X"):format(b) 9 | if pos > max then 10 | max = pos 11 | end 12 | elseif max >= 0 then 13 | for i=0, max, 4 do 14 | local a = buff[i+0] or '00' 15 | local b = buff[i+1] or '00' 16 | local c = buff[i+2] or '00' 17 | local d = buff[i+3] or '00' 18 | print(a..b..c..d) 19 | end 20 | end 21 | end 22 | end 23 | 24 | function writers.make_verbose() 25 | local buff = {} 26 | local max = -1 27 | return function(pos, b) 28 | if pos then 29 | buff[pos] = b 30 | if pos > max then 31 | max = pos 32 | end 33 | elseif max >= 0 then 34 | for i=0, max, 4 do 35 | local a = buff[i+0] or nil 36 | local b = buff[i+1] or nil 37 | local c = buff[i+2] or nil 38 | local d = buff[i+3] or nil 39 | if a or b or c or d then 40 | a = a and ("%02X"):format(a) or '--' 41 | b = b and ("%02X"):format(b) or '--' 42 | c = c and ("%02X"):format(c) or '--' 43 | d = d and ("%02X"):format(d) or '--' 44 | print(('%08X %s'):format(i, a..b..c..d)) 45 | end 46 | end 47 | end 48 | end 49 | end 50 | 51 | function writers.make_tester() 52 | local buff = {} 53 | local max = -1 54 | return function(pos, b) 55 | if pos then 56 | buff[pos] = b 57 | if pos > max then 58 | max = pos 59 | end 60 | elseif max >= 0 then 61 | local s = '' 62 | local last_i = 0 63 | for i=0, max, 4 do 64 | local a = buff[i+0] or nil 65 | local b = buff[i+1] or nil 66 | local c = buff[i+2] or nil 67 | local d = buff[i+3] or nil 68 | if a or b or c or d then 69 | a = a and ("%02X"):format(a) or '--' 70 | b = b and ("%02X"):format(b) or '--' 71 | c = c and ("%02X"):format(c) or '--' 72 | d = d and ("%02X"):format(d) or '--' 73 | if last_i ~= i - 4 then 74 | s = s..('@%08X\n'):format(i) 75 | end 76 | s = s..a..b..c..d.."\n" 77 | last_i = i 78 | end 79 | end 80 | return s 81 | end 82 | end 83 | end 84 | 85 | return writers 86 | -------------------------------------------------------------------------------- /user_preferences.lua: -------------------------------------------------------------------------------- 1 | userPreferences={ 2 | }; 3 | --------------------------------------------------------------------------------