Writing a theme people can hum after one hearing
Melody is the easy part. Kondo's real achievement was making short loops feel inevitable rather than trapped.

The constraint nobody asked about

A theme that sticks is usually described as catchy, and catchiness gets credited to melody — a good tune that lodges in memory. But for Koji Kondo, working on Super Mario Bros. in 1985, melody was almost the secondary problem. The primary problem was duration. A player might spend twenty minutes on World 1-1 on a bad run, and the overworld theme would loop the entire time. Write something too complex and it becomes noise before the second loop; write something too simple and it becomes a torture device before the third. The target was a piece that felt complete on first hearing, varied enough to survive ten repetitions in a row, and short enough to fit in the memory budget the Famicom's cartridge actually offered. That is a different brief from writing a song.
The 2A03's architecture pushed Kondo toward solutions he might not have chosen on a more capable chip. With two pulse channels, a triangle, a noise channel, and a DPCM sampler, polyphony is rationed. Every note in a melody that gets harmonized is a note that cannot go anywhere else. The consequence is that the Super Mario Bros. overworld theme — the "Ground Theme" — keeps its melody almost entirely in one pulse channel and uses the second pulse channel and the triangle as accompaniment. The arrangement is spare by necessity, which turns out to be a virtue: sparseness gives the ear room to follow the melody without work, and without work the melody enters memory cleanly.
What the ground theme actually does
The Ground Theme opens with a pickup figure — a quick ascending run into the first strong beat — that signals something before the main idea even arrives. This is not decoration. The pickup primes a listener's pulse, literally, by implying a downbeat; by the time the theme's main phrase lands, the ear is already committed. Psychologically, a melody you're leaning toward before it starts is a melody you're already invested in. Kondo uses this device in the Legend of Zelda overworld theme too, where an ascending arpeggio on the triangle functions as a runway into the tune proper.

The Ground Theme's main phrase is eight bars that repeat in a modified form, then resolve to a longer consequent phrase, and then loop. The loop point is smoothed so the pickup figure at the top of the repeat arrives naturally from the tail of the previous statement — but more importantly, the harmonic motion lands on the tonic before the repeat, so the ear accepts the loop as a conclusion rather than an interruption. This is the invisible work that prevents listener fatigue: if a loop feels like it ends, the next iteration feels like a beginning, not a return to a trap.
The bass line on the triangle channel is insistently rhythmic — a vamping, almost Latin pattern that sits under the melody like a percussion figure as much as a harmonic one. The 2A03's triangle channel has no volume control whatsoever, which would seem to make it a liability for anything melodic. Kondo sidesteps this by treating the triangle as a bass-percussion hybrid: a voice so low and rhythmically locked that its lack of dynamics becomes invisibly correct. Nobody expects a bass guitar to fade out mid-phrase. The limitation becomes a kind of authenticity.
The 2A03's architecture pushed Kondo toward solutions he might not have chosen on a more capable chip.
The noise channel carries a simple pattern — kick-and-snare shorthand — that completes the sense that this is a band playing, not a chip beeping. Stripped of even one of these four voices, the Ground Theme sounds significantly thinner, but the melody lives in one voice, and the others give it its shape. That is the composer's structural bet: the piece is genuinely layered, not merely accompanied.
The Zelda problem and its solution
The Legend of Zelda overworld theme faces a harder brief than Mario's. Mario's game is fast; a player is moving constantly, and the tempo of the theme matches the pace of the action so the repetition is partly masked by event density. The Legend of Zelda is slower. A player explores, backtracks, stands still thinking. The theme will loop over extended silences in the action, which means fatigue sets in earlier.
Kondo's answer was to write a theme that already contains its own internal variation. The Zelda overworld theme modulates — it moves through distinct harmonic regions before returning home — and it does so quickly enough that the ear is always slightly ahead of the resolution, always about to hear something slightly new. The overall form is closer to a short rondo than a simple verse-and-chorus, with a refrain that returns but is continually offset by contrasting material. On a console with no dynamic volume on the triangle channel and no sustain or release programming complex enough to mimic orchestral strings, this kind of formal variety is the only depth available — and Kondo mines it fully.

There is also the matter of tempo. The Zelda theme sits at a march-like pace that is quick enough to feel active but measured enough to allow its inner voices to register. The second pulse channel, tracking the melody at a third or sixth in places, gives the theme a brief, almost harmonic richness that the ear catches on second and third hearings without being confused by it on the first. First-hearing accessibility and repeated-listening reward are not usually in tension — but they require deliberate calibration, and Kondo calibrates them by keeping the melody in front and the harmony slightly behind it in perceptual salience.
Repetition as a feature, not a limit
What makes these scores remarkable is not that they are good melodies trapped in hardware limits. It is that the hardware limits shaped formal decisions that made them better melodies than they might otherwise have been. Composers with more channels, more memory and more dynamic range often fill space because they can. Kondo could not fill space; he had to make space feel full. The Ground Theme has almost no moment of textural rest — every bar is doing something rhythmically, harmonically and melodically — and yet it never feels cluttered because each layer is in its own register and serves its own clear function.
That clarity is the actual lesson. The 2A03's channel separation, its inability to blend timbres the way a real orchestra can, forces composers to be legible. A phrase in the upper pulse is not going to be masked by a wash of reverb or a wide string pad. It is simply there, or it is not. Writing for that condition trains an ear for melodic necessity: every note has to justify its presence because nothing will cover for it if it does not. The themes people still hum forty years later are not survivals of cultural accident. They were, in their original context, exactly as inevitable as they sound.