#include "intr.h"
#include "debug.h"
#include "game.h"
-
-#include "AAS.h"
#include "data.h"
+#include "maxmod.h"
-#define RGB15(r, g, b) \
- (((uint16_t)(r) & 0x1f) | \
- (((uint16_t)(g) & 0x1f) << 5) | \
- (((uint16_t)(b) & 0x1f) << 10))
+static void vblank(void);
+static void nopfunc(void);
int main(void)
{
REG_WAITCNT = WAITCNT_PREFETCH | WAITCNT_ROM_2_1;
#ifndef NOSOUND
- interrupt(INTR_TIMER1, AAS_Timer1InterruptHandler);
- AAS_SetConfig(AAS_CONFIG_MIX_24KHZ, AAS_CONFIG_CHANS_8, AAS_CONFIG_SPATIAL_STEREO, AAS_CONFIG_DYNAMIC_ON);
- unmask(INTR_TIMER1);
- intr_enable();
-
- AAS_MOD_Play(AAS_DATA_MOD_popcorn);
-#else
- intr_enable();
+ mmInitDefault(sound_data, 8);
+ mmStart(MOD_POPCORN, MM_PLAY_LOOP);
#endif
+ screen_vblank = nopfunc;
+
+ intr_disable();
+ interrupt(INTR_VBLANK, vblank);
+ REG_DISPSTAT |= DISPSTAT_IEN_VBLANK;
+ unmask(INTR_VBLANK);
+
+ intr_enable();
gamescr();
for(;;);
return 0;
}
+
+static void vblank(void)
+{
+ vblperf_count++;
+
+ screen_vblank();
+
+#ifndef NOSOUND
+ mmVBlank();
+ mmFrame();
+#endif
+}
+
+static void nopfunc(void)
+{
+}