Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [11:26 PM] Exarion: [unknown] pokemonred40.dem 5.55 KB
- [11:26 PM] Exarion: ^failure from 00:05:07:52 with u-->U npc
- [11:28 PM] Exarion: and I just played the demo that generated a successful manip earlier, and it also got that failure from the same save file
- [11:31 PM] Exarion: and I redownloaded the successful save file that I posted on monday, then ran pokemonred3.dem through that, and it did not fail
- [11:31 PM] Exarion: so unless I am blanking on something, it has to be a save file difference, not printletterdelay
- [11:43 PM] entrpntr: agree with it being a save file difference
- [11:43 PM] entrpntr: exciting!
- [11:44 PM] entrpntr: everything is exactly the same on the first joypad hit in overworld after Nido catch
- [11:44 PM] entrpntr: it is diverging before entering Viridian gate
- [11:45 PM] entrpntr: C4 54 vs C7 53 for hra+hrs, internal divider is the same
- [12:00 AM] entrpntr: it is diverging when reloading first Viridian NPC
- [12:00 AM] entrpntr: lollolokl
- [12:00 AM] entrpntr: @Dabomstew
- [12:01 AM] Dabomstew: where could that possibly be stored
- [12:05 AM] Dabomstew: some old data must somehow be getting used
- [12:32 AM] entrpntr: ya, I didn't see anything that would be different, but I may very easily have overlooked something
- [12:36 AM] entrpntr: I just broke on 0:0F4D (joypadOverworld) until I found the divergence
- [12:36 AM] entrpntr: and it was a tile after NPC gets loaded (first tile his sprite is visible, at least with that breakpoint)
- [12:37 AM] entrpntr: 57 06 vs 56 06
- [12:38 AM] entrpntr: being hra+hrs at the first joypadOverworld with divergence
- [12:51 AM] entrpntr: sprite data at that point is also not the same
- [12:52 AM] Dabomstew: what fields differ
- [12:55 AM] entrpntr: C119; C102, C107, C108, C302, C306, C30A, C30E
- [12:55 AM] entrpntr: so, mostly players, and what I think is NPC's step counter (which wouldn't be surprising)
- [12:55 AM] entrpntr: first thought was that it might be buffered vs unbuffered save but idk
- [12:57 AM] entrpntr:
- C10x (S) -- 01 00 0E 00 3C 01 40 03 02 0C 40 40 00 00 00 00
- C30x (S) -- 4C 50 08 20 4C 48 09 20 54 50 0A 22 54 48 0B 23
- C10x (F) -- 01 00 0F 00 3C 01 40 00 03 0C 40 40 00 00 00 00
- C30x (F) -- 4C 50 88 20 4C 48 89 20 54 50 8A 22 54 48 8B 23
- [12:58 AM] entrpntr: post-divergence, maybe I didn't pay close attention at what was going on pre-
- [1:04 AM] entrpntr: yeah I think it's buffered vs unbuffered
- [1:05 AM] entrpntr: and that must only matter when you load other sprites
- [1:06 AM] entrpntr: failure is on the buffered save
- [1:09 AM] Dabomstew: it's the very first random call after the last matching joypadoverworld
- [1:09 AM] Dabomstew: being called 22 cycles later
- [1:22 AM] Dabomstew: unbuffered arrives at UpdateNPCSprite later
- [1:22 AM] Dabomstew: checking more stuff
- [1:26 AM] Dabomstew: confirmed that it is a divergence in UpdatePlayerSprite (okay, that wasn't exactly rocket science)
- [1:33 AM] Dabomstew: oh it's actually 44 cycles not 22
- [1:33 AM] Dabomstew: derped on the internal divider stuff
- [1:33 AM] Dabomstew: in any case
- [1:34 AM] Dabomstew: the divergence for this specific part is caused by hitting or missing this https://github.com/pret/pokered/blob/46a94c63fc287e7290502776d02648476bc44171/engine/overworld/movement.asm#L71
- [1:34 AM] Dabomstew: failure (buffered) takes the jump, success (unbuffered) doesn't and spends 44 additional cycles
- [1:34 AM] Dabomstew: what it actually means is quite another question
- [1:37 AM] Dabomstew: but it should imply a ~44/256 chance of an RNG divergence between buffered and unbuffered for each NPC timer reset
- [1:39 AM] Dabomstew: the crucial bit of state being c107
- [1:45 AM] Dabomstew: just means that yes: buffered vs non-buffered matters for everything
- [1:46 AM] Dabomstew: unless you are doing a manip in an npcless environment
- [1:46 AM] Dabomstew: but it also means that it is 100% reasonable that a manip does not show any signs of buffered vs non-buffered mattering even if it does load a few NPCs
- [1:58 AM] entrpntr: yeah and for Moon it probably only matters until the first ladder
- -
- [11:44 PM] gifvex: the difference between un/buffered saves is d528 wPlayerMovingDirection being zero (unbuffered) vs nonzero (buffered)
- [11:45 PM] gifvex: it causes c107 PlayerIntraAnimFrameCounter to start at a different value and take the jump @Dabomstew noted previously at a different time https://github.com/pret/pokered/blob/46a94c63fc287e7290502776d02648476bc44171/engine/overworld/movement.asm#L71
- [11:46 PM] gifvex: in fact since it's an anim counter, the difference could have been seen this whole time (these are same frame of a demo playback from un/buffered saves) http://imgur.com/a/ZG4Xd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement