Screen Scroll While Rolling Fix - RetroKoH/S1Fixed GitHub Wiki

(Original guide by Mercury)
Source: ReadySonic
Commit: bdefc28

When Sonic finishes looking up or down, the screen is supposed to scroll back into the neutral position. However, the programmers neglected to put the code that handles this into Sonic's "roll" routine. So, if Sonic rolls up while the screen is re-centering, the screen will cease scrolling until Sonic uncurls. This isn't a huge deal in the base game, but it can make Spindashing awkward if we perform the move quickly enough. Let's fix this.

In _incObj\Sonic RollSpeed.asm, at loc_131CC:, add these lines:

loc_131CC:
+	cmpi.w	#$60,(v_lookshift).w
+	beq.s	.cont2
+	bcc.s	.cont1
+	addq.w	#4,(v_lookshift).w

+.cont1:
+	subq.w	#2,(v_lookshift).w

+.cont2:

	move.b	obAngle(a0),d0
	jsr	(CalcSine).l

The added lines are a simple copy/paste from Sonic_ResetScr: in the file _incObj\Sonic Move.asm. These instructions are what make the screen reset to its default positioning.