From b71b45a8f999e69a2e429e4c1782c69fdeec12b0 Mon Sep 17 00:00:00 2001 From: Luke Hubmayer-Werner Date: Wed, 26 Jun 2024 20:52:10 +0930 Subject: [PATCH 1/6] Test commit for subtree --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 11be88e..1e43f1e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ # ChocolateBirdData -The data definitions that ChocolateBird uses, separated out into its own repository so that other projects can easily use them. \ No newline at end of file +The data definitions that ChocolateBird uses, separated out into its own repository so that other projects can easily use them. +While the main ChocolateBird repo is mostly under AGPL3.0, this repo (or folder if viewed as a git subtree in the ChocolateBird repo) is intended to just be a collection of ROM maps of sorts, and structural definitions for data within them, and as such I am licensing it as CC0 so that anyone can use it for any purposes without any attribution or permission concerns. + +As the struct definitions use a simple custom language, a reference python implementation for reading, serializing, and deserializing them is provided. As it is intended to be a very simple format, datatypes with more complex logic will require overriding in code to do anything useful with them - these are the 'stubs' files, which should be loaded first, and then overriden as necessary. From 7c0806d3382cd03bdb80902479d5b0cb229a506f Mon Sep 17 00:00:00 2001 From: Luke Hubmayer-Werner Date: Wed, 26 Jun 2024 23:21:41 +0930 Subject: [PATCH 2/6] enemy stats should have a tbl_ prefix to match other tables --- 5/addresses_SNES_PSX.tsv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/5/addresses_SNES_PSX.tsv b/5/addresses_SNES_PSX.tsv index eb88839..4f9e473 100644 --- a/5/addresses_SNES_PSX.tsv +++ b/5/addresses_SNES_PSX.tsv @@ -18,7 +18,7 @@ enemy_battle_sprite_palettes 0x0ED000 See enemy_battle_sprite_data for pointe worldmap_blocks 0x0FF0C0 /nar/ff5_binx.bin 0x040300 3 of 4 of 192 of u8 # Top-left corners, top-right corners, bottom-left corners, bottom-right corners worldmap_tiles.bias 0x0FF9C0 /nar/ff5_bin3.bin 0x03FB00 3 of 256 of u8 Add to each pixel of the mode7c tiles worldmap_palettes 0x0FFCC0 /nar/ff5_binx.bin 0x040000 3 of Palette128Of555 -enemy_stats 0x100000 384 of EnemyStats +tbl_enemy_stats 0x100000 384 of EnemyStats enemy_battle_sprite_layouts_small 0x10D004 102 of 8 of u8 length 0x330 enemy_battle_sprite_layouts_large 0x10D334 72 of 16 of u16 length 0x900 enemy_battle_sprite_mini 0x10E003 4 of TileSNES4bpp length 0x80 From c7913232da1050288bed59dec7af365be336e647 Mon Sep 17 00:00:00 2001 From: Luke Hubmayer-Werner Date: Wed, 26 Jun 2024 23:54:06 +0930 Subject: [PATCH 3/6] Fix extra byte on EnemyStats --- 5/structs/SNES.tsv | 1 - 1 file changed, 1 deletion(-) diff --git a/5/structs/SNES.tsv b/5/structs/SNES.tsv index 650f01c..6d03abe 100644 --- a/5/structs/SNES.tsv +++ b/5/structs/SNES.tsv @@ -160,6 +160,5 @@ u8 monster_type u8 flags_25 u16 status_26 u16 status_28 -u8 29 u8 30 u8 level # 31 From 5dd3518437dbdeb5e8dfd2f981650cd925d00795 Mon Sep 17 00:00:00 2001 From: Luke Hubmayer-Werner Date: Thu, 27 Jun 2024 14:41:12 +0930 Subject: [PATCH 4/6] Remove PaletteOf555 type, make godot implementation automatically detect arrays of colors in general form --- 5/addresses_SNES_PSX.tsv | 14 +++++++------- structs_SNES_stubs.tsv | 11 ++++------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/5/addresses_SNES_PSX.tsv b/5/addresses_SNES_PSX.tsv index 4f9e473..3ef7da5 100644 --- a/5/addresses_SNES_PSX.tsv +++ b/5/addresses_SNES_PSX.tsv @@ -1,7 +1,7 @@ Label SNES PSX_file PSX_offset format Comment -character_battle_sprite_stone_palette 0x00F807 N/A N/A Palette16Of555 Also 0x199835 -character_battle_sprite_disabled_palette 0x00F867 /mnu/memsave.bin 0x000034 Palette16Of555 -locations_bg_palettes 0x03BB00 /nar/ff5_binx.bin 0x03BF80 43 of Palette128Of555 +character_battle_sprite_stone_palette 0x00F807 N/A N/A 16 of ColorBGR555 Also 0x199835 +character_battle_sprite_disabled_palette 0x00F867 /mnu/memsave.bin 0x000034 16 of ColorBGR555 +locations_bg_palettes 0x03BB00 /nar/ff5_binx.bin 0x03BF80 43 of 128 of ColorBGR555 font_glyphs_dialogue 0x03E800 256 of SNESTritile length 0x1800 sfx_brr_data 0x041E3F Use the below SPC pointers sfx_brr_pointers 0x041F4F 8 of 2 of u16 SPC memory addresses not ROM. Start address followed by loop address. @@ -17,7 +17,7 @@ bgm_instrument_indices 0x043DAA 72 of 16 of u16 length 0x900 enemy_battle_sprite_palettes 0x0ED000 See enemy_battle_sprite_data for pointers. Some are 8 colours instead of 16. worldmap_blocks 0x0FF0C0 /nar/ff5_binx.bin 0x040300 3 of 4 of 192 of u8 # Top-left corners, top-right corners, bottom-left corners, bottom-right corners worldmap_tiles.bias 0x0FF9C0 /nar/ff5_bin3.bin 0x03FB00 3 of 256 of u8 Add to each pixel of the mode7c tiles -worldmap_palettes 0x0FFCC0 /nar/ff5_binx.bin 0x040000 3 of Palette128Of555 +worldmap_palettes 0x0FFCC0 /nar/ff5_binx.bin 0x040000 3 of 128 of ColorBGR555 tbl_enemy_stats 0x100000 384 of EnemyStats enemy_battle_sprite_layouts_small 0x10D004 102 of 8 of u8 length 0x330 enemy_battle_sprite_layouts_large 0x10D334 72 of 16 of u16 length 0x900 @@ -49,15 +49,15 @@ tbl_ability_stats_passives 0x116308 33 of 4 of u8 length 0x84 character_initial_data 0x117000 4 of Character length 0x140 attack_layouts 0x117FA0 5 of 2048 of u8 length 0x2400 weapon_palettes 0x11A3A0 -enemy_battle_status_sprite_palette 0x11A400 Palette16Of555 +enemy_battle_status_sprite_palette 0x11A400 16 of ColorBGR555 tiles_fist 0x11D710 /btl/ff5_btl.bin 0x021D10 TileSNES3bpp Also /mnu/men_bin.eng:0x00D910 font_glyphs_small 0x11F000 256 of TileSNES2bpp length 0x1000 character_battle_sprite_tiles 0x120000 /mnu/men_bin.eng 0x010200 5 of 22 of 48 of TileSNES4bpp -character_battle_sprite_palettes 0x14A3C0 /btl/ff5_btl.bin 0x0273C0 5 of 22 of Palette16Of555 Also /mnu/men_bin.eng:0x03A5C0 +character_battle_sprite_palettes 0x14A3C0 /btl/ff5_btl.bin 0x0273C0 5 of 22 of 16 of ColorBGR555 Also /mnu/men_bin.eng:0x03A5C0 enemy_battle_sprite_data 0x14B180 384 of EnemySpriteData length 0x780 character_battle_sprite_layouts 0x14B997 /btl/ff5_btl.bin 0x028997 11 of 6 of u8 tbl_battle_backgrounds 0x14BA21 34 of BattleBackgroundData -battle_background_palettes 0x14BB31 84 of Palette16Of555 +battle_background_palettes 0x14BB31 84 of 16 of ColorBGR555 ptrs_battle_background_tile_animations 0x14C5B1 8 of u16 bank 0x140000 (0xD40000) battle_background_tile_animations_data 0x14C5C1 see above ptrs_battle_background_palette_animations 0x14C6CD 3 of u16 bank 0x140000 (0xD40000) diff --git a/structs_SNES_stubs.tsv b/structs_SNES_stubs.tsv index 90e3fdd..e26faa1 100644 --- a/structs_SNES_stubs.tsv +++ b/structs_SNES_stubs.tsv @@ -20,10 +20,7 @@ struct SNESTritile 24 of u8 data struct ColorBGR555 -u16 data - -struct Palette16Of555 # Typed PoolColorArray in GDscript -16 of ColorBGR555 data - -struct Palette128Of555 # Typed PoolColorArray in GDscript -128 of ColorBGR555 data +u5 r5 +u5 g5 +u5 b5 +u1 0 From 6fe0e4445e53549505377c16c6259b90a5af05ff Mon Sep 17 00:00:00 2001 From: Luke Hubmayer-Werner Date: Sun, 30 Jun 2024 14:30:25 +0930 Subject: [PATCH 5/6] 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 From 20a0820324011a8328d5de55d630ec7cf0360438 Mon Sep 17 00:00:00 2001 From: Luke Hubmayer-Werner Date: Sun, 30 Jun 2024 14:33:38 +0930 Subject: [PATCH 6/6] Backfill some more SNES data --- 5/addresses_SNES_PSX.tsv | 44 ++++++++++++++++++++++++++++++++++++++++ 5/structs/SNES.tsv | 35 ++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) diff --git a/5/addresses_SNES_PSX.tsv b/5/addresses_SNES_PSX.tsv index 3ef7da5..37fb3eb 100644 --- a/5/addresses_SNES_PSX.tsv +++ b/5/addresses_SNES_PSX.tsv @@ -14,11 +14,55 @@ bgm_instrument_loop_starts 0x043CD8 35 of u16 bgm_instrument_samplerates 0x043D1E 35 of u16 bgm_instrument_adsrs 0x043D64 35 of u16 bgm_instrument_indices 0x043DAA 72 of 16 of u16 length 0x900 + +worldmap_compressed_tilesets 0x070000 tilesets 0 up to 0x434 +worldmap_compressed_tilesets2 0x080000 tilesets 0x434 up to 0x500 +ptrs_jp_speech 0x082220 2160 of u16 +ptrs_extended_event_data 0x083320 1940 of u24 +extended_event_data 0x0849DF See above for addresses +jp_speech 0x0A0000 See 0x082220 for offsets +ptrs_tilemaps 0x0B0000 328 of u16 +tilemaps 0x0B0290 See above for offsets + +ptrs_npc_actions 0x0E0000 928 of u16 +npc_actions 0x0E0740 See above for offsets +ptrs_event_places 0x0E2400 512 of u16 +event_places 0x0E2800 920 of EventPlace See above for offsets +ptrs_zone_exits 0x0E36C0 512 of u16 +zone_exits 0x0E3AC0 See above for offsets +ptrs_npc_data 0x0E59C0 512 of u16 +npc_data 0x0E5DC2 See above for offsets +zones 0x0E9C00 512 of ZoneData enemy_battle_sprite_palettes 0x0ED000 See enemy_battle_sprite_data for pointers. Some are 8 colours instead of 16. +? 0x0EE130 +ptrs_tile_blocks 0x0F0000 28 of u16 +tile_blocks 0x0F0038 See above for offsets +ptrs_tile_properties 0x0FC540 23 of u16 +tile_properties 0x0FC56E See above for offsets +worldmap_minimap_border_tiles 0x0FD800 32 of TileSNES4bpp length 0x400 +ptrs_worldmap_tilesets 0x0FE000 5 of 256 of u16 Every offset points to a horizontal line of 256 tiles stored in banks C7 and C8 +worldmap_block_properties 0x0FEA00 3 of 192 of u24 worldmap_blocks 0x0FF0C0 /nar/ff5_binx.bin 0x040300 3 of 4 of 192 of u8 # Top-left corners, top-right corners, bottom-left corners, bottom-right corners worldmap_tiles.bias 0x0FF9C0 /nar/ff5_bin3.bin 0x03FB00 3 of 256 of u8 Add to each pixel of the mode7c tiles worldmap_palettes 0x0FFCC0 /nar/ff5_binx.bin 0x040000 3 of 128 of ColorBGR555 tbl_enemy_stats 0x100000 384 of EnemyStats +tbl_enemy_encounters 0x103000 512 of 16 of u8 +tbl_enemy_item_rewards 0x105000 384 of 4 of u8 2 drops 2 steals +tbl_enemy_control_actions 0x105600 384 of 4 of u8 +jp_enemy_names 0x105C00 +tbl_enemy_groups 0x106800 256 of 4 of u16 +ptrs_jp_location_names 0x107000 164 of u16 +jp_location_names 0x107200 See above +encounters_events 0x107800 +encounters_trapchests 0x107980 +enemy_zones.worldmaps 0x107A00 3 of 512 of u8 TODO +enemy_zones.dungeons 0x108000 512 of u16 TODO +tbl_zone_danger 0x108400 TODO +tbl_enemy_release_actions 0x108600 384 of u16 +tbl_enemy_formation_coords 0x108900 +tbl_enemy_special_attacks 0x109900 384 of u16 +ptrs_enemy_ai_scripts 0x109C00 384 of u16 +enemy_ai_scripts 0x109F00 See above for offsets enemy_battle_sprite_layouts_small 0x10D004 102 of 8 of u8 length 0x330 enemy_battle_sprite_layouts_large 0x10D334 72 of 16 of u16 length 0x900 enemy_battle_sprite_mini 0x10E003 4 of TileSNES4bpp length 0x80 diff --git a/5/structs/SNES.tsv b/5/structs/SNES.tsv index 6d03abe..d0dfea4 100644 --- a/5/structs/SNES.tsv +++ b/5/structs/SNES.tsv @@ -162,3 +162,38 @@ u16 status_26 u16 status_28 u8 30 u8 level # 31 + +struct EventPlace +u8 x +u8 y +u16 event_id + +struct ZoneExit +u8 x +u8 y +u16 dest_map_id +u8 dest_x +u8 dest_y + +struct ZoneData +u16 npc_layer +u8 name_id +u8 shadow_flags # Maybe make a type for this later +u8 graphic_maps # MSb animation-related, 6 LSbs are ID for table in 0x005BB8 which writes to $2131-$2133 (Color Math Designation, Subscreen BG color) +u8 tile_properties +u8 flags_6 +u8 7 +u8 blockset_id +4 of u6 tileset_ids +3 of u10 blockmap_ids +u2 _ +u8 16 +u8 17 +u8 18 +u8 19 +u8 20 +u8 21 +u8 palette_id +u8 23 +u8 24 +u8 music_id