Commits

hominem_te_esse  committed dfde22c

cosmetics again (prefixing every LOG by its location)

  • Participants
  • Parent commits df47468

Comments (0)

Files changed (16)

File src/appsupport.c

 }
 
 void appInit(void) {
-	LOG("appInit()\n");
+	LOG("APPSUPPORT Init\n");
 	appForceUpdate = 1;
 
 	configApps = configGetByType(CONFIG_APPS);
 
 static void appCleanUp(int exception) {
 	if (appItemList.enabled) {
-		LOG("appCleanUp()\n");
+		LOG("APPSUPPORT CleanUp\n");
 	}
 }
 

File src/config.c

 int configRead(config_set_t* configSet) {
 	file_buffer_t* fileBuffer = openFileBuffer(configSet->filename, O_RDONLY, 0, 4096);
 	if (!fileBuffer) {
-		LOG("No config %s.\n", configSet->filename);
+		LOG("CONFIG No file %s.\n", configSet->filename);
 		configSet->modified = 0;
 		return 0;
 	}
 		} else if (parsePrefix(line, prefix)) {
 			// prefix is set, that's about it
 		} else {
-			LOG("Malformed config file '%s' line %d: '%s'\n", configSet->filename, lineno, line);
+			LOG("CONFIG Malformed file '%s' line %d: '%s'\n", configSet->filename, lineno, line);
 		}
 	}
 	closeFileBuffer(fileBuffer);

File src/ethsupport.c

 	int ipconfiglen;
 	char ipconfig[IPCONFIG_MAX_LEN] __attribute__((aligned(64)));
 
