82 lines
3.8 KiB
C
82 lines
3.8 KiB
C
#include <stdint.h>
|
|
#include <stddef.h>
|
|
#include <assert.h>
|
|
|
|
struct graphics_engine_a {
|
|
volatile uint32_t DB_DISPCNT;
|
|
volatile uint8_t _pad0[4];
|
|
volatile uint16_t DB_BG0CNT;
|
|
volatile uint16_t DB_BG1CNT;
|
|
volatile uint16_t DB_BG2CNT;
|
|
volatile uint16_t DB_BG3CNT;
|
|
volatile uint16_t DB_BG0HOFS;
|
|
volatile uint16_t DB_BG0VOFS;
|
|
volatile uint16_t DB_BG1HOFS;
|
|
volatile uint16_t DB_BG1VOFS;
|
|
volatile uint16_t DB_BG2HOFS;
|
|
volatile uint16_t DB_BG2VOFS;
|
|
volatile uint16_t DB_BG3HOFS;
|
|
volatile uint16_t DB_BG3VOFS;
|
|
volatile uint16_t DB_BG2PA;
|
|
volatile uint16_t DB_BG2PB;
|
|
volatile uint16_t DB_BG2PC;
|
|
volatile uint16_t DB_BG2PD;
|
|
volatile uint32_t DB_BG2X;
|
|
volatile uint32_t DB_BG2Y;
|
|
volatile uint16_t DB_BG3PA;
|
|
volatile uint16_t DB_BG3PB;
|
|
volatile uint16_t DB_BG3PC;
|
|
volatile uint16_t DB_BG3PD;
|
|
volatile uint32_t DB_BG3X;
|
|
volatile uint32_t DB_BG3Y;
|
|
volatile uint16_t DB_WIN0H;
|
|
volatile uint16_t DB_WIN1H;
|
|
volatile uint16_t DB_WIN0V;
|
|
volatile uint16_t DB_WIN1V;
|
|
volatile uint16_t DB_WININ;
|
|
volatile uint16_t DB_WINOUT;
|
|
volatile uint16_t DB_MOSAIC;
|
|
volatile uint8_t _pad1[2];
|
|
volatile uint16_t DB_BLDCNT;
|
|
volatile uint16_t DB_BLDALPHA;
|
|
volatile uint16_t DB_BLDY;
|
|
volatile uint8_t _pad2[22];
|
|
volatile uint16_t DB_MASTER_BRIGHT;
|
|
};
|
|
static_assert((offsetof (struct graphics_engine_a, DB_DISPCNT)) == 0);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG0CNT)) == 8);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG1CNT)) == 10);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG2CNT)) == 12);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG3CNT)) == 14);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG0HOFS)) == 16);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG0VOFS)) == 18);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG1HOFS)) == 20);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG1VOFS)) == 22);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG2HOFS)) == 24);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG2VOFS)) == 26);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG3HOFS)) == 28);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG3VOFS)) == 30);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG2PA)) == 32);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG2PB)) == 34);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG2PC)) == 36);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG2PD)) == 38);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG2X)) == 40);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG2Y)) == 44);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG3PA)) == 48);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG3PB)) == 50);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG3PC)) == 52);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG3PD)) == 54);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG3X)) == 56);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG3Y)) == 60);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_WIN0H)) == 64);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_WIN1H)) == 66);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_WIN0V)) == 68);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_WIN1V)) == 70);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_WININ)) == 72);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_WINOUT)) == 74);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_MOSAIC)) == 76);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BLDCNT)) == 80);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BLDALPHA)) == 82);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BLDY)) == 84);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_MASTER_BRIGHT)) == 108);
|