Super Mario Bros warp zones were intended to work slightly differently [video]
For those who can&#x27;t watch the video or just want a text summary:<p>The underground 1-2 level is supposed to stop scrolling as soon as the mundane return-to-surface pipe comes onto the right edge of the screen. (Unless you&#x27;re walking on the ceiling.) But because of a programming error, it keeps scrolling, revealing that the warp zone room is there.<p>It was originally intended to be a much more hidden secret than it turned out to be.<p>(This is all explained much more thoroughly yet accessibly, and illustrated much more brilliantly, in the video; I suggest you watch it when you can.)<p>Now for some speculation on my part.<p>It&#x27;s unclear whether the error was missed in testing or intentionally left unfixed because they decided they liked the erroneous behavior better. But there&#x27;s a bunch of evidence that warp zones were added very late in the game&#x27;s development, perhaps as a last-minute change.<p>This includes:<p>* Comments in original SMB source code (revealed in the 2021 &quot;Nintendo Gigaleak&quot;) confirm that the programmer thought they were checking if Y = 0 when deciding whether to lock scrolling for the warp zone, even though the code doesn&#x27;t do that. And these subroutines are located at the ends of their files&#x2F;sections.<p>* Each object and enemy in the game is assigned a code, and the ones used to control warp zones are assigned the last codes used in the game.<p>* Memory addresses assigned to warp zone control variables are at the end of their respective tables.<p>* The code that decides where the warp pipes take you is implemented as: &quot;Are we in World 1-x? Then 2-3-4. Else, are we underground? Then 5. Else, 6-7-8.&quot; This indicates that the level maps were stable when the warp code was written.