-	LOG("ethLoadModules()\n");
+	LOG("ETHSUPPORT LoadModules\n");
 
 	ipconfiglen = sysSetIPConfig(ipconfig);
 
 				if (sysLoadModuleBuffer(&smsmap_irx, size_smsmap_irx, ipconfiglen, ipconfig) >= 0) {
 					gNetworkStartup = ERROR_ETH_MODULE_SMBMAN_FAILURE;
 					if (sysLoadModuleBuffer(&smbman_irx, size_smbman_irx, 0, NULL) >= 0) {
-						LOG("ethLoadModules: modules loaded\n");
+						LOG("ETHSUPPORT Modules loaded\n");
 						ethInitSMB();
 						return;
 					}
 }
 
 void ethInit(void) {
-	LOG("ethInit()\n");
+	LOG("ETHSUPPORT Init\n");
 
 	if (gNetworkStartup >= ERROR_ETH_SMB_LOGON) {
 		ethULSizePrev = -2;
 			free(ethGames);
 			ethGames = (base_game_info_t*)malloc(sizeof(base_game_info_t) * count);
 			for (i = 0; i < count; i++) {
-				LOG("Share found: %s\n", sharelist[i].ShareName);
+				LOG("ETHSUPPORT Share found: %s\n", sharelist[i].ShareName);
 				base_game_info_t *g = &ethGames[i];
 				memcpy(g->name, sharelist[i].ShareName, 32);
 				g->name[31] = '\0';
 
 static void ethCleanUp(int exception) {
 	if (ethGameList.enabled) {
-		LOG("ethCleanUp()\n");
+		LOG("ETHSUPPORT CleanUp\n");
 
 		free(ethGames);
 	}

File src/fntsys.c

 }
 
 static void fntResetFontDef(font_t *fnt) {
-	LOG("fntResetFontDef\n");
 	fnt->glyphCache = NULL;
 	fnt->cacheMaxPageID = -1;
 	fnt->isValid = 0;
 }
 
 void fntInit(void) {
-	LOG("fntInit\n");
+	LOG("FNTSYS Init\n");
 	int error = FT_Init_FreeType(&font_library);
 
 	if (error) {
 		// just report over the ps2link
-		LOG("Freetype init failed with %x!\n", error);
+		LOG("FNTSYS Freetype init failed with %x!\n", error);
 		// SleepThread();
 	}
 
 }
 
 static void fntCacheFlushPage(fnt_glyph_cache_entry_t *page) {
-	LOG("fntCacheFlushPage\n");
 	int i;
 
 	for (i = 0; i < GLYPH_CACHE_PAGE_SIZE; ++i, ++page) {
 }
 
 static void fntCacheFlush(font_t *fnt) {
-	LOG("fntCacheFlush\n");
-	
 	int i;
 
 	// Release all the glyphs from the cache
 }
 
 static int fntNewFont() {
-	LOG("fntNewFont\n");
 	int i;
 	for (i = 0; i < FNT_MAX_COUNT; ++i) {
 		if (fonts[i].isValid == 0) {
 }
 
 void fntDeleteFont(font_t *font) {
-	LOG("fntDeleteFont\n");
-	
 	// skip already deleted fonts
 	if (!font->isValid)
 		return;
 }
 
 int fntLoadSlot(font_t *fnt, void* buffer, int bufferSize) {
-	LOG("fntLoadSlot\n");
-	
 	if (!buffer) {
 		buffer = &freesansfont_raw;
 		bufferSize = size_freesansfont_raw;
 
 	if (error) {
 		// just report over the ps2link
-		LOG("Freetype: Font loading failed with %x!\n", error);
+		LOG("FNTSYS Freetype font loading failed with %x!\n", error);
 		// SleepThread();
 		return -1;
 	}
 
 	if (error) {
 		// just report over the ps2link
-		LOG("Freetype: Error setting font pixel size with %x!\n", error);
+		LOG("FNTSYS Freetype error setting font pixel size with %x!\n", error);
 		// SleepThread();
 		return -1;
 	}
 }
 
 int fntLoad(void* buffer, int bufferSize, int takeover) {
-	LOG("fntLoad\n");
-	
 	// we need a new slot in the font array
 	int fontID = fntNewFont();
 
 }
 
 int fntLoadFile(char* path) {
-	LOG("fntLoadFile\n");
+	LOG("FNTSYS LoadFile: %s\n", path);
 	// load the buffer with font
 	int size = -1;
 	void* customFont = readFile(path, -1, &size);
 }
 
 void fntRelease(int id) {
-	LOG("fntRelease\n");
 	if (id < FNT_MAX_COUNT)
 		fntDeleteFont(&fonts[id]);
 }
 
 /** Terminates the font rendering system */
 void fntEnd(void) {
-	LOG("fntEnd\n");
+	LOG("FNTSYS End\n");
 	// release all the fonts
 	int id;
 	for (id = 0; id < FNT_MAX_COUNT; ++id)
 static int fntGlyphAtlasPlace(font_t *fnt, fnt_glyph_cache_entry_t* glyph) {
 	FT_GlyphSlot slot = fnt->face->glyph;
 	
- 	//LOG("fntGlyphAtlasPlace: Placing the glyph... %d x %d\n", slot->bitmap.width, slot->bitmap.rows);
+ 	//LOG("FNTSYS GlyphAtlasPlace: Placing the glyph... %d x %d\n", slot->bitmap.width, slot->bitmap.rows);
 	
 	if (slot->bitmap.width == 0 || slot->bitmap.rows == 0) {
 		// no bitmap glyph, just skip
 	int aid;
 	
 	for (aid = 0; aid < ATLAS_MAX; ++aid) {
-		//LOG("  * Placing aid %d...\n", aid);
+		//LOG("FNTSYS Placing aid %d...\n", aid);
 		atlas_t **atl = &fnt->atlases[aid];
 		if (!*atl) { // atlas slot not yet used
-			//LOG("  * aid %d is new...\n", aid);
+			//LOG("FNTSYS aid %d is new...\n", aid);
 			*atl = fntNewAtlas();
 		}
 		
 			atlasPlace(*atl, slot->bitmap.width, slot->bitmap.rows, slot->bitmap.buffer);
 			
 		if (glyph->allocation) {
-			//LOG("  * found placement\n", aid);
+			//LOG("FNTSYS Found placement\n", aid);
 			glyph->atlas = *atl;
 			
 			return 1;
 		}
 	}
 	
-	LOG("  * ! no atlas free\n", aid);
+	LOG("FNTSYS No atlas free\n", aid);
 	return 0;
 }
 
 
 	// not cached but valid. Cache
 	if (!fnt->face) {
-		LOG("FNT: Face is NULL!\n");
+		LOG("FNTSYS Face is NULL!\n");
 	}
 
 	int error = FT_Load_Char(fnt->face, gid, FT_LOAD_RENDER);
 
 	if (error) {
-		LOG("FNT: Error loading glyph - %d\n", error);
+		LOG("FNTSYS Error loading glyph - %d\n", error);
 		return NULL;
 	}
 
 }
 
 void fntSetAspectRatio(float aw, float ah) {
-	LOG("fntSetAspectRatio\n");
 	// flush cache - it will be invalid after the setting
 	int i;
 
 			diaSetInt(diaVMC, VMC_PROGRESS, vmc_status.VMC_progress);
 
 			if (vmc_status.VMC_error != 0)
-				LOG("genvmc updater: %d\n", vmc_status.VMC_error);
+				LOG("GUI VMCUpdater: %d\n", vmc_status.VMC_error);
 
 			if (vmc_status.VMC_status == 0x00) {
 				diaSetLabel(diaVMC, VMC_BUTTON_CREATE, _l(_STR_OK));
 			}
 		}
 		else
-			LOG("status result: %d\n", result);
+			LOG("GUI Status result: %d\n", result);
 	}
 
 	return 0;
 	if (apaCheckLinkedList(table, 0) < 0)
 		return -9; // bad links
 
-	LOG("apaCheckPartitionTable OK!\n");
+	LOG("HDD CheckPartitionTable OK!\n");
 
 	return 0;
 }
 {
 	register int ret, i;
 
-	LOG("apaWritePartitionTable\n");
-
 	ret = apaCheckPartitionTable(table);
 	if (ret < 0)
 		return ret;
 
 		if (table->parts[i].modified) {
 			apa_header *part_hdr = &table->parts[i].header;
-			LOG("writing 2 sectors at sector 0x%X\n", part_hdr->start);
+			LOG("HDD Writing 2 sectors at sector 0x%X\n", part_hdr->start);
 #ifndef TEST_WRITES
 			ret = hddWriteSectors(part_hdr->start, 2, (void *)part_hdr);
 			if (ret < 0)
 	register int count = 1;
 	u32 pending_deletes[APA_MAXSUB];
 
-	LOG("apaDeletePartition %s\n", partname);
+	LOG("HDD DeletePartition %s\n", partname);
 
 	// retrieve part index
 	part_index = apaFindPartition(table, partname);
 
 	// preserve a list of starting sectors of partitions to be deleted
 	pending_deletes[0] = part_hdr->start;
-	LOG("apaDeletePartition: found part at %d \n", part_hdr->start / 262144);
+	LOG("HDD Found part at %d \n", part_hdr->start / 262144);
 	for (i=0; i<part_hdr->nsub; i++) {
-		LOG("apaDeletePartition: found subpart at %d \n", part_hdr->subs[i].start / 262144);
+		LOG("HDD Found subpart at %d \n", part_hdr->subs[i].start / 262144);
 		pending_deletes[count++] = part_hdr->subs[i].start;
 	}
 
-	LOG("apaDeletePartition: number of subpartitions=%d count=%d\n", part_hdr->nsub, count);
+	LOG("HDD Number of subpartitions=%d count=%d\n", part_hdr->nsub, count);
 
 	// remove partitions from the double-linked list
 	i = 0;
 			int part_num = table->parts[i].header.start / 262144; // 262144 sectors == 128M
 			int num_parts = table->parts[i].header.length / 262144;
 
-			LOG("apaDeletePartition: partition found! num_parts=%d part_num=%d\n", num_parts, part_num);
+			LOG("HDD Partition found! num_parts=%d part_num=%d\n", num_parts, part_num);
 
 			memmove((void *)&table->parts[i], (void *)&table->parts[i+1], sizeof(apa_partition_t) * (table->part_count-i-1));
 			table->part_count--;
 {
 	register int ret;
 
-	LOG("hddDeleteHDLGame() game name='%s'\n", ginfo->name);
+	LOG("HDD Delete game: '%s'\n", ginfo->name);
 
 	if (ptable == NULL)
 		return -1;
 
 	hddFlushCache();
 
-	LOG("hddDeleteHDLGame: '%s' deleted!\n", ginfo->name);
+	LOG("HDD Game: '%s' deleted!\n", ginfo->name);
 
 	return 0;
 }

File src/hddsupport.c

 	FlushCache(2);
 
 	if (ret)
-		LOG("hddCheckHDPro() HD Pro Kit detected!\n");
+		LOG("HDDSUPPORT HD Pro Kit detected!\n");
 
 	return ret;
 }
 	int ret;
 	static char hddarg[] = "-o" "\0" "4" "\0" "-n" "\0" "20";
 
-	LOG("hddLoadModules()\n");
+	LOG("HDDSUPPORT LoadModules\n");
 
 	gHddStartup = 4;
 
 		return;
 	}
 
-	LOG("hddLoadModules: modules loaded\n");
+	LOG("HDDSUPPORT modules loaded\n");
 
 	hddSetIdleTimeout(gHDDSpindown * 12); // gHDDSpindown [0..20] -> spindown [0..240] -> seconds [0..1200]
 
 }
 
 void hddInit(void) {
-	LOG("hddInit()\n");
+	LOG("HDDSUPPORT Init\n");
 	hddForceUpdate = 1;
 
 	ioPutRequest(IO_CUSTOM_SIMPLEACTION, &hddInitModules);
 			if (part_hdr.nsub <= 4) {
 				hdd_vmc_infos.parts[0].start = part_hdr.start;
 				hdd_vmc_infos.parts[0].length = part_hdr.length;
-				LOG("hdd_vmc_infos.parts[0].start : 0x%X\n", hdd_vmc_infos.parts[0].start);
-				LOG("hdd_vmc_infos.parts[0].length : 0x%X\n", hdd_vmc_infos.parts[0].length);
+				LOG("HDDSUPPORT hdd_vmc_infos.parts[0].start : 0x%X\n", hdd_vmc_infos.parts[0].start);
+				LOG("HDDSUPPORT hdd_vmc_infos.parts[0].length : 0x%X\n", hdd_vmc_infos.parts[0].length);
 				for (i = 0; i < part_hdr.nsub; i++) {
 					hdd_vmc_infos.parts[i+1].start = part_hdr.subs[i].start;
 					hdd_vmc_infos.parts[i+1].length = part_hdr.subs[i].length;
-					LOG("hdd_vmc_infos.parts[%d].start : 0x%X\n", i+1, hdd_vmc_infos.parts[i+1].start);
-					LOG("hdd_vmc_infos.parts[%d].length : 0x%X\n", i+1, hdd_vmc_infos.parts[i+1].length);
+					LOG("HDDSUPPORT hdd_vmc_infos.parts[%d].start : 0x%X\n", i+1, hdd_vmc_infos.parts[i+1].start);
+					LOG("HDDSUPPORT hdd_vmc_infos.parts[%d].length : 0x%X\n", i+1, hdd_vmc_infos.parts[i+1].length);
 				}
 				part_valid = 1;
 			}
 								hdd_vmc_infos.blocks[i].number = pfs_inode.data[i+1].number;
 								hdd_vmc_infos.blocks[i].subpart = pfs_inode.data[i+1].subpart;
 								hdd_vmc_infos.blocks[i].count = pfs_inode.data[i+1].count;
-								LOG("hdd_vmc_infos.blocks[%d].number     : 0x%X\n", i, hdd_vmc_infos.blocks[i].number);
-								LOG("hdd_vmc_infos.blocks[%d].subpart    : 0x%X\n", i, hdd_vmc_infos.blocks[i].subpart);
-								LOG("hdd_vmc_infos.blocks[%d].count      : 0x%X\n", i, hdd_vmc_infos.blocks[i].count);
+								LOG("HDDSUPPORT hdd_vmc_infos.blocks[%d].number     : 0x%X\n", i, hdd_vmc_infos.blocks[i].number);
+								LOG("HDDSUPPORT hdd_vmc_infos.blocks[%d].subpart    : 0x%X\n", i, hdd_vmc_infos.blocks[i].subpart);
+								LOG("HDDSUPPORT hdd_vmc_infos.blocks[%d].count      : 0x%X\n", i, hdd_vmc_infos.blocks[i].count);
 							}
 						} // else Vmc file too much fragmented
 					}
 
 static void hddCleanUp(int exception) {
 	if (hddGameList.enabled) {
-		LOG("hddCleanUp()\n");
+		LOG("HDDSUPPORT CleanUp\n");
 
 		hddFreeHDLGamelist(hddGames);
 
 		}
 		closeFileBuffer(fileBuffer);
 		
-		LOG("LANG: #### Loaded %d entries\n", strId);
+		LOG("LANG Loaded %d entries\n", strId);
 
 		// remember how many entries were read from the file (for the free later)
 		nValidEntries = strId;
 
 		// if necessary complete lang with default internal
 		while (strId < LANG_STR_COUNT) {
-			LOG("LANG: #### Default entry added: %s\n", internalEnglish[strId]);
+			LOG("LANG Default entry added: %s\n", internalEnglish[strId]);
 			lang_strs[strId] = internalEnglish[strId];
 			strId++;
 		}
 		char path[255];
 		snprintf(path, 255, "%s/font_%s.ttf", gBaseMCDir, name);
 		
-		LOG("#### Custom font path: %s\n", path);
+		LOG("LANG Custom font path: %s\n", path);
 		
 		void* customFont = readFile(path, -1, &size);
 		if (customFont)
 	for (i=1; i<argc; i++) {
 		if (!(strcmp(argv[i], "-use-early-debug"))) {
 			use_early_debug = 1;
-			PREINIT_LOG("Using early debug.\n");
+			PREINIT_LOG("OPL Using early debug.\n");
 		}
 		if (!(strcmp(argv[i], "-test-exception"))) {
 			exception_test = 1;
-			PREINIT_LOG("Exception test requested.\n");
+			PREINIT_LOG("OPL Exception test requested.\n");
 		}
 	}
 	#endif
 	// How many different modes can this device operate in?
 	// i.e. get # entrys in the modetable
 	modes = padInfoMode(pad->port, pad->slot, PAD_MODETABLE, -1);
-	LOG("PAD: The device has %d modes\n", modes);
+	LOG("PAD The device has %d modes: ", modes);
 
 	if (modes > 0) {
 		LOG("( ");
 			LOG("%d ", tmp);
 		}
 	        
-	        LOG(")");
+	        LOG(")\n");
 	}
 
 	tmp = padInfoMode(pad->port, pad->slot, PAD_MODECURID, 0);
-	LOG("PAD: It is currently using mode %d\n", tmp);
+	LOG("PAD It is currently using mode %d\n", tmp);
 
 	// If modes == 0, this is not a Dual shock controller 
 	// (it has no actuator engines)
 	if (modes == 0) {
-		LOG("PAD: This is a digital controller?\n");
+		LOG("PAD This is a digital controller?\n");
 		return 1;
 	}
 
 	} while (i < modes);
 	
 	if (i >= modes) {
-		LOG("PAD: This is no Dual Shock controller\n");
+		LOG("PAD This is no Dual Shock controller\n");
 		return 1;
 	}
 
 	// This check should always pass if the Dual Shock test above passed
 	tmp = padInfoMode(pad->port, pad->slot, PAD_MODECUREXID, 0);
 	if (tmp == 0) {
-	        LOG("PAD: This is no Dual Shock controller??\n");
+	        LOG("PAD This is no Dual Shock controller??\n");
 	        return 1;
 	}
 
-	LOG("PAD: Enabling dual shock functions\n");
+	LOG("PAD Enabling dual shock functions\n");
 
 	// When using MMODE_LOCK, user cant change mode with Select button
 	padSetMainMode(pad->port, pad->slot, PAD_MMODE_DUALSHOCK, PAD_MMODE_LOCK);
 
 	waitPadReady(pad);
 	tmp = padInfoPressMode(pad->port, pad->slot);
-	LOG("PAD: infoPressMode: %d\n", tmp);
+	LOG("PAD infoPressMode: %d\n", tmp);
 
 	waitPadReady(pad);        
 	tmp = padEnterPressMode(pad->port, pad->slot);
-	LOG("PAD: enterPressMode: %d\n", tmp);
+	LOG("PAD enterPressMode: %d\n", tmp);
 
 	waitPadReady(pad);
 	pad->actuators = padInfoAct(pad->port, pad->slot, -1, 0);
-	LOG("PAD: # of actuators: %d\n", pad->actuators);
+	LOG("PAD # of actuators: %d\n", pad->actuators);
 
 	if (pad->actuators != 0) {
 		pad->actAlign[0] = 0;   // Enable small engine
 
 		waitPadReady(pad);
 		tmp = padSetActAlign(pad->port, pad->slot, pad->actAlign);
-		LOG("PAD: padSetActAlign: %d\n", tmp);
+		LOG("PAD padSetActAlign: %d\n", tmp);
 	} else {
-		LOG("PAD: Did not find any actuators.\n");
+		LOG("PAD Did not find any actuators.\n");
 	}
 
 	waitPadReady(pad);

File src/renderman.c

 		
 		if (size >= __VRAM_SIZE) {
 			// Only log this if the allocation is too large itself
-			LOG("RM: CLUT: Requested allocation is bigger than VRAM!\n"); 
+			LOG("RENDERMAN Requested clut allocation is bigger than VRAM!\n");
 			// We won't allocate this, it's too large
 			clut->VramClut = GSKIT_ALLOC_ERROR;
 			return 0;
 		
 		if (size >= __VRAM_SIZE) {
 			// Only log this if the allocation is too large itself
-			LOG("RM: TXT: Requested allocation is bigger than VRAM!\n"); 
+			LOG("RENDERMAN Requested texture allocation is bigger than VRAM!\n");
 			// We won't allocate this, it's too large
 			txt->Vram = GSKIT_ALLOC_ERROR;
 			return 0;
 		gsKit_clear(gsGlobal, gColBlack);
 		gsKit_sync_flip(gsGlobal);
 
-		LOG("New vmode: %d, %d x %d\n", vmode, gsGlobal->Width, gsGlobal->Height);
+		LOG("RENDERMAN New vmode: %d, %d x %d\n", vmode, gsGlobal->Width, gsGlobal->Height);
 	}
 	return changed;
 }

File src/system.c

 }
 
 int sysGetDiscID(char *hexDiscID) {
-
 	cdInit(CDVD_INIT_NOCHECK);
-	LOG("cdvd RPC inited\n");
+	LOG("SYSTEM CDVD RPC inited\n");
 	if (cdStatus() == CDVD_STAT_OPEN) // If tray is open, error
 		return -1;
 		
 		return -1;
 
 	cdDiskReady(0); 	
-	LOG("Disc drive is ready\n");
+	LOG("SYSTEM Disc drive is ready\n");
 	CdvdDiscType_t cdmode = cdGetDiscType();	// If tray is closed, get disk type
 	if (cdmode == CDVD_TYPE_NODISK)
 		return -1;
 	if ((cdmode != CDVD_TYPE_PS2DVD) && (cdmode != CDVD_TYPE_PS2CD) && (cdmode != CDVD_TYPE_PS2CDDA)) {
 		cdStop();
 		cdSync(0);
-		LOG("Disc stopped\n");
-		LOG("Disc is not ps2 disc!\n");
+		LOG("SYSTEM Disc stopped, Disc is not ps2 disc!\n");
 		return -2;
 	}
 
 	cdStandby();
 	cdSync(0);
-	LOG("Disc standby\n");
+	LOG("SYSTEM Disc standby\n");
 
 	int fd = fioOpen("discID:", O_RDONLY);
 	if (fd < 0) {
 		cdStop();
 		cdSync(0);
-		LOG("Disc stopped\n");
+		LOG("SYSTEM Disc stopped\n");
 		return -3;
 	}
 
 
 	cdStop();
 	cdSync(0);
-	LOG("Disc stopped\n");
+	LOG("SYSTEM Disc stopped\n");
 
 	// convert to hexadecimal string
 	snprintf(hexDiscID, 15, "%02X %02X %02X %02X %02X", discID[0], discID[1], discID[2], discID[3], discID[4]);
-	LOG("PS2 Disc ID = %s\n", hexDiscID);
+	LOG("SYSTEM PS2 Disc ID = %s\n", hexDiscID);
 
 	return 1;
 }
 		if (curIrxSize > 0) {
 			ee_kmode_exit();
 			EIntr();
-			LOG("irx addr start: %08x end: %08x\n", (int)irxptr_tab[i].irxaddr, (int)(irxptr_tab[i].irxaddr+curIrxSize));
+			LOG("SYSTEM IRX address start: %08x end: %08x\n", (int)irxptr_tab[i].irxaddr, (int)(irxptr_tab[i].irxaddr+curIrxSize));
 			DIntr();
 			ee_kmode_enter();
 
 		strncpy(gExitPath, "Browser", 32);
 
 #ifdef VMC
-	LOG("sysLaunchLoaderElf started with size_mcemu_irx = %d\n", size_mcemu_irx);
+	LOG("SYSTEM LaunchLoaderElf called with size_mcemu_irx = %d\n", size_mcemu_irx);
 	sendIrxKernelRAM(size_cdvdman_irx, cdvdman_irx, size_mcemu_irx, mcemu_irx);
 #else
 	sendIrxKernelRAM(size_cdvdman_irx, cdvdman_irx);
 				fileXioLseek(fd, 0, SEEK_SET);
 				fileXioRead(fd, (void*)vmc_superblock, sizeof(vmc_superblock_t));
 
-				LOG("File size  : 0x%X\n", size);
-				LOG("Magic      : %s\n", vmc_superblock->magic);
-				LOG("Card type  : %d\n", vmc_superblock->mc_type);
-				LOG("Flags      : 0x%X\n", (vmc_superblock->mc_flag & 0xFF) | 0x100);
-				LOG("Page_size  : 0x%X\n", vmc_superblock->page_size);
-				LOG("Block_size : 0x%X\n", vmc_superblock->pages_per_block);
-				LOG("Card_size  : 0x%X\n", vmc_superblock->pages_per_cluster * vmc_superblock->clusters_per_card);
+				LOG("SYSTEM File size  : 0x%X\n", size);
+				LOG("SYSTEM Magic      : %s\n", vmc_superblock->magic);
+				LOG("SYSTEM Card type  : %d\n", vmc_superblock->mc_type);
+				LOG("SYSTEM Flags      : 0x%X\n", (vmc_superblock->mc_flag & 0xFF) | 0x100);
+				LOG("SYSTEM Page_size  : 0x%X\n", vmc_superblock->page_size);
+				LOG("SYSTEM Block_size : 0x%X\n", vmc_superblock->pages_per_block);
+				LOG("SYSTEM Card_size  : 0x%X\n", vmc_superblock->pages_per_cluster * vmc_superblock->clusters_per_card);
 
 				if(!strncmp(vmc_superblock->magic, "Sony PS2 Memory Card Format", 27) && vmc_superblock->mc_type == 0x2
 					&& size == vmc_superblock->pages_per_cluster * vmc_superblock->clusters_per_card * vmc_superblock->page_size) {
-					LOG("VMC file structure valid: %s\n", path);
+					LOG("SYSTEM VMC file structure valid: %s\n", path);
 				} else
 					size = 0;
 			}

File src/textures.c

 	
 	// failed allocation
 	if (!texture->Mem) {
-		LOG("texPngReadData: Failed to allocate %d bytes\n", size);
+		LOG("TEXTURES PngReadData: Failed to allocate %d bytes\n", size);
 		return;
 	}
 
 			
 			// failed allocation
 			if (!texture->Mem) {
-				LOG("texJpgLoad: Failed to allocate %d bytes\n", size);
+				LOG("TEXTURES JpgLoad: Failed to allocate %d bytes\n", size);
 			} else {
 				// okay
 				texUpdate(texture, jpg->width, jpg->height);

File src/themes.c

 		elem->endElem = &endMutableText;
 		elem->drawElem = &drawStaticText;
 	} else
-		LOG("elemStaticText %s: NO value, elem disabled !!\n", name);
+		LOG("THEMES StaticText %s: NO value, elem disabled !!\n", name);
 }
 
 // AttributeText ////////////////////////////////////////////////////////////////////////////////////////////////////////////
 		elem->endElem = &endMutableText;
 		elem->drawElem = &drawAttributeText;
 	} else
