Skip to content
Redmoon Calculators
← Blog
· 5 min read

How a "simple" Game Boy homebrew blows through its cartridge in a week

Eight-bit hardware feels like it should make budgeting easy — the whole console fits in kilobytes, how hard can it be? The tile, map, audio, and code byte-costs behind an accidental over-budget cartridge.

#gamedev#retro#pixel-art#homebrew

Retro homebrew has a specific way of lulling developers into a false sense of security. The target hardware is famously tiny — a stock Game Boy cartridge is 32 kilobytes, a number that sounds almost comically small next to a modern game's gigabytes — so it feels intuitively obvious that a homebrew project built with GB Studio, NESmaker, or SGDK should have room to spare. Then, a few weeks into production, with maybe a dozen rooms designed and a handful of songs composed, the build tool throws a capacity error, and the developer discovers that "tiny hardware" and "tiny budget discipline required" are not the same thing. If anything, the smaller the ceiling, the less slack there is to absorb decisions made without doing the arithmetic first.

Four things eat a cartridge, and none of them look expensive alone

A retro cartridge's budget is consumed by four categories, and every one of them looks harmless in isolation. Sprite tiles are small — roughly 16 bytes each for a basic Game Boy-style tile — so a couple hundred of them barely registers. Background maps cost more per unit, on the order of a kilobyte each, because a map is really a grid of tile references covering an entire screen or level section. Audio tracks are the heavyweight: a single music track can run several kilobytes once it's compiled into the sound driver's format. And code, measured roughly per line, adds up slowly but constantly across an entire project's logic. None of these categories is alarming on its own. What actually blows the budget is that a real game needs all four simultaneously, and their combined total grows in a straight line with content while the cartridge's capacity stays exactly fixed.

Worked example: how "reasonable" numbers add up to over budget

Take a Game Boy project — 32 KB of ROM — with what sounds like a modest content list: 200 sprite tiles, 8 background maps, 6 audio tracks, and 500 lines of game logic. Run the arithmetic: 200 tiles × 16 bytes is 3,200 bytes. Eight maps × 1,024 bytes is 8,192 bytes. Six audio tracks × 4,096 bytes is 24,576 bytes — already, on its own, most of the entire cartridge. Add 500 lines of code at roughly 4 bytes each, another 2,000 bytes, and the running total is 37,968 bytes against a 32,768-byte ceiling. That project is over budget before a single additional room, enemy, or song gets added — and nothing on that list sounds like an extravagant amount of content. Six songs and eight maps is closer to a minimal viable game than an ambitious one, which is exactly why this surprises people: the ceiling was never generous enough to survive a "normal-sized" content list without checking the math first.

Bank switching raises the ceiling, at a real cost

The classic escape hatch, and the reason retro consoles could ship games far larger than their base addressable memory, is bank switching: the cartridge hardware swaps different chunks of ROM in and out of the console's visible address space on demand, so the effective capacity can be several multiples of the base figure. This is a genuine and battle-tested solution — commercial NES and Genesis games routinely shipped multiple megabytes this way — but it is not free. Bank switching adds real code complexity: assets have to be organized so the right bank is paged in before it's needed, transitions between banks have timing rules, and a bug in bank management produces the specific, miserable class of glitch where the wrong bank is loaded and the screen shows garbled tiles or a frozen game. For a solo or small-team homebrew project, reaching for bank switching is a legitimate move once the budget math says you need it — but it should be a deliberate architectural decision made because the numbers demand it, not a reflexive fix bolted on after the build tool complains.

ROM isn't even the tightest constraint

The cartridge ceiling gets all the attention because it produces a hard build error, but it is often not the binding constraint in practice. Video RAM — the console's onboard memory for currently-loaded graphics, entirely separate from ROM — is frequently tighter. A stock Game Boy holds only around 384 tiles in VRAM at once, regardless of how many tiles exist in the cartridge as a whole; exceed that with tiles a given screen actually needs simultaneously visible, and the fix isn't freeing up ROM space, it's rethinking which tiles get shared and reused across a scene rather than each having a unique design. A project can be comfortably under its ROM budget and still fail in VRAM, because the two limits measure different things — total stored content versus content visible at one instant — and a developer who only tracks the ROM number can be blindsided by the VRAM one anyway.

These are planning numbers, not compiler numbers

Worth saying plainly: the per-tile, per-map, per-track figures here are heuristic planning estimates, not what any specific compression scheme or asset pipeline will produce exactly. Real tools apply compression to graphics and audio that can meaningfully shrink the final numbers, and different engines (GB Studio versus raw assembly versus SGDK) pack assets differently. The value of the heuristic isn't precision to the byte — it's catching a budget problem during pre-production planning, while cutting a map or trimming a song is a five-minute decision, instead of discovering it during a build that refuses to compile after months of content has already been made.

Our retro ROM/RAM budget calculator takes your target system, tile count, map count, audio track count, and code size, and returns a color-coded capacity gauge plus bank-switching and VRAM warnings before you've built anything — so the budget conversation happens at the design stage, not the day the compiler says no.

Related articles

Send feedback

We read every message. Tell us what could be better or what you love.