The SEGA Genesis (US) / Mega Drive (everywhere else) was a 1988 game console, known for great arcade ports, FM sound, and impressive 2D graphics. It had a Motorola 68000 CPU, 64 KB main RAM, and 64 KB Video RAM. One of the most well-known games for the system is Sonic the Hedgehog, developed by SEGA and released in 1991. This page contains a series of articles about this hardware, including how to program for it, starting from the very basics.
A description of the basic building blocks of Genesis graphics, and how they are put together to form screen images. 8x8 16-color tiles are mapped to form playfields. A couple of games are analyzed, including some more advanced techniques, usable for rendering polygons.
Building on the previous entry, it is explained how the VDP can be used to output text to the screen. This includes creating a font, loading it to graphics memory, writing character indices to playfields, and wrapping it into a useful subroutine.
A few examples of assembly code structure is explored, including variables, arrays and structures, function calling conventions, and how to implement the State Pattern.