-		LOG("elemAttributeText %s: NO attribute, elem disabled !!\n", name);
+		LOG("THEMES AttributeText %s: NO attribute, elem disabled !!\n", name);
 }
 
 // Common functions for Image ///////////////////////////////////////////////////////////////////////////////////////////////
 			if (cachePattern && source->cache && !strcmp(cachePattern, source->cache->suffix)) {
 				target->cache = source->cache;
 				target->cacheLinked = 1;
-				LOG("Re-using a cache for pattern %s\n", cachePattern);
+				LOG("THEMES Re-using a cache for pattern %s\n", cachePattern);
 			}
 
 			if (defaultTexture && source->defaultTexture && !strcmp(defaultTexture, source->defaultTexture->name)) {
 				target->defaultTexture = source->defaultTexture;
 				target->defaultTextureLinked = 1;
-				LOG("Re-using the default texture for %s\n", defaultTexture);
+				LOG("THEMES Re-using the default texture for %s\n", defaultTexture);
 			}
 
 			if (overlayTexture && source->overlayTexture && !strcmp(overlayTexture, source->overlayTexture->name)) {
 				target->overlayTexture = source->overlayTexture;
 				target->overlayTextureLinked = 1;
-				LOG("Re-using the overlay texture for %s\n", overlayTexture);
+				LOG("THEMES Re-using the overlay texture for %s\n", overlayTexture);
 			}
 		}
 
 	if (type == TYPE_ATTRIBUTE_IMAGE) {
 		snprintf(elemProp, 64, "%s_attribute", name);
 		configGetStr(themeConfig, elemProp, &cachePattern);
-		LOG("elemMutableImage %s: type: %d using cache pattern: %s\n", name, type, cachePattern);
+		LOG("THEMES MutableImage %s: type: %d using cache pattern: %s\n", name, type, cachePattern);
 	} else if ((type == TYPE_GAME_IMAGE) || type == (TYPE_BACKGROUND)) {
 		snprintf(elemProp, 64, "%s_pattern", name);
 		configGetStr(themeConfig, elemProp, &cachePattern);
 		snprintf(elemProp, 64, "%s_count", name);
 		configGetInt(themeConfig, elemProp, &cacheCount);
-		LOG("elemMutableImage %s: type: %d using cache pattern: %s\n", name, type, cachePattern);
+		LOG("THEMES MutableImage %s: type: %d using cache pattern: %s\n", name, type, cachePattern);
 	}
 
 	snprintf(elemProp, 64, "%s_default", name);
 	if (mutableImage->defaultTexture)
 		elem->drawElem = &drawStaticImage;
 	else
