Skilled player (1748)
Joined: 9/17/2009
Posts: 4998
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
I was bingeing Inuyasha, and I thought I could try playing this game. This game is kinda really bad due to very high encounter rate, but that appears to be luck-manipulatable. I made a script that displays stuff: Download InuyashaDS.lua
Language: lua

client.SetGameExtraPadding(0, 0, 200, 0) local text = gui.pixelText local image = gui.drawImage memory.usememorydomain("Main RAM") local read8 = memory.read_u8 local read16 = memory.read_u16_le local read24 = memory.read_u24_be local read32 = memory.read_u32_le local Addresses = { --to use ARM 7/9 System Bus, add 02000000 to the addresses --[[ there's 3 Janis characters 1. Start 2. Spells unlocked 3. Spear unlocked ]]-- Area = 0x0B40C4, --2 bytes; 7 is battle; 579 total Character_Overworld = 0x0C4A64, Money = 0x0C4AB0, -- Janis1_Start = 0x0c6469,0c647c --Janis without any spells Janis1_Start = 0x0C6488, Janis1_Name_Index = 0x0C648C, Janis1_Is_NPC = 0x0C648D, --1 is npc, 0 is player Janis1_Item_1 = 0x0C64A4, --4 bytes Janis1_Item_2 = 0x0C64A8, --4 bytes Janis1_Item_3 = 0x0C64AC, --4 bytes Janis1_Item_4 = 0x0C64B0, --4 bytes Janis1_Item_5 = 0x0C64B4, --4 bytes Janis1_Item_6 = 0x0C64B8, --4 bytes Janis1_Item_7 = 0x0C64BC, --4 bytes Janis1_Item_8 = 0x0C64C0, --4 bytes Janis1_Item_9 = 0x0C64C4, --4 bytes Janis1_Item_10 = 0x0C64C8, --4 bytes Janis1_Equip1 = 0x0C64D0, --Items 1 - 8 binary flag Janis1_Equip2 = 0x0C64D1, --Items 9 - 10 Janis1_EXP = 0x0C64D6, --2 bytes Janis1_HP = 0x0C64D8, --2 bytes Janis1_EP = 0x0C64DA, --2 bytes Janis1_MAX_HP = 0x0C64DC, --2 bytes Janis1_MAX_EP = 0x0C64DE, --2 bytes Janis1_Sprite_ID = 0x0C64E4, Janis1_Sprite_Pallete = 0x0C64F4, Janis1_LVL = 0x0C64FC, Janis1_ATK = 0x0C64FD, Janis1_DEF = 0x0C64FE, Janis1_DEX = 0x0C64FF, Janis1_AGI = 0x0C6500, Janis1_Select = 0x0C650D, --they are glowing Janis1_isPresent = 0x0C6510, --he vanishes to fight at 6? Janis1_Escaped = 0x0C6512, Janis1_Status = 0x0C6513, Janis1_Divine_Barrier = 0x0C6517, --how many turns does it last Janis1_Sealing_Barrier = 0x0C6518, --how many turns does it last --Janis with spells unlocked Janis2_Start = 0x0C651C, Janis2_Name_Index = 0x0C6520, Janis2_Is_NPC = 0x0C6521, --1 is npc, 0 is player Janis2_Item_1 = 0x0C6538, --4 bytes Janis2_Item_2 = 0x0C653C, --4 bytes Janis2_Item_3 = 0x0C6540, --4 bytes Janis2_Item_4 = 0x0C6544, --4 bytes Janis2_Item_5 = 0x0C6548, --4 bytes Janis2_Item_6 = 0x0C654C, --4 bytes Janis2_Item_7 = 0x0C6550, --4 bytes Janis2_Item_8 = 0x0C6554, --4 bytes Janis2_Item_9 = 0x0C6558, --4 bytes Janis2_Item_10 = 0x0C655C, --4 bytes Janis2_Equip1 = 0x0C6564, --Items 1 - 8 binary flag Janis2_Equip2 = 0x0C6565, --Items 9 - 10 Janis2_EXP = 0x0C656A, --2 bytes Janis2_HP = 0x0C656C, --2 bytes Janis2_EP = 0x0C656E, --2 bytes Janis2_MAX_HP = 0x0C6570, --2 bytes Janis2_MAX_EP = 0x0C6572, --2 bytes Janis2_Sprite_ID = 0x0C6578, Janis2_Sprite_Pallete = 0x0C6588, Janis2_LVL = 0x0C6590, Janis2_ATK = 0x0C6591, Janis2_DEF = 0x0C6592, Janis2_DEX = 0x0C6593, Janis2_AGI = 0x0C6594, Janis2_Select = 0x0C65A1, --they are glowing Janis2_isPresent = 0x0C65A4, --he vanishes to fight at 6? Janis2_Escaped = 0x0C65A6, Janis2_Status = 0x0C65A7, Janis2_Divine_Barrier = 0x0C65AB, --how many turns does it last Janis2_Sealing_Barrier = 0x0C65AC, --how many turns does it last --Janis with spear unlocked Janis3_Start = 0x0C65B0, Janis3_Name_Index = 0x0C65B4, Janis3_Is_NPC = 0x0C65B5, --1 is npc, 0 is player Janis3_Item_1 = 0x0C65CC, --4 bytes Janis3_Item_2 = 0x0C65D0, --4 bytes Janis3_Item_3 = 0x0C65D4, --4 bytes Janis3_Item_4 = 0x0C65D8, --4 bytes Janis3_Item_5 = 0x0C65DC, --4 bytes Janis3_Item_6 = 0x0C65E0, --4 bytes Janis3_Item_7 = 0x0C65E4, --4 bytes Janis3_Item_8 = 0x0C65E8, --4 bytes Janis3_Item_9 = 0x0C65EC, --4 bytes Janis3_Item_10 = 0x0C65F0, --4 bytes Janis3_Equip1 = 0x0C65F8, --Items 1 - 8 binary flag Janis3_Equip2 = 0x0C65F9, --Items 9 - 10 Janis3_EXP = 0x0C65FE, --2 bytes Janis3_HP = 0x0C6600, --2 bytes Janis3_EP = 0x0C6602, --2 bytes Janis3_MAX_HP = 0x0C6604, --2 bytes Janis3_MAX_EP = 0x0C6606, --2 bytes Janis3_Sprite_ID = 0x0C660C, Janis3_Sprite_Pallete = 0x0C661C, Janis3_LVL = 0x0C6624, Janis3_ATK = 0x0C6625, Janis3_DEF = 0x0C6626, Janis3_DEX = 0x0C6627, Janis3_AGI = 0x0C6628, Janis3_Select = 0x0C6635, --they are glowing Janis3_isPresent = 0x0C6638, --he vanishes to fight at 6? Janis3_Escaped = 0x0C663A, Janis3_Status = 0x0C663B, Janis3_Divine_Barrier = 0x0C663F, --how many turns does it last Janis3_Sealing_Barrier = 0x0C6640, --how many turns does it last --Inu Yasha Inuyasha1_Start = 0x0C6644, Inuyasha1_Name_Index = 0x0C6648, Inuyasha1_Is_NPC = 0x0C6649, --1 is npc, 0 is player Inuyasha1_Item_1 = 0x0C6660, --4 bytes Inuyasha1_Item_2 = 0x0C6664, --4 bytes Inuyasha1_Item_3 = 0x0C6668, --4 bytes Inuyasha1_Item_4 = 0x0C666C, --4 bytes Inuyasha1_Item_5 = 0x0C6670, --4 bytes Inuyasha1_Item_6 = 0x0C6674, --4 bytes Inuyasha1_Item_7 = 0x0C6678, --4 bytes Inuyasha1_Item_8 = 0x0C667C, --4 bytes Inuyasha1_Item_9 = 0x0C6680, --4 bytes Inuyasha1_Item_10 = 0x0C6684, --4 bytes Inuyasha1_Equip1 = 0x0C668C, --Items 1 - 8 binary flag Inuyasha1_Equip2 = 0x0C668D, --Items 9 - 10 Inuyasha1_EXP = 0x0C6692, --2 bytes Inuyasha1_HP = 0x0C6694, --2 bytes Inuyasha1_EP = 0x0C6696, --2 bytes Inuyasha1_MAX_HP = 0x0C6698, --2 bytes Inuyasha1_MAX_EP = 0x0C669A, --2 bytes Inuyasha1_Sprite_ID = 0x0C66A0, Inuyasha1_Sprite_Pallete = 0x0C66B0, Inuyasha1_LVL = 0x0C66B8, Inuyasha1_ATK = 0x0C66B9, Inuyasha1_DEF = 0x0C66BA, Inuyasha1_DEX = 0x0C66BB, Inuyasha1_AGI = 0x0C66BC, Inuyasha1_Select = 0x0C66C9, --they are glowing Inuyasha1_isPresent = 0x0C66CC, --he vanishes to fight at 6? Inuyasha1_Escaped = 0x0C66CE, Inuyasha1_Status = 0x0C66CF, Inuyasha1_Divine_Barrier = 0x0C66D3, --how many turns does it last Inuyasha1_Sealing_Barrier = 0x0C66D4, --how many turns does it last --Inu Yasha (Human) Inuyasha2_Start = 0x0C66D8, Inuyasha2_Name_Index = 0x0C66DC, Inuyasha2_Is_NPC = 0x0C66DD, --1 is npc, 0 is player Inuyasha2_Item_1 = 0x0C66F4, --4 bytes Inuyasha2_Item_2 = 0x0C66F8, --4 bytes Inuyasha2_Item_3 = 0x0C66FC, --4 bytes Inuyasha2_Item_4 = 0x0C6700, --4 bytes Inuyasha2_Item_5 = 0x0C6704, --4 bytes Inuyasha2_Item_6 = 0x0C6708, --4 bytes Inuyasha2_Item_7 = 0x0C670C, --4 bytes Inuyasha2_Item_8 = 0x0C6710, --4 bytes Inuyasha2_Item_9 = 0x0C6714, --4 bytes Inuyasha2_Item_10 = 0x0C6718, --4 bytes Inuyasha2_Equip1 = 0x0C6720, --Items 1 - 8 binary flag Inuyasha2_Equip2 = 0x0C6721, --Items 9 - 10 Inuyasha2_EXP = 0x0C6726, --2 bytes Inuyasha2_HP = 0x0C6728, --2 bytes Inuyasha2_EP = 0x0C672A, --2 bytes Inuyasha2_MAX_HP = 0x0C672C, --2 bytes Inuyasha2_MAX_EP = 0x0C672E, --2 bytes Inuyasha2_Sprite_ID = 0x0C6734, Inuyasha2_Sprite_Pallete = 0x0C6744, Inuyasha2_LVL = 0x0C674C, Inuyasha2_ATK = 0x0C674D, Inuyasha2_DEF = 0x0C674E, Inuyasha2_DEX = 0x0C674F, Inuyasha2_AGI = 0x0C6750, Inuyasha2_Select = 0x0C675D, --they are glowing Inuyasha2_isPresent = 0x0C6760, --he vanishes to fight at 6? Inuyasha2_Escaped = 0x0C6762, Inuyasha2_Status = 0x0C6763, Inuyasha2_Divine_Barrier = 0x0C6767, --how many turns does it last Inuyasha2_Sealing_Barrier = 0x0C6768, --how many turns does it last Kagome_Start = 0x0C676C, Kagome_Name_Index = 0x0C6770, Kagome_Is_NPC = 0x0C6771, --1 is npc, 0 is player Kagome_Item_1 = 0x0C6788, --4 bytes Kagome_Item_2 = 0x0C678C, --4 bytes Kagome_Item_3 = 0x0C6790, --4 bytes Kagome_Item_4 = 0x0C6794, --4 bytes Kagome_Item_5 = 0x0C6798, --4 bytes Kagome_Item_6 = 0x0C679C, --4 bytes Kagome_Item_7 = 0x0C67A0, --4 bytes Kagome_Item_8 = 0x0C67A4, --4 bytes Kagome_Item_9 = 0x0C67A8, --4 bytes Kagome_Item_10 = 0x0C67AC, --4 bytes Kagome_Equip1 = 0x0C67B4, --Items 1 - 8 binary flag Kagome_Equip2 = 0x0C67B5, --Items 9 - 10 Kagome_EXP = 0x0C67BA, --2 bytes Kagome_HP = 0x0C67BC, --2 bytes Kagome_EP = 0x0C67BE, --2 bytes Kagome_MAX_HP = 0x0C67C0, --2 bytes Kagome_MAX_EP = 0x0C67C2, --2 bytes Kagome_Sprite_ID = 0x0C67C8, Kagome_Sprite_Pallete = 0x0C67D8, Kagome_LVL = 0x0C67E0, Kagome_ATK = 0x0C67E1, Kagome_DEF = 0x0C67E2, Kagome_DEX = 0x0C67E3, Kagome_AGI = 0x0C67E4, Kagome_Select = 0x0C67F1, --they are glowing Kagome_isPresent = 0x0C67F4, --he vanishes to fight at 6? Kagome_Escaped = 0x0C67F6, Kagome_Status = 0x0C67F7, Kagome_Divine_Barrier = 0x0C67FB, --how many turns does it last Kagome_Sealing_Barrier = 0x0C67FC, --how many turns does it last Miroku_Start = 0x0C6800, Miroku_Name_Index = 0x0C6804, Miroku_Is_NPC = 0x0C6805, --1 is npc, 0 is player Miroku_Item_1 = 0x0C681C, --4 bytes Miroku_Item_2 = 0x0C6820, --4 bytes Miroku_Item_3 = 0x0C6824, --4 bytes Miroku_Item_4 = 0x0C6828, --4 bytes Miroku_Item_5 = 0x0C682C, --4 bytes Miroku_Item_6 = 0x0C6830, --4 bytes Miroku_Item_7 = 0x0C6834, --4 bytes Miroku_Item_8 = 0x0C6838, --4 bytes Miroku_Item_9 = 0x0C683C, --4 bytes Miroku_Item_10 = 0x0C6840, --4 bytes Miroku_Equip1 = 0x0C6848, --Items 1 - 8 binary flag Miroku_Equip2 = 0x0C6849, --Items 9 - 10 Miroku_EXP = 0x0C684E, --2 bytes Miroku_HP = 0x0C6850, --2 bytes Miroku_EP = 0x0C6852, --2 bytes Miroku_MAX_HP = 0x0C6854, --2 bytes Miroku_MAX_EP = 0x0C6856, --2 bytes Miroku_Sprite_ID = 0x0C685C, Miroku_Sprite_Pallete = 0x0C686C, Miroku_LVL = 0x0C6874, Miroku_ATK = 0x0C6875, Miroku_DEF = 0x0C6876, Miroku_DEX = 0x0C6877, Miroku_AGI = 0x0C6878, Miroku_Select = 0x0C6885, --they are glowing Miroku_isPresent = 0x0C6888, --he vanishes to fight at 6? Miroku_Escaped = 0x0C688A, Miroku_Status = 0x0C688B, Miroku_Divine_Barrier = 0x0C688F, --how many turns does it last Miroku_Sealing_Barrier = 0x0C6890, --how many turns does it last Sango_Start = 0x0C6894, Sango_Name_Index = 0x0C6898, Sango_Is_NPC = 0x0C6899, --1 is npc, 0 is player Sango_Item_1 = 0x0C68B0, --4 bytes Sango_Item_2 = 0x0C68B4, --4 bytes Sango_Item_3 = 0x0C68B8, --4 bytes Sango_Item_4 = 0x0C68BC, --4 bytes Sango_Item_5 = 0x0C68C0, --4 bytes Sango_Item_6 = 0x0C68C4, --4 bytes Sango_Item_7 = 0x0C68C8, --4 bytes Sango_Item_8 = 0x0C68CC, --4 bytes Sango_Item_9 = 0x0C68D0, --4 bytes Sango_Item_10 = 0x0C68D4, --4 bytes Sango_Equip1 = 0x0C68DC, --Items 1 - 8 binary flag Sango_Equip2 = 0x0C68DD, --Items 9 - 10 Sango_EXP = 0x0C68E2, --2 bytes Sango_HP = 0x0C68E4, --2 bytes Sango_EP = 0x0C68E6, --2 bytes Sango_MAX_HP = 0x0C68E8, --2 bytes Sango_MAX_EP = 0x0C68EA, --2 bytes Sango_Sprite_ID = 0x0C68F0, Sango_Sprite_Pallete = 0x0C6900, Sango_LVL = 0x0C6908, Sango_ATK = 0x0C6909, Sango_DEF = 0x0C690A, Sango_DEX = 0x0C690B, Sango_AGI = 0x0C690C, Sango_Select = 0x0C6919, --they are glowing Sango_isPresent = 0x0C691C, --he vanishes to fight at 6? Sango_Escaped = 0x0C691E, Sango_Status = 0x0C691F, Sango_Divine_Barrier = 0x0C6923, --how many turns does it last Sango_Sealing_Barrier = 0x0C6924, --how many turns does it last --Alone Shippo1_Start = 0x0C6928, Shippo1_Name_Index = 0x0C692C, Shippo1_Is_NPC = 0x0C692D, --1 is npc, 0 is player Shippo1_Item_1 = 0x0C6944, --4 bytes Shippo1_Item_2 = 0x0C6948, --4 bytes Shippo1_Item_3 = 0x0C694C, --4 bytes Shippo1_Item_4 = 0x0C6950, --4 bytes Shippo1_Item_5 = 0x0C6954, --4 bytes Shippo1_Item_6 = 0x0C6958, --4 bytes Shippo1_Item_7 = 0x0C695C, --4 bytes Shippo1_Item_8 = 0x0C6960, --4 bytes Shippo1_Item_9 = 0x0C6964, --4 bytes Shippo1_Item_10 = 0x0C6968, --4 bytes Shippo1_Equip1 = 0x0C6970, --Items 1 - 8 binary flag Shippo1_Equip2 = 0x0C6971, --Items 9 - 10 Shippo1_EXP = 0x0C6976, --2 bytes Shippo1_HP = 0x0C6978, --2 bytes Shippo1_EP = 0x0C697A, --2 bytes Shippo1_MAX_HP = 0x0C697C, --2 bytes Shippo1_MAX_EP = 0x0C697E, --2 bytes Shippo1_Sprite_ID = 0x0C6984, Shippo1_Sprite_Pallete = 0x0C6994, Shippo1_LVL = 0x0C699C, Shippo1_ATK = 0x0C699D, Shippo1_DEF = 0x0C699E, Shippo1_DEX = 0x0C699F, Shippo1_AGI = 0x0C69A0, Shippo1_Select = 0x0C69AD, --they are glowing Shippo1_isPresent = 0x0C69B0, --he vanishes to fight at 6? Shippo1_Escaped = 0x0C69B2, Shippo1_Status = 0x0C69B3, Shippo1_Divine_Barrier = 0x0C69B7, --how many turns does it last Shippo1_Sealing_Barrier = 0x0C69B8, --how many turns does it last --With Kirara Shippo2_Start = 0x0C69BC, Shippo2_Name_Index = 0x0C69C0, Shippo2_Is_NPC = 0x0C69C1, --1 is npc, 0 is player Shippo2_Item_1 = 0x0C69D8, --4 bytes Shippo2_Item_2 = 0x0C69DC, --4 bytes Shippo2_Item_3 = 0x0C69E0, --4 bytes Shippo2_Item_4 = 0x0C69E4, --4 bytes Shippo2_Item_5 = 0x0C69E8, --4 bytes Shippo2_Item_6 = 0x0C69EC, --4 bytes Shippo2_Item_7 = 0x0C69F0, --4 bytes Shippo2_Item_8 = 0x0C69F4, --4 bytes Shippo2_Item_9 = 0x0C69F8, --4 bytes Shippo2_Item_10 = 0x0C69FC, --4 bytes Shippo2_Equip1 = 0x0C6A04, --Items 1 - 8 binary flag Shippo2_Equip2 = 0x0C6A05, --Items 9 - 10 Shippo2_EXP = 0x0C6A0A, --2 bytes Shippo2_HP = 0x0C6A0C, --2 bytes Shippo2_EP = 0x0C6A0E, --2 bytes Shippo2_MAX_HP = 0x0C6A10, --2 bytes Shippo2_MAX_EP = 0x0C6A12, --2 bytes Shippo2_Sprite_ID = 0x0C6A18, Shippo2_Sprite_Pallete = 0x0C6A28, Shippo2_LVL = 0x0C6A30, Shippo2_ATK = 0x0C6A31, Shippo2_DEF = 0x0C6A32, Shippo2_DEX = 0x0C6A33, Shippo2_AGI = 0x0C6A34, Shippo2_Select = 0x0C6A41, --they are glowing Shippo2_isPresent = 0x0C6A44, --he vanishes to fight at 6? Shippo2_Escaped = 0x0C6A46, Shippo2_Status = 0x0C6A47, Shippo2_Divine_Barrier = 0x0C6A4B, --how many turns does it last Shippo2_Sealing_Barrier = 0x0C6A4C, --how many turns does it last --Shikioni 1 Shikioni1_Item_1 = 0x0C6CBC, --4 bytes Shikioni1_Item_2 = 0x0C6CC0, --4 bytes Shikioni1_Item_3 = 0x0C6CC4, --4 bytes Shikioni1_Item_4 = 0x0C6CC8, --4 bytes Shikioni1_Item_5 = 0x0C6CCC, --4 bytes Shikioni1_Item_6 = 0x0C6CD0, --4 bytes Shikioni1_Item_7 = 0x0C6CD4, --4 bytes Shikioni1_Item_8 = 0x0C6CD8, --4 bytes Shikioni1_Item_9 = 0x0C6CDC, --4 bytes Shikioni1_Item_10 = 0x0C6CE0, --4 bytes Shikioni1_Equip1 = 0x0C6CE8, --Items 1 - 8 binary flag Shikioni1_Equip2 = 0x0C6CE9, --Items 9 - 10 Shikioni1_EXP = 0x0C6CEE, --2 bytes Shikioni1_HP = 0x0C6CF0, --2 bytes Shikioni1_EP = 0x0C6CF2, --2 bytes Shikioni1_MAX_HP = 0x0C6CF4, --2 bytes Shikioni1_MAX_EP = 0x0C6CF6, --2 bytes Shikioni1_LVL = 0x0C6D14, Shikioni1_ATK = 0x0C6D15, Shikioni1_DEF = 0x0C6D16, Shikioni1_DEX = 0x0C6D17, Shikioni1_AGI = 0x0C6D18, Shikioni1_Select = 0x0C6D25, --they are glowing Shikioni1_Status = 0x0C6D2B, Shikioni1_Divine_Barrier = 0x0C6D2F, --how many turns does it last Shikioni1_Sealing_Barrier = 0x0C6D30, --how many turns does it last Shikioni1_Power_Leaf = 0x0C6D31, --how many turns does it last --0C6DC8 NPC1_Start = 0x0C6DC8, NPC1_Name_Index = 0x0C6DCC, NPC1_Item_1 = 0x0C6DE4, --4 bytes NPC1_Item_2 = 0x0C6DE8, --4 bytes NPC1_Item_3 = 0x0C6DEC, --4 bytes NPC1_Item_4 = 0x0C6DF0, --4 bytes NPC1_Item_5 = 0x0C6DF4, --4 bytes NPC1_Item_6 = 0x0C6DF8, --4 bytes NPC1_Item_7 = 0x0C6DFC, --4 bytes NPC1_Item_8 = 0x0C6E00, --4 bytes NPC1_Item_9 = 0x0C6E04, --4 bytes NPC1_Item_10 = 0x0C6E08, --4 bytes NPC1_Equip1 = 0x0C6E10, --Items 1 - 8 binary flag NPC1_Equip2 = 0x0C6E11, --Items 9 - 10 NPC1_EXP = 0x0C6E16, --2 bytes NPC1_HP = 0x0C6E18, --2 bytes NPC1_EP = 0x0C6E1A, --2 bytes NPC1_MAX_HP = 0x0C6E1C, --2 bytes NPC1_MAX_EP = 0x0C6E1E, --2 bytes NPC1_Sprite_ID = 0x0C6E24, NPC1_Sprite_Pallete = 0x0C6E34, NPC1_LVL = 0x0C6E3C, NPC1_ATK = 0x0C6E3D, NPC1_DEF = 0x0C6E3E, NPC1_DEX = 0x0C6E3F, NPC1_AGI = 0x0C6E40, NPC1_Select = 0x0C6E4D, --they are glowing NPC1_isPresent = 0x0C6E50, --he vanishes to fight at 6? NPC1_Escaped = 0x0C6E52, NPC1_Status = 0x0C6E53, NPC1_Divine_Barrier = 0x0C6E57, --how many turns does it last NPC1_Sealing_Barrier = 0x0C6E58, --how many turns does it last NPC1_Power_Leaf = 0x0C6E59, --how many turns does it last Moon_Phase = 0x107568, Moon_Step = 0x10756C, --80 steps outdoors a phase RNG1 = 0x107B98, RNG2 = 0x107B9C, Character_Menu = 0x24BF06, Character_Attacking = 0x24C152, X = 0x2AD49C, Y = 0x2AD4A0, Attack_Selected = 0x2B5E28 } --[[ Status 7 6 5 4 3 2 1 0 0 Defense 1 Paralysis 2 Poison 3 Blindness 4 Fatigue ]]-- local Attack = { --value for FUN_02068c64 [1] = {Name = "Attack", EP = 1, Value = 0x00}, [2] = {Name = "Charge", EP = 2, Value = 0}, [3] = {Name = "Shoot", EP = 1, Value = 0}, [4] = {Name = "Defense", EP = 0, Value = 0}, [6] = {Name = "?", EP = 0, Value = 0}, [7] = {Name = "?", EP = 0, Value = 0}, [8] = {Name = "?", EP = 0, Value = 0}, [9] = {Name = "?", EP = 0, Value = 0}, [10] = {Name = "Spirit Up", EP = 0, Value = 0}, [11] = {Name = "Item", EP = 0, Value = 0}, [12] = {Name = "?", EP = 0, Value = 0}, [13] = {Name = "Lightning Arrow", EP = 2, Value = 0x7B}, [14] = {Name = "Infernal Meteor", EP = 3, Value = 0x64}, [15] = {Name = "Heavenly Essence",EP = 3, Value = 0}, --heals [16] = {Name = "Power Leaf", EP = 2, Value = 0}, --boost attack for 3 turns [17] = {Name = "Iron Reaver", EP = 2, Value = 0x5F}, [18] = {Name = "Blades Of Blood", EP = 3, Value = 0x5A}, [19] = {"Wind Scar", EP = 4, Value = 0xAF}, [20] = {Name = "Backlash Wave", EP = 5, Value = 0xBE}, [21] = {Name = "Sacred Arrow", EP = 3, Value = 0x87}, [22] = {Name = "Purifying Light", EP = 3, Value = 0}, --Heals status [23] = {Name = "Divine Barrier", EP = 3, Value = 0}, [24] = {Name = "Wind Tunnel", EP = 5, Value = 0}, [25] = {Name = "Healing Sutra", EP = 3, Value = 0}, [26] = {Name = "Sealing Barrier", EP = 4, Value = 0}, [27] = {Name = "Binding Sutra", EP = 3, Value = 0}, [28] = {Name = "Fury Of Taishaku", EP = 3, Value = 0x6E}, [29] = {Name = "Hiraikotsu", EP = 3, Value = 0x82}, [30] = {Name = "Great Cannon", EP = 3, Value = 0x5A}, [31] = {Name = "Fox Fire", EP = 1, Value = 0x41}, [32] = {Name = "Smashing Top", EP = 2, Value = 0x50}, [33] = {Name = "Smoke Illusion", EP = 2, Value = 0} } local Battle = { Name_Index = {0,0,0,0,0,0,0,0,0,0,0,0,0}, EXP = {0,0,0,0,0,0,0,0,0,0,0,0,0}, HP = {0,0,0,0,0,0,0,0,0,0,0,0,0}, EP = {0,0,0,0,0,0,0,0,0,0,0,0,0}, Max_HP = {0,0,0,0,0,0,0,0,0,0,0,0,0}, Max_EP = {0,0,0,0,0,0,0,0,0,0,0,0,0}, Sprite_ID = {0,0,0,0,0,0,0,0,0,0,0,0,0}, Sprite_ID2 = {0,0,0,0,0,0,0,0,0,0,0,0,0}, Sprite_Palette = {0,0,0,0,0,0,0,0,0,0,0,0,0}, Sprite_Palette2 = {0,0,0,0,0,0,0,0,0,0,0,0,0}, LVL = {0,0,0,0,0,0,0,0,0,0,0,0,0}, ATK = {0,0,0,0,0,0,0,0,0,0,0,0,0}, DEF = {0,0,0,0,0,0,0,0,0,0,0,0,0}, DEX = {0,0,0,0,0,0,0,0,0,0,0,0,0}, AGI = {0,0,0,0,0,0,0,0,0,0,0,0,0} } local NPC = { [0] = { Name = "Iron Dragon Spawn", Sprite_ID = 0x0114, Sprite_Pallete = 0x0114, Width = 80, Height = 76}, [1] = { Name = "Fire Dragon Spawn", Sprite_ID = 0x0114, Sprite_Pallete = 0x0115, Width = 80, Height = 76}, [2] = { Name = "Wandering Spirit", Sprite_ID = 0x0116, Sprite_Pallete = 0x0116, Width = 16, Height = 30}, [3] = { Name = "Lost Soul", Sprite_ID = 0x0116, Sprite_Pallete = 0x0118, Width = 16, Height = 30}, [4] = { Name = "Banshee", Sprite_ID = 0x011A, Sprite_Pallete = 0x011A, Width = 29, Height = 48}, [5] = { Name = "Ten-Eyed Monster", Sprite_ID = 0x011B, Sprite_Pallete = 0x011B, Width = 44, Height = 41}, [6] = { Name = "Disembodied Soul", Sprite_ID = 0x011B, Sprite_Pallete = 0x011C, Width = 44, Height = 41}, [7] = { Name = "Cackling Skull", Sprite_ID = 0x0000, Sprite_Pallete = 0x0000, Width = 255, Height = 255}, [8] = { Name = "Cursed Skull", Sprite_ID = 0x0000, Sprite_Pallete = 0x0000, Width = 255, Height = 255}, [9] = { Name = "Little Devil", Sprite_ID = 0x011D, Sprite_Pallete = 0x011D, Width = 31, Height = 43}, [10] = { Name = "Vile Demon", Sprite_ID = 0x011D, Sprite_Pallete = 0x011E, Width = 31, Height = 43}, [11] = { Name = "Malicious Demon", Sprite_ID = 0x011D, Sprite_Pallete = 0x011F, Width = 31, Height = 43}, [12] = { Name = "Wild Hermit", Sprite_ID = 0x0120, Sprite_Pallete = 0x0120, Width = 50, Height = 65}, [13] = { Name = "Masked Priest", Sprite_ID = 0x0120, Sprite_Pallete = 0x0121, Width = 50, Height = 65}, [14] = { Name = "Demon Handler", Sprite_ID = 0x0122, Sprite_Pallete = 0x0122, Width = 29, Height = 54}, [15] = { Name = "Revenant", Sprite_ID = 0x0122, Sprite_Pallete = 0x0124, Width = 29, Height = 54}, [16] = { Name = "Savage Rat", Sprite_ID = 0x0126, Sprite_Pallete = 0x0126, Width = 28, Height = 32}, [17] = { Name = "Filthy Rat", Sprite_ID = 0x0126, Sprite_Pallete = 0x0127, Width = 28, Height = 32}, [18] = { Name = "Giant Mantis", Sprite_ID = 0x0000, Sprite_Pallete = 0x0000, Width = 255, Height = 255}, [19] = { Name = "Shadow Mantis", Sprite_ID = 0x0000, Sprite_Pallete = 0x0000, Width = 255, Height = 255}, [20] = { Name = "Giant Spider", Sprite_ID = 0x0128, Sprite_Pallete = 0x0128, Width = 29, Height = 26}, [21] = { Name = "Hirasaka Spider", Sprite_ID = 0x0128, Sprite_Pallete = 0x012A, Width = 29, Height = 26}, [22] = { Name = "Sandman", Sprite_ID = 0x012C, Sprite_Pallete = 0x012C, Width = 30, Height = 46}, [23] = { Name = "Sludge", Sprite_ID = 0x012C, Sprite_Pallete = 0x012E, Width = 30, Height = 46}, [24] = { Name = "Wild Bear", Sprite_ID = 0x0130, Sprite_Pallete = 0x0130, Width = 45, Height = 52}, [25] = { Name = "Bloody Bear", Sprite_ID = 0x0130, Sprite_Pallete = 0x0131, Width = 45, Height = 52}, [26] = { Name = "Rock Monkey", Sprite_ID = 0x0132, Sprite_Pallete = 0x0132, Width = 46, Height = 36}, [27] = { Name = "Jizo Monkey", Sprite_ID = 0x0132, Sprite_Pallete = 0x0134, Width = 46, Height = 36}, [28] = { Name = "Iorimaru", Sprite_ID = 0x0136, Sprite_Pallete = 0x0136, Width = 23, Height = 43}, [29] = { Name = "Tosen King", Sprite_ID = 0x0138, Sprite_Pallete = 0x0138, Width = 23, Height = 43}, [30] = { Name = "Senryo", Sprite_ID = 0x013A, Sprite_Pallete = 0x013A, Width = 34, Height = 49}, [31] = { Name = "Manryo", Sprite_ID = 0x0000, Sprite_Pallete = 0x0000, Width = 255, Height = 255}, [32] = { Name = "Tengu", Sprite_ID = 0x013E, Sprite_Pallete = 0x013E, Width = 58, Height = 65}, [33] = { Name = "Dark Tengu", Sprite_ID = 0x013E, Sprite_Pallete = 0x0141, Width = 58, Height = 65}, [34] = { Name = "Wandering Demon", Sprite_ID = 0x0144, Sprite_Pallete = 0x0144, Width = 44, Height = 79}, [35] = { Name = "Iron-Souled Demon", Sprite_ID = 0x0144, Sprite_Pallete = 0x0147, Width = 44, Height = 79}, [36] = { Name = "One-Eyed Priest", Sprite_ID = 0x0144, Sprite_Pallete = 0x014A, Width = 44, Height = 79}, [37] = { Name = "Antero Demon", Sprite_ID = 0x014D, Sprite_Pallete = 0x014D, Width = 40, Height = 55}, [38] = { Name = "Ninestar Demon", Sprite_ID = 0x014D, Sprite_Pallete = 0x014E, Width = 40, Height = 55}, [39] = { Name = "Postero Demon", Sprite_ID = 0x014F, Sprite_Pallete = 0x014F, Width = 35, Height = 56}, [40] = { Name = "Shrouded Demon", Sprite_ID = 0x014F, Sprite_Pallete = 0x0150, Width = 35, Height = 56}, [41] = { Name = "Demon of Misfortune", Sprite_ID = 0x0151, Sprite_Pallete = 0x0151, Width = 50, Height = 111}, [42] = { Name = "Slashing Demon", Sprite_ID = 0x0151, Sprite_Pallete = 0x0156, Width = 50, Height = 111}, [43] = { Name = "Hades Demon", Sprite_ID = 0x0151, Sprite_Pallete = 0x015B, Width = 50, Height = 111}, [44] = { Name = "Saimyosho", Sprite_ID = 0x0160, Sprite_Pallete = 0x0160, Width = 40, Height = 38}, [45] = { Name = "Saimyosho", Sprite_ID = 0x0000, Sprite_Pallete = 0x0000, Width = 255, Height = 255}, [46] = { Name = "Saimyosho", Sprite_ID = 0x0000, Sprite_Pallete = 0x0000, Width = 255, Height = 255}, [47] = { Name = "Saimyosho", Sprite_ID = 0x0000, Sprite_Pallete = 0x0000, Width = 255, Height = 255}, [48] = { Name = "Wind Spirit", Sprite_ID = 0x0167, Sprite_Pallete = 0x0167, Width = 45, Height = 50}, [49] = { Name = "Wind God", Sprite_ID = 0x0167, Sprite_Pallete = 0x0168, Width = 45, Height = 50}, [50] = { Name = "Ice Dragon Spawn", Sprite_ID = 0x0114, Sprite_Pallete = 0x0169, Width = 80, Height = 76}, [51] = { Name = "Light Demon", Sprite_ID = 0x014D, Sprite_Pallete = 0x016A, Width = 40, Height = 55}, [52] = { Name = "Dark Demon", Sprite_ID = 0x014F, Sprite_Pallete = 0x016B, Width = 35, Height = 56}, [53] = { Name = "Akagane", Sprite_ID = 0x016C, Sprite_Pallete = 0x016C, Width = 65, Height = 109}, [54] = { Name = "Akagane", Sprite_ID = 0x016C, Sprite_Pallete = 0x016C, Width = 65, Height = 109}, [55] = { Name = "Akagane", Sprite_ID = 0x016C, Sprite_Pallete = 0x016C, Width = 65, Height = 109}, [56] = { Name = "Burai", Sprite_ID = 0x016F, Sprite_Pallete = 0x016F, Width = 66, Height = 78}, [57] = { Name = "Datara", Sprite_ID = 0x0170, Sprite_Pallete = 0x0170, Width = 55, Height = 106}, [58] = { Name = "Gorai", Sprite_ID = 0x0175, Sprite_Pallete = 0x0175, Width = 35, Height = 67}, [59] = { Name = "Gorai", Sprite_ID = 0x0175, Sprite_Pallete = 0x0175, Width = 35, Height = 67}, [60] = { Name = "Gorai", Sprite_ID = 0x0175, Sprite_Pallete = 0x0175, Width = 35, Height = 67}, [61] = { Name = "Haniwa Golem 1", Sprite_ID = 0x0177, Sprite_Pallete = 0x0177, Width = 23, Height = 36}, [62] = { Name = "Haniwa Golem 2", Sprite_ID = 0x0178, Sprite_Pallete = 0x0178, Width = 25, Height = 27}, [63] = { Name = "Haniwa Golem 3", Sprite_ID = 0x017A, Sprite_Pallete = 0x017A, Width = 64, Height = 48}, [64] = { Name = "Demon Puppet", Sprite_ID = 0x017C, Sprite_Pallete = 0x017C, Width = 80, Height = 80}, [65] = { Name = "Demon Puppet", Sprite_ID = 0x017C, Sprite_Pallete = 0x017C, Width = 80, Height = 80}, [66] = { Name = "Masuko", Sprite_ID = 0x017D, Sprite_Pallete = 0x017D, Width = 121, Height = 116}, [67] = { Name = "Mitsurugi", Sprite_ID = 0x017E, Sprite_Pallete = 0x017E, Width = 37, Height = 44}, [68] = { Name = "Mitsurugi", Sprite_ID = 0x017E, Sprite_Pallete = 0x017E, Width = 37, Height = 44}, [69] = { Name = "Sara", Sprite_ID = 0x0180, Sprite_Pallete = 0x0180, Width = 23, Height = 45}, [70] = { Name = "Sara", Sprite_ID = 0x0180, Sprite_Pallete = 0x0180, Width = 23, Height = 45}, [71] = { Name = "Monk Sen", Sprite_ID = 0x0182, Sprite_Pallete = 0x0182, Width = 33, Height = 61}, [72] = { Name = "Sugagaki", Sprite_ID = 0x0184, Sprite_Pallete = 0x0184, Width = 64, Height = 64}, [73] = { Name = "Sugagaki", Sprite_ID = 0x0184, Sprite_Pallete = 0x0184, Width = 64, Height = 64}, [74] = { Name = "Usuba", Sprite_ID = 0x0187, Sprite_Pallete = 0x0187, Width = 78, Height = 76}, [75] = { Name = "Crash", Sprite_ID = 0x0000, Sprite_Pallete = 0x0000, Width = 255, Height = 255}, [241] = { Name = "Crash", Sprite_ID = 0x0000, Sprite_Pallete = 0x0000, Width = 255, Height = 255}, [242] = { Name = "No name", Sprite_ID = 0x0000, Sprite_Pallete = 0x0000, Width = 255, Height = 255}, [243] = { Name = "Zombie", Sprite_ID = 0x00FA, Sprite_Pallete = 0x00FA, Width = 20, Height = 46}, [244] = { Name = "Zombie 2", Sprite_ID = 0x00FB, Sprite_Pallete = 0x00FB, Width = 48, Height = 64}, [245] = { Name = "Possessed Warrior", Sprite_ID = 0x00FC, Sprite_Pallete = 0x00FC, Width = 23, Height = 42}, [246] = { Name = "Deceased Warrior", Sprite_ID = 0x00FC, Sprite_Pallete = 0x00FE, Width = 23, Height = 42}, [247] = { Name = "Demon Soldier", Sprite_ID = 0x0100, Sprite_Pallete = 0x0100, Width = 59, Height = 35}, [248] = { Name = "Cave Insect", Sprite_ID = 0x0101, Sprite_Pallete = 0x0101, Width = 53, Height = 36}, [249] = { Name = "Rock Insect", Sprite_ID = 0x0101, Sprite_Pallete = 0x0103, Width = 53, Height = 36}, [250] = { Name = "Slimy Bug", Sprite_ID = 0x0101, Sprite_Pallete = 0x0105, Width = 53, Height = 36}, [251] = { Name = "Giant Centipede", Sprite_ID = 0x0107, Sprite_Pallete = 0x0107, Width = 93, Height = 78}, [252] = { Name = "Poisonous Centipede", Sprite_ID = 0x0107, Sprite_Pallete = 0x010A, Width = 93, Height = 78}, [253] = { Name = "Steel Centipede", Sprite_ID = 0x0107, Sprite_Pallete = 0x010D, Width = 93, Height = 78}, [254] = { Name = "Poisonous Child", Sprite_ID = 0x0110, Sprite_Pallete = 0x0110, Width = 20, Height = 33}, [255] = { Name = "Messenger of Hades", Sprite_ID = 0x0110, Sprite_Pallete = 0x0112, Width = 20, Height = 33} } --starts from 1, 24BF06 for menu, 0C4A64 for overworld local Character = { "Janis 1", --1 start "Janis 2", --2 spell unlocked "Janis 3", --3 spear unlocked "Inuyasha 1", --4 Demon "Inuyasha 2", --5 Human "Kagome", --6 "Miroku", --7 "Sango", --8 "Shippo 1", --9 Alone, no Kirara "Shippo 2", --10 Riding Kirara --not sure if following are playable "Kohaku", --11 "Koga", --12 "Tsugumi", --13 "Sesshomaru", --14 "Shiki Demon 1", --15 from start "Shiki Demon 2", --16 from start } --total amount of experience at current level to reach next. So you need 17 xp total to reach level 2 from 1 local XP = { [1] = 17, [2] = 49, [3] = 94, [4] = 153, [5] = 231, [6] = 330, [7] = 450, [8] = 590, [9] = 746, [10] = 919, [11] = 1109, [12] = 1314, [13] = 1533, [14] = 1769, [15] = 2026, [16] = 2300, [17] = 2589, [18] = 2899, [19] = 3227, [20] = 3572, [21] = 3933, [22] = 4308, [23] = 4698, [24] = 5102, [25] = 5523, [26] = 5959, [27] = 6412, [28] = 6884, [29] = 7377, [30] = 7889, [31] = 8422, [32] = 8977, [33] = 9551, [34] = 10147, [35] = 10765, [36] = 11401, [37] = 12056, [38] = 12734, [39] = 13433, [40] = 14154, [41] = 14896, [42] = 15661, [43] = 16443, [44] = 17244, [45] = 18066, [46] = 18905, [47] = 19764, [48] = 20645, [49] = 21545, [50] = 22466, [51] = 23404, [52] = 24363, [53] = 25342, [54] = 26342, [55] = 27342, [56] = 28342, [57] = 29342, [58] = 30342, [59] = 31367, [60] = 32392, [61] = 33417, [62] = 34442, [63] = 35467, [64] = 36517, [65] = 37567, [66] = 38617, [67] = 39667, [68] = 40717, [69] = 41817, [70] = 42917, [71] = 44017, [72] = 45117, [73] = 46217, [74] = 47367, [75] = 48517, [76] = 49667, [77] = 50817, [78] = 51967, [79] = 53167, [80] = 54367, [81] = 55567, [82] = 56767, [83] = 57967, [84] = 59217, [85] = 60467, [86] = 61717, [87] = 62967, [88] = 64217, [89] = 65535, [90] = 0 } --checks the mouse position during a click relative to the client and see if its within some range function get_mouse_pos(x,y,width,height) mx = input.getmouse().X my = input.getmouse().Y --input.getmouse() is already relative to client :) gui.drawRectangle(x, y, width, height, "red", nil) --So I know where the heck are the clickboxes --subtract 192, since top of bottom screen is y == 0 for mouse Y if (mx >= x and mx <= x+width) and (my >= y-192 and my <= y+height*2-192) then return true end return false end function MLA(A,B,C) --http://tasvideos.org/forum/viewtopic.php?p=489512#489512 local reslow = A * (B%0x10000) -- A multiplied with lower 16 bits of B local reshigh = A * (math.floor(B/0x10000)%0x10000) -- A multiplied with higher 16 bits of B (shifted down) reshigh = reshigh%0x10000 -- only 16 bits can matter here if result is 32 bits return (reshigh*0x10000 + reslow + C)%0x100000000 -- recombine and cut off to 32 bits end function MUL64(A,B) --http://tasvideos.org/forum/viewtopic.php?p=489523#489523 local reslow = A * (B%0x10000) -- 0x0000LLLLLLLLLLLL local reshigh = A * math.floor(B/0x10000) -- 0xHHHHHHHHHHHH0000 local reslow_lo = reslow%0x100000000 -- 0x00000000LLLLLLLL local reslow_hi = math.floor(reslow/0x100000000) -- 0x0000LLLL00000000 local reshigh_lo = reshigh%0x10000 -- 0x00000000HHHH0000 local reshigh_hi = math.floor(reshigh/0x10000) -- 0xHHHHHHHH00000000 local low32 = reshigh_lo*0x10000 + reslow_lo local high32 = reshigh_hi + reslow_hi high32 = high32 + math.floor(low32/0x100000000) -- add what carries over low32 = low32%0x100000000 -- 32 bit high32 = high32%0x100000000 -- 32 bit return low32,high32 end function rng(r0, rng1, rng2) --020461c4: e59f1050 ldr r1, [pc, #+0x50] local r1 = 0 local r2, r3 = 0,0 local r4, lr, carry = 0,0,0 local rng1_2, rng2_2 = 0, 0 r4, lr = MUL64(0x6C078965, rng1) lr = MLA(0x6C078965, rng2, lr) lr = MLA(0x5D588B65, rng1, lr) r3 = 0x00269EC3 + r4 carry = r3 > 4294967295 and 1 or 0 rng1_2 = r3 % 4294967296 --107b98 r4 = lr + carry rng2_2 = r4 --107b9c if (r0 ~= 0) then r4 = (r4 * r0) >> 0x20 end r0 = r4 return r0, rng1_2, rng2_2 end function update_battle() local start = Addresses.NPC1_Start --0x94 long for i = 0, 11 do Battle.Name_Index[i+1] = read8(start + 0x4 + (i * 0x94)) Battle.EXP[i+1] = read16(start + 0x4E + (i * 0x94)) Battle.HP[i+1] = read16(start + 0x50 + (i * 0x94)) Battle.EP[i+1] = read16(start + 0x52 + (i * 0x94)) Battle.Max_HP[i+1] = read16(start + 0x54 + (i * 0x94)) Battle.Max_EP[i+1] = read16(start + 0x56 + (i * 0x94)) Battle.Sprite_ID[i+1] = read16(start + 0x5C + (i * 0x94)) Battle.Sprite_ID2[i+1] = read8(start + 0x5D + (i * 0x94)) Battle.Sprite_Palette[i+1] = read16(start + 0x6C + (i * 0x94)) Battle.Sprite_Palette2[i+1] = read8(start + 0x6D + (i * 0x94)) Battle.LVL[i+1] = read8(start + 0x74 + (i * 0x94)) Battle.ATK[i+1] = read8(start + 0x75 + (i * 0x94)) Battle.DEF[i+1] = read8(start + 0x76 + (i * 0x94)) Battle.DEX[i+1] = read8(start + 0x77 + (i * 0x94)) Battle.AGI[i+1] = read8(start + 0x78 + (i * 0x94)) end end local image_height = 22 function display_battle() local text_x = 264 local text_y = 8 local name = "" local image_x = 0 local total_xp = 0 local total_npcs = 0 for i = 1, 13 do if NPC[Battle.Name_Index[i]] ~= 0 then if Battle.Sprite_ID[i] == NPC[Battle.Name_Index[i]].Sprite_ID then total_xp = total_xp + math.floor(Battle.EXP[i]/6) total_npcs = total_npcs + 1 if NPC[i].Name ~= nil then name = NPC[Battle.Name_Index[i]].Name image_width = math.floor(NPC[Battle.Name_Index[i]].Width/(NPC[Battle.Name_Index[i]].Height/image_height)) image_x = (image_width > 29) and text_x-12 or text_x-12+(math.abs(image_width-29)/2) image(name .. ".png", image_x, text_y, image_width, image_height) else name = "" end text(text_x + 16,text_y, string.format('%s (%d) EXP: %d', name, Battle.Name_Index[i],math.floor(Battle.EXP[i]/6))) text_y = text_y + 8 text(text_x + 16,text_y, string.format('%d LV: %d HP: %d/%d EP: %d/%d', i, Battle.LVL[i], Battle.HP[i], Battle.Max_HP[i], Battle.EP[i], Battle.Max_EP[i])) text_y = text_y + 8 text(text_x + 16,text_y, string.format('ATK: %d DEF: %d DEX: %d AGI: %d EXP: %d', Battle.ATK[i], Battle.DEF[i], Battle.DEX[i], Battle.AGI[i], Battle.EXP[i])) text_y = text_y + 8 end end end text(text_x,0, string.format("NPCS: %d Total XP: %d", total_npcs, total_xp)) end -- local toggle = {0,0,1,1,0,1,1,1,0,1} local toggle = {0,0,0,0,0,0,0,0,0,0} function display_stats() local text_x = 260 local text_y = 216 local box_y = 192; local box_x = {[1] = 0, [2] = 12, [3] = 24, [4] = 36, [5] = 48, [6] = 60, [7] = 72, [8] = 84, [9] = 96, [10] = 108}; local box_width = 8; local box_height = 8; local start = Addresses.Janis1_EXP for i = 1, 10 do if toggle[i] == 1 then local XP = read16(start + (i-1) * 0x94) local HP = read16(start + 0x2 + (i-1) * 0x94) local EP = read16(start + 0x4 + (i-1) * 0x94) local Max_HP = read16(start + 0x6 + (i-1) * 0x94) local Max_EP = read16(start + 0x8 + (i-1) * 0x94) local LVL = read8(start + 0x26 + (i-1) * 0x94) local ATK = read8(start + 0x27 + (i-1) * 0x94) local DEF = read8(start + 0x28 + (i-1) * 0x94) local DEX = read8(start + 0x29 + (i-1) * 0x94) local AGI = read8(start + 0x2A + (i-1) * 0x94) color = "yellow" text(text_x,text_y, string.format('%s', Character[i])) text_y = text_y + 8 text(text_x,text_y, string.format('LV: %d HP: %d/%d EP: %d/%d', LVL, HP, Max_HP, EP, Max_EP)) text_y = text_y + 8 text(text_x,text_y, string.format('ATK: %d DEF: %d DEX: %d AGI: %d EXP: %d', ATK, DEF, DEX, AGI, XP)) text_y = text_y + 8 else color = "green" end gui.drawRectangle(box_x[i]+text_x,box_y,box_width,box_height, color, nil) if (input.getmouse().Left and get_mouse_pos(box_x[i]+text_x,box_y,box_width,box_height)) then toggle[i] = (toggle[i] == 1 and 0 or 1) --flip them end end end --0C6E24 local i = 1 console.clear() update_battle() -- console.log(string.format('%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d', Battle.Sprite_ID[i], Battle.Sprite_ID2[i], Battle.Sprite_Palette[i], Battle.Sprite_Palette2[i], Battle.EXP[i], Battle.Max_HP[i], Battle.Max_EP[i], Battle.LVL[i], Battle.ATK[i], Battle.DEF[i], Battle.DEX[i], Battle.AGI[i])) while true do local text_x = 260 local text_y = 202 local area = read16(Addresses.Area) local x = read32(Addresses.X) local y = read32(Addresses.Y) display_stats() text(text_x, text_y, string.format('X: %d Y: %d\nArea: %d', x, y, area)) text_y = text_y + 40 -- text(text_x, text_y, string.format('MX: %d MY: %d', input.getmouse().X, input.getmouse().Y)) -- if area == 7 then update_battle() display_battle() -- end emu.frameadvance() end
Notes: 1. There's 3 Janis characters. 1st one is from the start. You're completely defenseless, and cannot escape from battle. The 2nd one is after unlocking spells. The last one has a spear. 2. Similarly, there's 2 Inuyasha's (demon/human) and 2 Shippos (with/without Kirara) 3. Every character uses the same XP to next amount. They cap at level 90 4. Attack/Charge is based on your Attack/Dex, and the opponent's DEF. However, specials like Wind Scar is entirely based on your level. Unfortunately, this means you need to grind. 5. I couldn't figure out the NPC ids, but I did record their sprite/palletehttps://docs.google.com/spreadsheets/d/13ly3T8zQA1WYVDUFytGlAuNMhFBxtflyWnkJAUxzjRA/edit?usp=sharing
Skilled player (1748)
Joined: 9/17/2009
Posts: 4998
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Ok, so I actually finally finished the game. It turns out quite a number of things in this are optional. For instance, the entire initial park event, Akagane subplot, and Sesshomaru subplot are not needed at all. In fact, after unlocking fly, you can basically head north immediately. Minimum things to do: 1. Get to Shrine 2. Reach level 2 or 3 using Giant Centipede (or else Little Devil fight later OHKOs you) 3. Head to Kaede's Village 4. Head to Mikage Creek 5. Head to Masuko Village. Maybe level? 6. Beat bosses Masuko, Usuba somehow. 7. Head to Mt. Habaki 8. Beat Poisonous Centipede (1160 HP) guarding the item 9. Head to Jinenji’s Home 10. Head to Minatori Village 11. Somehow beat Demon Puppet (2400 HP) 12. Go through Mountain Pass 13. Head to Yamasachi Village 14. Head to Abandoned Shrine, then back to Yamasachi Village 15. Somehow beat Demon of Misfortune (1230 HP) 16. Head to Sara’s Lair 17. Somehow beat Sara (2550 HP) 18. Head to Sakata Village. Immediately leave 19. Head to Inuyasha's Forest 20. Unlock flying by finding Hachi. Fly to upper right of the map to Habi Village 21. Talk to villagers (priest, then elder) to unlock going north 22. Go to Tanuki Plains to the north, then pay 300 to fly to north The difficulty now radically increases 23. Head to Susuki Plains Village 24. Head to Mt. Mansetsu Fortress 25. Save the villagers, then go through Mt. Mansetsu 26. Go to Datara's Shrine 27. Go to the far left/right to unlock both Mitsurugi's Tower and Sugagaki's Waterfall 28. Go to Mitsurugi's Tower 29. Somehow beat Mitsurugi (4400 HP; 1850 more than previous boss) 30. Head to Sugagaki's Waterfall at upper left of map 31. Somehow beat Sugagaki (4000 HP) 32. Go back to Datara's Shrine. You will be transported 500 years back in time 33. Go to Shinonome Village. Talk to Tsugumi's Mother. 34. Go to Izayoi's Mansion 35. Beat all the enemies Ninestar Demon (2150 HP), Iron-Souled Demon (2640 HP), Shrouded Demon (2020 HP) somehow 36. Reach the shrine basement 37. Beat Gorai (7800 HP) somehow 38. Go back to Shinonome Village. Go to the elder to sleep 39. Talk to the elder, then Izayoi. Head to lower left of map 40. Beat the monsters somehow 41. You're back in the present. Head to Datara's Shrine to regroup. 42. Head to Mt. Mansetsu then go through it again 43. Beat Burai (9999 HP) somehow 44. Go back to Tanuki Plains. Get Hachi to fly to Demon Fortress south 45. Go through Demon Fortress. 46. Beat Gorai again (9200 HP) followed by 2 Demon Puppets (6750 HP) 47. Leave, then go to Tanuki Forest 48. Fly to Inuyasha's Forest 49. Go to present day. Head to the park 50. Find the shrine, go through the maze to find red orb 51. Go back to Inuyasha's Forest. Fly to north Tanuki Plains, then fly north 52. Fly to Tempest Tower 53. Beat Monk Sen (8230 HP) 54. Go through the tower. You will fight Mitsurugi and Sugagaki again at the same time, both 6600 HP 55. Head to the top 56. Beat Gorai (10000 HP) and Datara (15800 HP, all stats 255) at the same time The sudden jump in difficulty means you must grind levels. The enemies XP is divided by the amount of teammates rounded down, which is usually 6 members. The best npc to grind at the start are Giant Centipedes, and I haven't figured out the rest of the route.
Skilled player (1748)
Joined: 9/17/2009
Posts: 4998
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Download Wind Scar.lua
Language: lua

local text = gui.pixelText memory.usememorydomain("Main RAM") local read8 = memory.read_u8 local read16 = memory.read_u16_le local read24 = memory.read_u24_be local read32 = memory.read_u32_le local frameadvance = emu.frameadvance local write8 = memory.write_u8 local write16 = memory.write_u16_le local write24 = memory.write_u24_be local write32 = memory.write_u32_le console.clear() --[[ First name of attack in J starts at 022079 First name of monsters for status screen at 021625 ]]-- function MLA(A,B,C) --http://tasvideos.org/forum/viewtopic.php?p=489512#489512 local reslow = A * (B%0x10000) -- A multiplied with lower 16 bits of B local reshigh = A * (math.floor(B/0x10000)%0x10000) -- A multiplied with higher 16 bits of B (shifted down) reshigh = reshigh%0x10000 -- only 16 bits can matter here if result is 32 bits return (reshigh*0x10000 + reslow + C)%0x100000000 -- recombine and cut off to 32 bits end function MUL64(A,B) --http://tasvideos.org/forum/viewtopic.php?p=489523#489523 local reslow = A * (B%0x10000) -- 0x0000LLLLLLLLLLLL local reshigh = A * math.floor(B/0x10000) -- 0xHHHHHHHHHHHH0000 local reslow_lo = reslow%0x100000000 -- 0x00000000LLLLLLLL local reslow_hi = math.floor(reslow/0x100000000) -- 0x0000LLLL00000000 local reshigh_lo = reshigh%0x10000 -- 0x00000000HHHH0000 local reshigh_hi = math.floor(reshigh/0x10000) -- 0xHHHHHHHH00000000 local low32 = reshigh_lo*0x10000 + reslow_lo local high32 = reshigh_hi + reslow_hi high32 = high32 + math.floor(low32/0x100000000) -- add what carries over low32 = low32%0x100000000 -- 32 bit high32 = high32%0x100000000 -- 32 bit return low32,high32 end function rng(r0, rng1, rng2) --020461c4: e59f1050 ldr r1, [pc, #+0x50] local r1 = 0 local r2, r3 = 0,0 local r4, lr, carry = 0,0,0 local rng1_2, rng2_2 = 0, 0 r4, lr = MUL64(0x6C078965, rng1) lr = MLA(0x6C078965, rng2, lr) lr = MLA(0x5D588B65, rng1, lr) r3 = 0x00269EC3 + r4 carry = r3 > 4294967295 and 1 or 0 rng1_2 = r3 % 4294967296 --107b98 r4 = lr + carry rng2_2 = r4 --107b9c if (r0 ~= 0) then r4 = (r4 * r0) >> 0x20 end r0 = r4 return r0, rng1_2, rng2_2 end local r0, rng1_1, rng2_1 = 0,0,0 local save = 1 local limit = 10 local level = 1 local hp = 10000 Inuyasha1_LVL = 0x0C66B8 Inuyasha1_AGI = 0x0C66BC NPC1_HP = 0x0C6E18 NPC1_MAX_HP = 0x0C6E1C RNG1 = 0x107B98 RNG2 = 0x107B9C function Wind_Scar_Bot(limit, level) local file = io.open("Wind Scar " .. level .. ".txt","w") io.output(file) io.write(string.format("RNG1\tRNG2\tDamage\n")) write8(Inuyasha1_LVL,level) write8(Inuyasha1_AGI,1) write16(NPC1_MAX_HP,hp) write16(NPC1_HP,hp) savestate.saveslot(save) local min_damage = 0 local max_damage = 0 for i = 1, limit do savestate.loadslot(save) write8(Inuyasha1_LVL,level) write16(NPC1_HP,hp) write32(RNG1,rng1_1) write32(RNG2,rng2_1) frameadvance() r0, rng1_1, rng2_1 = rng(r0, rng1_1, rng2_1) local damage = hp-read16(NPC1_HP) if min_damage == 0 then min_damage = damage else min_damage = (damage < min_damage) and damage or min_damage end if max_damage == 0 then max_damage = damage else max_damage = (damage > max_damage) and damage or max_damage end io.write(string.format("%d\t%d\t%d\n", rng1_1, rng2_1, damage)) end io.close(file) savestate.loadslot(save) return min_damage, max_damage end --loop levels, calling wind scar bot function Loop(limit1, start, level) --limit 1 is how many loops for wind scar bot --limit 2 is how many levels to loop local start_line = "Level\tMin\tMax\n" local line = "" for i = start, level do local min_damage = 0 local max_damage = 0 min_damage, max_damage = Wind_Scar_Bot(limit1,i) line = line .. string.format("%d\t%d\t%d\n",i, min_damage, max_damage) end local file = io.open("Wind Scar damage.txt","w") io.output(file) io.write(string.format("Level\tMin\tMax\n")) io.write(line) io.close(file) end Loop(1000, 1, 90) client.pause()
I made a script that I ran right before damage was dealt using Wind Scar. It appears damage from Wind Scar is solely based on Inuyasha's level, independent of his attack stats, nor enemy's defence. It never misses, and it does not seem criticals are a thing. Edit: The rng values and the resultant damage doesn't match for some reason.
Skilled player (1748)
Joined: 9/17/2009
Posts: 4998
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Based on the trace logs and Ghidra, I made a prediction script for Wind Scar. Download Wind Scar Damage.lua
Language: lua

--[[ 02008d04: e3a0100f mov r1, #0xF r0:432f0000 r1:00000094 r2:020c6468 r3:00000250 r4:0000000f r5:000000af r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00269ec3 SP:027e3748 LR:02008cf8 PC:02008d0c Cy:39999750071 ARM9 Get inuyashas level 02008d08: e7d22003 ldrb r2, [r2, r3, lsl #0] r0:432f0000 r1:0000000f r2:020c6468 r3:00000250 r4:0000000f r5:000000af r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00269ec3 SP:027e3748 LR:02008cf8 PC:02008d10 Cy:39999750071 ARM9 02008d0c: e1a05000 mov r5, r0, lsl #0 r0:432f0000 r1:0000000f r2:0000005a r3:00000250 r4:0000000f r5:000000af r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00269ec3 SP:027e3748 LR:02008cf8 PC:02008d14 Cy:39999750073 ARM9 02008d10: e0000192 mul r0, r2, r1 r0:432f0000 r1:0000000f r2:0000005a r3:00000250 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00269ec3 SP:027e3748 LR:02008cf8 PC:02008d18 Cy:39999750073 ARM9 02008d14: e2800055 add r0, r0, #0x55 r0:00000546 r1:0000000f r2:0000005a r3:00000250 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00269ec3 SP:027e3748 LR:02008cf8 PC:02008d1c Cy:39999750074 ARM9 02008d18: eb017fd1 bl #0x5FF4C r0:0000059b r1:0000000f r2:0000005a r3:00000250 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00269ec3 SP:027e3748 LR:02008cf8 PC:02008d20 Cy:39999750075 ARM9 r0 = 0xF x inuyashas level + 0x55 02068c64: e2102102 ands r2, r0, #0x80000000 r0:0000059b r1:0000000f r2:0000005a r3:00000250 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00269ec3 SP:027e3748 LR:02008d1c PC:02068c6c Cy:39999750077 ARM9 02068c68: 42600000 rsbmi r0, r0, #0x0 r0:0000059b r1:0000000f r2:00000000 r3:00000250 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00269ec3 SP:027e3748 LR:02008d1c PC:02068c70 Cy:39999750077 ARM9 02068c6c: e3500000 cmp r0, #0x0 r0:0000059b r1:0000000f r2:00000000 r3:00000250 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00269ec3 SP:027e3748 LR:02008d1c PC:02068c74 Cy:39999750078 ARM9 02068c70: 012fff1e bxeq lr r0:0000059b r1:0000000f r2:00000000 r3:00000250 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00269ec3 SP:027e3748 LR:02008d1c PC:02068c78 Cy:39999750078 ARM9 02068c74: e16f3f10 clz r3, r0 r0:0000059b r1:0000000f r2:00000000 r3:00000250 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00269ec3 SP:027e3748 LR:02008d1c PC:02068c7c Cy:39999750079 ARM9 02068c78: e1b00310 movs r0, r0, lsl r3 r0:0000059b r1:0000000f r2:00000000 r3:00000015 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00269ec3 SP:027e3748 LR:02008d1c PC:02068c80 Cy:39999750079 ARM9 02068c7c: e263309e rsb r3, r3, #0x9E r0:b3600000 r1:0000000f r2:00000000 r3:00000015 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00269ec3 SP:027e3748 LR:02008d1c PC:02068c84 Cy:39999750081 ARM9 02068c80: e21010ff ands r1, r0, #0xFF r0:b3600000 r1:0000000f r2:00000000 r3:00000089 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00269ec3 SP:027e3748 LR:02008d1c PC:02068c88 Cy:39999750082 ARM9 02068c84: e0800000 add r0, r0, r0, lsl #0 r0:b3600000 r1:00000000 r2:00000000 r3:00000089 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00269ec3 SP:027e3748 LR:02008d1c PC:02068c8c Cy:39999750082 ARM9 02068c88: e18204a0 orr r0, r2, r0, lsr #9 r0:66c00000 r1:00000000 r2:00000000 r3:00000089 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00269ec3 SP:027e3748 LR:02008d1c PC:02068c90 Cy:39999750083 ARM9 02068c8c: e1800b83 orr r0, r0, r3, lsl #23 r0:00336000 r1:00000000 r2:00000000 r3:00000089 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00269ec3 SP:027e3748 LR:02008d1c PC:02068c94 Cy:39999750083 ARM9 02068c90: 012fff1e bxeq lr r0:44b36000 r1:00000000 r2:00000000 r3:00000089 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00269ec3 SP:027e3748 LR:02008d1c PC:02068c98 Cy:39999750084 ARM9 ]]-- function Count_Leading_Zeroes(num) --given a number, count the amount of 0s to the left of it in terms of binary local shifts = 0 while num ~= 0 do num = num >> 1 shifts = shifts + 1 end return 32 - shifts end function MLA(A,B,C) --http://tasvideos.org/forum/viewtopic.php?p=489512#489512 local reslow = A * (B%0x10000) -- A multiplied with lower 16 bits of B local reshigh = A * (math.floor(B/0x10000)%0x10000) -- A multiplied with higher 16 bits of B (shifted down) reshigh = reshigh%0x10000 -- only 16 bits can matter here if result is 32 bits return (reshigh*0x10000 + reslow + C)%0x100000000 -- recombine and cut off to 32 bits end function MUL64(A,B) --http://tasvideos.org/forum/viewtopic.php?p=489523#489523 local reslow = A * (B%0x10000) -- 0x0000LLLLLLLLLLLL local reshigh = A * math.floor(B/0x10000) -- 0xHHHHHHHHHHHH0000 local reslow_lo = reslow%0x100000000 -- 0x00000000LLLLLLLL local reslow_hi = math.floor(reslow/0x100000000) -- 0x0000LLLL00000000 local reshigh_lo = reshigh%0x10000 -- 0x00000000HHHH0000 local reshigh_hi = math.floor(reshigh/0x10000) -- 0xHHHHHHHH00000000 local low32 = reshigh_lo*0x10000 + reslow_lo local high32 = reshigh_hi + reslow_hi high32 = high32 + math.floor(low32/0x100000000) -- add what carries over low32 = low32%0x100000000 -- 32 bit high32 = high32%0x100000000 -- 32 bit return low32,high32 end function rng(r0, rng1, rng2) --020461c4: e59f1050 ldr r1, [pc, #+0x50] local r1 = 0 local r2, r3 = 0,0 local r4, lr, carry = 0,0,0 local rng1_2, rng2_2 = 0, 0 r4, lr = MUL64(0x6C078965, rng1) lr = MLA(0x6C078965, rng2, lr) lr = MLA(0x5D588B65, rng1, lr) r3 = 0x00269EC3 + r4 carry = r3 > 4294967295 and 1 or 0 rng1_2 = r3 % 4294967296 --107b98 r4 = lr + carry rng2_2 = r4 --107b9c if (r0 ~= 0) then r4 = (r4 * r0) >> 0x20 end r0 = r4 return r0, rng1_2, rng2_2 end function FUN_02068c64_Skill(r0) --02068c90: 012fff1e bxeq lr always branches for skills local r2 = r0 & 0x80000000 --why lol if r2 < 0 then r0 = -1* r0 end if r0 == 0 then return 0 end local r3 = Count_Leading_Zeroes(r0) r0 = r0 << r3 r3 = 0x9E - r3 --local r1 = r0 & 0xFF r0 = (r0 + r0) & 0xFFFFFFFF --make sure it doesnt set bit 32 in lua r0 = r0 >> 9 --r2 is 0, so you can pretend it doesnt exist r0 = r0 | (r3 << 23) return r0 end console.clear() -- local value = 0x87 -- console.log(bizstring.hex(FUN_02068c64_Skill(value))) -- console.log(bizstring.hex((FUN_02068c64_Skill(value) >> 23) & 0xFF)) local Attack = { --value for FUN_02068c64 [1] = {Name = "Attack", EP = 1, Value = 0x00}, [2] = {Name = "Charge", EP = 2, Value = 0}, [3] = {Name = "Shoot", EP = 1, Value = 0}, [4] = {Name = "Defense", EP = 0, Value = 0}, [6] = {Name = "?", EP = 0, Value = 0}, [7] = {Name = "?", EP = 0, Value = 0}, [8] = {Name = "?", EP = 0, Value = 0}, [9] = {Name = "?", EP = 0, Value = 0}, [10] = {Name = "Spirit Up", EP = 0, Value = 0}, [11] = {Name = "Item", EP = 0, Value = 0}, [12] = {Name = "?", EP = 0, Value = 0}, [13] = {Name = "Lightning Arrow", EP = 2, Value = 0x7B}, [14] = {Name = "Infernal Meteor", EP = 3, Value = 0x64}, [15] = {Name = "Heavenly Essence",EP = 3, Value = 0}, --heals [16] = {Name = "Power Leaf", EP = 2, Value = 0}, --boost attack for 3 turns [17] = {Name = "Iron Reaver", EP = 2, Value = 0x5F}, [18] = {Name = "Blades Of Blood", EP = 3, Value = 0x5A}, [19] = {"Wind Scar", EP = 4, Value = 0xAF}, [20] = {Name = "Backlash Wave", EP = 5, Value = 0xBE}, [21] = {Name = "Sacred Arrow", EP = 3, Value = 0x87}, [22] = {Name = "Purifying Light", EP = 3, Value = 0}, --Heals status [23] = {Name = "Divine Barrier", EP = 3, Value = 0}, [24] = {Name = "Wind Tunnel", EP = 5, Value = 0}, [25] = {Name = "Healing Sutra", EP = 3, Value = 0}, [26] = {Name = "Sealing Barrier", EP = 4, Value = 0}, [27] = {Name = "Binding Sutra", EP = 3, Value = 0}, [28] = {Name = "Fury Of Taishaku", EP = 3, Value = 0x6E}, [29] = {Name = "Hiraikotsu", EP = 3, Value = 0x82}, [30] = {Name = "Great Cannon", EP = 3, Value = 0x5A}, [31] = {Name = "Fox Fire", EP = 1, Value = 0x41}, [32] = {Name = "Smashing Top", EP = 2, Value = 0x50}, [33] = {Name = "Smoke Illusion", EP = 2, Value = 0} } --[[ 02068cac: e0202001 eor r2, r0, r1, lsl #0 r0:432f0000 r1:44b36000 r2:00000000 r3:00000089 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00269ec3 SP:027e3748 LR:02008d28 PC:02068cb4 Cy:39999750090 ARM9 02068cb0: e2022102 and r2, r2, #0x80000000 r0:432f0000 r1:44b36000 r2:079c6000 r3:00000089 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00269ec3 SP:027e3748 LR:02008d28 PC:02068cb8 Cy:39999750090 ARM9 02068cb4: e3a0c0ff mov r12, #0xFF r0:432f0000 r1:44b36000 r2:00000000 r3:00000089 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00269ec3 SP:027e3748 LR:02008d28 PC:02068cbc Cy:39999750091 ARM9 02068cb8: e01c3ba0 ands r3, r12, r0, lsr #23 r0:432f0000 r1:44b36000 r2:00000000 r3:00000089 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:000000ff SP:027e3748 LR:02008d28 PC:02068cc0 Cy:39999750091 ARM9 02068cbc: e1a00400 mov r0, r0, lsl #8 r0:432f0000 r1:44b36000 r2:00000000 r3:00000086 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:000000ff SP:027e3748 LR:02008d28 PC:02068cc4 Cy:39999750093 ARM9 02068cc0: 135300ff cmpne r3, #0xFF r0:2f000000 r1:44b36000 r2:00000000 r3:00000086 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:000000ff SP:027e3748 LR:02008d28 PC:02068cc8 Cy:39999750093 ARM9 02068cc4: 0a000017 beq #0x64 r0:2f000000 r1:44b36000 r2:00000000 r3:00000086 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:000000ff SP:027e3748 LR:02008d28 PC:02068ccc Cy:39999750094 ARM9 02068cc8: e3800102 orr r0, r0, #0x80000000 r0:2f000000 r1:44b36000 r2:00000000 r3:00000086 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:000000ff SP:027e3748 LR:02008d28 PC:02068cd0 Cy:39999750094 ARM9 02068ccc: e01ccba1 ands r12, r12, r1, lsr #23 r0:af000000 r1:44b36000 r2:00000000 r3:00000086 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:000000ff SP:027e3748 LR:02008d28 PC:02068cd4 Cy:39999750095 ARM9 02068cd0: e1a01401 mov r1, r1, lsl #8 r0:af000000 r1:44b36000 r2:00000000 r3:00000086 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000089 SP:027e3748 LR:02008d28 PC:02068cd8 Cy:39999750095 ARM9 02068cd4: 135c00ff cmpne r12, #0xFF r0:af000000 r1:b3600000 r2:00000000 r3:00000086 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000089 SP:027e3748 LR:02008d28 PC:02068cdc Cy:39999750096 ARM9 02068cd8: 0a000022 beq #0x90 r0:af000000 r1:b3600000 r2:00000000 r3:00000086 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000089 SP:027e3748 LR:02008d28 PC:02068ce0 Cy:39999750096 ARM9 02068cdc: e3811102 orr r1, r1, #0x80000000 r0:af000000 r1:b3600000 r2:00000000 r3:00000086 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000089 SP:027e3748 LR:02008d28 PC:02068ce4 Cy:39999750098 ARM9 02068ce0: e083c00c add r12, r3, r12, lsl #0 r0:af000000 r1:b3600000 r2:00000000 r3:00000086 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000089 SP:027e3748 LR:02008d28 PC:02068ce8 Cy:39999750098 ARM9 02068ce4: e0831190 umull r1, r3, r0, r1 r0:af000000 r1:b3600000 r2:00000000 r3:00000086 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000010f SP:027e3748 LR:02008d28 PC:02068cec Cy:39999750099 ARM9 02068ce8: e1b00003 movs r0, r3, lsl #0 r0:af000000 r1:00000000 r2:00000000 r3:7a9ea000 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000010f SP:027e3748 LR:02008d28 PC:02068cf0 Cy:39999750100 ARM9 02068cec: 50800000 addpl r0, r0, r0, lsl #0 r0:7a9ea000 r1:00000000 r2:00000000 r3:7a9ea000 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000010f SP:027e3748 LR:02008d28 PC:02068cf4 Cy:39999750100 ARM9 02068cf0: 524cc001 subpl r12, r12, #0x1 r0:f53d4000 r1:00000000 r2:00000000 r3:7a9ea000 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000010f SP:027e3748 LR:02008d28 PC:02068cf8 Cy:39999750101 ARM9 02068cf4: e25cc07f subs r12, r12, #0x7F r0:f53d4000 r1:00000000 r2:00000000 r3:7a9ea000 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000010e SP:027e3748 LR:02008d28 PC:02068cfc Cy:39999750101 ARM9 02068cf8: 4a00003d bmi #0xFC r0:f53d4000 r1:00000000 r2:00000000 r3:7a9ea000 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000008f SP:027e3748 LR:02008d28 PC:02068d00 Cy:39999750102 ARM9 02068cfc: e35c00fe cmp r12, #0xFE r0:f53d4000 r1:00000000 r2:00000000 r3:7a9ea000 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000008f SP:027e3748 LR:02008d28 PC:02068d04 Cy:39999750103 ARM9 02068d00: aa000056 bge #0x160 r0:f53d4000 r1:00000000 r2:00000000 r3:7a9ea000 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000008f SP:027e3748 LR:02008d28 PC:02068d08 Cy:39999750104 ARM9 02068d04: e21030ff ands r3, r0, #0xFF r0:f53d4000 r1:00000000 r2:00000000 r3:7a9ea000 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000008f SP:027e3748 LR:02008d28 PC:02068d0c Cy:39999750104 ARM9 02068d08: e1820420 orr r0, r2, r0, lsr #8 r0:f53d4000 r1:00000000 r2:00000000 r3:00000000 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000008f SP:027e3748 LR:02008d28 PC:02068d10 Cy:39999750105 ARM9 02068d0c: e0800b8c add r0, r0, r12, lsl #23 r0:00f53d40 r1:00000000 r2:00000000 r3:00000000 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000008f SP:027e3748 LR:02008d28 PC:02068d14 Cy:39999750105 ARM9 02068d10: e3130080 tst r3, #0x80 r0:48753d40 r1:00000000 r2:00000000 r3:00000000 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000008f SP:027e3748 LR:02008d28 PC:02068d18 Cy:39999750106 ARM9 02068d14: 012fff1e bxeq lr r0:48753d40 r1:00000000 r2:00000000 r3:00000000 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000008f SP:027e3748 LR:02008d28 PC:02068d1c Cy:39999750106 ARM9 02068cac: e0202001 eor r2, r0, r1, lsl #0 r0:451cf400 r1:3f666666 r2:01680000 r3:00e66666 r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:00000006 SP:027e3748 LR:02008d50 PC:02068cb4 Cy:39999750301 ARM9 02068cb0: e2022102 and r2, r2, #0x80000000 r0:451cf400 r1:3f666666 r2:7a7a9266 r3:00e66666 r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:00000006 SP:027e3748 LR:02008d50 PC:02068cb8 Cy:39999750301 ARM9 02068cb4: e3a0c0ff mov r12, #0xFF r0:451cf400 r1:3f666666 r2:00000000 r3:00e66666 r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:00000006 SP:027e3748 LR:02008d50 PC:02068cbc Cy:39999750302 ARM9 02068cb8: e01c3ba0 ands r3, r12, r0, lsr #23 r0:451cf400 r1:3f666666 r2:00000000 r3:00e66666 r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:000000ff SP:027e3748 LR:02008d50 PC:02068cc0 Cy:39999750302 ARM9 02068cbc: e1a00400 mov r0, r0, lsl #8 r0:451cf400 r1:3f666666 r2:00000000 r3:0000008a r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:000000ff SP:027e3748 LR:02008d50 PC:02068cc4 Cy:39999750304 ARM9 02068cc0: 135300ff cmpne r3, #0xFF r0:1cf40000 r1:3f666666 r2:00000000 r3:0000008a r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:000000ff SP:027e3748 LR:02008d50 PC:02068cc8 Cy:39999750304 ARM9 02068cc4: 0a000017 beq #0x64 r0:1cf40000 r1:3f666666 r2:00000000 r3:0000008a r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:000000ff SP:027e3748 LR:02008d50 PC:02068ccc Cy:39999750305 ARM9 02068cc8: e3800102 orr r0, r0, #0x80000000 r0:1cf40000 r1:3f666666 r2:00000000 r3:0000008a r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:000000ff SP:027e3748 LR:02008d50 PC:02068cd0 Cy:39999750305 ARM9 02068ccc: e01ccba1 ands r12, r12, r1, lsr #23 r0:9cf40000 r1:3f666666 r2:00000000 r3:0000008a r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:000000ff SP:027e3748 LR:02008d50 PC:02068cd4 Cy:39999750306 ARM9 02068cd0: e1a01401 mov r1, r1, lsl #8 r0:9cf40000 r1:3f666666 r2:00000000 r3:0000008a r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:0000007e SP:027e3748 LR:02008d50 PC:02068cd8 Cy:39999750306 ARM9 02068cd4: 135c00ff cmpne r12, #0xFF r0:9cf40000 r1:66666600 r2:00000000 r3:0000008a r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:0000007e SP:027e3748 LR:02008d50 PC:02068cdc Cy:39999750307 ARM9 02068cd8: 0a000022 beq #0x90 r0:9cf40000 r1:66666600 r2:00000000 r3:0000008a r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:0000007e SP:027e3748 LR:02008d50 PC:02068ce0 Cy:39999750307 ARM9 02068cdc: e3811102 orr r1, r1, #0x80000000 r0:9cf40000 r1:66666600 r2:00000000 r3:0000008a r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:0000007e SP:027e3748 LR:02008d50 PC:02068ce4 Cy:39999750309 ARM9 02068ce0: e083c00c add r12, r3, r12, lsl #0 r0:9cf40000 r1:e6666600 r2:00000000 r3:0000008a r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:0000007e SP:027e3748 LR:02008d50 PC:02068ce8 Cy:39999750309 ARM9 02068ce4: e0831190 umull r1, r3, r0, r1 r0:9cf40000 r1:e6666600 r2:00000000 r3:0000008a r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:00000108 SP:027e3748 LR:02008d50 PC:02068cec Cy:39999750310 ARM9 02068ce8: e1b00003 movs r0, r3, lsl #0 r0:9cf40000 r1:38000000 r2:00000000 r3:8d41ffc1 r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:00000108 SP:027e3748 LR:02008d50 PC:02068cf0 Cy:39999750311 ARM9 02068cec: 50800000 addpl r0, r0, r0, lsl #0 r0:8d41ffc1 r1:38000000 r2:00000000 r3:8d41ffc1 r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:00000108 SP:027e3748 LR:02008d50 PC:02068cf4 Cy:39999750311 ARM9 02068cf0: 524cc001 subpl r12, r12, #0x1 r0:8d41ffc1 r1:38000000 r2:00000000 r3:8d41ffc1 r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:00000108 SP:027e3748 LR:02008d50 PC:02068cf8 Cy:39999750312 ARM9 02068cf4: e25cc07f subs r12, r12, #0x7F r0:8d41ffc1 r1:38000000 r2:00000000 r3:8d41ffc1 r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:00000108 SP:027e3748 LR:02008d50 PC:02068cfc Cy:39999750312 ARM9 02068cf8: 4a00003d bmi #0xFC r0:8d41ffc1 r1:38000000 r2:00000000 r3:8d41ffc1 r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:00000089 SP:027e3748 LR:02008d50 PC:02068d00 Cy:39999750313 ARM9 02068cfc: e35c00fe cmp r12, #0xFE r0:8d41ffc1 r1:38000000 r2:00000000 r3:8d41ffc1 r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:00000089 SP:027e3748 LR:02008d50 PC:02068d04 Cy:39999750314 ARM9 02068d00: aa000056 bge #0x160 r0:8d41ffc1 r1:38000000 r2:00000000 r3:8d41ffc1 r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:00000089 SP:027e3748 LR:02008d50 PC:02068d08 Cy:39999750315 ARM9 02068d04: e21030ff ands r3, r0, #0xFF r0:8d41ffc1 r1:38000000 r2:00000000 r3:8d41ffc1 r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:00000089 SP:027e3748 LR:02008d50 PC:02068d0c Cy:39999750315 ARM9 02068d08: e1820420 orr r0, r2, r0, lsr #8 r0:8d41ffc1 r1:38000000 r2:00000000 r3:000000c1 r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:00000089 SP:027e3748 LR:02008d50 PC:02068d10 Cy:39999750316 ARM9 02068d0c: e0800b8c add r0, r0, r12, lsl #23 r0:008d41ff r1:38000000 r2:00000000 r3:000000c1 r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:00000089 SP:027e3748 LR:02008d50 PC:02068d14 Cy:39999750316 ARM9 02068d10: e3130080 tst r3, #0x80 r0:450d41ff r1:38000000 r2:00000000 r3:000000c1 r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:00000089 SP:027e3748 LR:02008d50 PC:02068d18 Cy:39999750317 ARM9 02068d14: 012fff1e bxeq lr r0:450d41ff r1:38000000 r2:00000000 r3:000000c1 r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:00000089 SP:027e3748 LR:02008d50 PC:02068d1c Cy:39999750317 ARM9 02068d18: e1911c83 orrs r1, r1, r3, lsl #25 r0:450d41ff r1:38000000 r2:00000000 r3:000000c1 r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:00000089 SP:027e3748 LR:02008d50 PC:02068d20 Cy:39999750318 ARM9 02068d1c: 02103001 andseq r3, r0, #0x1 r0:450d41ff r1:ba000000 r2:00000000 r3:000000c1 r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:00000089 SP:027e3748 LR:02008d50 PC:02068d24 Cy:39999750319 ARM9 02068d20: 12800001 addne r0, r0, #0x1 r0:450d41ff r1:ba000000 r2:00000000 r3:000000c1 r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:00000089 SP:027e3748 LR:02008d50 PC:02068d28 Cy:39999750320 ARM9 02068d24: e12fff1e bx lr r0:450d4200 r1:ba000000 r2:00000000 r3:000000c1 r4:00000000 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4044bebb r10:0000003c r11:fffffc00 r12:00000089 SP:027e3748 LR:02008d50 PC:02068d2c Cy:39999750320 ARM9 ]]-- function FUN_02068cac_Skill(r0, r1) --r0 is from AF --r1 is from inuyashas level formula local r2 = (r0 ~ r1) & 0x80000000 local r12 = 0xFF local r3 = (r0 >> 23) & r12 r0 = (r0 << 8) & 0xFFFFFFFF --make sure it remains 32 bit -- r0 is related to those hard coded values for skills. checking every case, it appears this branch never gets taken -- if r3 == 0 or r3 == 0xFF then -- end r0 = r0 | 0x80000000 r12 = (r1 >> 23) & r12 r1 = (r1 << 8) & 0xFFFFFFFF --make sure it remains 32 bit -- r1 is related to player level. checking every case, it appears this branch never gets taken -- if r12 == 0 or r12 == 0xFF then -- end r1 = r1 | 0x80000000 r12 = r3 + r12 --02068ce4: e0831190 umull r1, r3, r0, r1 r1, r3 = MUL64(r0, r1) r0 = r3 if bit.check(r0, 31) == false then --check if sign bit set r0 = (r0 + r0) & 0xFFFFFFFF --make sure it remains 32 bit r12 = r12 - 1 -- else --debug -- console.log("FUN_02068cac_Skill") -- console.log(string.format("r0: 0x%08X r1: 0x%08X",r0, r1)) end r12 = r12 - 0x7F -- if r12 < 0 then -- end if r12 >= 0xFE then r0 = r2 | 0x7F800000 return r0 end r3 = r0 & 0xFF r0 = r2 | (r0 >> 8) r0 = (r0 + (r12 << 23)) & 0xFFFFFFFF --make sure it remains 32 bit if (r3 & 0x80) == 0 then return r0 else r1 = r1 | (r3 << 0x19) r3 = r0 & 0x1 r0 = r0 + 0x1 return r0 end end --[[ 020687ac: e92d4000 stmdb sp!, {lr} r0:48753d40 r1:42c80000 r2:00000000 r3:00000000 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000008f SP:027e3748 LR:02008d30 PC:020687b4 Cy:39999750112 ARM9 020687b0: e3a0c0ff mov r12, #0xFF r0:48753d40 r1:42c80000 r2:00000000 r3:00000000 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000008f SP:027e3744 LR:02008d30 PC:020687b8 Cy:39999750112 ARM9 020687b4: e01c3ba0 ands r3, r12, r0, lsr #23 r0:48753d40 r1:42c80000 r2:00000000 r3:00000000 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:000000ff SP:027e3744 LR:02008d30 PC:020687bc Cy:39999750113 ARM9 020687b8: 135300ff cmpne r3, #0xFF r0:48753d40 r1:42c80000 r2:00000000 r3:00000090 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:000000ff SP:027e3744 LR:02008d30 PC:020687c0 Cy:39999750113 ARM9 020687bc: 0a00006f beq #0x1C4 r0:48753d40 r1:42c80000 r2:00000000 r3:00000090 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:000000ff SP:027e3744 LR:02008d30 PC:020687c4 Cy:39999750115 ARM9 020687c0: e01ccba1 ands r12, r12, r1, lsr #23 r0:48753d40 r1:42c80000 r2:00000000 r3:00000090 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:000000ff SP:027e3744 LR:02008d30 PC:020687c8 Cy:39999750115 ARM9 020687c4: 135c00ff cmpne r12, #0xFF r0:48753d40 r1:42c80000 r2:00000000 r3:00000090 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:02008d30 PC:020687cc Cy:39999750116 ARM9 020687c8: 0a00007b beq #0x1F4 r0:48753d40 r1:42c80000 r2:00000000 r3:00000090 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:02008d30 PC:020687d0 Cy:39999750116 ARM9 020687cc: e3811502 orr r1, r1, #0x800000 r0:48753d40 r1:42c80000 r2:00000000 r3:00000090 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:02008d30 PC:020687d4 Cy:39999750117 ARM9 020687d0: e3800502 orr r0, r0, #0x800000 r0:48753d40 r1:42c80000 r2:00000000 r3:00000090 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:02008d30 PC:020687d8 Cy:39999750117 ARM9 020687d4: e3c024ff bic r2, r0, #0xFF000000 r0:48f53d40 r1:42c80000 r2:00000000 r3:00000090 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:02008d30 PC:020687dc Cy:39999750118 ARM9 020687d8: e3c1e4ff bic lr, r1, #0xFF000000 r0:48f53d40 r1:42c80000 r2:00f53d40 r3:00000090 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:02008d30 PC:020687e0 Cy:39999750118 ARM9 020687dc: e152000e cmp r2, lr, lsl #0 r0:48f53d40 r1:42c80000 r2:00f53d40 r3:00000090 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:00c80000 PC:020687e4 Cy:39999750120 ARM9 020687e0: 31a02082 movcc r2, r2, lsl #1 r0:48f53d40 r1:42c80000 r2:00f53d40 r3:00000090 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:00c80000 PC:020687e8 Cy:39999750120 ARM9 020687e4: 32433001 subcc r3, r3, #0x1 r0:48f53d40 r1:42c80000 r2:00f53d40 r3:00000090 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:00c80000 PC:020687ec Cy:39999750121 ARM9 020687e8: e1300001 teq r0, r1, lsl #0 r0:48f53d40 r1:42c80000 r2:00f53d40 r3:00000090 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:00c80000 PC:020687f0 Cy:39999750121 ARM9 020687ec: e24f0094 sub r0, pc, #0x94 r0:48f53d40 r1:42c80000 r2:00f53d40 r3:00000090 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:00c80000 PC:020687f4 Cy:39999750122 ARM9 020687f0: e7d017ae ldrb r1, [r0, lr, lsr #15] r0:02068760 r1:42c80000 r2:00f53d40 r3:00000090 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:00c80000 PC:020687f8 Cy:39999750122 ARM9 020687f4: e26ee000 rsb lr, lr, #0x0 r0:02068760 r1:000000a4 r2:00f53d40 r3:00000090 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:00c80000 PC:020687fc Cy:39999750124 ARM9 020687f8: e1a000ce mov r0, lr, asr #1 r0:02068760 r1:000000a4 r2:00f53d40 r3:00000090 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:ff380000 PC:02068800 Cy:39999750124 ARM9 020687fc: e0000091 mul r0, r1, r0 r0:ff9c0000 r1:000000a4 r2:00f53d40 r3:00000090 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:ff380000 PC:02068804 Cy:39999750126 ARM9 02068800: e2800102 add r0, r0, #0x80000000 r0:bff00000 r1:000000a4 r2:00f53d40 r3:00000090 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:ff380000 PC:02068808 Cy:39999750127 ARM9 02068804: e1a00320 mov r0, r0, lsr #6 r0:3ff00000 r1:000000a4 r2:00f53d40 r3:00000090 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:ff380000 PC:0206880c Cy:39999750127 ARM9 02068808: e0000091 mul r0, r1, r0 r0:00ffc000 r1:000000a4 r2:00f53d40 r3:00000090 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:ff380000 PC:02068810 Cy:39999750128 ARM9 0206880c: e1a00720 mov r0, r0, lsr #14 r0:a3d70000 r1:000000a4 r2:00f53d40 r3:00000090 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:ff380000 PC:02068814 Cy:39999750129 ARM9 02068810: e001009e mul r1, lr, r0 r0:00028f5c r1:000000a4 r2:00f53d40 r3:00000090 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:ff380000 PC:02068818 Cy:39999750129 ARM9 02068814: e043c00c sub r12, r3, r12, lsl #0 r0:00028f5c r1:00200000 r2:00f53d40 r3:00000090 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:ff380000 PC:0206881c Cy:39999750130 ARM9 02068818: e1a01621 mov r1, r1, lsr #12 r0:00028f5c r1:00200000 r2:00f53d40 r3:00000090 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000000b SP:027e3744 LR:ff380000 PC:02068820 Cy:39999750131 ARM9 0206881c: e0010190 mul r1, r0, r1 r0:00028f5c r1:00000200 r2:00f53d40 r3:00000090 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000000b SP:027e3744 LR:ff380000 PC:02068824 Cy:39999750132 ARM9 02068820: e1a00700 mov r0, r0, lsl #14 r0:00028f5c r1:051eb800 r2:00f53d40 r3:00000090 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000000b SP:027e3744 LR:ff380000 PC:02068828 Cy:39999750133 ARM9 02068824: e08007a1 add r0, r0, r1, lsr #15 r0:a3d70000 r1:051eb800 r2:00f53d40 r3:00000090 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000000b SP:027e3744 LR:ff380000 PC:0206882c Cy:39999750134 ARM9 02068828: e0801092 umull r1, r0, r2, r0 r0:a3d70a3d r1:051eb800 r2:00f53d40 r3:00000090 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000000b SP:027e3744 LR:ff380000 PC:02068830 Cy:39999750134 ARM9 0206882c: e1a03000 mov r3, r0, lsl #0 r0:009cf3ff r1:ff941840 r2:00f53d40 r3:00000090 r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000000b SP:027e3744 LR:ff380000 PC:02068834 Cy:39999750135 ARM9 02068830: 43800102 orrmi r0, r0, #0x80000000 r0:009cf3ff r1:ff941840 r2:00f53d40 r3:009cf3ff r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000000b SP:027e3744 LR:ff380000 PC:02068838 Cy:39999750136 ARM9 02068834: e29cc07e adds r12, r12, #0x7E r0:009cf3ff r1:ff941840 r2:00f53d40 r3:009cf3ff r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000000b SP:027e3744 LR:ff380000 PC:0206883c Cy:39999750136 ARM9 02068838: 4a000091 bmi #0x24C r0:009cf3ff r1:ff941840 r2:00f53d40 r3:009cf3ff r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000089 SP:027e3744 LR:ff380000 PC:02068840 Cy:39999750137 ARM9 0206883c: e35c00fe cmp r12, #0xFE r0:009cf3ff r1:ff941840 r2:00f53d40 r3:009cf3ff r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000089 SP:027e3744 LR:ff380000 PC:02068844 Cy:39999750138 ARM9 02068840: aa0000bc bge #0x2F8 r0:009cf3ff r1:ff941840 r2:00f53d40 r3:009cf3ff r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000089 SP:027e3744 LR:ff380000 PC:02068848 Cy:39999750139 ARM9 02068844: e0800b8c add r0, r0, r12, lsl #23 r0:009cf3ff r1:ff941840 r2:00f53d40 r3:009cf3ff r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000089 SP:027e3744 LR:ff380000 PC:0206884c Cy:39999750139 ARM9 02068848: e1a0ce21 mov r12, r1, lsr #28 r0:451cf3ff r1:ff941840 r2:00f53d40 r3:009cf3ff r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000089 SP:027e3744 LR:ff380000 PC:02068850 Cy:39999750140 ARM9 0206884c: e35c0007 cmp r12, #0x7 r0:451cf3ff r1:ff941840 r2:00f53d40 r3:009cf3ff r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000000f SP:027e3744 LR:ff380000 PC:02068854 Cy:39999750140 ARM9 02068850: 0a000042 beq #0x110 r0:451cf3ff r1:ff941840 r2:00f53d40 r3:009cf3ff r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000000f SP:027e3744 LR:ff380000 PC:02068858 Cy:39999750141 ARM9 02068854: e0800fa1 add r0, r0, r1, lsr #31 r0:451cf3ff r1:ff941840 r2:00f53d40 r3:009cf3ff r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000000f SP:027e3744 LR:ff380000 PC:0206885c Cy:39999750141 ARM9 02068858: e8bd4000 ldmia sp!, {lr} r0:451cf400 r1:ff941840 r2:00f53d40 r3:009cf3ff r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000000f SP:027e3744 LR:ff380000 PC:02068860 Cy:39999750142 ARM9 0206885c: e12fff1e bx lr r0:451cf400 r1:ff941840 r2:00f53d40 r3:009cf3ff r4:0000000f r5:432f0000 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000000f SP:027e3748 LR:02008d30 PC:02068864 Cy:39999750143 ARM9 ]]-- --[[ 0206884c: e35c0007 cmp r12, #0x7 succeeded 020687ac: e92d4000 stmdb sp!, {lr} r0:42d40000 r1:42c80000 r2:00000000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000019 SP:027e3748 LR:02008d44 PC:020687b4 Cy:39263661161 ARM9 020687b0: e3a0c0ff mov r12, #0xFF r0:42d40000 r1:42c80000 r2:00000000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000019 SP:027e3744 LR:02008d44 PC:020687b8 Cy:39263661161 ARM9 020687b4: e01c3ba0 ands r3, r12, r0, lsr #23 r0:42d40000 r1:42c80000 r2:00000000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:000000ff SP:027e3744 LR:02008d44 PC:020687bc Cy:39263661162 ARM9 020687b8: 135300ff cmpne r3, #0xFF r0:42d40000 r1:42c80000 r2:00000000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:000000ff SP:027e3744 LR:02008d44 PC:020687c0 Cy:39263661162 ARM9 020687bc: 0a00006f beq #0x1C4 r0:42d40000 r1:42c80000 r2:00000000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:000000ff SP:027e3744 LR:02008d44 PC:020687c4 Cy:39263661164 ARM9 020687c0: e01ccba1 ands r12, r12, r1, lsr #23 r0:42d40000 r1:42c80000 r2:00000000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:000000ff SP:027e3744 LR:02008d44 PC:020687c8 Cy:39263661164 ARM9 020687c4: 135c00ff cmpne r12, #0xFF r0:42d40000 r1:42c80000 r2:00000000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:02008d44 PC:020687cc Cy:39263661165 ARM9 020687c8: 0a00007b beq #0x1F4 r0:42d40000 r1:42c80000 r2:00000000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:02008d44 PC:020687d0 Cy:39263661165 ARM9 020687cc: e3811502 orr r1, r1, #0x800000 r0:42d40000 r1:42c80000 r2:00000000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:02008d44 PC:020687d4 Cy:39263661166 ARM9 020687d0: e3800502 orr r0, r0, #0x800000 r0:42d40000 r1:42c80000 r2:00000000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:02008d44 PC:020687d8 Cy:39263661166 ARM9 020687d4: e3c024ff bic r2, r0, #0xFF000000 r0:42d40000 r1:42c80000 r2:00000000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:02008d44 PC:020687dc Cy:39263661167 ARM9 020687d8: e3c1e4ff bic lr, r1, #0xFF000000 r0:42d40000 r1:42c80000 r2:00d40000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:02008d44 PC:020687e0 Cy:39263661167 ARM9 020687dc: e152000e cmp r2, lr, lsl #0 r0:42d40000 r1:42c80000 r2:00d40000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:00c80000 PC:020687e4 Cy:39263661169 ARM9 020687e0: 31a02082 movcc r2, r2, lsl #1 r0:42d40000 r1:42c80000 r2:00d40000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:00c80000 PC:020687e8 Cy:39263661169 ARM9 020687e4: 32433001 subcc r3, r3, #0x1 r0:42d40000 r1:42c80000 r2:00d40000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:00c80000 PC:020687ec Cy:39263661170 ARM9 020687e8: e1300001 teq r0, r1, lsl #0 r0:42d40000 r1:42c80000 r2:00d40000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:00c80000 PC:020687f0 Cy:39263661170 ARM9 020687ec: e24f0094 sub r0, pc, #0x94 r0:42d40000 r1:42c80000 r2:00d40000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:00c80000 PC:020687f4 Cy:39263661171 ARM9 020687f0: e7d017ae ldrb r1, [r0, lr, lsr #15] r0:02068760 r1:42c80000 r2:00d40000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:00c80000 PC:020687f8 Cy:39263661171 ARM9 020687f4: e26ee000 rsb lr, lr, #0x0 r0:02068760 r1:000000a4 r2:00d40000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:00c80000 PC:020687fc Cy:39263661173 ARM9 020687f8: e1a000ce mov r0, lr, asr #1 r0:02068760 r1:000000a4 r2:00d40000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:ff380000 PC:02068800 Cy:39263661173 ARM9 020687fc: e0000091 mul r0, r1, r0 r0:ff9c0000 r1:000000a4 r2:00d40000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:ff380000 PC:02068804 Cy:39263661175 ARM9 02068800: e2800102 add r0, r0, #0x80000000 r0:bff00000 r1:000000a4 r2:00d40000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:ff380000 PC:02068808 Cy:39263661176 ARM9 02068804: e1a00320 mov r0, r0, lsr #6 r0:3ff00000 r1:000000a4 r2:00d40000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:ff380000 PC:0206880c Cy:39263661176 ARM9 02068808: e0000091 mul r0, r1, r0 r0:00ffc000 r1:000000a4 r2:00d40000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:ff380000 PC:02068810 Cy:39263661177 ARM9 0206880c: e1a00720 mov r0, r0, lsr #14 r0:a3d70000 r1:000000a4 r2:00d40000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:ff380000 PC:02068814 Cy:39263661178 ARM9 02068810: e001009e mul r1, lr, r0 r0:00028f5c r1:000000a4 r2:00d40000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:ff380000 PC:02068818 Cy:39263661178 ARM9 02068814: e043c00c sub r12, r3, r12, lsl #0 r0:00028f5c r1:00200000 r2:00d40000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000085 SP:027e3744 LR:ff380000 PC:0206881c Cy:39263661179 ARM9 02068818: e1a01621 mov r1, r1, lsr #12 r0:00028f5c r1:00200000 r2:00d40000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000000 SP:027e3744 LR:ff380000 PC:02068820 Cy:39263661180 ARM9 0206881c: e0010190 mul r1, r0, r1 r0:00028f5c r1:00000200 r2:00d40000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000000 SP:027e3744 LR:ff380000 PC:02068824 Cy:39263661181 ARM9 02068820: e1a00700 mov r0, r0, lsl #14 r0:00028f5c r1:051eb800 r2:00d40000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000000 SP:027e3744 LR:ff380000 PC:02068828 Cy:39263661182 ARM9 02068824: e08007a1 add r0, r0, r1, lsr #15 r0:a3d70000 r1:051eb800 r2:00d40000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000000 SP:027e3744 LR:ff380000 PC:0206882c Cy:39263661183 ARM9 02068828: e0801092 umull r1, r0, r2, r0 r0:a3d70a3d r1:051eb800 r2:00d40000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000000 SP:027e3744 LR:ff380000 PC:02068830 Cy:39263661183 ARM9 0206882c: e1a03000 mov r3, r0, lsl #0 r0:0087ae14 r1:7a840000 r2:00d40000 r3:00000085 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000000 SP:027e3744 LR:ff380000 PC:02068834 Cy:39263661184 ARM9 02068830: 43800102 orrmi r0, r0, #0x80000000 r0:0087ae14 r1:7a840000 r2:00d40000 r3:0087ae14 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000000 SP:027e3744 LR:ff380000 PC:02068838 Cy:39263661185 ARM9 02068834: e29cc07e adds r12, r12, #0x7E r0:0087ae14 r1:7a840000 r2:00d40000 r3:0087ae14 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000000 SP:027e3744 LR:ff380000 PC:0206883c Cy:39263661185 ARM9 02068838: 4a000091 bmi #0x24C r0:0087ae14 r1:7a840000 r2:00d40000 r3:0087ae14 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:0000007e SP:027e3744 LR:ff380000 PC:02068840 Cy:39263661186 ARM9 0206883c: e35c00fe cmp r12, #0xFE r0:0087ae14 r1:7a840000 r2:00d40000 r3:0087ae14 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:0000007e SP:027e3744 LR:ff380000 PC:02068844 Cy:39263661187 ARM9 02068840: aa0000bc bge #0x2F8 r0:0087ae14 r1:7a840000 r2:00d40000 r3:0087ae14 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:0000007e SP:027e3744 LR:ff380000 PC:02068848 Cy:39263661188 ARM9 02068844: e0800b8c add r0, r0, r12, lsl #23 r0:0087ae14 r1:7a840000 r2:00d40000 r3:0087ae14 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:0000007e SP:027e3744 LR:ff380000 PC:0206884c Cy:39263661188 ARM9 02068848: e1a0ce21 mov r12, r1, lsr #28 r0:3f87ae14 r1:7a840000 r2:00d40000 r3:0087ae14 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:0000007e SP:027e3744 LR:ff380000 PC:02068850 Cy:39263661189 ARM9 0206884c: e35c0007 cmp r12, #0x7 r0:3f87ae14 r1:7a840000 r2:00d40000 r3:0087ae14 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000007 SP:027e3744 LR:ff380000 PC:02068854 Cy:39263661189 ARM9 02068850: 0a000042 beq #0x110 r0:3f87ae14 r1:7a840000 r2:00d40000 r3:0087ae14 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000007 SP:027e3744 LR:ff380000 PC:02068858 Cy:39263661190 ARM9 02068960: e1a01083 mov r1, r3, lsl #1 r0:3f87ae14 r1:7a840000 r2:00d40000 r3:0087ae14 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000007 SP:027e3744 LR:ff380000 PC:02068968 Cy:39263661192 ARM9 02068964: e2811001 add r1, r1, #0x1 r0:3f87ae14 r1:010f5c28 r2:00d40000 r3:0087ae14 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000007 SP:027e3744 LR:ff380000 PC:0206896c Cy:39263661192 ARM9 02068968: e26ee000 rsb lr, lr, #0x0 r0:3f87ae14 r1:010f5c29 r2:00d40000 r3:0087ae14 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000007 SP:027e3744 LR:ff380000 PC:02068970 Cy:39263661193 ARM9 0206896c: e001019e mul r1, lr, r1 r0:3f87ae14 r1:010f5c29 r2:00d40000 r3:0087ae14 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000007 SP:027e3744 LR:00c80000 PC:02068974 Cy:39263661193 ARM9 02068970: e1510c02 cmp r1, r2, lsl #24 r0:3f87ae14 r1:00080000 r2:00d40000 r3:0087ae14 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000007 SP:027e3744 LR:00c80000 PC:02068978 Cy:39263661194 ARM9 02068974: 42800001 addmi r0, r0, #0x1 r0:3f87ae14 r1:00080000 r2:00d40000 r3:0087ae14 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000007 SP:027e3744 LR:00c80000 PC:0206897c Cy:39263661195 ARM9 02068978: e8bd4000 ldmia sp!, {lr} r0:3f87ae14 r1:00080000 r2:00d40000 r3:0087ae14 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000007 SP:027e3744 LR:00c80000 PC:02068980 Cy:39263661195 ARM9 0206897c: e12fff1e bx lr r0:3f87ae14 r1:00080000 r2:00d40000 r3:0087ae14 r4:00000010 r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:4050ab42 r10:0000003c r11:fffffc00 r12:00000007 SP:027e3748 LR:02008d44 PC:02068984 Cy:39263661197 ARM9 ]]-- local read8 = memory.read_u8 local read16 = memory.read_u16_le local read24 = memory.read_u24_be local read32 = memory.read_u32_le function FUN_020687ac_Skill(r0, r1) --r1 seems hard coded to 42c80000 local cond = false local r12 = 0xFF local r3 = r12 & (r0 >> 23) if r3 == 0 or r3 == 0xFF then --doesnt seem to happen console.log("FUN_020687ac_Skill r0") end r12 = r12 & (r1 >> 23) if r12 == 0 or r12 == 0xFF then --doesnt seem to happen console.log("FUN_020687ac_Skill r1") end r1 = r1 | 0x800000 r0 = r0 | 0x800000 local r2 = r0 & 0xFFFFFF --r0 AND NOT(0xFF000000) local lr = r1 & 0xFFFFFF --r1 AND NOT(0xFF000000) if r2 < lr then --?? r2 = r2 << 1 r3 = r3 - 1 end -- 020687e8: e1300001 teq r0, r1, lsl #0 cond = bit.check(r0 ~ r1, 31) r1 = read8(0x00068760 + (lr >> 15),"Main RAM") --20688F0, or 0688F0 in main ram lr = (0 - lr) & 0xFFFFFFFF --make sure it remains 32 bit r0 = bit.arshift(lr,1) & 0xFFFFFFFF --make sure it remains 32 bit r0 = MLA(r0,r1,0) --32 bit multiply r0 = (r0 + 0x80000000) & 0xFFFFFFFF --make sure it remains 32 bit r0 = r0 >> 6 r0 = MLA(r0, r1, 0) --32 bit multiply r0 = r0 >> 14 r1 = MLA(lr, r0, 0) --32 bit multiply r12 = r3 - r12 r1 = r1 >> 12 r1 = MLA(r0, r1, 0) --32 bit multiply r0 = (r0 << 14) & 0xFFFFFFFF --make sure it remains 32 bit r0 = r0 + (r1 >> 15) --02068828: e0801092 umull r1, r0, r2, r0 r1, r0 = MUL64(r2, r0) r3 = r0 if cond then r0 = r0 | 0x80000000 end r12 = r12 + 0x7E --02068838: 4a000091 bmi #0x24C --0206883c: e35c00fe cmp r12, #0xFE --02068840: aa0000bc bge #0x2F8 --never occurs r0 = r0 + (r12 << 23) r12 = r1 >> 28 --0206884c: e35c0007 cmp r12, #0x7 if r12 == 7 then r1 = (r3 << 1) + 1 lr = (0 - lr) & 0xFFFFFFFF --make sure it remains 32 bit r1 = MLA(lr,r1,0) --32 bit multiply if (r1 - ((r2 << 24) & 0xFFFFFFFF) < 0) then console.log("FUN_020687ac_Skill r12") r0 = r0 + 1 end return r0 end r0 = r0 + (r1 >> 31) return r0 end --[[ 02068c1c: e3500000 cmp r0, #0x0 r0:00000069 r1:ff941840 r2:00f53d40 r3:009cf3ff r4:0000000f r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000000f SP:027e3748 LR:02008d3c PC:02068c24 Cy:39999750149 ARM9 02068c20: 012fff1e bxeq lr r0:00000069 r1:ff941840 r2:00f53d40 r3:009cf3ff r4:0000000f r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000000f SP:027e3748 LR:02008d3c PC:02068c28 Cy:39999750150 ARM9 02068c24: e3a0309e mov r3, #0x9E r0:00000069 r1:ff941840 r2:00f53d40 r3:009cf3ff r4:0000000f r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000000f SP:027e3748 LR:02008d3c PC:02068c2c Cy:39999750150 ARM9 02068c28: 4a000002 bmi #0x10 r0:00000069 r1:ff941840 r2:00f53d40 r3:0000009e r4:0000000f r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000000f SP:027e3748 LR:02008d3c PC:02068c30 Cy:39999750151 ARM9 02068c2c: e16fcf10 clz r12, r0 r0:00000069 r1:ff941840 r2:00f53d40 r3:0000009e r4:0000000f r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:0000000f SP:027e3748 LR:02008d3c PC:02068c34 Cy:39999750151 ARM9 02068c30: e1b00c10 movs r0, r0, lsl r12 r0:00000069 r1:ff941840 r2:00f53d40 r3:0000009e r4:0000000f r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000019 SP:027e3748 LR:02008d3c PC:02068c38 Cy:39999750152 ARM9 02068c34: e043300c sub r3, r3, r12, lsl #0 r0:d2000000 r1:ff941840 r2:00f53d40 r3:0000009e r4:0000000f r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000019 SP:027e3748 LR:02008d3c PC:02068c3c Cy:39999750153 ARM9 02068c38: e21020ff ands r2, r0, #0xFF r0:d2000000 r1:ff941840 r2:00f53d40 r3:00000085 r4:0000000f r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000019 SP:027e3748 LR:02008d3c PC:02068c40 Cy:39999750153 ARM9 02068c3c: e0800000 add r0, r0, r0, lsl #0 r0:d2000000 r1:ff941840 r2:00000000 r3:00000085 r4:0000000f r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000019 SP:027e3748 LR:02008d3c PC:02068c44 Cy:39999750155 ARM9 02068c40: e1a004a0 mov r0, r0, lsr #9 r0:a4000000 r1:ff941840 r2:00000000 r3:00000085 r4:0000000f r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000019 SP:027e3748 LR:02008d3c PC:02068c48 Cy:39999750155 ARM9 02068c44: e1800b83 orr r0, r0, r3, lsl #23 r0:00520000 r1:ff941840 r2:00000000 r3:00000085 r4:0000000f r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000019 SP:027e3748 LR:02008d3c PC:02068c4c Cy:39999750156 ARM9 02068c48: 012fff1e bxeq lr r0:42d20000 r1:ff941840 r2:00000000 r3:00000085 r4:0000000f r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000019 SP:027e3748 LR:02008d3c PC:02068c50 Cy:39999750156 ARM9 ]]-- function FUN_02068c1c_Skill(r0) if r0 == 0 then return end local r3 = 0x9E --02068c28: 4a000002 bmi #0x10 if r0 < 0 then console.log("FUN_02068c1c_Skill r0") end local r12 = Count_Leading_Zeroes(r0) r0 = r0 << r12 r3 = r3 - r12 local r2 = r0 & 0xFF r0 = (r0 + r0) >> 9 r0 = r0 | (r3 << 23) if r2 == 0 then return r0 end end --[[ 02068be8: e3c01102 bic r1, r0, #0x80000000 r0:4524cd00 r1:3c000000 r2:00000000 r3:00000082 r4:0000000f r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000089 SP:027e3748 LR:02008d54 PC:02068bf0 Cy:39999750223 ARM9 02068bec: e3a0209e mov r2, #0x9E r0:4524cd00 r1:4524cd00 r2:00000000 r3:00000082 r4:0000000f r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000089 SP:027e3748 LR:02008d54 PC:02068bf4 Cy:39999750223 ARM9 02068bf0: e0522ba1 subs r2, r2, r1, lsr #23 r0:4524cd00 r1:4524cd00 r2:0000009e r3:00000082 r4:0000000f r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000089 SP:027e3748 LR:02008d54 PC:02068bf8 Cy:39999750224 ARM9 02068bf4: da000005 ble #0x1C r0:4524cd00 r1:4524cd00 r2:00000014 r3:00000082 r4:0000000f r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000089 SP:027e3748 LR:02008d54 PC:02068bfc Cy:39999750224 ARM9 02068bf8: e1a01401 mov r1, r1, lsl #8 r0:4524cd00 r1:4524cd00 r2:00000014 r3:00000082 r4:0000000f r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000089 SP:027e3748 LR:02008d54 PC:02068c00 Cy:39999750225 ARM9 02068bfc: e3811102 orr r1, r1, #0x80000000 r0:4524cd00 r1:24cd0000 r2:00000014 r3:00000082 r4:0000000f r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000089 SP:027e3748 LR:02008d54 PC:02068c04 Cy:39999750226 ARM9 02068c00: e3500000 cmp r0, #0x0 r0:4524cd00 r1:a4cd0000 r2:00000014 r3:00000082 r4:0000000f r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000089 SP:027e3748 LR:02008d54 PC:02068c08 Cy:39999750227 ARM9 02068c04: e1a00231 mov r0, r1, lsr r2 r0:4524cd00 r1:a4cd0000 r2:00000014 r3:00000082 r4:0000000f r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000089 SP:027e3748 LR:02008d54 PC:02068c0c Cy:39999750227 ARM9 02068c08: 42600000 rsbmi r0, r0, #0x0 r0:00000a4c r1:a4cd0000 r2:00000014 r3:00000082 r4:0000000f r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000089 SP:027e3748 LR:02008d54 PC:02068c10 Cy:39999750228 ARM9 02068c0c: e12fff1e bx lr r0:00000a4c r1:a4cd0000 r2:00000014 r3:00000082 r4:0000000f r5:451cf400 r6:00000004 r7:00000011 r8:00000008 r9:437f0000 r10:0000003c r11:fffffc00 r12:00000089 SP:027e3748 LR:02008d54 PC:02068c14 Cy:39999750229 ARM9 ]]-- function FUN_02068be8(r0) local r1 = r0 & 0x7FFFFFFF -- r1 = r0 AND NOT(0x80000000) local r2 = 0x9E r2 = r2 - (r1 >> 23) if r1 < r2 then r0 = bit.arshift(r0,31) + 0x80000000 return r0 end r1 = (r1 << 8) & 0xFFFFFFFF --make sure it remains 32 bit r1 = r1 | 0x80000000 local cond = r0 < 0 r0 = r1 >> r2 if cond then r0 = -1* r0 end return r0 end local level = 90 -- local rng1 = 0xc910a194 -- local rng2 = 0x0a8b4e34 local rng1 = 2817202923 local rng2 = 3945076056 local r0 = 0 function Wind_Scar_Damage(level, skill_value, rng1, rng2) local r0 = 0 r0, rng1, rng2 = rng(r0, rng1, rng2) r0, rng1, rng2 = rng(r0, rng1, rng2) r0, rng1, rng2 = rng(r0, rng1, rng2) r0, rng1, rng2 = rng(r0, rng1, rng2) local r5 = skill_value r0 = 0x14 r0, rng1, rng2 = rng(0x14, rng1, rng2) local r4 = r0 r0 = FUN_02068c64_Skill(r5) -- local r2 = level local r1 = FUN_02068c64_Skill(0xF * level + 0x55) r0 = FUN_02068cac_Skill(r0, r1) r1 = 0x42c80000 --02008d28: e59f102c ldr r1, [pc, #+0x2C] r0 = FUN_020687ac_Skill(r0, r1) r5 = r0 r0 = r4 + 0x5A r0 = FUN_02068c1c_Skill(r0) r1 = 0x42c80000 --02008d3c: e59f1018 ldr r1, [pc, #+0x18] r0 = FUN_020687ac_Skill(r0, r1) r1 = r0 r0 = r5 r0 = FUN_02068cac_Skill(r0, r1) r0 = FUN_02068be8(r0) return r0 end console.log(Wind_Scar_Damage(90, Attack[19].Value, 2817202923, 3945076056))
Based on this, I generated a table of min/max damage for Wind Scar:
Level Min Max
1 157 190
2 181 219
3 204 247
4 228 276
5 252 305
6 275 333
7 299 362
8 322 391
9 346 419
10 370 448
11 393 476
12 417 505
13 441 534
14 464 562
15 488 591
16 511 619
17 535 648
18 559 677
19 582 705
20 606 734
21 630 763
22 653 791
23 677 820
24 700 848
25 724 877
26 748 906
27 771 934
28 795 963
29 819 991
30 842 1020
31 866 1049
32 889 1077
33 913 1106
34 937 1134
35 960 1163
36 984 1192
37 1008 1220
38 1031 1249
39 1055 1278
40 1078 1306
41 1102 1335
42 1126 1363
43 1149 1392
44 1173 1421
45 1197 1449
46 1220 1478
47 1244 1506
48 1267 1535
49 1291 1564
50 1315 1592
51 1338 1621
52 1362 1649
53 1386 1678
54 1409 1707
55 1433 1735
56 1456 1764
57 1480 1793
58 1504 1821
59 1527 1850
60 1551 1878
61 1575 1907
62 1598 1936
63 1622 1964
64 1645 1993
65 1669 2021
66 1693 2050
67 1716 2079
68 1740 2107
69 1764 2136
70 1787 2165
71 1811 2193
72 1834 2222
73 1858 2250
74 1882 2279
75 1905 2308
76 1929 2336
77 1953 2365
78 1976 2393
79 2000 2422
80 2023 2451
81 2047 2479
82 2071 2508
83 2094 2536
84 2118 2565
85 2142 2594
86 2165 2622
87 2189 2651
88 2212 2680
89 2236 2708
90 2260 2737
Skilled player (1748)
Joined: 9/17/2009
Posts: 4998
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
https://docs.google.com/spreadsheets/d/13ly3T8zQA1WYVDUFytGlAuNMhFBxtflyWnkJAUxzjRA/edit?usp=sharing Information I found for this game. There are 88 different npcs, 66 items, and 29 mandatory fights in this game. NPCS: Sprites are in hex so they could easily be pasted to hex editor for viewing.
Name Name ID Sprite ID Sprite Pallete XP HP EP Level ATK DEF DEX AGI
Iron Dragon Spawn 0 01 14 01 14 42 480 3 12 47 42 42 38
Fire Dragon Spawn 1 01 14 01 15 93 2030 5 33 137 135 112 105
Wandering Spirit 2 01 16 01 16 36 600 2 17 66 25 78 60
Lost Soul 3 01 16 01 18 73 1600 2 50 180 113 193 171
Banshee 4 01 1A 01 1A 52 920 6 21 69 62 68 73
Ten-Eyed Monster 5 01 1B 01 1B 9 200 3 5 28 26 18 22
Disembodied Soul 6 01 1B 01 1C 37 970 3 16 72 68 52 57
Cackling Skull 7 00 00 00 00 ? ? ? ? ? ? ? ?
Cursed Skull 8 00 00 00 00 ? ? ? ? ? ? ? ?
Little Devil 9 01 1D 01 1D 7 160 3 4 24 15 20 13
Vile Demon 10 01 1D 01 1E 39 650 4 14 61 48 56 60
Malicious Demon 11 01 1D 01 1F 51 870 5 18 78 62 69 73
Wild Hermit 12 01 20 01 20 31 450 4 12 53 49 46 48
Masked Priest 13 01 20 01 21 99 2000 6 39 130 140 120 125
Demon Handler 14 01 22 01 22 23 290 3 8 28 30 30 26
Revenant 15 01 22 01 24 55 980 5 21 58 71 69 78
Savage Rat 16 01 26 01 26 5 130 1 3 18 12 22 15
Filthy Rat 17 01 26 01 27 28 680 1 17 68 37 66 63
Giant Mantis 18 00 00 00 00 ? ? ? ? ? ? ? ?
Shadow Mantis 19 00 00 00 00 ? ? ? ? ? ? ? ?
Giant Spider 20 01 28 01 28 16 270 2 7 30 22 25 27
Hirasaka Spider 21 01 28 01 2A 33 560 2 16 57 44 45 63
Sandman 22 01 2C 01 2C 31 610 3 13 57 57 49 49
Sludge 23 01 2C 01 2E 8 220 3 6 26 20 19 18
Wild Bear 24 01 30 01 30 41 770 4 15 64 62 50 52
Bloody Bear 25 01 30 01 31 98 2100 5 38 138 125 113 117
Rock Monkey 26 01 32 01 32 24 335 4 11 41 44 50 49
Jizo Monkey 27 01 32 01 34 84 1320 4 31 99 98 115 116
Iorimaru 28 01 36 01 36 110 2300 6 37 140 118 125 124
Tosen King 29 01 38 01 38 143 3030 8 52 197 156 182 191
Senryo 30 01 3A 01 3A 77 750 4 14 55 54 57 62
Manryo 31 00 00 00 00 ? ? ? ? ? ? ? ?
Tengu 32 01 3E 01 3E 83 1510 7 30 107 104 106 102
Dark Tengu 33 01 3E 01 41 101 2200 7 40 152 144 139 143
Wandering Demon 34 01 44 01 44 74 1630 4 24 91 88 78 77
Iron-Souled Demon 35 01 44 01 47 111 2640 4 44 165 170 137 139
One-Eyed Priest 36 01 44 01 4A 128 3020 5 49 182 177 158 162
Antero Demon 37 01 4D 01 4D 85 1350 5 27 102 95 97 98
Ninestar Demon 38 01 4D 01 4E 108 2150 5 38 152 143 154 156
Postero Demon 39 01 4F 01 4F 85 1230 6 27 71 87 99 98
Shrouded Demon 40 01 4F 01 50 108 2020 6 38 108 143 159 151
Demon of Misfortune 41 01 51 01 51 70 1230 4 19 83 70 74 64
Slashing Demon 42 01 51 01 56 96 1800 4 29 112 101 87 84
Hades Demon 43 01 51 01 5B 140 3520 4 54 209 189 172 181
Saimyosho 44 01 60 01 60 20 400 3 10 37 26 45 44
Saimyosho 45 00 00 00 00 ? ? ? ? ? ? ? ?
Saimyosho 46 00 00 00 00 ? ? ? ? ? ? ? ?
Saimyosho 47 00 00 00 00 ? ? ? ? ? ? ? ?
Wind Spirit 48 01 67 01 67 125 1480 6 36 126 115 121 130
Wind God 49 01 67 01 68 155 2350 7 53 191 182 188 187
Ice Dragon Spawn 50 01 14 01 69 112 2585 4 47 169 167 159 151
Light Demon 51 01 4D 01 6A 123 2650 4 48 177 170 182 186
Dark Demon 52 01 4F 01 6B 123 2420 5 48 133 170 189 174
Akagane 53 01 6C 01 6C 350 2600 6 23 96 96 96 96
Akagane 2 54 01 6C 01 6C 0 32767 6 30 123 115 118 127
Akagane 3 55 01 6C 01 6C 430 3600 6 30 123 115 118 127
Burai 56 01 6F 01 6F 780 9999 5 50 203 202 170 165
Datara 57 01 70 01 70 1000 15800 10 99 255 255 255 255
Gorai 58 01 75 01 75 800 7800 7 45 188 179 198 192
Gorai 59 01 75 01 75 1000 9200 7 61 212 192 223 216
Gorai 3 60 01 75 01 75 0 10000 7 61 215 195 225 220
Haniwa Golem (Orange) 61 01 77 01 77 45 1820 3 35 133 136 121 123
Haniwa Golem (Pink) 62 01 78 01 78 45 1600 3 35 133 136 121 123
Haniwa Golem (Group) 63 01 7A 01 7A 200 7800 3 55 212 216 181 183
Demon Puppet 64 01 7C 01 7C 210 2400 4 20 85 74 84 90
Demon Puppet 65 01 7C 01 7C 760 6750 3 51 193 182 186 175
Masuko 66 01 7D 01 7D 150 1250 3 15 64 55 53 51
Mitsurugi 67 01 7E 01 7E 600 4400 9 42 194 165 188 242
Mitsurugi 2 68 01 7E 01 7E 700 6600 9 58 223 182 234 255
Sara 69 01 80 01 80 400 2550 5 25 101 85 105 111
Sara 2 70 01 80 01 80 920 10200 8 56 207 228 212 215
Monk Sen 71 01 82 01 82 0 8230 10 55 198 203 192 197
Sugagaki 72 01 84 01 84 600 4000 9 42 121 176 200 214
Sugagaki 2 73 01 84 01 84 700 6600 9 58 153 200 212 211
Usuba 74 01 87 01 87 180 1450 4 18 71 57 79 85
Crash 75 00 00 00 00 ? ? ? ? ? ? ? ?
Crash 241 00 00 00 00 ? ? ? ? ? ? ? ?
No name 242 00 00 00 00 ? ? ? ? ? ? ? ?
Zombie 243 00 FA 00 FA 16 270 3 7 33 24 25 22
Zombie (Large) 244 00 FB 00 FB 23 310 3 8 37 25 24 22
Possessed Warrior 245 00 FC 00 FC 19 280 5 8 38 33 40 37
Deceased Warrior 246 00 FC 00 FE 59 1140 4 23 96 80 88 89
Demon Soldier 247 01 00 01 00 13 220 4 6 33 28 32 32
Cave Insect 248 01 01 01 01 26 440 3 11 48 50 39 37
Rock Insect 249 01 01 01 03 25 410 3 10 46 48 33 36
Slimy Bug 250 01 01 01 05 73 1160 3 29 95 101 92 94
Giant Centipede 251 01 07 01 07 49 350 3 20 49 41 33 36
Poisonous Centipede 252 01 07 01 0A 64 1160 4 31 89 88 61 74
Steel Centipede 253 01 07 01 0D 89 1980 4 31 122 127 93 113
Poisonous Child 254 01 10 01 10 24 310 3 11 44 31 47 46
Messenger of Hades 255 01 10 01 12 76 1200 3 28 108 74 95 121
Items:
ID Name Cost Description
0
1 Amulet TAKERU 2200 Can be equipped. Increases ATK by 5%.
2 Orb TAKERU 5000 Can be equipped. Increases ATK by 10%.
3 Amulet MAMORI 2200 Can be equipped. Increases DEF by 5%.
4 Orb MAMORI 5000 Can be equipped. Increases DEF by 10%.
5 Amulet KIYOME 3300 Can be equipped. Increases resistance to poison and paralysis.
6 Orb KIYOME 4500 Can be equipped. Increases resistance to poison, paralysis and blindness.
7 Amulet SIZUKA 2800 Can be equipped. Decreases enemy encounters.
8 Orb SIZUKA 3900 Can be equipped. Decreases enemy encounters.
9 Amulet MATSURI 2800 Can be equipped. Increases enemy encounters.
10 Orb MATSURI 3900 Can be equipped. Increases enemy encounters.
11 Amulet INORI 1900 Can be equipped. Turn in battle comes around faster.
12 Orb INORI 3200 Can be equipped. Turn in battle comes around faster.
13 Amulet NEGAI 2900 Can be equipped. Turn in battle comes around slower.
14 Orb NEGAI 4700 Can be equipped. Turn in battle comes around slower.
15 Amulet HOMURA 5300 Can be equipped. Increases EP by 2 on every turn, but decreases maximum HP by 20%.
16 Orb HOMURA Can be equipped. Increases EP by 2 on every turn, but decreases maximum HP by 10%.
17 Amulet SADAME Can be equipped. Adds Cover attribute. Protects allies from enemy attacks.
18 Orb SADAME Can be equipped. Adds Cover attribute. Increases maximum HP by 10%.
19 Amulet SHINOBI Can be equipped. Increases critical hit rate.
20 Orb SHINOBI Can be equipped. Increases critical hit rate.
21 Amulet TSUYOSHI Can be equipped. Adds Counter attribute. Counter attacks become possible when covering
22 Orb TSUYOSHI Can be equipped. Adds Counter attribute. Increases maximum EP by 1.
23 Amulet KANAME 6300 Can be equipped. Increases maximum EP by 2.
24 Orb KANAME Can be equipped. Increases maximum EP by 3.
25 Amulet MITAMA Can be equipped. Restores 4% of maximum HP on every turn.
26 Orb MITAMA Can be equipped. Restores 8% of maximum HP on every turn.
27 Herb 60 Restores 300 HP.
28 Remedy 380 Restores 1000 HP.
29 High Remedy 1080 Restores 2500 HP.
30 Ointment 180 Increases ATK by 30% during one battle.
31 Fresh Herb 80 Cures poison.
32 Serene Universe 170 Cures paralysis.
33 Power Source 200 Cures fatigue.
34 Eye Powder 100 Cures blindness.
35 Lion Remedy 18000 Increases ATK by 1.
36 Dragon Remedy 18000 Increases DEF by 1.
37 Kylin Remedy 18000 Increases AGI by 1.
38 Tengu Remedy 18000 Increases DEX by 1.
39 Phoenix Remedy 18000 Increases maximum HP by 5%.
40 Feather Herb 500 Prevents enemy encounters for a while. Allows the whole party to escape from battle.
41 Moon Herb 2100 Restores HP of all allies by 30%.
42 Imperial Herb 1700 Fully restores HP.
43 Instant Noodles Restores HP by 60%.
44 Potato Chips Restores HP by 40%.
45 Energy Drink Fully restores EP.
46 Maruhide Bun 30 Restores HP by 20%.
47 Permit 1260 Needed to pass the checkpoint.
48 Glass Ball Transparent glass. Considered of high value in feudal Japan. Used for creating amulets and orbs.
49 Adamant 1800 The hardest and most beautiful gem. Used for creating amulets and orbs.
50 Ruby A crimson gem. Used for creating amulets and orbs.
51 Jasper A gem used for decoration since the ancient times. Used for creating amulets and orbs.
52 Amethyst A light purple quartz. Used for creating amulets and orbs.
53 Jade A green gem. Used for creating amulets and orbs.
54 Grain of Gold 1400 A grain of gold dust. Used for creating amulets and orbs.
55 Pearl 680 A silvery gem produced inside of seashells. Used for creating amulets and orbs.
56 Black Newt 320 A roasted newt. Used for creating amulets and orbs.
57 Demon Fang A sharp fang. Authenticity is questionable. Used for creating amulets and orbs.
58 Demon Horn A short, thick, horn. Authenticity is questionable. Used for creating amulets and orbs.
59 Tengu Feather 390 A long white feather. Authenticity is questionable. Used for creating amulets and orbs.
60 Moth Powder 210 Powder from a large poisonous moth. Used for creating amulets and orbs.
61 Bear Claw 260 Extremely sharp. Used for creating amulets and orbs.
62 Bear Liver 520 Can also be used to make medicine for all kinds of diseases. Used for creating amulets and orbs.
63 Sansho Branch 16 A fragrant young branch oc sansho. Purifies evil. Used for creating amulets and orbs.
64 Holly Berry A berry from a holly tree that chases away demons. Used for creating amulets and orbs.
65 Purifying Leaf 140 A sakaki leaf. A crucial plant placed as an offering on altars. Used for creating amulets and orbs.
66 Purifying Seed An azuki bean. Red seeds are believed to purify evil. Used for creating amulets and orbs.
Skilled player (1748)
Joined: 9/17/2009
Posts: 4998
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
The amulets are interesting. In a place called "Hosenki's Den", which is located northeast of Jinenji's Home, you can buy the game's only equipable items. They are:
ID Name Cost Description
1 Amulet TAKERU 2200 Can be equipped. Increases ATK by 5%.
3 Amulet MAMORI 2200 Can be equipped. Increases DEF by 5%.
7 Amulet SIZUKA 2800 Can be equipped. Decreases enemy encounters.
9 Amulet MATSURI 2800 Can be equipped. Increases enemy encounters.
By giving certain items, the addresses 239B9E, 239B9C, 239B9D (BizHawk "Main RAM") increment by 1. After a certain point, more items are unlocked:
ID Name Address
48 Glass Ball 239B9E 239B9C -
49 Adamant 239B9E 239B9C -
50 Ruby 239B9E 239B9C -
51 Jasper 239B9E 239B9C -
52 Amethyst 239B9E 239B9C -
53 Jade 239B9E 239B9C -
54 Grain of Gold 239B9E 239B9C -
55 Pearl 239B9E 239B9C -
56 Black Newt 239B9E - 239B9D
57 Demon Fang 239B9E - 239B9D
58 Demon Horn 239B9E - 239B9D
59 Tengu Feather 239B9E - 239B9D
60 Moth Powder 239B9E - 239B9D
61 Bear Claw 239B9E - 239B9D
62 Bear Liver 239B9E - 239B9D
63 Sansho Branch 239B9E - -
64 Holly Berry 239B9E - -
65 Purifying Leaf 239B9E - -
66 Purifying Seed 239B9E - -
15 20 30
You must give 15 of any item to Hosenki first, followed by 20 gems, followed by 30 Organs. These are the amulets:
ID Name Cost Unlock Description
1 Amulet TAKERU 2200 Default Can be equipped. Increases ATK by 5%.
2 Orb TAKERU 5000 30 organs Can be equipped. Increases ATK by 10%.
3 Amulet MAMORI 2200 Default Can be equipped. Increases DEF by 5%.
4 Orb MAMORI 5000 30 organs Can be equipped. Increases DEF by 10%.
5 Amulet KIYOME 3300 15 any craftables Can be equipped. Increases resistance to poison and paralysis.
6 Orb KIYOME 4500 20 gems Can be equipped. Increases resistance to poison, paralysis and blindness.
7 Amulet SIZUKA 2800 Default Can be equipped. Decreases enemy encounters.
8 Orb SIZUKA 3900 20 gems Can be equipped. Decreases enemy encounters.
9 Amulet MATSURI 2800 Default Can be equipped. Increases enemy encounters.
10 Orb MATSURI 3900 20 gems Can be equipped. Increases enemy encounters.
11 Amulet INORI 1900 15 any craftables Can be equipped. Turn in battle comes around faster.
12 Orb INORI 3200 30 organs Can be equipped. Turn in battle comes around faster.
13 Amulet NEGAI 2900 15 any craftables Can be equipped. Turn in battle comes around slower.
14 Orb NEGAI 4700 30 organs Can be equipped. Turn in battle comes around slower.
15 Amulet HOMURA 5300 20 gems Can be equipped. Increases EP by 2 on every turn, but decreases maximum HP by 20%.
16 Orb HOMURA ? ? Can be equipped. Increases EP by 2 on every turn, but decreases maximum HP by 10%.
17 Amulet SADAME ? ? Can be equipped. Adds Cover attribute. Protects allies from enemy attacks.
18 Orb SADAME ? ? Can be equipped. Adds Cover attribute. Increases maximum HP by 10%.
19 Amulet SHINOBI ? ? Can be equipped. Increases critical hit rate.
20 Orb SHINOBI ? ? Can be equipped. Increases critical hit rate.
21 Amulet TSUYOSHI ? ? Can be equipped. Adds Counter attribute. Counter attacks become possible when covering
22 Orb TSUYOSHI ? ? Can be equipped. Adds Counter attribute. Increases maximum EP by 1.
23 Amulet KANAME 6300 20 gems Can be equipped. Increases maximum EP by 2.
24 Orb KANAME ? ? Can be equipped. Increases maximum EP by 3.
25 Amulet MITAMA ? ? Can be equipped. Restores 4% of maximum HP on every turn.
26 Orb MITAMA ? ? Can be equipped. Restores 8% of maximum HP on every turn.
Unfortunately, I wasn't able to figure out how to unlock the remaining stock.
Skilled player (1748)
Joined: 9/17/2009
Posts: 4998
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
While random encounters can be avoided by delaying movement, there are 29 mandatory fights that exist in the game. Bold means the fight is a boss battle. Otherwise it's a normal encounter you're forced to fight.
Fight Name Amount XP HP EP Level ATK DEF DEX AGI
1 Iron Dragon Spawn 1 42 480 3 12 47 42 42 38
2 Little Devil 1 7 160 3 4 24 15 20 13
3 Masuko 1 150 1250 3 15 64 55 53 51
4 Demon Soldier 4 13 220 4 6 33 28 32 32
Possessed Warrior 2 19 280 5 8 38 33 40 37
5 Demon Soldier 3 13 220 4 6 33 28 32 32
Possessed Warrior 4 19 280 5 8 38 33 40 37
6 Demon Soldier 3 13 220 4 6 33 28 32 32
7 Demon Soldier 4 13 220 4 6 33 28 32 32
Possessed Warrior 2 19 280 5 8 38 33 40 37
8 Usuba 1 180 1450 4 18 71 57 79 85
9 Poisonous Centipede 1 64 1160 4 31 89 88 61 74
10 Demon Puppet 1 210 2400 4 20 85 74 84 90
11 Demon of Misfortune 2 70 1230 4 19 83 70 74 64
12 Demon of Misfortune 3 70 1230 4 19 83 70 74 64
13 Demon of Misfortune 3 70 1230 4 19 83 70 74 64
Vile Demon 3 39 650 4 14 61 48 56 60
Sara 1 400 2550 5 25 101 85 105 111
14 Iorimaru 2 110 2300 6 37 140 118 125 124
Mitsurugi 1 600 4400 9 42 194 165 188 242
15 Haniwa Golem (Orange) 2 45 1820 3 35 133 136 121 123
Haniwa Golem (Pink) 1 45 1600 3 35 133 136 121 123
Sugagaki 1 600 4000 9 42 121 176 200 214
16 Ninestar Demon 1 108 2150 5 38 152 143 154 156
Iron-Souled Demon 2 111 2640 4 44 165 170 137 139
Shrouded Demon 1 108 2020 6 38 108 143 159 151
17 Iron-Souled Demon 2 111 2640 4 44 165 170 137 139
Shrouded Demon 2 108 2020 6 38 108 143 159 151
18 Iron-Souled Demon 1 111 2640 4 44 165 170 137 139
Gorai 1 800 7800 7 45 188 179 198 192
19 Ninestar Demon 2 108 2150 5 38 152 143 154 156
Iron-Souled Demon 3 111 2640 4 44 165 170 137 139
Shrouded Demon 1 108 2020 6 38 108 143 159 151
20 Ninestar Demon 2 108 2150 5 38 152 143 154 156
Iron-Souled Demon 3 111 2640 4 44 165 170 137 139
Shrouded Demon 1 108 2020 6 38 108 143 159 151
21 Slashing Demon 1 96 1800 4 29 112 101 87 84
22 Iron-Souled Demon 3 111 2640 4 44 165 170 137 139
23 Iron-Souled Demon 5 111 2640 4 44 165 170 137 139
24 One-Eyed Priest 2 128 3020 5 49 182 177 158 162
Burai 1 780 9999 5 50 203 202 170 165
25 Gorai 2 1 1000 9200 7 61 212 192 223 216
26 Demon Puppet 2 760 6750 3 51 193 182 186 175
27 Lost Soul 4 73 1600 2 50 180 113 193 171
Tosen King 2 143 3030 8 52 197 156 182 191
Monk Sen 1 0 8230 10 55 198 203 192 197
28 Haniwa Golem (Group) 2 200 7800 3 55 212 216 181 183
Wind God 2 155 2350 7 53 191 182 188 187
Mitsurugi 1 700 6600 9 58 223 182 234 255
Sugagaki 1 700 6600 9 58 153 200 212 211
29 Wind God 2 155 2350 7 53 191 182 188 187
Gorai 3 1 0 10000 7 61 215 195 225 220
Datara 1 1000 15800 10 99 255 255 255 255
From the above, there's a clear massive jump in difficulty from fight 13 with Sara, compared to fight 14 with Mitsurugi. I can easily beat Sara at level 20, but I have a hard time beating Mitsurugi until I'm around level 30. I can beat Monk Sen at level 30ish, but I only managed to beat Datara at level 45 (without healing). Level 45 is 17,244 XP, or assuming every fight gave everyone 50 xp, 344 fights.
Skilled player (1748)
Joined: 9/17/2009
Posts: 4998
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
These are your stats at the very start:
Name Level HP EP ATK DEF DEX AGI
Janis 1 130 6 6 4 5 4
Inuyasha 7 1030 7 37 34 28 32
Kagome 6 520 9 23 17 22 23
Miroku 8 820 8 31 31 30 28
Sango 7 640 5 28 22 28 25
Shippo 6 390 3 15 13 20 23
I need to figure out how stats are given when you level up, so I trace logged when it raises your stats. There's a dedicated RNG function (FUN_02046160) that also affects RNG, for this purpose. It is called once, before the usual RNG (FUN_020461c0) gets used. The game's level up function is at 02010520 (FUN_02010520 in Ghidra). It has 16 different cases, each for the characters IDs. Cases 1-3, 11, 12, 13, 14, 15, 16 is Janis/followers. 4/5 is Inuyasha, 6 is Kagome, 7 is Mioku. 8 is Sango. 9/10 is Shippo. Here's my lua interpretation of what's going on: Download level.lua
Language: lua

function MLA(A,B,C) local reslow = A * (B%0x10000) -- A multiplied with lower 16 bits of B local reshigh = A * (math.floor(B/0x10000)%0x10000) -- A multiplied with higher 16 bits of B (shifted down) reshigh = reshigh%0x10000 -- only 16 bits can matter here if result is 32 bits return (reshigh*0x10000 + reslow + C)%0x100000000 -- recombine and cut off to 32 bits end function MUL64(A,B) local reslow = A * (B%0x10000) -- 0x0000LLLLLLLLLLLL local reshigh = A * math.floor(B/0x10000) -- 0xHHHHHHHHHHHH0000 local reslow_lo = reslow%0x100000000 -- 0x00000000LLLLLLLL local reslow_hi = math.floor(reslow/0x100000000) -- 0x0000LLLL00000000 local reshigh_lo = reshigh%0x10000 -- 0x00000000HHHH0000 local reshigh_hi = math.floor(reshigh/0x10000) -- 0xHHHHHHHH00000000 local low32 = reshigh_lo*0x10000 + reslow_lo local high32 = reshigh_hi + reslow_hi high32 = high32 + math.floor(low32/0x100000000) -- add what carries over low32 = low32%0x100000000 -- 32 bit high32 = high32%0x100000000 -- 32 bit return low32,high32 end function FUN_020461c0_RNG(r0, rng1, rng2) --020461c4: e59f1050 ldr r1, [pc, #+0x50] local r1 = 0 local r2, r3 = 0,0 local r4, lr, carry = 0,0,0 local rng1_2, rng2_2 = 0, 0 r4, lr = MUL64(0x6C078965, rng1) lr = MLA(0x6C078965, rng2, lr) lr = MLA(0x5D588B65, rng1, lr) r3 = 0x00269EC3 + r4 carry = r3 > 4294967295 and 1 or 0 rng1_2 = r3 % 4294967296 --107b98 r4 = lr + carry rng2_2 = r4 --107b9c if (r0 ~= 0) then r4 = (r4 * r0) >> 0x20 end r0 = r4 return r0, rng1_2, rng2_2 end function FUN_02046160_RNG(r0, rng1, rng2) --r0 provided before call --0x02107b98 is rng1 --0x02107b9c is rng2 local r1 = 0 local r12 = 0x6c078965 --from 0x02107b98 + 0x08, seems constant local r3 = rng1 local r2 = rng2 local r4, lr = MUL64(0x6c078965, r3) local rng1_2, rng2_2, carry = 0, 0, 0 --020461d8: e02ee29c mla lr, r12, r2, lr --Rd:=Rm*Rs+Rn --lr = r12*r12+lr lr = MLA(r12, r2, lr) lr = MLA(0x5D588B65, r3, lr) r3 = 0x00269ec3 + r4 carry = r3 > 4294967295 and 1 or 0 rng1_2 = r3 % 4294967296 r4 = lr + carry r12 = r0 << 1 rng2_2 = r4 if r12 ~= 0 then r2, r1 = MUL64(r4, r12) r0 = r1 - r0 end return r0, rng1_2, rng2_2 end function FUN_02010520_2(r0, rng1, rng2, level, hp, atk, def, dex, agi) --[[just for finding start address local r2 = 0x020c63f4 local r1 = 0x94 local r5 = MLA(r0, r1, r2) ]]-- local agi_plus, dex_plus, def_plus, atk_plus = 0, 0, 0, 0 local r10 = 3 local hp_plus = 0 if (r0 >= 1 and r0 <= 3) or (r0 >= 11 and r0 <= 16) then --JANIS 2 020105e0: ea00000d b #0x3C --applies for Janis 1, 2, 3 hp_plus, rng1, rng2 = FUN_02046160_RNG(0x10, rng1, rng2) --02010624: e2800050 add r0, r0, #0x50 hp_plus = hp_plus + 0x50 atk_plus, rng1, rng2 = FUN_020461c0_RNG(3, rng1, rng2) --0201063c: e2800002 add r0, r0, #0x2 atk_plus = atk_plus + 2 def_plus, rng1, rng2 = FUN_020461c0_RNG(3, rng1, rng2) --02010650: e2800002 add r0, r0, #0x2 def_plus = def_plus + 2 dex_plus, rng1, rng2 = FUN_020461c0_RNG(4, rng1, rng2) --02010664: e2800002 add r0, r0, #0x2 dex_plus = dex_plus + 2 agi_plus, rng1, rng2 = FUN_020461c0_RNG(2, rng1, rng2) --02010678: e2800003 add r0, r0, #0x3 agi_plus = agi_plus + 3 r0, rng1, rng2 = FUN_020461c0_RNG(0x64, rng1, rng2) --0201068c: e350001e cmp r0, #0x1E if r0 < 0x1E then atk_plus = atk_plus + 1 end r0, rng1, rng2 = FUN_020461c0_RNG(0x64, rng1, rng2) --020106a4: e350000a cmp r0, #0xA if r0 < 0xA then def_plus = def_plus + 1 end r0, rng1, rng2 = FUN_020461c0_RNG(0x64, rng1, rng2) --020106b8: e350000a cmp r0, #0xA if r0 < 0xA then agi_plus = agi_plus - 1 end elseif r0 == 4 or r0 == 5 then --INUYASHA 020105e8: ea000038 b #0xE8 hp_plus, rng1, rng2 = FUN_02046160_RNG(0x1C, rng1, rng2) --020106d8: e280008e add r0, r0, #0x8E hp_plus = hp_plus + 0x8E atk_plus, rng1, rng2 = FUN_020461c0_RNG(3, rng1, rng2) --020106f0: e2800003 add r0, r0, #0x3 atk_plus = atk_plus + 3 def_plus, rng1, rng2 = FUN_020461c0_RNG(2, rng1, rng2) --02010704: e2800003 add r0, r0, #0x3 def_plus = def_plus + 3 dex_plus, rng1, rng2 = FUN_020461c0_RNG(3, rng1, rng2) --02010718: e2800002 add r0, r0, #0x2 dex_plus = dex_plus + 2 agi_plus, rng1, rng2 = FUN_020461c0_RNG(2, rng1, rng2) --0201072c: e2800003 add r0, r0, #0x3 agi_plus = agi_plus + 3 r0, rng1, rng2 = FUN_020461c0_RNG(0x64, rng1, rng2) --02010740: e350001e cmp r0, #0x1E if r0 < 0x1E then def_plus = def_plus + 1 end r0, rng1, rng2 = FUN_020461c0_RNG(0x64, rng1, rng2) --02010758: e3500014 cmp r0, #0x14 if r0 < 0x14 then dex_plus = dex_plus + 1 end r0, rng1, rng2 = FUN_020461c0_RNG(0x64, rng1, rng2) --02010770: e3500014 cmp r0, #0x14 if r0 < 0x14 then agi_plus = agi_plus + 1 end elseif r0 == 6 then --KAGOME 020105f0: ea000063 b #0x194 hp_plus, rng1, rng2 = FUN_02046160_RNG(0xD, rng1, rng2) --0201078c: e2800044 add r0, r0, #0x44 hp_plus = hp_plus + 0x44 atk_plus, rng1, rng2 = FUN_020461c0_RNG(5, rng1, rng2) --020107a4: e2800001 add r0, r0, #0x1 atk_plus = atk_plus + 1 def_plus, rng1, rng2 = FUN_020461c0_RNG(3, rng1, rng2) --020107b8: e2800002 add r0, r0, #0x2 def_plus = def_plus + 2 dex_plus = 3 agi_plus, rng1, rng2 = FUN_020461c0_RNG(3, rng1, rng2) --020107d0: e2800003 add r0, r0, #0x3 agi_plus = agi_plus + 3 r0, rng1, rng2 = FUN_020461c0_RNG(0x64, rng1, rng2) --020107e4: e3500028 cmp r0, #0x28 if r0 < 0x28 then def_plus = def_plus - 1 end r0, rng1, rng2 = FUN_020461c0_RNG(0x64, rng1, rng2) --020107fc: e3500028 cmp r0, #0x28 if r0 < 0x28 then dex_plus = 4 end r0, rng1, rng2 = FUN_020461c0_RNG(0x64, rng1, rng2) --02010814: e350001e cmp r0, #0x1E if r0 < 0x1E then agi_plus = agi_plus - 1 end elseif r0 == 7 then --MIROKU 020105f4: ea00008b b #0x234 hp_plus, rng1, rng2 = FUN_02046160_RNG(0x13, rng1, rng2) --02010830: e2800060 add r0, r0, #0x60 hp_plus = hp_plus + 0x60 atk_plus = 3 def_plus = 3 dex_plus = 3 agi_plus = 3 r0, rng1, rng2 = FUN_020461c0_RNG(0x64, rng1, rng2) --02010858: e3500028 cmp r0, #0x28 if r0 < 0x28 then atk_plus = 4 end r0, rng1, rng2 = FUN_020461c0_RNG(0x64, rng1, rng2) --02010870: e350003c cmp r0, #0x3C if r0 < 0x3C then def_plus = 4 end r0, rng1, rng2 = FUN_020461c0_RNG(0x64, rng1, rng2) --02010888: e3500032 cmp r0, #0x32 if r0 < 0x32 then dex_plus = 4 end r0, rng1, rng2 = FUN_020461c0_RNG(0x64, rng1, rng2) --020108a0: e350001e cmp r0, #0x1E if r0 < 0x1E then agi_plus = 4 end elseif r0 == 8 then --SANGO 020105f8: ea0000ad b #0x2BC hp_plus, rng1, rng2 = FUN_02046160_RNG(0x11, rng1, rng2) --020108bc: e2800056 add r0, r0, #0x56 hp_plus = hp_plus + 0x56 atk_plus, rng1, rng2 = FUN_020461c0_RNG(3, rng1, rng2) --020108d4: e2800002 add r0, r0, #0x2 atk_plus = atk_plus + 2 def_plus, rng1, rng2 = FUN_020461c0_RNG(2, rng1, rng2) --020108e8: e2800002 add r0, r0, #0x2 def_plus = def_plus + 2 dex_plus, rng1, rng2 = FUN_020461c0_RNG(2, rng1, rng2) --020108fc: e2800003 add r0, r0, #0x3 dex_plus = dex_plus + 3 agi_plus, rng1, rng2 = FUN_020461c0_RNG(2, rng1, rng2) --02010910: e2800003 add r0, r0, #0x3 agi_plus = agi_plus + 3 r0, rng1, rng2 = FUN_020461c0_RNG(0x64, rng1, rng2) --02010924: e350003c cmp r0, #0x3C if r0 < 0x3C then atk_plus = atk_plus + 1 end r0, rng1, rng2 = FUN_020461c0_RNG(0x64, rng1, rng2) --0201093c: e3500032 cmp r0, #0x32 if r0 < 0x32 then def_plus = def_plus + 1 end r0, rng1, rng2 = FUN_020461c0_RNG(0x64, rng1, rng2) --02010954: e350000a cmp r0, #0xA if r0 < 0xA then dex_plus = dex_plus + 1 end elseif r0 == 9 or r0 == 10 then --SHIPPO 02010600: ea0000d8 b #0x368 hp_plus, rng1, rng2 = FUN_02046160_RNG(0xA, rng1, rng2) --02010970: e2800036 add r0, r0, #0x36 hp_plus = hp_plus + 0x36 atk_plus, rng1, rng2 = FUN_020461c0_RNG(4, rng1, rng2) --02010988: e1a00800 mov r0, r0, lsl #16 def_plus, rng1, rng2 = FUN_020461c0_RNG(4, rng1, rng2) --02010998: e1a00800 mov r0, r0, lsl #16 dex_plus, rng1, rng2 = FUN_020461c0_RNG(2, rng1, rng2) --020109a8: e2800003 add r0, r0, #0x3 dex_plus = dex_plus + 3 agi_plus, rng1, rng2 = FUN_020461c0_RNG(4, rng1, rng2) --020109bc: e2800002 add r0, r0, #0x2 agi_plus = agi_plus + 2 r0, rng1, rng2 = FUN_020461c0_RNG(0x64, rng1, rng2) --020109d0: e3500028 cmp r0, #0x28 if r0 < 0x28 then atk_plus = atk_plus + 1 end r0, rng1, rng2 = FUN_020461c0_RNG(0x64, rng1, rng2) --020109e8: e350001e cmp r0, #0x1E if r0 < 0x1E then def_plus = def_plus + 1 end r0, rng1, rng2 = FUN_020461c0_RNG(0x64, rng1, rng2) --02010a00: e3500014 cmp r0, #0x14 if r0 < 0x14 then dex_plus = dex_plus - 1 end r0, rng1, rng2 = FUN_020461c0_RNG(0x64, rng1, rng2) --02010a18: e350000a cmp r0, #0xA if r0 < 0xA then agi_plus = agi_plus + 1 end end --02010a28: e5d51074 ldrb r1, [r5, #+0x74] level = level + 1 --02010a38: e1d525f4 ldrsh r2, [r5, #+0x54] hp = hp + hp_plus --02010a6c: e5d50075 ldrb r0, [r5, #+0x75] atk = atk + atk_plus atk = atk > 255 and 255 or atk --02010a88: e5d50076 ldrb r0, [r5, #+0x76] def = def + def_plus def = def > 255 and 255 or def --02010aa4: e5d50077 ldrb r0, [r5, #+0x77] dex = dex + dex_plus dex = dex > 255 and 255 or dex --02010ac0: e5d50078 ldrb r0, [r5, #+0x78] agi = agi + agi_plus agi = agi > 255 and 255 or agi return rng1, rng2, level, hp, atk, def, dex, agi end
FUN_02046160_RNG returns a value from -r0 to r0-1 For instance, FUN_02046160_RNG(0x10, rng1, rng2) returns -16 to 15. FUN_020461c0_RNG returns a value from 0 to r0 For instance, FUN_020461c0_RNG(3, rng1, rng2) returns 0, 1, or 2. Given the above information, here's a table of min/max stats per level:
Name Level HP EP ATK DEF DEX AGI
Janis 1 64 / 95 0 2 / 5 2 / 5 2 / 5 2 / 4
Inuyasha 1 114 / 169 0 3 / 5 3 / 5 2 / 5 3 / 5
Kagome 1 55 / 80 0 1 / 5 1 / 4 3 / 4 2 / 5
Miroku 1 77 / 114 0 3 / 4 3 / 4 3 / 4 3 / 4
Sango 1 69 / 102 0 2 / 5 2 / 4 3 / 5 3 / 4
Shippo 1 44 / 63 0 0 / 4 0 / 4 2 / 4 2 / 6
Skilled player (1748)
Joined: 9/17/2009
Posts: 4998
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Clearly, there's grinding needed for this game, given the enemy basically never misses, and you're forced to use skills that scale solely by level since you will miss too frequently. Here's a table of XP needed for each level:
Level Experience total Diff
1 0
2 17 17
3 49 32
4 94 45
5 153 59
6 231 78
7 330 99
8 450 120
9 590 140
10 746 156
11 919 173
12 1109 190
13 1314 205
14 1533 219
15 1769 236
16 2026 257
17 2300 274
18 2589 289
19 2899 310
20 3227 328
21 3572 345
22 3933 361
23 4308 375
24 4698 390
25 5102 404
26 5523 421
27 5959 436
28 6412 453
29 6884 472
30 7377 493
31 7889 512
32 8422 533
33 8977 555
34 9551 574
35 10147 596
36 10765 618
37 11401 636
38 12056 655
39 12734 678
40 13433 699
41 14154 721
42 14896 742
43 15661 765
44 16443 782
45 17244 801
46 18066 822
47 18905 839
48 19764 859
49 20645 881
50 21545 900
51 22466 921
52 23404 938
53 24363 959
54 25342 979
55 26342 1000
56 27342 1000
57 28342 1000
58 29342 1000
59 30342 1000
60 31367 1025
61 32392 1025
62 33417 1025
63 34442 1025
64 35467 1025
65 36517 1050
66 37567 1050
67 38617 1050
68 39667 1050
69 40717 1050
70 41817 1100
71 42917 1100
72 44017 1100
73 45117 1100
74 46217 1100
75 47367 1150
76 48517 1150
77 49667 1150
78 50817 1150
79 51967 1150
80 53167 1200
81 54367 1200
82 55567 1200
83 56767 1200
84 57967 1200
85 59217 1250
86 60467 1250
87 61717 1250
88 62967 1250
89 64217 1250
90 65535 1318
To check out quickly what npc layouts are there, I trace logged when I obtain an encounter. In ARM9 System Bus, the address 02014BBC has the value EBFFE77E. If I replaced it with a NOP operation, as in change it to values E1A00000 (corresponds to mov r0, r0, lsl #0) by pasting 0000A0E1 directly to it on bizhawk hex editor, I start the fight with an empty field. 02015508 has the values EBFFF710. Changing that to NOP gives me no encounters what so ever. I know this because normally, if I freeze both RNG values to 0, an encounter occurs almost immediately after I walk 1 step. This game actually does have a step counter at 10756C Main RAM. Every 80 steps, the moon phase advances by 1. 020131E4 has the values EB0022C5. Changing it to NOP causes the npcs to update (visible on script), but the battle never starts. The music still plays though. So by walking around with 020131E4 set to E1A00000, I can see what XP and layout occurs. EXP is determined by summing up all XP values from NPCs defeated, then divided by the amount of people remaining, rounded down. So for instance, Giant Centipedes have an XP value of 49. Fighting 4 of them with a team of 6 will give each team member math.floor((4 x 49)/6) = 32 XP. At the very start, the npcs are complete trash. Savage Rats give 0 XP to a team of 6. Little Devil gives 1. Going further, there's 3 possibilities. 1. 3x Giant Centipedes + 3x Poisonous Child, 36 XP per member 2. 4x Giant Centipedes, 32 XP per member 3. 4x Iron Dragon Spawns, 28 XP per member Their stats as follows:
Name Name ID XP HP EP Level ATK DEF DEX AGI
Iron Dragon Spawn 0 42 480 3 12 47 42 42 38
Giant Centipede 251 49 350 3 20 49 41 33 36
Poisonous Child 254 24 310 3 11 44 31 47 46
Based on the Wind Scar damage table, I can OHKO Poisonous Child starting at level 8 (guaranteed OHKO at 10), OHKO Giant Centipede at level 9 (guaranteed OHKO at 12), and OHKO Iron Dragon Spawn at level 14 (guaranteed OHKO at 16). Clearly, the first fight should be Giant Centipedes, then raise 3 levels, each having Inuyasha gain 5 AGI for a total of 47 AGI at level 10 to be able to start outrunning, and OHKO poison child. Before this, Janis must level up at least 1 time by fighting 3 Giant Centipedes with her 2 Shiki Oni. The 2 Shiki Oni don't get any XP, nor level up. However, they do affect the calculations, since they count as part of the team. If Janis isn't at least level 2 before the 2nd fight, she will be OHKO by the Little Devil. There's a brief period before fight 10 (Demon Puppet) where both Miroku and Sango leave the party. This changes the XP above to 1. 3x Giant Centipedes + 3x Poisonous Child, 73 XP per member 2. 4x Giant Centipedes, 65 XP per member 3. 4x Iron Dragon Spawns, 56 XP per member I tried actually beating the game. I can beat Datara with everyone at least level 45, without healing. I can beat Sara at level 20 easily. At level 30, I can at least beat most fights up to Monk Sen, with some struggle. Why does this matter? Because in this case, I can 1/2 the fights needed, at the expense of Miruko and Sango. Bosses who attack physically can target only Inuyasha, Sango, and Miruko. Miruko's only purpose after Wind Tunnel is to tank up hits. All healing items should be given to Shippo, and Sango can attack, or tank hits. If I leveled up to 20 without Sango/Miruko, by the time I reach level 45, they should be at level 41. At level 20, under ideal RNG, Inuyasha would have 97 AGI. He will also deal 606-734 damage to every enemy. This is actually fantastic early on. In the area before Sara's Lair, there's a layout 5x Vile Demon + 3x Poisonous Child, 42 XP per member. While uncommon, I can at least OHKO them all. To guarantee everyone dies, Inuyasha needs to be level 22. This would also get him to 107 AGI. After Sara's Lair, there's 2 possiblities: 1. 3x Poisonous Centipede + 2x Hirasaka Spider + 2x Vile Demon + 1x Malicious Demon, 60 XP per member 2. 3x Malicious Demon + 3x Revenant + 1x Banshee, 59 XP per member (Near Demon Fortress) 3. 10x Hirasaka Spider, 50 XP per member (Above Checkpoint) The stats for all of them are:
Name Name ID XP HP EP Level ATK DEF DEX AGI
Banshee 4 52 920 6 21 69 62 68 73
Vile Demon 10 39 650 4 14 61 48 56 60
Malicious Demon 11 51 870 5 18 78 62 69 73
Revenant 15 55 980 5 21 58 71 69 78
Hirasaka Spider 21 33 560 2 16 57 44 45 63
Poisonous Centipede 252 64 1160 4 31 89 88 61 74
Since Hirasaka Spider has only 350 HP, yet 10 of them give 50 XP, it's actually better to skip the area before Sara's Lair for further grinding. Miruko still needs at least some levels, or else Wind Tunnel won't work. Poisonous Centipede can be ignored, since it would take a minimum level of 35 to OHKO them (level 44 for guaranteed OHKO). I investigated Northern Plains. For the south area, I get: 1. 2x Antero Demon + x3 Slashing Demon, 76 XP per member 2. 4x Antero Demon + x1 Slashing Demon, 72 XP per member 3. 5x Antero Demon, 70 XP per member Mt. Mansetsu Fortress: 1. 3x Light Demon + 3x Dark Demon, 120 XP per member (inside) 2. 5x One-Eyed Priest, 105 XP per member (inside) 3. 2x Light Demon + 1x Dark Demon +2x One-Eyed Priest, 102 XP per member (inside) 4. 2x Light Demon + 2x Dark Demon +1x One-Eyed Priest, 101 XP per member (outside) 5. 3x Light Demon + 2x Dark Demon, 100 XP per member (outside) The mountain itself has the highest at 3x Steel Centipede + 3 Messenger of Hades, 78 XP per member But it's too low given their HP.
Name Name ID XP HP EP Level ATK DEF DEX AGI
One-Eyed Priest 36 128 3020 5 49 182 177 158 162
Antero Demon 37 85 1350 5 27 102 95 97 98
Slashing Demon 42 96 1800 4 29 112 101 87 84
Light Demon 51 123 2650 4 48 177 170 182 186
Dark Demon 52 123 2420 5 48 133 170 189 174
Steel Centipede 253 89 1980 4 31 122 127 93 113
Messenger of Hades 255 76 1200 3 28 108 74 95 121
All of the npcs are way too powerful to OHKO. Messenger of Hades at 1200 HP needs level 37 to OHKO (level 46 for guaranteed) while the strongest ones cannot be OHKO ever (level caps at 90, so damage caps at 2708). There's more layouts, but those are worse than the main overworld due to high HP low XP. North of Mt. Mansetsu gave me: 7x Jizo Monkey, 98 XP per member 4x Jizo Monkey + 3 Tengu, 95 XP per member 4x Jizo Monkey + 1 Tengu, 83 XP per member There's more, but their XP is far too low. At the spot before Tempest Tower, the higher ones are: 1. 7x Tosen King, 161 XP per member 2. 5x Tosen King, 115 XP per member 3. 5x Lost Soul + x2 Tosen King, 106 XP per member 4. 1x Lost Soul + x4 Tosen King, 104 XP per member 5. 4x Tosen King, 92 XP per member
Name Name ID XP HP EP Level ATK DEF DEX AGI
Lost Soul 3 73 1600 2 50 180 113 193 171
Jizo Monkey 27 84 1320 4 31 99 98 115 116
Tosen King 29 143 3030 8 52 197 156 182 191
Tengu 32 83 1510 7 30 107 104 106 102
Unfortunately, this means the best area to grind, is still that 1 point right before Demon Puppet, at the cost of Miruko/Sango. An alternative method would be relying solely on Miroku's Wind Tunnel. His AGI at level 8 is 28. Assuming the idealized case where he gains 4 AGI every level, he outruns Antero Demon at level 26, with 100 AGI. He seems to be able to Wind Tunnel both Antero Demon and Slashing Demon at this level (inconsistently). Unfortunately, Inuyasha will likely be faster than Miroku (especially since I really don't want Miroku going first during boss fights).

1737986439