next up previous contents
Next: PC Fonts (font.c) Up: Hardware Abstraction Layer: DC Previous: Basic Video (video.c)   Contents

Subsections

BIOS Fonts (biosfont.c)

BIOS fonts are the ones you see in the boot manager on the Dreamcast. These are stored in ROM and so are available to any program. You will probably recognize them immidiately since they are used all over the place in official productions. The BIOS font contains European Latin-1 characters (which we support) and Kanji (which we don't support yet but will eventually). The Latin-1 characters are bit masks of size 12x24, so each character uses 36 bytes. I suspect that the Kanji characters are 24x24, but I haven't tested this yet. These functions are frame-buffer agnostic except that they expect a 16-bit pixel size.

The following functions are available:

void* bfont_find_char(int ch)

Returns the address in ROM of the given character, after being mapped to the BIOS font.

void bfont_draw(uint16 *buffer, int bufwidth, int c)

Draws Latin-1 character 'c' at the given location in 'buffer', and assumes that 'buffer' is 'bufwidth' pixels wide. For example, to draw an 'a' at 20,20 in a 640x480 framebuffer, you'd use bfont_draw(vram_s+20*640+20, 640, 'a').

void bfont_draw_str(uint16 *buffer, int bufwidth, char *str)

Exactly like bfont_draw, but it takes a string and draws each character in turn.


next up previous contents
Next: PC Fonts (font.c) Up: Hardware Abstraction Layer: DC Previous: Basic Video (video.c)   Contents
Dan Potter 2002-07-29