-		LOG("elemStaticImage %s: NO image name, elem disabled !!\n", name);
+		LOG("THEMES StaticImage %s: NO image name, elem disabled !!\n", name);
 }
 
 // GameImage ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 	if (gEnableArt) {
 		item_list_t * list = (item_list_t *) support;
 		char* startup = list->itemGetStartup(item->id);
-		//LOG("getGameCachedTex, prefix: %s addsep: %d value: %s suffix: %s\n", cache->prefix, cache->addSeparator, startup, suffix);
 		return cacheGetTexture(cache, list, &item->cache_id[cache->userId], &item->cache_uid[cache->userId], startup);
 	}
 
 	if (mutableImage->cache)
 		elem->drawElem = &drawGameImage;
 	else
-		LOG("elemGameImage %s: NO pattern, elem disabled !!\n", name);
+		LOG("THEMES GameImage %s: NO pattern, elem disabled !!\n", name);
 }
 
 // AttributeImage ///////////////////////////////////////////////////////////////////////////////////////////////////////////
 	if (mutableImage->cache)
 		elem->drawElem = &drawAttributeImage;
 	else
-		LOG("elemAttributeImage %s: NO attribute, elem disabled !!\n", name);
+		LOG("THEMES AttributeImage %s: NO attribute, elem disabled !!\n", name);
 }
 
 // BasicElement /////////////////////////////////////////////////////////////////////////////////////////////////////////////
 		elem->height = theme->usedHeight - (MENU_POS_V + HINT_HEIGHT);
 
 	itemsList->displayedItems = elem->height / MENU_ITEM_HEIGHT;
