He was able to squeeze out so much memory that the Kanto region of the original games was more or less added as an afterthought.
And it was totally worth it, having the entire first game available in the sequel, just set a couple of years in the future, seeing how the world changed by "your" actions in the first games, blew the minds of many ten-year olds at the time.
If you want to look the story up: The "assembly optimization guru" was Satoru Iwata, who would later become CEO of Nintendo of America, and who unfortunately died of cancer a couple of years ago.
Any connection between those hardware elements and objects in a game's state, as well as updates to that state, must be maintained and implemented by software, and that software is the game engine.
For example, on the NES, the hardware can display 64 8x8x2bpp sprites, on a roughly 64x64 tile background where 1/4 of it is visible at any given time. Mario Bros' uses the hardware to "draw" Mario as 8 sprites by adjusting registers per frame, but things like what happens when movement commands are received, when Mario hits bricks and other objects, does not involve the PPU at all.