Zelda NES screen transitions are undefined behaviour
The vertical scrolling effect in the original "The Legend of Zelda" relies on manipulating the NES graphics hardware in a manner likely that was unintended by its designers. Writing to a particular PPU register while a frame is being drawn can result in graphical artefacts. The Legend of Zelda intentionally causes an artefact which manifests itself as partial vertical scrolling. This post gives some background on NES graphics hardware, and explains how the partial vertical scrolling trick works. Game developers on these older, constrained systems had to resort to some very clever thinking to work around said constraints.