freemyipod r305 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r304‎ | r305 | r306 >
Date:21:37, 1 December 2010
Author:theseven
Status:new
Tags:
Comment:
iLoader: Remove hardwired color values. Should work on the Classic now.
Modified paths:
  • /apps/iloader/ls.x (modified) (history)
  • /apps/iloader/main.c (modified) (history)

Diff [purge]

Index: apps/iloader/ls.x
@@ -25,8 +25,11 @@
2626
2727 .bss (NOLOAD) :
2828 {
 29+ __bss_start = .;
2930 *(.bss*)
3031 *(COMMON)
 32+ __bss_end = .;
 33+ *(.stack*)
3134 } > RAM
3235
3336 /DISCARD/ :
Index: apps/iloader/main.c
@@ -91,8 +91,19 @@
9292 int fh = get_font_height();
9393 config[0x25] = dw; // width and height for 0x0088
9494 config[0x26] = dh;
 95+ config[0x27] = lcd_translate_color(0, 0, 0, 0);
 96+ config[0x2b] = lcd_translate_color(0, 255, 255, 255);
 97+ config[0x2c] = lcd_translate_color(0, 0, 0, 0);
9598 config[0x4a] = fh; // font height for 0x0120
 99+ config[0x4b] = lcd_translate_color(0, 255, 255, 255);
 100+ config[0x4c] = lcd_translate_color(0, 0, 0, 0);
 101+ config[0x4d] = lcd_translate_color(0, 255, 255, 0);
 102+ config[0x4e] = lcd_translate_color(0, 0, 0, 255);
96103 config[0x52] = fh * 2; // font height for 0x0140
 104+ config[0x53] = lcd_translate_color(0, 255, 255, 255);
 105+ config[0x54] = lcd_translate_color(0, 0, 0, 0);
 106+ config[0x55] = lcd_translate_color(0, 255, 255, 0);
 107+ config[0x56] = lcd_translate_color(0, 0, 0, 255);
97108 uint32_t found = 0;
98109 uint32_t x = 0;
99110 uint32_t y = fh * 2;
@@ -111,10 +122,10 @@
112123 config[0x58 + found * 8] = 0x3564 + 9 * found;
113124 config[0x59 + found * 8] = x;
114125 config[0x5a + found * 8] = y;
115 - config[0x5b + found * 8] = 0xffff;
116 - config[0x5c + found * 8] = 0x0000;
117 - config[0x5d + found * 8] = 0xe0ff;
118 - config[0x5e + found * 8] = 0x1f00;
 126+ config[0x5b + found * 8] = lcd_translate_color(0, 255, 255, 255);
 127+ config[0x5c + found * 8] = lcd_translate_color(0, 0, 0, 0);
 128+ config[0x5d + found * 8] = lcd_translate_color(0, 255, 255, 0);
 129+ config[0x5e + found * 8] = lcd_translate_color(0, 0, 0, 255);
119130 config[0x5f + found * 8] = 0x2164 + found * 20;
120131 config[0x859 + found * 5] = 0x03;
121132 config[0x85a + found * 5] = 0x08000000;
@@ -129,7 +140,7 @@
130141 void main(void)
131142 {
132143 uint32_t i;
133 - uint32_t size;
 144+ int size;
134145 uint32_t errhandler;
135146 uint32_t pc = clickwheel_get_state() & 0x1f;
136147 char* filename;