Hi everyone. Today I decided to review some speedruns of the game, and I was surprised that on the first bonus level, the balloons appeared very late for runners Hostel and jodosutari, while other runners (like myself, Spyriel, and Hirexen – previous record holders) had them appear much faster. Wanting to figure out how this works, I found memory address $05CC, which acts as a timer controlling when the balloons emerge from the pipes during the bonus level. By default, after a hard reset, its value is zero, meaning the player has to wait 255 frames before the first balloon appears on the bonus level. After that, this variable is updated using the following formula:
LDA $1B ; unpredictable random value
AND #$3F
ADC #$28
STA $05CC
This means each subsequent balloon will appear approximately 40 to 100 frames later. The game's randomness is quite unpredictable, so it was often necessary to restart the game if the timers were unfavorable, since hitting a good cycle is extremely difficult. Now for the most interesting part: If you perform a soft reset, the value at address $05CC will be preserved for up to about 100 frames. However, if you do a hard reset, $05CC will be set back to zero, meaning you'll have to wait another full 255 frames on the next bonus level (which means at least two and a half seconds longer).
In other words, with a hard reset you will always lose a lot of time on the first bonus, not making it into a good cycle.