Entering Graphics

Graphics on the Sega Genesis are stored in an area called VRAM. VRAM consists of 65,536 bytes. Each graphic is made up of 8x8-pixel squares called tiles. Each tile can have up to 16 colors, so it takes 32 bytes to represent one tile.

Each hexadecimal nybble of a tile corresponds to a color pixel. A value of $0 represents a transparent pixel. In each set of 4 bytes, the nybbles are read from left to right. There are two pixels stored in each byte.

INCBIN Graphics
One convenient way to store graphics in a ROM would be to use the INCBIN directive. The contents of the file are stored directly into the ROM.

INCBIN	"C:\YourGame\Graphics\YourGraphics.bin"