Hidden Points Bugfix - RetroKoH/S1Fixed GitHub Wiki

(Original guide by 1337Rooster) Source: SCHG Page

You may not have noticed this, but Sonic 1 has a minor bug related to the hidden points earned by jumping after the signpost. There are three types of flags: '100', '1000', and '10000'. The issue is with the fact that the '100' flag only awards 10 points, instead of 100. Here is a brief illustration (Images courtesy of Sonic Retro):

image image

2200+100+100+100+1000+10000=13500, but we only have 13230 points.

To fix this, we need to open incObj/7D Hidden Bonuses.asm and look for a label called .points (@points for asm68k users). There are three points values:


; ===========================================================================

.points:	dc.w 0			; Bonus	points array

		dc.w 1000

		dc.w 100

		dc.w 1 ; This is the wrong number of points.

; ===========================================================================


The fix is VERY simple. We only need to add a 0 at the end of the last entry, so that it says dc.w 10 instead of dc.w 1. But why does this say 10 instead of 100? Actually, why do all three values seem smaller than they actually are? This is because the last digit of your score isn't actually stored in memory. Instead, the final zero on your score tally is merely a placeholder 0 inserted into the HUD display to make your score always result in a multiple of 10. This means that when you had that score of 13230, in actuality your score in memory is really 1323. When you get the flag for 1000 points, you really only gained 100. You'll notice something similar anywhere else where the subroutine AddPoints is called in the game.