a particular sequence of inputs :
up, down, left, right, A+START during the opening scene of Sonic the Hedgehog (right when Sonic appear from inside the giant ring)
Then you choose the final level, beat up robotnik (stay on the right side of the screen it will be easier) and don't forget to jump on his flying saucer when he escapes to unlock the true ending.