Index: apps/debug_menu.c =================================================================== RCS file: /cvsroot/rockbox/apps/debug_menu.c,v retrieving revision 1.167 diff -u -r1.167 debug_menu.c --- apps/debug_menu.c 17 Feb 2006 22:38:38 -0000 1.167 +++ apps/debug_menu.c 21 Feb 2006 19:05:25 -0000 @@ -18,7 +18,6 @@ ****************************************************************************/ #include "config.h" -#ifndef SIMULATOR #include #include #include @@ -74,6 +73,7 @@ extern int num_threads; extern const char *thread_name[]; +#ifndef SIMULATOR #ifdef HAVE_LCD_BITMAP /* Test code!!! */ bool dbg_os(void) @@ -150,9 +150,10 @@ return false; } #endif /* !HAVE_LCD_BITMAP */ +#endif /* !SIMULATOR */ #ifdef HAVE_LCD_BITMAP -#if CONFIG_CODEC != SWCODEC +#if CONFIG_CODEC != SWCODEC && !SIMULATOR bool dbg_audio_thread(void) { char buf[32]; @@ -214,8 +215,10 @@ void dbg_audio_task(void) { +#ifndef SIMULATOR if(FREQ > CPUFREQ_NORMAL) boost_ticks++; +#endif ticks++; } @@ -257,7 +260,7 @@ lcd_clear_display(); snprintf(buf, sizeof(buf), "pcm: %7ld/%7ld", - bufsize-audiobuffer_free, bufsize); + (long)bufsize-audiobuffer_free, (long)bufsize); lcd_puts(0, line++, buf); /* Playable space left */ @@ -276,10 +279,11 @@ snprintf(buf, sizeof(buf), "track count: %2d", track_count); lcd_puts(0, line++, buf); +#ifndef SIMULATOR snprintf(buf, sizeof(buf), "cpu freq: %3dMHz", (int)((FREQ + 500000) / 1000000)); lcd_puts(0, line++, buf); - +#endif snprintf(buf, sizeof(buf), "boost ratio: %3d%%", boost_ticks * 100 / ticks); lcd_puts(0, line++, buf); @@ -298,6 +302,8 @@ #endif /* CONFIG_CODEC */ #endif /* HAVE_LCD_BITMAP */ +#ifndef SIMULATOR + /* Tool function to calculate a CRC16 across some buffer */ unsigned short crc_16(const unsigned char* buf, unsigned len) { @@ -1893,6 +1899,7 @@ return false; } #endif /* CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) */ +#endif /* !SIMULATOR */ bool debug_menu(void) { @@ -1900,6 +1907,7 @@ bool result; static const struct menu_item items[] = { +#ifndef SIMULATOR #if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) { "Dump ROM contents", dbg_save_roms }, #endif @@ -1930,16 +1938,22 @@ #ifdef HAVE_DIRCACHE { "View dircache info", dbg_dircache_info }, #endif +#endif /* SIMULATOR */ + #ifdef HAVE_LCD_BITMAP { "View audio thread", dbg_audio_thread }, #ifdef PM_DEBUG { "pm histogram", peak_meter_histogram}, #endif /* PM_DEBUG */ #endif /* HAVE_LCD_BITMAP */ + +#ifndef SIMULATOR { "View runtime", view_runtime }, #ifdef CONFIG_TUNER { "FM Radio", dbg_fm_radio }, #endif +#endif + #ifdef ROCKBOX_HAS_LOGF {"logf", logfdisplay }, {"logfdump", logfdump }, @@ -1954,4 +1968,3 @@ return result; } -#endif /* SIMULATOR */ Index: apps/main_menu.c =================================================================== RCS file: /cvsroot/rockbox/apps/main_menu.c,v retrieving revision 1.145 diff -u -r1.145 main_menu.c --- apps/main_menu.c 5 Dec 2005 22:44:41 -0000 1.145 +++ apps/main_menu.c 21 Feb 2006 19:05:25 -0000 @@ -5,7 +5,7 @@ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ * \/ \/ \/ \/ \/ - * $Id: main_menu.c,v 1.145 2005-12-05 22:44:41 bagder Exp $ + * $Id: main_menu.c,v 1.145 2005/12/05 22:44:41 bagder Exp $ * * Copyright (C) 2002 Björn Stenberg * @@ -282,9 +282,9 @@ static const struct menu_item items[] = { { ID2P(LANG_INFO_MENU), show_info }, { ID2P(LANG_VERSION), show_credits }, -#ifndef SIMULATOR + { ID2P(LANG_DEBUG), debug_menu }, -#else +#ifdef SIMULATOR { ID2P(LANG_USB), simulate_usb }, #ifdef ROCKBOX_HAS_LOGF {"logf", logfdisplay },