#include <stdint.h>
#include "gba.h"
+#define RGB555(r, g, b) \
+ (((r) >> 3) | (((g) << 2) & 0x3e0) | (((b) << 7) & 0x7c00))
+
#ifdef BUILD_GBA
#define wait_vblank() \
#define present(x) \
do { \
- REG_DISPCNT = (REG_DISPCNT & ~DISPCNT_FB1) | ((x) << 4); \
+ REG_DISPCNT = (REG_DISPCNT & 0xffef) | ((x) << 4); \
} while(0)
#define ARM_IWRAM __attribute__((noinline, target("arm"), section(".iwram")))