From 6fe0e4445e53549505377c16c6259b90a5af05ff Mon Sep 17 00:00:00 2001 From: Luke Hubmayer-Werner Date: Sun, 30 Jun 2024 14:30:25 +0930 Subject: [PATCH] Add a little bit of GBA support to demonstrate project portability --- 5/addresses_GBA.tsv | 2 + 5/platform_mappings/enemy_ids.tsv | 406 ++++++++++++++++++++++++++++++ 5/structs/GBA.tsv | 167 ++++++++++++ 3 files changed, 575 insertions(+) create mode 100644 5/addresses_GBA.tsv create mode 100644 5/platform_mappings/enemy_ids.tsv create mode 100644 5/structs/GBA.tsv diff --git a/5/addresses_GBA.tsv b/5/addresses_GBA.tsv new file mode 100644 index 0000000..c74a469 --- /dev/null +++ b/5/addresses_GBA.tsv @@ -0,0 +1,2 @@ +Label U E J format Comment +tbl_enemy_stats 0x14B2A8 512 of EnemyStats length 0x4800 diff --git a/5/platform_mappings/enemy_ids.tsv b/5/platform_mappings/enemy_ids.tsv new file mode 100644 index 0000000..712d55c --- /dev/null +++ b/5/platform_mappings/enemy_ids.tsv @@ -0,0 +1,406 @@ +SNES GBA Comment +0 224 Goblin +1 225 Killer Bee +2 226 Nut Eater - also GBA 503 +3 227 Stray Cat +4 228 Steel Bat +5 229 Dearo +6 230 Stroper +7 231 Black Goblin +8 232 White Snake +9 233 Mold Wind +10 234 ManiWizard +11 235 Magic Pot +12 236 Sucker +13 237 Octoraken +14 238 Gatlings +15 239 Bighorn +16 240 Tatu +17 241 Bander S. +18 242 Galura +19 243 Skeleton +20 244 Carcurser +21 245 UndeadRusk +22 246 PsychoHead +23 247 RockGarter +24 248 Gala Cat +25 249 Cockatrice +26 250 Blocks +27 251 Elf Toad +28 252 IceSoldier +29 253 RikaldMage +30 254 Wyvern +31 255 Padosule +32 256 Byblos +33 257 Aegil +34 258 Zuu +35 259 Wild Nack +36 260 GrassTurtle +37 261 Silent Bee +38 262 Mithril Drgn +39 263 Ramuh +40 264 Crew Dust +41 265 Poltergeist +42 266 Motor Trap +43 267 Defeater +44 268 Garkimasra - diff elements_weak? GBA 0, SNES 255 - but elements_absorb is 255 +45 269 Sergeant +46 270 Sorcerer +47 271 Karnak +48 272 Gigas +49 273 Page 32 +50 274 Page 64 +51 275 Page 128 +52 276 Page 256 +53 277 Ifrit +54 278 Bomb +55 279 TwinLizard +56 280 BioSoldier +57 281 Crescent +58 282 BlackFlame +59 283 StoneGolem +60 284 MiniDragon +61 285 Prototype +62 286 D.Chimera +63 287 Sand Porky +64 288 Sand Killer +65 289 Sand Bear +66 290 Ra Mage +67 291 LonkaKnght +68 292 StonedMask +69 293 Whirl Demon +70 294 Lamia +71 295 ArchaeToad +72 296 Hyudora +73 297 Hydra +74 298 Water Buzz +75 299 Torrent +76 300 Rock Brain +77 301 Tarantula +78 302 Jail Bear +79 303 Lunenta +80 304 Dilure +81 305 Faerie Orc +82 306 Devourer +83 307 Mandrake +84 308 Kuzar +85 309 Cactus +86 310 Sand Crawl +87 311 ShieldDrgn +88 312 Blood Slime +89 313 Acrophese +90 314 MooglEater +91 315 Lopros +92 316 Skull Eater +93 317 Aquathone +94 318 Weresnake +95 319 Conago +96 320 Ridicule +97 321 Andagranda +98 322 Drippy +99 323 Likaon +100 324 BoneDragon +101 325 Sting Eagle +102 326 ZombieDrgn +103 327 Golem +104 328 Neon +105 329 Magnetes +106 330 Wall Knight +107 331 Traveler +108 332 Tricker +109 333 Gravido +110 334 Ziggurat +111 335 Cure Beast +112 336 Land Turtle +113 337 Bold Mani +114 338 Shoat +115 339 MiniMage +116 340 GajraGajri +117 341 Mammon +118 342 Imp +119 343 Wyrm +120 344 TwinLizard +121 345 Blind Wolf +122 346 Arage +123 347 Wall Mage +124 348 Magic Drgn +125 349 DarkWizard +126 350 AdamaGolem +127 351 BandelKuar +128 352 Motordrive +129 353 BlueDragon +130 354 Red Dragon +131 355 Yellow Drgn +132 356 Sleepy +133 357 Treeman +134 358 Hedgehog +135 359 Python +136 360 Shadow +137 361 Elm Gigas +138 362 Pao +139 363 Radiator +140 364 Metamorpha +141 365 Unknown +142 366 Desertpede +143 367 Barette +144 368 Sekmet +145 369 BlandLamia +146 370 Pyra Layer +147 371 Nile +148 372 Archaesaur +149 373 ZephyrZone +150 374 ExdethSoul +151 375 Slug +152 376 GloomWidow +153 377 Mukare +154 378 Ixecrator +155 379 Owazoral +156 380 ShdwDancer +157 381 Cursed One +158 382 Slownin +159 383 TinyMage +160 384 Dim Master +161 385 BoneDragon +162 386 Flare +163 387 DuelKnight +164 388 Ion +165 389 Berserker +166 390 ZombieDrgn +167 391 Druid +168 392 Iron Dress +169 393 Statue +170 394 Blizzard +171 395 Isteritos +172 396 Spizner +173 397 Unknown +174 398 Unknown +175 399 Unknown +176 400 Unknown +177 401 MercuryBat +178 402 Coral +179 403 Tonberi +180 404 Gel Water +181 405 Fall Guard +182 406 Alcumia +183 407 Red Dragon +184 408 Hydra +185 409 BoneDragon +186 410 Grenade +187 411 SwrdDancer +188 412 Bardandels +189 413 DoomDealer +190 414 Anku Heggu +191 415 Ammona +192 416 Land Crawl +193 417 Chamcubia +194 418 Bella Donna +195 419 Cherie +196 420 White Flame +197 421 MossFungus +198 422 Orcat +199 423 Iron Giant +200 424 Death Claw +201 425 K.Behemoth +202 426 Farfarerro +203 427 Necromancr +204 428 Ninja +205 429 Great Drgn +206 430 AvisDragon +207 431 Gorchimera +208 432 LevelCheck +209 433 Mind Mage +210 434 Fury +211 435 Thing +212 436 Mover +213 437 CrysDragon +214 438 Achelone +215 439 Bodyguard +216 440 Gilgamesh +217 441 Sahagin +218 442 Th.Anemone +219 443 Sea Avis +220 444 Corvette +221 445 Armon +222 446 SeaScorpio +223 447 Silvune +224 448 Gel Fish +225 449 Giant Bird +226 450 Sea Devil +227 451 Stingray +228 452 ???? +229 453 Golem +230 454 Chimera +231 455 Shiva +232 456 Ifrit +233 457 Ramuh +234 458 Gala Cat +235 459 Wyvern +236 460 Elf Toad +237 461 Crew Dust +238 462 Whirl Demon +239 463 ZombieDrgn +240 464 D.Chimera +241 465 AdamaGolem +242 466 Ziggurat +243 467 LonkaKnght +244 468 BioSoldier +245 469 Lunenta +246 470 Tote Avis +247 471 Belfegor +248 472 Imp +249 473 Owazoral +250 474 Garkimasra +251 475 Gabbldegak +252 476 Gil Turtle - also GBA 151 +253 477 Omega - also GBA 152 with different flags_25? +254 478 Big Boss +255 479 unk - also GBA 505 through 511 map to this +256 0 WingRaptor +257 1 WingRaptor +258 2 Karlabos +259 3 Twin Tania +260 4 Siren +261 5 Siren +262 6 Forza +263 7 Magisa +264 8 Galura +265 9 LiquiFlame +266 10 LiquiFlame - diff elements_weak? GBA has 0, SNES has 2 +267 11 LiquiFlame +268 12 Commander +269 13 Sandworm +270 14 Hole +271 15 +272 16 AdamanTiMi +273 17 Flamegun +274 18 Rocket +275 19 Exdeath +276 20 Sol Cannon +277 21 ArchaeAvis +278 22 ArchaeAvis +279 23 ArchaeAvis +280 24 ArchaeAvis +281 25 ArchaeAvis +282 26 Chim.Brain +283 27 Titan +284 28 Puroboros +285 29 Abductor +286 30 Gilgamesh +287 31 Fishman +288 32 FlyingKillr +289 33 Lil'Chariot +290 34 NeoGalura +291 35 Gilgamesh - diff status_immune? GBA has 0x1074f4, SNES has 0x1070f4 +292 36 Tyrasaurus +293 37 Shiva +294 38 Abductor +295 39 HiryuuPlant +296 40 HiryuuFlowr +297 41 HiryuuFlowr +298 42 HiryuuFlowr +299 43 HiryuuFlowr +300 44 HiryuuFlowr +301 45 Gilgamesh +302 46 Enkidou +303 47 Atmos +304 48 +305 49 +306 50 +307 51 +308 52 Carbunkle +309 53 Merugene +310 54 Gilgamesh +311 55 Exdeath +312 56 Antlion +313 57 Mummy +314 58 Aspis +315 59 MachinHead - also GBA 504 +316 60 Merugene +317 61 Merugene +318 62 Merugene +319 63 Merugene +320 64 Odin +321 65 Gargoyle +322 66 Triton +323 67 Neregeid +324 68 Phobos +325 69 Omniscient +326 70 Minotauros +327 71 Leviathan +328 72 Stalker +329 73 Gogo +330 74 Bahamut +331 75 Jura Avis +332 76 Halicarnaso +333 77 Exdeath +334 78 NeoExdeath +335 79 NeoExdeath +336 80 Goblin +337 81 Iron Claw +338 82 Sergeant - level 0? +339 83 Karnak +340 84 Crayclaw +341 85 NeoGoblin - level 0? +342 86 Calofisteri +343 87 Apocalypse +344 88 Catastroph +345 89 Necrofobia +346 90 Twin Tania +347 91 Launcher +348 92 Launcher +349 93 Gilgamesh +350 94 Carbunkle +351 95 GrandMummy +352 96 Apanda +353 97 Alte Roite +354 98 Invisible +355 99 Abductor +356 100 BandelKuar +357 101 LiquiFlame +358 102 Kuzar +359 103 Sol Cannon +360 104 Pantera +361 105 Shinryuu +362 106 Barrier +363 107 +364 108 +365 109 +366 110 +367 111 +368 112 Chocobo +369 113 FatChocobo +370 114 Sylph +371 115 Remora +372 116 Shiva +373 117 Ramuh +374 118 Ifrit +375 119 Titan +376 120 Golem +377 121 Shoat +378 122 Carbunkle +379 123 Syldra +380 124 Odin +381 125 Phoenix +382 126 Leviathan +383 127 Bahamut + 128 Soul Eater + 129 Exoray + 130 Dark Elemental + 131 Medusa + 132 Mini Satana + 133 Assassin + 134 Duelist + 135 Ironclad + 136 Claret Dragon + 137 Dinozombie + 138 Behemoth + 139 Hades + 140 Grand Aevis + 141 Omega Mk.II + 142 Neo Shinryu + 143 Guardian + 144 Archeodemon + 145 Enuo + 146 Gilgamesh + 147 Crystal + 148 Wave Cannon diff --git a/5/structs/GBA.tsv b/5/structs/GBA.tsv new file mode 100644 index 0000000..369290c --- /dev/null +++ b/5/structs/GBA.tsv @@ -0,0 +1,167 @@ +struct AttackType +u1 is_blue_magic +u1 is_white_magic +u1 is_black_magic +u1 is_dimension_magic +u1 is_summon +u1 is_sound +u1 is_longrange +u1 is_physical + +struct AttackProperties +u2 action_delay +u1 roulette +u1 target_enemy_by_default +u1 can_target_either_side +u1 can_select_target +u1 always_target_all +u1 can_target_all + +struct WeaponData +AttackProperties attack_properties +AttackType attack_type +u6 item_type +u1 is_unthrowable +u1 byte_2_leftover +EquipStatBonus bonus +u6 description +u1 can_double_grip +u1 only_double_grip +u1 is_wonder_rod +u1 is_action_on_use +u1 can_magic_sword +u1 is_action_on_hit +u1 is_5.4 +u1 is_initiative +u1 is_knife_parry +u1 is_sword_parry +u7 spell_cast +u1 is_break_after_use +u8 attack_power +u7 attack_effect +u1 byte_8_leftover +u8 param0 # accuracy_percent for sub-100 weapons, crit rate on katanas, element on Flametongue/Icebrand/Excalibur/AirKnife/Trident/WindSpear +u8 param1 # on_hit_effect_percent for weapons that cast actions on hit, also Rune weapons bonus attack power +u8 param2 # action_on_hit for weapons that cast actions on hit, Also Rune weapons 5 mana cost on attack, also element of attack for rods + +struct ArmorData +u8 slot # b0 - 0x01 acc, 0x02 body, 0x04 head, 0x08 shield, 0xF0 unused +u8 weight # b1 +u6 item_type +u1 is_unthrowable +u1 byte_2_leftover +EquipStatBonus bonus # b3 +u6 description # b4 +u2 byte_4_leftovers +u1 is_improve_catch # b5 +u1 is_become_undead +u1 is_improve_dance +u1 is_halve_mp_cost +u1 is_improve_steal +u1 is_improve_brawl +u1 is_elf_cape_dodge +u1 is_block_all_magic # b5 +u8 evasion # b6 +u8 defense +u8 m_evasion +u8 m_def # b9 +u8 elem_effect # b10 - 01 ½ lightning, 02 ½ all, 03 immune poison damage, 04 absorb fire+immune ice+weak water, 05 absorb water+immune fire+weak lightning, 06 Bone Mail (absorb poison, halve ice, weak fire/holy), 07 absorb fire, 08 absorb ice +u8 status_effect # b11 - 01 auto-regen, 02 auto-doom, 03 auto-haste + immune slow/stop/paralyse/sleep, 04 immune petrify, 05 Ribbon, 06 immune confuse, 07 immune silence, 08 immune blind, 09 immune poison, 0A bone mail, 0B auto-reflect, 0C immune mini, 0D immune old/zombie, 0E auto-sap + immune sleep, 0F auto-blink, 10 immune mini/paralyse, 11 immune confuse/mini, 12 immune confuse/toad, 13 immune toad/paralyse + + +struct ItemData +AttackProperties attack_properties +u8 attack_type +u1 unk0 +u1 is_unmixable +u1 unk1 +u1 is_magic_lamp +u1 is_undrinkable +u1 is_unusable_in_battle +u1 is_unthrowable +u1 unk2 +u6 description # b3 +u2 byte_3_leftovers +u7 attack_formula +u1 is_unavoidable +u8 param_0 +u8 param_1 +u8 param_2 + + +struct MagicData +AttackProperties attack_properties +u8 attack_type +u4 meteo_extra_hits +u2 unk +u1 is_learnable +u1 is_monster_bit +u7 mp_cost +u1 is_unreflectable +u7 attack_formula +u1 is_unavoidable +u8 param_0 +u8 param_1 +u8 param_2 + + +struct ElemDef +u8 absorb +u8 evade +u8 immune +u8 half +u8 weak + +struct StatusEffect +4 of u8 initial +3 of u8 immune + + +struct EnemySpriteData +u7 tileset_offset_hi # combined with lo, << 3, + 0x150000 +u1 is_3bpp +u8 tileset_offset_lo +u2 palette_offset_hi # combined with lo, << 4, + 0x0ED000 +u4 unk +u1 is_separate_shadow +u1 is_large_layout +u8 palette_offset_lo +u8 layout_id # Small? <<3, + 0x10D004, take 8 bytes. Large? <<5, + 0x10D334, take 32 bytes. + +struct BattleBackgroundData +u8 tileset_id +2 of u8 palette_ids +u8 tilemap_id +u8 tilemap_flips_id +u8 tilemap_v_flips_id # Unused, all 0xFF = no flips +u8 tilecycle_id +u8 palcycle_id + +struct EnemyStats +u8 speed +u8 attack_power +u8 attack_multiplier +u8 evasion +u8 defense +u8 magic_power +u8 magic_defense +u8 magic_evasion +u16 max_hp +u16 max_mp +u16 reward_exp +u16 reward_gil +u8 attack_graphics +u8 elements_immune +u24 status_immune +u8 elements_absorb +AttackType attack_type +u8 elements_weak +u8 monster_type +u8 flags_25 +u16 status_26 +u16 status_28 +u16 monster_id +u8 level # 32 +u8 33 +u8 34 +u8 35