Technical articleArtículo técnico

Mega Drive Tile GraphicsGráficos por tiles en Mega Drive

How 8x8 tiles are arranged and referenced by Mega Drive graphics systems.Cómo se organizan y referencian los tiles de 8x8 en los sistemas gráficos de Mega Drive.

PublishedPublicado

September 8, 20268 de septiembre de 2026

UpdatedActualizado

September 12, 202612 de septiembre de 2026

DifficultyDificultad

BeginnerInicial

Reading timeTiempo de lectura

6 min read6 min de lectura

Pixels inside a tilePíxeles dentro de un tile

In the normal Mega Drive display mode, a tile is an 8-by-8 grid of pixels. Each pixel occupies four bits, so one tile takes 32 bytes: eight rows of four bytes. Tiles are also called patterns or characters. This article describes ordinary 8-by-8 tiles; interlace mode 2 has different pattern geometry.En el modo de visualización normal de Mega Drive, un tile es una cuadrícula de 8 por 8 píxeles. Cada píxel ocupa cuatro bits, por lo que un tile necesita 32 bytes: ocho filas de cuatro bytes. Los tiles también se llaman patrones o caracteres. Este artículo describe tiles normales de 8 por 8; el modo entrelazado 2 utiliza otra geometría de patrones.

Pixel values are packed into nibbles. The high nibble is the left pixel of a pair; the low nibble is the right one. Subsequent bytes complete the row, followed by the next row. Selecting another console's planar format in a viewer interprets these bytes incorrectly.Los píxeles se empaquetan en nibbles. El nibble superior representa el píxel izquierdo de la pareja; el inferior representa el derecho. Los bytes siguientes completan la fila, seguida de la siguiente fila. Seleccionar el formato planar de otra consola en un visor interpreta estos bytes incorrectamente.

Synthetic rowFila didáctica
Bytes:   12 34 56 78
Pixels:  1 2 3 4 5 6 7 8

8 rows x 4 bytes = 32 bytes per tile

Indices and coloursÍndices y colores

A tile stores indices from 0 to 15, not RGB values. The selected palette line supplies colours from CRAM. There are four lines of sixteen entries. Index zero is transparent for a plane or sprite pixel, allowing lower layers or the backdrop to show through. A tile's appearance depends on its pixels and palette selection.Un tile almacena índices de 0 a 15, no valores RGB. La línea de paleta seleccionada aporta colores desde CRAM. Hay cuatro líneas de dieciséis entradas. El índice cero es transparente para un píxel de plano o sprite, dejando ver capas inferiores o el fondo. La apariencia depende de los píxeles y de la selección de paleta.

If an extracted image has a recognizable shape but strange colours, check the palette before changing the decoder. A resource can contain only pixels while the palette is loaded elsewhere or updated during the scene. Not every graphical resource includes its own palette.Si una imagen extraída tiene una forma reconocible pero colores extraños, comprueba la paleta antes de cambiar el decodificador. Un recurso puede contener solo píxeles mientras la paleta se carga desde otra ubicación o se actualiza durante la escena. No todos los recursos gráficos incluyen su propia paleta.

From tiles to a pictureDe tiles a una imagen

A background tilemap tells the VDP which pattern to place in each cell. Each entry is a 16-bit word with a pattern index and attributes. Reusing or flipping a tile saves pixel storage. A tile sheet in storage order is therefore not necessarily the finished picture.Un tilemap de fondo indica al VDP qué patrón colocar en cada celda. Cada entrada es una palabra de 16 bits con un índice de patrón y atributos. Reutilizar o reflejar un tile ahorra almacenamiento. Por eso una hoja de tiles en orden de almacenamiento no equivale necesariamente a la imagen terminada.

BitsMeaningSignificado
15PriorityPrioridad
14-13Palette line (0-3)Línea de paleta (0-3)
12Vertical flipReflejo vertical
11Horizontal flipReflejo horizontal
10-0Pattern indexÍndice de patrón
Synthetic background entryEntrada de fondo didáctica
0x2805 = 0x2000 | 0x0800 | 0x0005
Palette = 1
H flip = 1, V flip = 0, Priority = 0
Tile index = 5
VRAM pattern address = 5 x 32 = 0x00A0

That is a VRAM address, not a ROM file offset. Sprite placement uses a sprite attribute table instead of the background tilemap. Sprite dimensions and tile ordering must also be considered when reconstructing a character.Es una dirección de VRAM, no un offset del archivo ROM. Los sprites utilizan una tabla de atributos en lugar del tilemap de fondo. Sus dimensiones y orden de tiles también deben tenerse en cuenta al reconstruir un personaje.

ROM data and VRAMDatos ROM y VRAM

The game transfers patterns into VRAM before displaying them. ROM data may match the VDP format already, or require decompression and reconstruction first. Tilemaps can also be compressed or generated by code. A resource's ROM offset does not determine its VRAM slot.El juego transfiere patrones a VRAM antes de mostrarlos. Los datos ROM pueden coincidir ya con el formato del VDP o necesitar descompresión y reconstrucción. Los tilemaps también pueden estar comprimidos o generarse por código. El offset ROM de un recurso no determina su posición en VRAM.

VRAM's 64 KiB is shared between patterns and display tables. Dividing by 32 gives 2048 theoretical pattern slots, not 2048 freely available art tiles. Games replace patterns between scenes and during animation; the same index can display different pixels over time.Los 64 KiB de VRAM se comparten entre patrones y tablas de visualización. Dividir entre 32 da 2048 posiciones teóricas, no 2048 tiles libres para gráficos. Los juegos sustituyen patrones entre escenas y durante animaciones; un mismo índice puede mostrar píxeles diferentes con el tiempo.

Inspecting a game graphicInspeccionar un gráfico del juego

  1. Pause on the relevant screen and inspect live VRAM patterns, tilemap and CRAM together.Pausa en la pantalla relevante e inspecciona conjuntamente patrones de VRAM, tilemap y CRAM.
  2. Identify a visible cell and its index, palette and flips. Reconstruct a small area before the full screen.Identifica una celda visible y su índice, paleta y reflejos. Reconstruye una zona pequeña antes de toda la pantalla.
  3. Trace the load back to its source. For a RAM source, follow the decoder or generator that filled the buffer.Rastrea la carga hasta el origen. Si procede de RAM, sigue el decodificador o generador que llenó el búfer.
  4. Record source offset, decoded size, tile order and separate map or palette locations. Test a small edit everywhere the pattern is reused.Registra offset, tamaño decodificado, orden de tiles y ubicaciones separadas de mapa o paleta. Prueba una edición pequeña en cada lugar donde se reutilice el patrón.

ReferencesReferencias

SGDK: background patterns and tilemapsSGDK: tile attribute definitions