2012-03-31 08:14:31 +00:00
|
|
|
struct Registers {
|
|
|
|
struct Control {
|
|
|
|
uint3 bgmode;
|
|
|
|
bool cgbmode;
|
|
|
|
bool frame;
|
|
|
|
bool hblank;
|
2012-04-03 00:47:28 +00:00
|
|
|
bool objmapping;
|
2012-03-31 08:14:31 +00:00
|
|
|
bool forceblank;
|
2012-03-31 08:17:36 +00:00
|
|
|
bool enablebg[4];
|
|
|
|
bool enableobj;
|
2012-04-03 00:47:28 +00:00
|
|
|
bool enablebgwindow[2];
|
2012-03-31 08:17:36 +00:00
|
|
|
bool enableobjwindow;
|
2012-03-31 08:14:31 +00:00
|
|
|
|
|
|
|
operator uint16() const;
|
|
|
|
uint16 operator=(uint16 source);
|
|
|
|
Control& operator=(const Control&) = delete;
|
|
|
|
} control;
|
|
|
|
|
2012-03-31 08:17:36 +00:00
|
|
|
bool greenswap;
|
|
|
|
|
|
|
|
struct Status {
|
|
|
|
bool vblank;
|
|
|
|
bool hblank;
|
|
|
|
bool vcoincidence;
|
|
|
|
bool irqvblank;
|
|
|
|
bool irqhblank;
|
|
|
|
bool irqvcoincidence;
|
|
|
|
uint8 vcompare;
|
|
|
|
|
|
|
|
operator uint16() const;
|
|
|
|
uint16 operator=(uint16 source);
|
|
|
|
Status& operator=(const Status&) = delete;
|
|
|
|
} status;
|
|
|
|
|
|
|
|
uint16 vcounter;
|
|
|
|
|
|
|
|
struct BackgroundControl {
|
|
|
|
uint2 priority;
|
|
|
|
uint2 characterbaseblock;
|
|
|
|
uint1 mosaic;
|
|
|
|
uint1 colormode;
|
|
|
|
uint5 screenbaseblock;
|
|
|
|
uint2 screensize;
|
|
|
|
|
|
|
|
operator uint16() const;
|
|
|
|
uint16 operator=(uint16 source);
|
|
|
|
BackgroundControl& operator=(const BackgroundControl&) = delete;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Background {
|
|
|
|
BackgroundControl control;
|
|
|
|
uint9 hoffset;
|
|
|
|
uint9 voffset;
|
|
|
|
|
|
|
|
//BG2,3 only
|
|
|
|
uint16 pa, pb, pc, pd;
|
|
|
|
uint28 x, y;
|
|
|
|
} bg[4];
|
|
|
|
|
|
|
|
struct WindowFlags {
|
|
|
|
bool enablebg[4];
|
|
|
|
bool enableobj;
|
|
|
|
bool enablesfx;
|
|
|
|
|
|
|
|
operator uint8() const;
|
|
|
|
uint8 operator=(uint8 source);
|
|
|
|
WindowFlags& operator=(const WindowFlags&) = delete;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Window {
|
|
|
|
uint8 x1, x2;
|
|
|
|
uint8 y1, y2;
|
|
|
|
WindowFlags in, out;
|
|
|
|
} window[2];
|
|
|
|
|
|
|
|
struct ObjectWindow {
|
|
|
|
WindowFlags in;
|
|
|
|
} windowobj;
|
|
|
|
|
|
|
|
struct Mosaic {
|
|
|
|
uint4 bghsize;
|
|
|
|
uint4 bgvsize;
|
|
|
|
uint4 objhsize;
|
|
|
|
uint4 objvsize;
|
|
|
|
} mosaic;
|
|
|
|
|
|
|
|
struct BlendControl {
|
|
|
|
bool firstbg[4];
|
|
|
|
bool firstobj;
|
|
|
|
bool firstbd;
|
|
|
|
uint2 effect;
|
|
|
|
bool secondbg[4];
|
|
|
|
bool secondobj;
|
|
|
|
bool secondbd;
|
|
|
|
|
|
|
|
operator uint16() const;
|
|
|
|
uint16 operator=(uint16 source);
|
|
|
|
BlendControl& operator=(const BlendControl&) = delete;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Blend {
|
|
|
|
BlendControl control;
|
|
|
|
uint5 eva;
|
|
|
|
uint5 evb;
|
|
|
|
uint5 evy;
|
|
|
|
} blend;
|
2012-03-31 08:14:31 +00:00
|
|
|
} regs;
|