82 lines
3.9 KiB
C
82 lines
3.9 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)) == 0x000);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG0CNT)) == 0x008);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG1CNT)) == 0x00a);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG2CNT)) == 0x00c);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG3CNT)) == 0x00e);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG0HOFS)) == 0x010);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG0VOFS)) == 0x012);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG1HOFS)) == 0x014);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG1VOFS)) == 0x016);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG2HOFS)) == 0x018);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG2VOFS)) == 0x01a);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG3HOFS)) == 0x01c);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG3VOFS)) == 0x01e);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG2PA)) == 0x020);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG2PB)) == 0x022);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG2PC)) == 0x024);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG2PD)) == 0x026);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG2X)) == 0x028);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG2Y)) == 0x02c);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG3PA)) == 0x030);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG3PB)) == 0x032);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG3PC)) == 0x034);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG3PD)) == 0x036);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG3X)) == 0x038);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BG3Y)) == 0x03c);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_WIN0H)) == 0x040);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_WIN1H)) == 0x042);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_WIN0V)) == 0x044);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_WIN1V)) == 0x046);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_WININ)) == 0x048);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_WINOUT)) == 0x04a);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_MOSAIC)) == 0x04c);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BLDCNT)) == 0x050);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BLDALPHA)) == 0x052);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_BLDY)) == 0x054);
|
|
static_assert((offsetof (struct graphics_engine_a, DB_MASTER_BRIGHT)) == 0x06c);
|