Introduction
A game’s language choice shaped the tools its programmers used, the code that survived in the binary, and how easy that code is to reconstruct today. Assembly gave precise control over a particular CPU. C made larger programs easier to organize without removing the need to understand memory maps, cartridges, or graphics hardware. BASIC opened other routes into game creation. These approaches overlapped: a studio could use C for game logic and assembly for a routine that needed exact timing.
Assembly Language
Assembly names CPU instructions and the registers they act on. It is closely tied to a processor family, so learning one console’s assembly does not make another’s instruction set interchangeable. The NES uses 6502-family code, the SNES uses 65C816, the Mega Drive’s main CPU uses 68000, and the Game Boy uses Sharp’s SM83 rather than a Z80, despite the resemblance 1. Sega’s Master System and Game Gear do use Z80-family code 2.
That specificity is useful to a reverse engineer: register accesses, branches, and cycle-sensitive loops remain visible in a disassembly. It also explains why C did not simply replace assembly everywhere. Peter Morawiec recalled that Sega Technical Institute’s Sonic Spinball was written in C while many other Mega Drive games of its period still used assembly 3. The exception is more revealing than a rule that assigns one language to an entire console generation.
Assembly fundamentals
Ben Eater explains how loops work in assembly language. This is a useful foundation for recognising control flow in a disassembly.
Dave’s Garage presents an introductory assembly-language programming session. It offers a longer practical starting point for readers learning to follow machine-level code.
Jason Turley offers advice for learning assembly programming. It is a short orientation resource alongside the practical programming lessons.
x86 Assembly Language
The x86 material below moves from recognizing function calls to inspecting a running program.
Functions and procedures in NASM
OliveStem introduces x86 functions and procedures using NASM. The tutorial is useful preparation for recognising calls, returns and function boundaries in a disassembly.
Reversing x86 code
jyn introduces reverse engineering x86 assembly. The walkthrough provides a practical counterpart to the language and tool references.
x86-64 Playground
Alberto Ventafridda’s x86-64 Playground runs a Linux-compatible emulator and debugger in the browser. You can write a few instructions, execute them, and watch registers or memory change without setting up a local toolchain.
PacManOS: A Bare-Metal x86 Pac-Man Kernel
mdeclerk’s PacManOS boots a playable Pac-Man clone on a small 32-bit x86 kernel. Its source and build setup offer a different view of assembly: instead of inspecting a compiled game, you can see the code that gets a machine ready to run one.
C/C++
C and C++ let developers split a game into source files, reuse libraries, and work at a higher level than raw instructions. The choice still depended on the platform and the compiler available to a team. Sonic Spinball is a documented Mega Drive example: Morawiec named Denis Kobel and Lee Actor as the contractors who programmed it in C 3. Game Boy Color titles made in C, including Lego Stunt Rally and the Datel Rocket games mentioned in surviving accounts, are another reminder that older hardware did not dictate a single language 4.
What did a console C toolchain actually provide?
The SN Systems N64 development manual lists a GNU C compiler alongside its R4300 assembler, linker, and source-level debugger. It also says developers needed Nintendo-specific libraries and C headers from Nintendo 5. A compiler alone did not supply the console’s operating-system calls or hardware interface.
For Game Boy, the GBDK toolchain guide shows C and assembly sources passing through SDCC, an assembler, a linker, and finally a ROM-image tool 2. Its instructions even document placing variables in the Game Boy’s high RAM to use shorter memory-access instructions. This is a concrete example of C code still being shaped by the target machine 2.
In a binary, strings and library routines may suggest a C-family toolchain, but they cannot establish the original source language on their own. Compare compiler output, calling conventions, linked libraries, or surviving build files before making that claim.
Common toolchains in the pages linked here include GNU C and platform-specific assemblers; PC game projects also used Borland Turbo C++ and Microsoft Visual C++.
The compiler toolchains guide compares the SDK compilers used across consoles and the code patterns they leave in binaries.
Game Development in C/C++
The following reconstruction shows C as an accessible way to study a small game engine.
Let’s Make: Dangerous Dave
MaiZure’s Let’s Make: Dangerous Dave reconstructs the game in roughly 1,000 lines of C and SDL2. Its write-up and videos follow the assets, sprite drawing, and platforming physics, so readers can see what a small engine actually needs.
Kernel Development in C/C++
A bare-metal project is a different setting from a commercial console SDK, but it makes the boundary between C++ and assembly visible.
Make your own kernel from scratch… with C++!
Cinemint walks through a kernel built with C++ and a little assembly:
Shader Languages
A shader is code for a programmable stage of the graphics pipeline. Its language and available operations depend on the GPU and graphics API, so shader source deserves attention alongside a game’s CPU code.
NVIDIA Cg
NVIDIA’s Cg (C for Graphics) toolkit first appeared in December 2002. Its compiler targeted several DirectX and OpenGL profiles, with runtime libraries and examples for developers 6. The Cg Toolkit archive preserves legacy releases; it is useful when identifying a game’s shader source, runtime dependency, or build tools.
BASIC Variants
BASIC offered a more approachable route into programming than an assembler. Game-focused variants bundled graphics and sound commands so a hobbyist could make something playable without building an engine first.
Blitz BASIC
On the Amiga, Blitz BASIC combined a familiar BASIC syntax with commands intended for games. Its appeal was practical: drawing, input, and sound were closer at hand than in a general-purpose language. The examples below show that this was more than a teaching tool.
Two Amiga games associated with Blitz BASIC illustrate its commercial reach:
- Super Skidmarks - A racing game.
- Worms - A turn-based artillery game.
Blitz BASIC later evolved into Blitz2D which was for creating games for DOS/Windows and has continued to evolve into future products such as Blitz3D 7.
DarkBASIC
DarkBASIC carried the game-focused BASIC approach onto Windows, with commands for 2D and 3D graphics. Its emphasis was getting a scene running quickly; Dark Basic Professional later added an extensible plugin system. The surviving source is particularly useful if you want to follow those commands down into the compiler and runtime.
As far as we can tell, DarkBASIC did not become a common choice for large commercial games. It did find its way into other retail software:
- The 3D Game Maker - A game-creation package from The Game Creators that appears to have sold reasonably well.
- Driving Test Success Practical - A Focus title that the company reported selling more than 100,000 copies 8.
Dark Basic Professional was later rewritten with support for plugins, extending what its built-in commands could do.
The Game Creators also built FPS Creator with Dark Basic Professional; its source tree is available to inspect 9.
The Dark Basic Professional source repository includes the compiler and supporting code. It is a stronger starting point for investigating the language than a feature list alone.
TannerProductions traces the wider The Game Creators product line in this documentary:
References
-
Open Game Boy Documentation Project, hardware specifications and SNESdev Wiki, 65C816 CPU listing ↩
-
Ken Horowitz, interview with Peter Morawiec, Sega-16 (20 April 2007) ↩ ↩2
-
Quang Nguyen - Nintendo Game Boy Development - Media - Computing History ↩
-
SN Systems, PC Development System for the Nintendo 64, installation and toolchain ↩
-
FPS-Creator-Classic/Dark Basic Pro Shared/Dark Basic Pro/Projects/FPSCREATOR at master · TheGameCreators/FPS-Creator-Classic ↩