-	LOG("elemItemsList %s: displaying %d elems, item height: %d\n", name, itemsList->displayedItems, elem->height);
+	LOG("THEMES ItemsList %s: displaying %d elems, item height: %d\n", name, itemsList->displayedItems, elem->height);
 
 	itemsList->decorator = NULL;
 	snprintf(elemProp, 64, "%s_decorator", name);
 static void validateGUIElems(char* themePath, config_set_t* themeConfig, theme_t* theme) {
 	// 1. check we have a valid Background elements
 	if ( !theme->mainElems.first || (theme->mainElems.first->type != TYPE_BACKGROUND) ) {
-		LOG("No valid background found for main, add default BG_ART\n");
+		LOG("THEMES No valid background found for main, add default BG_ART\n");
 		theme_element_t* backgroundElem = initBasic(themePath, themeConfig, theme, "bg", TYPE_BACKGROUND, 0, 0, ALIGN_NONE, screenWidth, screenHeight, SCALING_NONE, gDefaultCol, FNT_DEFAULT);
 		if (themePath)
 			initBackground(themePath, themeConfig, theme, backgroundElem, "bg", "BG", 1, "background");
 
 	if (theme->infoElems.first) {
 		if (theme->infoElems.first->type != TYPE_BACKGROUND) {
-			LOG("No valid background found for info, add default BG_ART\n");
+			LOG("THEMES No valid background found for info, add default BG_ART\n");
 			theme_element_t* backgroundElem = initBasic(themePath, themeConfig, theme, "bg", TYPE_BACKGROUND, 0, 0, ALIGN_NONE, screenWidth, screenHeight, SCALING_NONE, gDefaultCol, FNT_DEFAULT);
 			if (themePath)
 				initBackground(themePath, themeConfig, theme, backgroundElem, "bg", "BG", 1, "background");
 			itemsList->decorator = NULL;
 		}
 	} else {
-		LOG("No itemsList found, adding a default one\n");
+		LOG("THEMES No itemsList found, adding a default one\n");
 		theme->itemsList = initBasic(themePath, themeConfig, theme, "il", TYPE_ITEMS_LIST, 150, MENU_POS_V, ALIGN_NONE, DIM_UNDEF, DIM_UNDEF, SCALING_RATIO, theme->textColor, FNT_DEFAULT);
 		initItemsList(themePath, themeConfig, theme, theme->itemsList, "il", NULL);
 		theme->itemsList->next = theme->mainElems.first->next; // Position the itemsList as second element (right after the Background)
 
 static int thmReadEntry(int index, char* path, char* separator, char* name, unsigned int mode) {
 	if (FIO_SO_ISDIR(mode) && strstr(name, "thm_")) {
-		LOG("thmReadEntry() path=%s sep=%s name=%s\n", path, separator, name);
 		theme_file_t* currTheme = &themes[nThemes + index];
 
 		int length = strlen(name) - 4 + 1;
 		currTheme->filePath = (char*) malloc(length * sizeof(char));
 		sprintf(currTheme->filePath, "%s%s%s%s", path, separator, name, separator);
 
-		LOG("Theme found: %s\n", currTheme->filePath);
+		LOG("THEMES Theme found: %s\n", currTheme->filePath);
 
 		index++;
 	}
 }
 
 static void thmLoad(char* themePath) {
-	LOG("thmLoad() path=%s\n", themePath);
+	LOG("THEMES Load theme path=%s\n", themePath);
 	theme_t* curT = gTheme;
 	theme_t* newT = (theme_t*) malloc(sizeof(theme_t));
 	memset(newT, 0, sizeof(theme_t));
 	validateGUIElems(themePath, themeConfig, newT);
 	configFree(themeConfig);
 
-	LOG("theme loaded, number of cache: %d\n", newT->gameCacheCount);
-
-	LOG("thmLoad() usedHeight=%d\n", newT->usedHeight);
+	LOG("THEMES Number of cache: %d\n", newT->gameCacheCount);
+	LOG("THEMES Used height: %d\n", newT->usedHeight);
 
 	/// Now swap theme and start loading textures
 	if (newT->usedHeight == screenHeight)
 }
 
 void thmAddElements(char* path, char* separator, int mode) {
-	LOG("thmAddElements() path=%s sep=%s\n", path, separator);
 	nThemes += listDir(path, separator, THM_MAX_FILES - nThemes, &thmReadEntry);
-	LOG("thmAddElements() nThemes=%d\n", nThemes);
 	thmRebuildGuiNames();
 
 	char* temp;
 	if (configGetStr(configGetByType(CONFIG_OPL), "theme", &temp)) {
-		LOG("Trying to set again theme: %s\n", temp);
+		LOG("THEMES Trying to set again theme: %s\n", temp);
 		if (thmSetGuiValue(thmFindGuiID(temp), 0))
 			moduleUpdateMenu(mode, 1);
 	}
 }
 
 void thmInit() {
-	LOG("thmInit()\n");
+	LOG("THEMES Init\n");
 	gTheme = NULL;
 
 	thmReloadScreenExtents();
 }
 
 char* thmGetValue() {
-	//LOG("thmGetValue() id=%d name=%s\n", guiThemeID, guiThemesNames[guiThemeID]);
 	return guiThemesNames[guiThemeID];
 }
 
 int thmSetGuiValue(int themeID, int reload) {
-	LOG("thmSetGuiValue() id=%d\n", themeID);
 	if (themeID != -1) {
 		if (guiThemeID != themeID || reload) {
 			if (themeID != 0)
 }
 
 int thmGetGuiValue() {
-	//LOG("thmGetGuiValue() id=%d\n", guiThemeID);
 	return guiThemeID;
 }
 
 int thmFindGuiID(char* theme) {
-	LOG("thmFindGuiID() theme=%s\n", theme);
 	if (theme) {
 		int i = 0;
 		for (; i < nThemes; i++) {

File src/usbsupport.c

 }
 
 void usbLoadModules(void) {
-	LOG("usbLoadModules()\n");
+	LOG("USBSUPPORT LoadModules\n");
 	//first it search for custom usbd in MC?
 	usbd_irx = readFile("mc?:BEDATA-SYSTEM/USBD.IRX", -1, &size_usbd_irx);
 	if (!usbd_irx) {
 
 	delay(gUSBDelay);
 
-	LOG("usbLoadModules: modules loaded\n");
+	LOG("USBSUPPORT Modules loaded\n");
 }
 
 void usbInit(void) {
-	LOG("usbInit()\n");
+	LOG("USBSUPPORT Init\n");
 	usbULSizePrev = -2;
 	memset(usbModifiedCDPrev, 0, 8);
 	memset(usbModifiedDVDPrev, 0, 8);
 				// Check vmc cluster chain (write operation can cause dammage)
 				sprintf(vmc_path, "%s/VMC/%s.bin", gUSBPrefix, vmc_name);
 				if (fioIoctl(fd, 0xCAFEC0DE, vmc_path)) {
-					LOG("Cluster Chain OK\n");
+					LOG("USBSUPPORT Cluster Chain OK\n");
 					if ((i = fioIoctl(fd, 0xBEEFC0DE, vmc_path)) != 0) {
 						have_error = 0;
 						usb_vmc_infos.active = 1;
 						usb_vmc_infos.start_sector = i;
-						LOG("Start Sector: 0x%X\n", usb_vmc_infos.start_sector);
+						LOG("USBSUPPORT Start Sector: 0x%X\n", usb_vmc_infos.start_sector);
 					}
 				}
 			}
 		sprintf(partname, "%s/%s.00", gUSBPrefix, isoname);
 
 	val = fioIoctl(fd, 0xDEADC0DE, partname);
-	LOG("mass storage device sectorsize = %d\n", val);
+	LOG("USBSUPPORT Mass storage device sectorsize = %d\n", val);
 	void** irx = &usb_cdvdman_irx;
 	int irx_size = size_usb_cdvdman_irx;
 	if (val == 4096) {
 
 static void usbCleanUp(int exception) {
 	if (usbGameList.enabled) {
-		LOG("usbCleanUp()\n");
+		LOG("USBSUPPORT CleanUp\n");
 
 		free(usbGames);
 	}
 		unsigned int realSize = getFileSize(fd);
 
 		if ((*size > 0) && (*size != realSize)) {
-			LOG("Invalid filesize, expected: %d, got: %d\n", *size, realSize);
+			LOG("UTIL Invalid filesize, expected: %d, got: %d\n", *size, realSize);
 			fioClose(fd);
 			return NULL;
 		}
 			buffer = malloc(realSize);
 
 		if (!buffer) {
-			LOG("readFile: Failed allocation of %d bytes", realSize);
+			LOG("UTIL ReadFile: Failed allocation of %d bytes", realSize);
 			*size = 0;
 		} else {
 			fioRead(fd, buffer, realSize);