enum plugin_status plugin_start(const void* parameter)
{
#if LCD_DEPTH > 1
    rb->lcd_set_backdrop(NULL);
#endif
    rb->splash(HZ, "Welcome to ZXBox");


    sp_init();

#ifdef USE_GREY
    /* get the remainder of the plugin buffer */
    gbuf = (unsigned char *) rb->plugin_get_buffer(&gbuf_size);
#ifdef USE_BUFFERED_GREY
    grey_init(gbuf, gbuf_size, GREY_BUFFERED|GREY_ON_COP, LCD_WIDTH,
              LCD_HEIGHT, NULL);
#else
    grey_init(gbuf, gbuf_size, GREY_ON_COP, LCD_WIDTH, LCD_HEIGHT, NULL);
#endif /* USE_BUFFERED_GREY */
    /* switch on greyscale overlay */
    grey_show(true);
#endif /* USE_GREY */


#if defined(HAVE_ADJUSTABLE_CPU_FREQ)
    rb->cpu_boost(true);
#endif

    start_time = *rb->current_tick;

#ifdef RB_PROFILE
   rb->profile_thread();
#endif

    start_spectemu(parameter);

#ifdef RB_PROFILE
   rb->profstop();
#endif

#if defined(HAVE_ADJUSTABLE_CPU_FREQ)
    rb->cpu_boost(false);
#endif

#ifdef USE_GREY
grey_show(false);
grey_release();
#endif 

#if CONFIG_CODEC == SWCODEC && !defined SIMULATOR
    rb->pcm_play_stop();
#endif

return PLUGIN_OK;
}
Exemple #2
0
int main(int argc, char *argv[])
{
    spma_init_privileged();
    sp_init_vga();

    spcf_pre_check_options(argc, argv);

    check_params(argc, argv);
    sp_init();

    start_spectemu();
    /* This function DOES NOT return */

    return 0;
}