8 static void vblank(void);
13 volatile uint16_t *cptr;
17 REG_WAITCNT = WAITCNT_PREFETCH | WAITCNT_ROM_2_1;
19 cptr = (uint16_t*)CRAM_BG_ADDR;
20 for(i=0; i<256; i++) {
22 *cptr++ = c | ((c >> 1) << 10);
26 mmInitDefault(sound_data, 8);
27 mmStart(MOD_POPCORN, MM_PLAY_LOOP);
31 interrupt(INTR_VBLANK, vblank);
32 REG_DISPSTAT |= DISPSTAT_IEN_VBLANK;
35 if(init_screens() == -1) {
36 panic(get_pc(), "failed to initialize screens");
39 if(change_screen(find_screen("game")) == -1) {
40 panic(get_pc(), "failed to find game screen");
52 static void vblank(void)