Firmware: some logging

This commit is contained in:
Maximilian Rehkopf 2011-10-08 19:25:14 +02:00
parent bc28fed22a
commit 20e4106229
2 changed files with 5 additions and 1 deletions

View File

@ -178,6 +178,7 @@ sram_hexdump(SRAM_MENU_ADDR+0xffc0, 16);
sram_writelong(curr_dir_id, SRAM_DIRID);
sram_writelong(0x12345678, SRAM_SCRATCHPAD);
} else {
snes_bootprint(" same card, loading db... \0");
printf("same card, loading db...\n");
load_sram((uint8_t*)"/sd2snes/sd2snes.db", SRAM_DB_ADDR);
load_sram((uint8_t*)"/sd2snes/sd2snes.dir", SRAM_DIR_ADDR);

View File

@ -312,7 +312,10 @@ uint32_t load_sram(uint8_t* filename, uint32_t base_addr) {
DWORD filesize;
file_open(filename, FA_READ);
filesize = file_handle.fsize;
if(file_res) return 0;
if(file_res) {
printf("load_sram: could not open %s, res=%d\n", filename, file_res);
return 0;
}
for(;;) {
bytes_read = file_read();
if (file_res || !bytes_read) break;