Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FIGURING OUT SPRITE PALETTE GLITCHES
- Where is ladder loaded? Ness's ladder sprite stored at c3f2bb
- at every? frame:
- read from c079e6 routine UNKNOWN_C0780F, is end of routine to load this number (0x15 == 21)
- called from c07a74 routine UNKNOWN_C07A56
- get sprite data location (ef1d43)
- this function was called with y == 0x18, asl'd to 0x30
- that is the index into 30x2 tables
- 00ef stored into 2a06 table (2a36) UNKNOWN_30X2_TABLE_30
- 1d43 + 0x9 (1d4c) stored into 29ca table (29fa) UNKNOWN_30X2_TABLE_29
- sprites_cardinal I believe
- value at 1d43 + 0x8 (1d4b), bank, stored into 2a42 table (2a72) UNKNOWN_30X2_TABLE_31
- this function was called with x == 0x08, stored into 2x22 table (2c52) UNKNOWN_30X2_TABLE_40
- loads 4dc6 == 99ce, adds 0x37 = 9a05 (unknown data in character stats section), loads
- I think this might be comparing this sprite state (now 0x8) vs old state (0x0 at 9a05)?
- BEQ @UNKNOWN1
- if not equal, write new val to spot, load 7e1002 + 0x30 (asl'd y) UNKNOWN_30X2_TABLE_10
- in this case 6000, ora'd with 8000 = e000, stored back to same
- if the game state + 144 is 0 or the new sprite state is 0xc, skip to @UNKNOWN2
- load 1002 table, ora with 6000, store back to same, goto @UNKNOWN3
- otherwise, load 1002 table, and 1fff ( = 0 itc), store back to same, goto @UNKNOWN3
- if game state + 176 is 2, do ora 1000 on same table same store
- called from c04df7 routine UNKNOWN_C04D78, lengthy
- palette for sprite 1 is at ef1a82. Where is it read on screen transition?
- full sprite data: ef1a7f
- read at c01f1b routine PARSE_C3FC49_DATA: ;$C01E49
- maybe $21 is number of sprite table entries? not helpful if not saved to a 30x2
- c01ebe: getting the pointer into UNKNOWN_C42B0D data that has the sprite pieces number
- too many steps, let's just cheat
- UNKNOWN_C01D38 takes palette in at y and does dumb shit with it, two inner loops
- stores values modified from it un a weird way at 467e,x (i.e. 7e4680)
- 467e is some weird ass table of sprite pieces. changing values makes things go wild.
- one half a byte for each sprite piece is the most significant digit hex of the palette.
- UNKNOWN_30X2_TABLE_16 and UNKNOWN_30X2_TABLE_15 is the index to the 467e table first entry
- possibly another table is the number of entries
- if we hijack specifically in main-character only, we don't need to know number, we can hardcode
- change the X entries for the palettes, maybe every frame, maybe on change
- might be able to just set and let other processing on that data handle the weird changes
- 4 entries: +2, +7, +12 (0x0c), +17 (0x11)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement