Aaaaalright, I'm back with more questions related to S2Final/S2Beta-to-S1 porting shenanigans.
So I've managed to port over a few of HPZ's objects and graphics (I'm still working on things, but I've got the glowing orb and waterfall objects ported, and have set up the bridge and floating platform objects to use HPZ-specific art). I've also taken a look at both S2Final and S2Beta's HPZ deformation code, and ported it over as well.
Having said that, I'm running into a few visual problems...
The further I move, the more HPZ's background starts to "overwrite" 16x16 blocks instead of just scrolling (I'm not sure how to describe this any better). The bigger problem is with the part of the background that's offscreen:
(ignore the palette, I hadn't ported HPZ's cycling palette at this point) It gets completely dishevelled like this. I've double-checked several times, and the ScrollBlock routines that the "main" routine calls are their S1 equivalents. I've even tried porting over the proto's versions of the ScrollBlock routines and using those (after correcting the RAM addresses of course), but they act even stranger (I assume I'm missing something in the main deform routine that's causing this). First question - What could be causing it to behave this way?
The other issue (which I'm hoping isn't too vague/general of a question to ask, my apologies if it is) is with the waterfall object. Once again, I've ported the object code over and converted all the addresses to their S1 equivalents, so - as far as I know - it's not reading unrelated data.
The graphics load fine, but I can't get them to appear in-game, except in only one spot (and even then, they aren't showing up correctly):
I know the original object code checks for the water level, but I've altered that check already (it uses the lower screen boundary). Having said that, I notice in the S2Final disassembly, it checks a variable called "Camera_x_pos_coarse" - Is this possibly related?