// SPDX-License-Identifier: MIT // Mode 5, frame 1, 160x128, rotated: outside the bitmap is transparent. #include "scene.h" int main(void) { DISPCNT = 0x0080; volatile u16 *f1 = VRAM16 + 0x5000; for (int y = 0; y < 128; y++) for (int x = 0; x < 160; x++) { VRAM16[y * 160 + x] = rgb(31, 0, 0); f1[y * 160 + x] = rgb(x / 5, y / 4, 31 - x / 5); } PAL16[0] = rgb(10, 10, 10); BGPA(2) = 236; BGPB(2) = -98; BGPC(2) = 98; BGPD(2) = 236; BGX(2) = 20 << 8; BGY(2) = -30 << 8; DISPCNT = 0x0005 | 0x0010 | 0x0400; forever(); }