home

AVGA graphics format


The whole system (tileset, overlay, rammap) accepts (and works with) 4 bit-per-pixel graphic format, meaning 2 pixels per one byte.

High nibble goes first. In other words: first pixel data is stored in the high nibble of 1st byte, second in low nibble of 1st byte, third in high nibble of 2nd byte and so on. All the on-chip graphics is in RAW format, with no special formatting or headers.

The pallette is nothing fixed and depends on your hardware video DAC configuration. The pixel's 4 bits, carried in a byte, is what exactly appears at VIDEO_PORT for 5 clock cycles.

Each bitmap data starts at left-top pixel and continues from left to right first. When a bitmap width is odd number, the last data byte in image line is supposed to carry only one pixel data - in high nibble. I.e. each new line starts with new byte.

Tileset is a set of bitmaps with size DRIVER_BLOCK_WIDTHxDRIVER_BLOCK_HEIGHT, one after another. ID of tile is its order in tileset from zero.


Example images of tilesets









Download section


  • bmp2h

    Description: Converts a 24bpp BMP image file to 4bpp and saves in raw format to header file.
    Download C source code or Win32 executable.


  • tile2h

    Description: Converts a 24bpp BMP image file to set of 8x8 4bpp bitmaps and saves in raw format to a header file.
    Download C source code or Win32 executable.


  • x2h

    Description: Converts a general binary file to header file
    Download C source code or Win32 executable.


  • x2h_rle

    Description: Converts a tile-reference binary image file to header file with RLE-compression, 128-upper tiles can be addressed only.
    Download C source code or Win32 executable.