Start building up structs for video registers

This commit is contained in:
Jeffrey Pfau 2013-04-21 12:33:03 -07:00
parent 9f425c53c8
commit 573fcead5d
1 changed files with 44 additions and 0 deletions

View File

@ -88,6 +88,50 @@ union GBAOAM {
uint16_t raw[512];
};
union GBATextMapData {
struct {
unsigned tile : 9;
unsigned hflip : 1;
unsigned vflip : 1;
unsigned palette : 5;
};
uint16_t packed;
};
union GBARegisterDISPCNT {
struct {
unsigned mode : 3;
unsigned cgb : 1;
unsigned frameSelect : 1;
unsigned hblankIntervalFree : 1;
unsigned objCharacterMapping : 1;
unsigned forcedBlank : 1;
unsigned bg0Enable : 1;
unsigned bg1Enable : 1;
unsigned bg2Enable : 1;
unsigned bg3Enable : 1;
unsigned objEnable : 1;
unsigned win0Enable : 1;
unsigned win1Enable : 1;
unsigned objwinEnable : 1;
};
uint16_t packed;
};
union GBARegisterBGCNT {
struct {
unsigned priority : 2;
unsigned charBase : 2;
unsigned : 2;
unsigned mosaic : 1;
unsigned multipalette : 1;
unsigned screenBase : 5;
unsigned overflow : 1;
unsigned size : 2;
};
uint16_t packed;
};
struct GBAVideoRenderer {
void (*init)(struct GBAVideoRenderer* renderer);
void (*deinit)(struct GBAVideoRenderer* renderer);