Advertisement
Guest User

Untitled

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