Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Removed startup_io test code


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4045 a1c6a512-1295-4272-9138-f99709370657

-111
-25
apps/debug_menu.c
··· 1357 1357 return false; 1358 1358 } 1359 1359 1360 - 1361 - /* test code, to be removed later */ 1362 - extern union /* defined in main.c */ 1363 - { 1364 - unsigned char port8 [512]; 1365 - unsigned short port16[256]; 1366 - unsigned port32[128]; 1367 - } startup_io; 1368 - 1369 - bool dbg_save_io(void) /* dump the initial I/O space to disk */ 1370 - { 1371 - int fd; 1372 - 1373 - fd = creat("/startup_io.bin", O_WRONLY); 1374 - if(fd >= 0) 1375 - { 1376 - write(fd, (void *)&startup_io, sizeof(startup_io)); 1377 - close(fd); 1378 - } 1379 - 1380 - return false; 1381 - } 1382 - /* end of test code */ 1383 - 1384 1360 bool debug_menu(void) 1385 1361 { 1386 1362 int m; ··· 1388 1364 1389 1365 struct menu_items items[] = { 1390 1366 { "Dump ROM contents", dbg_save_roms }, 1391 - { "Dump startup I/O", dbg_save_io }, 1392 1367 { "View I/O ports", dbg_ports }, 1393 1368 #ifdef HAVE_LCD_BITMAP 1394 1369 #ifdef HAVE_RTC
-32
apps/main.c
··· 54 54 #include "screens.h" 55 55 #include "power.h" 56 56 57 - /* diagnostic, to be removed later: */ 58 - /* snapshot of the I/O space on startup, to compare initialisations */ 59 - union 60 - { 61 - unsigned char port8 [512]; 62 - unsigned short port16[256]; 63 - unsigned port32[128]; 64 - } startup_io; 65 - 66 - 67 57 char appsversion[]=APPSVERSION; 68 58 69 59 void init(void); ··· 235 225 236 226 int main(void) 237 227 { 238 - /* diagnostic, to be removed later: dump I/O space */ 239 - int i; 240 - for (i = 0; i < 512; i++) 241 - { // most can be read with 8 bit access 242 - startup_io.port8[i] = *((volatile unsigned char*)0x5FFFE00 + i); 243 - } 244 - // some don't allow that, read with 32 bit if aligned 245 - startup_io.port32[0x140/4] = *((volatile unsigned char*)0x5FFFF40); 246 - startup_io.port32[0x144/4] = *((volatile unsigned char*)0x5FFFF44); 247 - startup_io.port32[0x150/4] = *((volatile unsigned char*)0x5FFFF50); 248 - startup_io.port32[0x154/4] = *((volatile unsigned char*)0x5FFFF54); 249 - startup_io.port32[0x160/4] = *((volatile unsigned char*)0x5FFFF60); 250 - startup_io.port32[0x170/4] = *((volatile unsigned char*)0x5FFFF70); 251 - startup_io.port32[0x174/4] = *((volatile unsigned char*)0x5FFFF74); 252 - 253 - // read the rest with 16 bit 254 - startup_io.port16[0x14A/2] = *((volatile unsigned short*)0x5FFFF4A); 255 - startup_io.port16[0x15A/2] = *((volatile unsigned short*)0x5FFFF5A); 256 - startup_io.port16[0x16A/2] = *((volatile unsigned short*)0x5FFFF6A); 257 - startup_io.port16[0x17A/2] = *((volatile unsigned short*)0x5FFFF7A); 258 - /* end of diagnostic */ 259 - 260 228 app_main(); 261 229 262 230 while(1) {
-54
firmware/rolo.c
··· 30 30 31 31 #define IRQ0_EDGE_TRIGGER 0x80 32 32 33 - /* test code, to be removed later */ 34 - extern union /* defined in main.c */ 35 - { 36 - unsigned char port8 [512]; 37 - unsigned short port16[256]; 38 - unsigned port32[128]; 39 - } startup_io; 40 - 41 - 42 - bool rolo_io_load(char* filename) 43 - { 44 - int fd; 45 - fd = open(filename, O_RDONLY); 46 - if(fd >= 0) /* no complaint if it doesn't exit */ 47 - { 48 - read(fd, (void *)&startup_io, sizeof(startup_io)); 49 - close(fd); 50 - return true; /* success */ 51 - } 52 - return false; /* not found */ 53 - } 54 - 55 - void rolo_io_restore(void) 56 - { 57 - int i; 58 - for (i = 0; i < 512; i++) 59 - { /* most can be written with 8 bit access */ 60 - *((volatile unsigned char*)0x5FFFE00 + i) = startup_io.port8[i]; 61 - } 62 - /* some don't allow that, write with 32 bit if aligned */ 63 - *((volatile unsigned char*)0x5FFFF40) = startup_io.port32[0x140/4]; 64 - *((volatile unsigned char*)0x5FFFF44) = startup_io.port32[0x144/4]; 65 - *((volatile unsigned char*)0x5FFFF50) = startup_io.port32[0x150/4]; 66 - *((volatile unsigned char*)0x5FFFF54) = startup_io.port32[0x154/4]; 67 - *((volatile unsigned char*)0x5FFFF60) = startup_io.port32[0x160/4]; 68 - *((volatile unsigned char*)0x5FFFF70) = startup_io.port32[0x170/4]; 69 - *((volatile unsigned char*)0x5FFFF74) = startup_io.port32[0x174/4]; 70 - 71 - /* write the rest with 16 bit */ 72 - *((volatile unsigned short*)0x5FFFF4A) = startup_io.port16[0x14A/2]; 73 - *((volatile unsigned short*)0x5FFFF5A) = startup_io.port16[0x15A/2]; 74 - *((volatile unsigned short*)0x5FFFF6A) = startup_io.port16[0x16A/2]; 75 - *((volatile unsigned short*)0x5FFFF7A) = startup_io.port16[0x17A/2]; 76 - } 77 - /* end of test code */ 78 - 79 - 80 - 81 33 static void rolo_error(char *text) 82 34 { 83 35 lcd_clear_display(); ··· 107 59 unsigned long file_length; 108 60 unsigned short checksum,file_checksum; 109 61 unsigned char* ramstart = (void*)0x09000000; 110 - bool restore_io; /* debug value */ 111 62 112 63 lcd_clear_display(); 113 64 lcd_puts(0, 0, "ROLO..."); ··· 165 116 return -1; 166 117 } 167 118 168 - restore_io = rolo_io_load("/startup_io.bin"); /* test code */ 169 - 170 119 lcd_puts(0, 1, "Executing "); 171 120 lcd_update(); 172 121 ··· 182 131 #ifndef ARCHOS_PLAYER /* player is to be checked later */ 183 132 PAIOR = 0x0FA0; /* needed when flashed, probably model-specific */ 184 133 #endif 185 - 186 - if (restore_io) /* test code */ 187 - rolo_io_restore(); /* restore the I/Os from the file content */ 188 134 189 135 rolo_restart(mp3buf, ramstart, length); 190 136