9 static void vblank(void);
14 volatile uint16_t *cptr;
18 REG_WAITCNT = WAITCNT_PREFETCH | WAITCNT_ROM_2_1;
20 cptr = (uint16_t*)CRAM_BG_ADDR;
21 for(i=0; i<256; i++) {
23 *cptr++ = c | ((c >> 1) << 10);
27 mmInitDefault(sound_data, 8);
28 mmStart(MOD_POPCORN, MM_PLAY_LOOP);
32 interrupt(INTR_VBLANK, vblank);
33 REG_DISPSTAT |= DISPSTAT_IEN_VBLANK;
36 if(init_screens() == -1) {
37 panic(get_pc(), "failed to initialize screens");
40 if(change_screen(find_screen("menu")) == -1) {
41 panic(get_pc(), "failed to find game screen");
53 static void vblank(void)