Commit 6e63c108 authored by Libretro-Admin's avatar Libretro-Admin
Browse files

Add logs

parent 889f2115
...@@ -1515,24 +1515,31 @@ static MDFN_COLD bool LoadCD(std::vector<CDIF *>* CDInterfaces) ...@@ -1515,24 +1515,31 @@ static MDFN_COLD bool LoadCD(std::vector<CDIF *>* CDInterfaces)
uint8 fd_id[16]; uint8 fd_id[16];
char sgid[16 + 1]; char sgid[16 + 1];
cdifs = CDInterfaces; cdifs = CDInterfaces;
log_cb(RETRO_LOG_INFO, "Calculating game ID...\n");
CalcGameID(MDFNGameInfo->MD5, fd_id, sgid); CalcGameID(MDFNGameInfo->MD5, fd_id, sgid);
if(MDFN_GetSettingB("ss.region_autodetect")) if(MDFN_GetSettingB("ss.region_autodetect"))
{
log_cb(RETRO_LOG_INFO, "Trying to autodetect region...\n");
if(!DB_LookupRegionDB(fd_id, &region)) if(!DB_LookupRegionDB(fd_id, &region))
{ {
log_cb(RETRO_LOG_INFO, "[Mednafen]: Could not find region inside DB.\n"); log_cb(RETRO_LOG_INFO, "[Mednafen]: Could not find region inside DB.\n");
DetectRegion(&region); DetectRegion(&region);
} }
}
// //
// //
if((cart_type = MDFN_GetSettingI("ss.cart")) == CART__RESERVED) if((cart_type = MDFN_GetSettingI("ss.cart")) == CART__RESERVED)
{ {
log_cb(RETRO_LOG_INFO, "Trying to lookup cartridge from DB...\n");
cart_type = CART_BACKUP_MEM; cart_type = CART_BACKUP_MEM;
DB_LookupCartDB(sgid, &cart_type); DB_LookupCartDB(sgid, &cart_type);
} }
if(MDFN_GetSettingB("ss.cd_sanity")) if(MDFN_GetSettingB("ss.cd_sanity"))
{ {
log_cb(RETRO_LOG_INFO, "Trying to do CD sanity checks...\n");
if (!DiscSanityChecks()) if (!DiscSanityChecks())
return false; return false;
} }
...@@ -2277,6 +2284,7 @@ static MDFNGI *MDFNI_LoadCD(const char *devicename) ...@@ -2277,6 +2284,7 @@ static MDFNGI *MDFNI_LoadCD(const char *devicename)
log_cb(RETRO_LOG_DEBUG, "Leadout: %6d\n", toc.tracks[100].lba); log_cb(RETRO_LOG_DEBUG, "Leadout: %6d\n", toc.tracks[100].lba);
} }
log_cb(RETRO_LOG_DEBUG, "Calculating layout MD5.\n");
// Calculate layout MD5. The system emulation LoadCD() code is free to ignore this value and calculate // Calculate layout MD5. The system emulation LoadCD() code is free to ignore this value and calculate
// its own, or to use it to look up a game in its database. // its own, or to use it to look up a game in its database.
{ {
...@@ -2305,6 +2313,7 @@ static MDFNGI *MDFNI_LoadCD(const char *devicename) ...@@ -2305,6 +2313,7 @@ static MDFNGI *MDFNI_LoadCD(const char *devicename)
layout_md5.finish(LayoutMD5); layout_md5.finish(LayoutMD5);
} }
log_cb(RETRO_LOG_DEBUG, "Done calculating layout MD5.\n");
// TODO: include module name in hash // TODO: include module name in hash
memcpy(MDFNGameInfo->MD5, LayoutMD5, 16); memcpy(MDFNGameInfo->MD5, LayoutMD5, 16);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment