參考資訊:
https://bgb.bircd.org/
https://github.com/mrombout/gbdk_playground
http://gbdk.sourceforge.net/doc/html/book01.html
Font Functions
extern UINT8 font_ibm[]; extern UINT8 font_min[]; extern UINT8 font_spect[]; extern UINT8 font_italic[]; void font_init(void) NONBANKED; font_t font_load(void *font) NONBANKED; font_t font_set(font_t font_handle) NONBANKED;
main.c
#include <stdio.h>
#include <gb/gb.h>
#include <gb/cgb.h>
#include <gb/font.h>
unsigned short palette[] = {RGB_WHITE, RGB_RED, RGB_GREEN, RGB_BLUE};
void main(void)
{
font_init();
font_set(font_load(font_spect));
set_bkg_palette(0, 1, palette);
printf("New font!");
}
完成