From fda1498696258d91d950ca4260daa76e536dcce0 Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Fri, 23 Feb 2007 23:22:03 +0000 Subject: Remap flash ROM to 0x20000000 on the ipods and H10s, and implement dbg_save_roms() in the debug menu for those targets to dump the content to a file. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12467 a1c6a512-1295-4272-9138-f99709370657 --- apps/debug_menu.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'apps/debug_menu.c') diff --git a/apps/debug_menu.c b/apps/debug_menu.c index a27ea50..e25abca 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -1983,6 +1983,24 @@ static bool dbg_save_roms(void) return false; } +#elif defined(IPOD_ARCH) || defined(IRIVER_H10) || defined(IRIVER_H10_5GB) +static bool dbg_save_roms(void) +{ + int fd; + +#if defined(IPOD_ARCH) + fd = creat("/internal_rom_000000-0FFFFF.bin"); +#elif defined(IRIVER_H10) + fd = creat("/internal_rom_000000-3FFFFF.bin"); +#endif + if(fd >= 0) + { + write(fd, (void *)0x20000000, FLASH_SIZE); + close(fd); + } + + return false; +} #endif /* CPU */ #ifndef SIMULATOR @@ -2305,7 +2323,8 @@ bool debug_menu(void) { "Button Light modes", dbg_buttonlights }, #endif -#if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) +#if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || \ + defined(IPOD_ARCH) || defined(IRIVER_H10) || defined(IRIVER_H10_5GB) { "Dump ROM contents", dbg_save_roms }, #endif #if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || defined(CPU_PP) -- cgit v1.1