Advertisement
LilPinkus

why cane glitches crashes

Jan 16th, 2018
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.92 KB | None | 0 0
  1. Pinkus - 10/26/2017
  2. I think the problem is $B7[0x2]
  3. which is uninitialized in this case
  4. yeah, I memory edited it to 0x8800 (which seems like a safe value) and swamp doesnt crash
  5.  
  6. nacitar sevaht - 10/26/2017
  7. what's B7?
  8.  
  9. Pinkus - 10/26/2017
  10. points to a table
  11. one table per overlay
  12. its uninitialized so we're loading w/e overlay was loaded last I think
  13. possibly with a pointer that points to outside of the table or something
  14. yeah, if we can clear/modify $BA or $B7 somehow, we'd be golden
  15. no canes would crash
  16.  
  17. Pinkus - 10/26/2017
  18. its about dynamic stuff inside dungeons. like stepping on a star tile, making a chest appear, probably hammering a peg
  19. stuff like that matters for those variables
  20. stuff that makes jingle noise generally
  21. but it looks like they are set as you enter rooms too
  22.  
  23. Pinkus - 10/26/2017
  24. anyways I think data is just written everywhere in ram
  25. which is a good thing maybe
  26. its like using map in FD dungeon
  27. game tries to decompress invalid data and ends up putting jarbled values everywhere, including some graphics-related memory addresses
  28. perhaps some hardware register is read from, which would act differently on console and (at least bad) emulators
  29.  
  30. Pinkus - 10/26/2017
  31. oh lol
  32. ye so I can see its writing all over hardware registers and stuff
  33. so everything makes sense
  34. now to figure out how to manipulate $ba and $b7..
  35.  
  36. Pinkus - 10/26/2017
  37. Ok, generally every screen will have different values here, all of them unintended for our functionality. It's used for multiple things when loading a new room (so intra-transitions does not touch it). The last thing is generally loading a pointer to objects that should be drawn in the newly loaded room, so no way to manipulate that. In rooms that fade in/out (like GWG eastern) some code will run after the room is loaded, and it should be set to the same value every time I think.
  38. I've yet to find anything we can do to manipulate but I'll read on more.
  39. Applying overlay, whatever that entails, also changes it after the room is loaded. I tested walking on a star tile in room before mummy hellway and it changed. I'm not sure what other examples there are but seems to be 19 overlays(edited)
  40.  
  41. Pinkus - 10/26/2017
  42. its the darkness
  43. or, fade in/out
  44. as noted above
  45. so if there are more than one way to get to a supertile, and one of them includes a fade out/in effect (like staircases), those can be used to save it
  46. also considering we're writing random data to random addresses, random things can save it too lol
  47. basically the loop is waiting for the sequence $FF, $FF to stop. that can happen on the first try or .. never
  48. in which case we'd write over a lot of shit
  49. and concidering the values generally are random, unless there is a fadeout/in effect, or you happen to interact with some overlay, we get different glitches in different rooms, though they do look the same I guess..
  50.  
  51. Blank - 10/26/2017
  52. so could be different results if you enter using staicases or not basically?
  53.  
  54. Pinkus - 10/26/2017
  55. I think we can say that entering staircase will always be safe
  56. you'll get the same value I think
  57.  
  58. Blank - 10/26/2017
  59. In desert it's safe, but entering normally (by advancing in desert and going back) gives more beneficial gfx(edited)
  60.  
  61. Pinkus - 10/26/2017
  62. yep makes sense
  63. it has fade in/out upon entering the supertile coming from desert 2
  64. then you change supertile and go back, and you get the real room value instead
  65. so it's the reverse :>
  66.  
  67. Pinkus - 10/26/2017
  68. so
  69.  
  70. 1) red yba/prayer cutscene
  71. 2) doing transitions in different order
  72. - staircases
  73. - dark rooms
  74. - possibly others?
  75. 3) interact with overlay (only confirmed one is stepping on star tiles)
  76.  
  77. those are our options afaik
  78.  
  79. Pinkus - 10/26/2017
  80. studying the ram addresses we overwrite, theres not much of interest. but doing the swamp one does 224 writes to hardware, most of which is undefined behaviour if you do it outside of vblank.
  81. so the fact that emulators and consoles are different is not strange
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement