freemyipod r380 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r379‎ | r380 | r381 >
Date:04:27, 23 December 2010
Author:theseven
Status:new
Tags:
Comment:
iLoader themes for iPod Classic: Better error handling
Modified paths:
  • /apps/iloader/themes/ipodclassic-default-fastboot/source/iloader.conf (modified) (history)
  • /apps/iloader/themes/ipodclassic-default/source/iloader.conf (modified) (history)

Diff [purge]

Index: apps/iloader/themes/ipodclassic-default/source/iloader.conf
@@ -23,10 +23,22 @@
2424 unpackucl(0x09000000, 0x08000000)
2525 exec(0x08000000)
2626 rockboxuncompressed:
27 - error(0xffffffff)
 27+ error(rockboxerror)
2828 readfile(0x08000000, "/.rockbox/rockbox.ipod\0")
2929 rbchecksum(0x08000000)
3030 exec(0x08000000)
 31+rockboxerror:
 32+ error(0xffffffff)
 33+ fillrect(0, 0, 195, 240, 0xffff)
 34+ text(16, 16, 0x0000, 0xffff, "Rockbox does not seem\0")
 35+ text(16, 24, 0x0000, 0xffff, "to be installed.\0")
 36+ text(16, 32, 0x0000, 0xffff, "You need to extract it\0")
 37+ text(16, 40, 0x0000, 0xffff, "to the root directory\0")
 38+ text(16, 48, 0x0000, 0xffff, "of your iPod.\0")
 39+ text(16, 64, 0x0000, 0xffff, "Press any key to\0")
 40+ text(16, 72, 0x0000, 0xffff, "return to the menu.\0")
 41+ blit()
 42+ button(menu, menu, menu, menu, menu, 0)
3143
3244 update:
3345 error(updateerror)
@@ -35,11 +47,14 @@
3648 script(0x08000000, 0)
3749 updateerror:
3850 error(0xffffffff)
39 - fillrect(0, 0, 320, 240, 0xffff)
40 - text(16, 16, 0x0000, 0xffff, "Please place update.cfg\0")
41 - text(16, 24, 0x0000, 0xffff, "in the iLoader folder on\0")
42 - text(16, 32, 0x0000, 0xffff, "your iPod. Press any key\0")
43 - text(16, 40, 0x0000, 0xffff, "to return to the menu.\0")
 51+ fillrect(0, 0, 195, 240, 0xffff)
 52+ text(16, 16, 0x0000, 0xffff, "There is no updater\0")
 53+ text(16, 24, 0x0000, 0xffff, "present. Please copy \0")
 54+ text(16, 32, 0x0000, 0xffff, "ipodclassic-installer.ubi\0")
 55+ text(16, 40, 0x0000, 0xffff, "into the root directory\0")
 56+ text(16, 48, 0x0000, 0xffff, "of your iPod.\0")
 57+ text(16, 64, 0x0000, 0xffff, "Press any key to\0")
 58+ text(16, 72, 0x0000, 0xffff, "return to the menu.\0")
4459 blit()
4560 button(menu, menu, menu, menu, menu, 0)
4661
@@ -46,9 +61,9 @@
4762 entry:
4863 readfile(0x08000000, "/iLoader/theme.ucl\0")
4964 unpackucl(0x08000000, 0x09000000)
 65+ displaybmp(195, 0, 0x09000000)
5066 menu:
51 - fillrect(0, 0, 320, 240, 0xffff)
52 - displaybmp(195, 0, 0x09000000)
 67+ fillrect(0, 0, 195, 240, 0xffff)
5368 displaybmp(0, 0, 0x0900ec88)
5469 blit()
5570 menu(mainmenu, 0, 0xffffffff, 0xfffffffe, 0xffffffff, 0xfffffffe, 0)
Index: apps/iloader/themes/ipodclassic-default-fastboot/source/iloader.conf
@@ -1,5 +1,5 @@
22 # nothing center right center+right left center+left left+right center+left+right
3 -.word(rockbox) .word(entry) .word(entry) .word(console) .word(entry) .word(entry) .word(entry) .word(entry)
 3+.word(fastboot) .word(entry) .word(entry) .word(console) .word(entry) .word(entry) .word(entry) .word(entry)
44 .word(rockbox) .word(umsboot) .word(entry) .word(entry) .word(entry) .word(entry) .word(entry) .word(entry) # +play
55 .word(entry) .word(entry) .word(entry) .word(entry) .word(entry) .word(entry) .word(entry) .word(entry) # +menu
66 .word(entry) .word(entry) .word(entry) .word(entry) .word(entry) .word(entry) .word(entry) .word(entry) # +play+menu
@@ -16,17 +16,34 @@
1717 umsboot:
1818 readflash(0x08000000, "umsboot ")
1919 exec(0x08000000)
 20+
 21+fastboot:
 22+ error(entry)
 23+ jmp(rockboxcommon)
2024
2125 rockbox:
2226 error(rockboxuncompressed)
 27+rockboxcommon:
2328 readfile(0x09000000, "/iloader/rockbox.ucl\0")
2429 unpackucl(0x09000000, 0x08000000)
2530 exec(0x08000000)
2631 rockboxuncompressed:
27 - error(0xffffffff)
 32+ error(rockboxerror)
2833 readfile(0x08000000, "/.rockbox/rockbox.ipod\0")
2934 rbchecksum(0x08000000)
3035 exec(0x08000000)
 36+rockboxerror:
 37+ error(0xffffffff)
 38+ fillrect(0, 0, 195, 240, 0xffff)
 39+ text(16, 16, 0x0000, 0xffff, "Rockbox does not seem\0")
 40+ text(16, 24, 0x0000, 0xffff, "to be installed.\0")
 41+ text(16, 32, 0x0000, 0xffff, "You need to extract it\0")
 42+ text(16, 40, 0x0000, 0xffff, "to the root directory\0")
 43+ text(16, 48, 0x0000, 0xffff, "of your iPod.\0")
 44+ text(16, 64, 0x0000, 0xffff, "Press any key to\0")
 45+ text(16, 72, 0x0000, 0xffff, "return to the menu.\0")
 46+ blit()
 47+ button(menu, menu, menu, menu, menu, 0)
3148
3249 update:
3350 error(updateerror)
@@ -35,11 +52,14 @@
3653 script(0x08000000, 0)
3754 updateerror:
3855 error(0xffffffff)
39 - fillrect(0, 0, 320, 240, 0xffff)
40 - text(16, 16, 0x0000, 0xffff, "Please place update.cfg\0")
41 - text(16, 24, 0x0000, 0xffff, "in the iLoader folder on\0")
42 - text(16, 32, 0x0000, 0xffff, "your iPod. Press any key\0")
43 - text(16, 40, 0x0000, 0xffff, "to return to the menu.\0")
 56+ fillrect(0, 0, 195, 240, 0xffff)
 57+ text(16, 16, 0x0000, 0xffff, "There is no updater\0")
 58+ text(16, 24, 0x0000, 0xffff, "present. Please copy \0")
 59+ text(16, 32, 0x0000, 0xffff, "ipodclassic-installer.ubi\0")
 60+ text(16, 40, 0x0000, 0xffff, "into the root directory\0")
 61+ text(16, 48, 0x0000, 0xffff, "of your iPod.\0")
 62+ text(16, 64, 0x0000, 0xffff, "Press any key to\0")
 63+ text(16, 72, 0x0000, 0xffff, "return to the menu.\0")
4464 blit()
4565 button(menu, menu, menu, menu, menu, 0)
4666
@@ -46,9 +66,9 @@
4767 entry:
4868 readfile(0x08000000, "/iLoader/theme.ucl\0")
4969 unpackucl(0x08000000, 0x09000000)
 70+ displaybmp(195, 0, 0x09000000)
5071 menu:
51 - fillrect(0, 0, 320, 240, 0xffff)
52 - displaybmp(195, 0, 0x09000000)
 72+ fillrect(0, 0, 195, 240, 0xffff)
5373 displaybmp(0, 0, 0x0900ec88)
5474 blit()
5575 menu(mainmenu, 0, 0xffffffff, 0xfffffffe, 0xffffffff, 0xfffffffe, 0)