From 20a0820324011a8328d5de55d630ec7cf0360438 Mon Sep 17 00:00:00 2001 From: Luke Hubmayer-Werner Date: Sun, 30 Jun 2024 14:33:38 +0930 Subject: [PATCH] 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