diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/debug_menu.c | 25 | ||||
-rw-r--r-- | apps/main.c | 32 |
2 files changed, 0 insertions, 57 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index c56d4cc2c0..5f9c1a7bf9 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c | |||
@@ -1357,30 +1357,6 @@ bool dbg_save_roms(void) | |||
1357 | return false; | 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 | bool debug_menu(void) | 1360 | bool debug_menu(void) |
1385 | { | 1361 | { |
1386 | int m; | 1362 | int m; |
@@ -1388,7 +1364,6 @@ bool debug_menu(void) | |||
1388 | 1364 | ||
1389 | struct menu_items items[] = { | 1365 | struct menu_items items[] = { |
1390 | { "Dump ROM contents", dbg_save_roms }, | 1366 | { "Dump ROM contents", dbg_save_roms }, |
1391 | { "Dump startup I/O", dbg_save_io }, | ||
1392 | { "View I/O ports", dbg_ports }, | 1367 | { "View I/O ports", dbg_ports }, |
1393 | #ifdef HAVE_LCD_BITMAP | 1368 | #ifdef HAVE_LCD_BITMAP |
1394 | #ifdef HAVE_RTC | 1369 | #ifdef HAVE_RTC |
diff --git a/apps/main.c b/apps/main.c index d180067c9e..1a1c6711b9 100644 --- a/apps/main.c +++ b/apps/main.c | |||
@@ -54,16 +54,6 @@ | |||
54 | #include "screens.h" | 54 | #include "screens.h" |
55 | #include "power.h" | 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 | char appsversion[]=APPSVERSION; | 57 | char appsversion[]=APPSVERSION; |
68 | 58 | ||
69 | void init(void); | 59 | void init(void); |
@@ -235,28 +225,6 @@ void init(void) | |||
235 | 225 | ||
236 | int main(void) | 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 | app_main(); | 228 | app_main(); |
261 | 229 | ||
262 | while(1) { | 230 | while(1) { |