From 518795e35fc17577b9695adddd91de22d08ef2b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 25 Oct 2026 17:33:44 +0100 Subject: [PATCH] Cut down on outdated/useless REPORTing and logging --- Common/Render/Text/draw_text_uwp.cpp | 1 + Common/UI/Context.cpp | 5 ++- Core/Dialog/PSPGamedataInstallDialog.cpp | 6 +-- Core/Dialog/PSPMsgDialog.cpp | 13 +++--- Core/Dialog/PSPOskDialog.cpp | 7 ++-- Core/Dialog/PSPSaveDialog.cpp | 2 +- Core/ELF/ElfReader.cpp | 24 ++++++----- Core/FileSystems/ISOFileSystem.cpp | 2 +- Core/Font/PGF.cpp | 4 +- Core/HLE/HLE.cpp | 6 +-- Core/HLE/sceAudio.cpp | 8 ++-- Core/HLE/sceDisplay.cpp | 4 +- Core/HLE/sceFont.cpp | 42 +++++++++---------- Core/HLE/sceGe.cpp | 16 +++---- Core/HLE/sceKernelHeap.cpp | 3 +- Core/HLE/sceKernelInterrupt.cpp | 3 +- Core/HLE/sceMpeg.cpp | 32 +++++++------- Core/HLE/scePsmf.cpp | 34 +++++++-------- Core/HLE/sceReg.cpp | 3 +- Core/HW/MediaEngine.cpp | 20 ++++----- Core/MIPS/IR/IRFrontend.cpp | 2 +- Core/MIPS/InterpreterVFPU.cpp | 12 +++--- Core/MIPS/LoongArch64/LoongArch64RegCache.cpp | 6 +-- Core/MIPS/RiscV/RiscVRegCache.cpp | 6 +-- GPU/Common/TextureCacheCommon.cpp | 4 +- GPU/GPUCommon.cpp | 14 +++---- GPU/Software/Sampler.cpp | 4 +- GPU/Software/SoftGpu.cpp | 18 ++++---- 28 files changed, 152 insertions(+), 149 deletions(-) diff --git a/Common/Render/Text/draw_text_uwp.cpp b/Common/Render/Text/draw_text_uwp.cpp index aee564b629..890f3c1d51 100644 --- a/Common/Render/Text/draw_text_uwp.cpp +++ b/Common/Render/Text/draw_text_uwp.cpp @@ -262,6 +262,7 @@ TextDrawerUWP::~TextDrawerUWP() { } void TextDrawerUWP::SetOrCreateFont(const FontStyle &style) { + _dbg_assert_(style.sizePts > 0); auto iter = fontMap_.find(style); if (iter != fontMap_.end()) { fontStyle_ = style; diff --git a/Common/UI/Context.cpp b/Common/UI/Context.cpp index d6cd0a7387..26eeb831b7 100644 --- a/Common/UI/Context.cpp +++ b/Common/UI/Context.cpp @@ -281,7 +281,10 @@ void UIContext::MeasureText(const FontStyle &style, float scaleX, float scaleY, textDrawer_->SetFontScale(scaleX, scaleY); textDrawer_->MeasureString(str, x, y); if (switchFont) { - textDrawer_->SetOrCreateFont(*fontStyle_); + // Check for bad "old font". + if (fontStyle_ && fontStyle_->sizePts > 0) { + textDrawer_->SetOrCreateFont(*fontStyle_); + } } } } diff --git a/Core/Dialog/PSPGamedataInstallDialog.cpp b/Core/Dialog/PSPGamedataInstallDialog.cpp index 00d5741257..b05414f500 100644 --- a/Core/Dialog/PSPGamedataInstallDialog.cpp +++ b/Core/Dialog/PSPGamedataInstallDialog.cpp @@ -58,7 +58,7 @@ static std::vector GetPSPFileList(std::string_view dirpath) { int PSPGamedataInstallDialog::Init(u32 paramAddr) { if (GetStatus() != SCE_UTILITY_STATUS_NONE) { - ERROR_LOG_REPORT(Log::sceUtility, "A game install request is already running, not starting a new one"); + ERROR_LOG(Log::sceUtility, "A game install request is already running, not starting a new one"); return SCE_ERROR_UTILITY_INVALID_STATUS; } @@ -83,7 +83,7 @@ int PSPGamedataInstallDialog::Init(u32 paramAddr) { } if (allFilesSize == 0) { - ERROR_LOG_REPORT(Log::sceUtility, "Game install with no files / data"); + ERROR_LOG(Log::sceUtility, "Game install with no files / data"); // Getting a lot of reports of this from patched football games. Can probably ignore. https://report.ppsspp.org/logs/kind/793 return -1; } @@ -152,7 +152,7 @@ void PSPGamedataInstallDialog::OpenNextFile() { currentInputFile = pspFileSystem.OpenFile(inputFileName, FILEACCESS_READ); if (currentInputFile < 0) { // TODO: Generate an error code? - ERROR_LOG_REPORT(Log::sceUtility, "Unable to read from install file: %s", inFileNames[readFiles].c_str()); + ERROR_LOG(Log::sceUtility, "Unable to read from install file: %s", inFileNames[readFiles].c_str()); ++readFiles; currentInputFile = 0; return; diff --git a/Core/Dialog/PSPMsgDialog.cpp b/Core/Dialog/PSPMsgDialog.cpp index 4bb8141229..30aaa7e106 100755 --- a/Core/Dialog/PSPMsgDialog.cpp +++ b/Core/Dialog/PSPMsgDialog.cpp @@ -52,7 +52,7 @@ bool PSPMsgDialog::UseAutoStatus() { int PSPMsgDialog::Init(unsigned int paramAddr) { // Ignore if already running if (GetStatus() != SCE_UTILITY_STATUS_NONE) { - ERROR_LOG_REPORT(Log::sceUtility, "sceUtilityMsgDialogInitStart: invalid status"); + ERROR_LOG(Log::sceUtility, "sceUtilityMsgDialogInitStart: invalid status"); return SCE_ERROR_UTILITY_INVALID_STATUS; } @@ -65,16 +65,15 @@ int PSPMsgDialog::Init(unsigned int paramAddr) { } messageDialogAddr = paramAddr; - int size = Memory::ReadUnchecked_U32(paramAddr); + const int size = Memory::ReadUnchecked_U32(paramAddr); memset(&messageDialog, 0, sizeof(messageDialog)); // Only copy the right size to support different request format - Memory::Memcpy(&messageDialog,paramAddr,size); + Memory::Memcpy(&messageDialog, paramAddr, size); // debug info - int optionsNotCoded = messageDialog.options & ~SCE_UTILITY_MSGDIALOG_OPTION_SUPPORTED; - if(optionsNotCoded) - { - ERROR_LOG_REPORT(Log::sceUtility, "PSPMsgDialog options not coded : 0x%08x", optionsNotCoded); + const int unsupportedOptionBits = messageDialog.options & ~SCE_UTILITY_MSGDIALOG_OPTION_SUPPORTED; + if (unsupportedOptionBits) { + ERROR_LOG_REPORT(Log::sceUtility, "PSPMsgDialog options not coded : 0x%08x", unsupportedOptionBits); } flag = 0; diff --git a/Core/Dialog/PSPOskDialog.cpp b/Core/Dialog/PSPOskDialog.cpp index ce34a68bb3..09cfce206e 100755 --- a/Core/Dialog/PSPOskDialog.cpp +++ b/Core/Dialog/PSPOskDialog.cpp @@ -210,15 +210,14 @@ int PSPOskDialog::Init(u32 oskPtr) { } const int check = CheckRequest(oskPtr, { 0x40, 0x44 }); if (check < 0) { - ERROR_LOG_REPORT(Log::sceUtility, "sceUtilityOskInitStart: bad request at %08x: %08x", oskPtr, check); + ERROR_LOG(Log::sceUtility, "sceUtilityOskInitStart: bad request at %08x: %08x", oskPtr, check); return check; } oskParams = oskPtr; // Seems to crash. - if (!Memory::IsValidRange(oskParams->fields.ptr, sizeof(SceUtilityOskData))) - { - ERROR_LOG_REPORT(Log::sceUtility, "sceUtilityOskInitStart: invalid field data (%08x)", oskParams->fields.ptr); + if (!Memory::IsValidRange(oskParams->fields.ptr, sizeof(SceUtilityOskData))) { + ERROR_LOG(Log::sceUtility, "sceUtilityOskInitStart: invalid field data (%08x)", oskParams->fields.ptr); return -1; } diff --git a/Core/Dialog/PSPSaveDialog.cpp b/Core/Dialog/PSPSaveDialog.cpp index 53fca2b2a1..d68d2b4f72 100755 --- a/Core/Dialog/PSPSaveDialog.cpp +++ b/Core/Dialog/PSPSaveDialog.cpp @@ -115,7 +115,7 @@ PSPSaveDialog::~PSPSaveDialog() { int PSPSaveDialog::Init(int paramAddr) { // Ignore if already running if (GetStatus() != SCE_UTILITY_STATUS_NONE) { - ERROR_LOG_REPORT(Log::sceUtility, "A save request is already running, not starting a new one"); + ERROR_LOG(Log::sceUtility, "A save request is already running, not starting a new one"); return SCE_ERROR_UTILITY_INVALID_STATUS; } diff --git a/Core/ELF/ElfReader.cpp b/Core/ELF/ElfReader.cpp index 380941562a..8f2f5b9afc 100644 --- a/Core/ELF/ElfReader.cpp +++ b/Core/ELF/ElfReader.cpp @@ -353,7 +353,7 @@ void ElfReader::LoadRelocations2(int rel_seg) flag = ( cmd<<(16-flag_bits))&0xffff; flag = (flag>>(16-flag_bits))&0xffff; if (flag >= flag_table_size) { - ERROR_LOG_REPORT(Log::Loader, "Rel2: flag %d out of range (table has %d)", flag, flag_table_size); + ERROR_LOG(Log::Loader, "Rel2: flag %d out of range (table has %d)", flag, flag_table_size); return; } flag = flag_table[flag]; @@ -364,7 +364,7 @@ void ElfReader::LoadRelocations2(int rel_seg) type = ( cmd<<(16-type_bits-seg_bits-flag_bits))&0xffff; type = (type>>(16-type_bits))&0xffff; if (type >= type_table_size) { - ERROR_LOG_REPORT(Log::Loader, "Rel2: type %d out of range (table has %d)", type, type_table_size); + ERROR_LOG(Log::Loader, "Rel2: type %d out of range (table has %d)", type, type_table_size); return; } type = type_table[type]; @@ -379,21 +379,21 @@ void ElfReader::LoadRelocations2(int rel_seg) rel_base = buf[0] | (buf[1]<<8) | (buf[2]<<16) | (buf[3]<<24); buf += 4; }else{ - ERROR_LOG_REPORT(Log::Loader, "Rel2: invalid size flag! %x", flag); + ERROR_LOG(Log::Loader, "Rel2: invalid size flag! %x", flag); rel_base = 0; } }else{ addr_seg = seg; if (!SegmentIsLoaded(addr_seg)) { if (!loggedBadSegment) { - ERROR_LOG_REPORT(Log::Loader, "Rel2: relocating against segment %d, which we didn't load", addr_seg); + ERROR_LOG(Log::Loader, "Rel2: relocating against segment %d, which we didn't load", addr_seg); loggedBadSegment = true; } continue; } relocate_to = segmentVAddr[addr_seg]; if (!Memory::IsValidAddress(relocate_to)) { - ERROR_LOG_REPORT(Log::Loader, "ELF: Bad address to relocate to: %08x (segment %d)", relocate_to, addr_seg); + ERROR_LOG(Log::Loader, "ELF: Bad address to relocate to: %08x (segment %d)", relocate_to, addr_seg); continue; } @@ -423,21 +423,23 @@ void ElfReader::LoadRelocations2(int rel_seg) rel_base = buf[0] | (buf[1]<<8) | (buf[2]<<16) | (buf[3]<<24); buf += 4; }else{ - ERROR_LOG_REPORT(Log::Loader, "Rel2: invalid relocat size flag! %x", flag); + ERROR_LOG(Log::Loader, "Rel2: invalid relocat size flag! %x", flag); } // seg is seg_bits wide, so it can name more segments than the file actually has - and // naming one we didn't load leaves nothing to write to. if (!SegmentIsLoaded(off_seg)) { if (!loggedBadSegment) { - ERROR_LOG_REPORT(Log::Loader, "Rel2: bad or unloaded offset segment %d", off_seg); + ERROR_LOG(Log::Loader, "Rel2: bad or unloaded offset segment %d", off_seg); loggedBadSegment = true; } continue; } rel_offset = rel_base+segmentVAddr[off_seg]; - if (!Memory::IsValidAddress(rel_offset)) { - ERROR_LOG_REPORT(Log::Loader, "ELF: Bad rel_offset: %08x", rel_offset); + + // We didn't check alignment here before, but it has to be right to do so. + if (!Memory::IsValid4AlignedAddress(rel_offset)) { + ERROR_LOG(Log::Loader, "ELF: Bad rel_offset: %08x", rel_offset); continue; } @@ -459,7 +461,7 @@ void ElfReader::LoadRelocations2(int rel_seg) lo16 |= 0xffff0000; buf += 2; }else{ - ERROR_LOG_REPORT(Log::Loader, "Rel2: invalid lo16 type! %x", flag); + ERROR_LOG(Log::Loader, "Rel2: invalid lo16 type! %x", flag); } op = Memory::Read_Instruction(rel_offset).encoding; @@ -496,7 +498,7 @@ void ElfReader::LoadRelocations2(int rel_seg) op = (op&0xffff0000) | (((op&0xffff)+relocate_to)&0xffff); break; default: - ERROR_LOG_REPORT(Log::Loader, "Rel2: unexpected relocation type! %x", type); + ERROR_LOG(Log::Loader, "Rel2: unexpected relocation type! %x", type); break; } diff --git a/Core/FileSystems/ISOFileSystem.cpp b/Core/FileSystems/ISOFileSystem.cpp index aae8acc549..b0812b1f11 100644 --- a/Core/FileSystems/ISOFileSystem.cpp +++ b/Core/FileSystems/ISOFileSystem.cpp @@ -493,7 +493,7 @@ int ISOFileSystem::Ioctl(u32 handle, u32 cmd, u32 indataPtr, u32 inlen, u32 outd } if (!Memory::IsValidRange(outdataPtr, 0x800) || outlen < 0x800) { - WARN_LOG_REPORT(Log::FileSystem, "sceIoIoctl: Invalid out pointer %08x while reading ISO9660 volume descriptor", outdataPtr); + WARN_LOG(Log::FileSystem, "sceIoIoctl: Invalid out pointer %08x while reading ISO9660 volume descriptor", outdataPtr); return SCE_KERNEL_ERROR_ERRNO_INVALID_ARGUMENT; } diff --git a/Core/Font/PGF.cpp b/Core/Font/PGF.cpp index 18a6d9b07c..7f6a200470 100644 --- a/Core/Font/PGF.cpp +++ b/Core/Font/PGF.cpp @@ -639,7 +639,7 @@ void PGF::DrawCharacter(const GlyphImage *image, int clipX, int clipY, int clipW if (((glyph.flags & FONT_PGF_BMP_OVERLAY) != FONT_PGF_BMP_H_ROWS) && ((glyph.flags & FONT_PGF_BMP_OVERLAY) != FONT_PGF_BMP_V_ROWS)) { - ERROR_LOG_REPORT(Log::sceFont, "Nonsense glyph bitmap direction flag"); + ERROR_LOG(Log::sceFont, "Nonsense glyph bitmap direction flag"); return; } @@ -650,7 +650,7 @@ void PGF::DrawCharacter(const GlyphImage *image, int clipX, int clipY, int clipW // // This was measured on a PSP-1000: 32 cases per format, every pixel left at its pre-fill value. if (pixelFormat != PSP_FONT_PIXELFORMAT_4 && pixelFormat != PSP_FONT_PIXELFORMAT_8) { - WARN_LOG_REPORT_ONCE(pgfunsupportedfmt, Log::sceFont, "Font pixel format %d draws nothing on hardware", (int)pixelFormat); + WARN_LOG_ONCE(pgfunsupportedfmt, Log::sceFont, "Font pixel format %d draws nothing on hardware", (int)pixelFormat); return; } diff --git a/Core/HLE/HLE.cpp b/Core/HLE/HLE.cpp index 876de21bb6..84ceab9e57 100644 --- a/Core/HLE/HLE.cpp +++ b/Core/HLE/HLE.cpp @@ -674,7 +674,7 @@ bool WriteHLESyscall(std::string_view moduleName, u32 nib, u32 address) { _dbg_assert_(Memory::IsValid4AlignedAddress(address)); if (nib == 0) { - WARN_LOG_REPORT(Log::HLE, "Wrote patched out nid=0 syscall (%.*s)", (int)moduleName.size(), moduleName.data()); + WARN_LOG(Log::HLE, "Wrote patched out nid=0 syscall (%.*s)", (int)moduleName.size(), moduleName.data()); Memory::WriteUnchecked_U32(MIPS_MAKE_JR_RA(), address); //patched out? Memory::WriteUnchecked_U32(MIPS_MAKE_NOP(), address+4); //patched out? return true; @@ -688,7 +688,7 @@ bool WriteHLESyscall(std::string_view moduleName, u32 nib, u32 address) { } else { - ERROR_LOG_REPORT(Log::HLE, "Unable to write unknown syscall: %.*s/%08x", (int)moduleName.size(), moduleName.data(), nib); + ERROR_LOG(Log::HLE, "Unable to write unknown syscall: %.*s/%08x", (int)moduleName.size(), moduleName.data(), nib); return false; } } @@ -1221,7 +1221,7 @@ void CallSyscallWithPC(MIPSState *mips, MIPSOpcode op, u32 pc) { } else { // We haven't incremented the stack yet. RETURN(SCE_KERNEL_ERROR_LIBRARY_NOT_YET_LINKED); - ERROR_LOG_REPORT(Log::HLE, "Unimplemented HLE function %s", info->name ? info->name : "(\?\?\?)"); + ERROR_LOG(Log::HLE, "Unimplemented HLE function %s", info->name ? info->name : "(\?\?\?)"); } if (collectStats) { diff --git a/Core/HLE/sceAudio.cpp b/Core/HLE/sceAudio.cpp index 6f430f558a..5a02ca265b 100644 --- a/Core/HLE/sceAudio.cpp +++ b/Core/HLE/sceAudio.cpp @@ -584,26 +584,26 @@ static int sceAudioGetInputLength() { } static u32 sceAudioRoutingSetMode(u32 mode) { - ERROR_LOG_REPORT(Log::sceAudio, "sceAudioRoutingSetMode(%08x)", mode); + ERROR_LOG(Log::sceAudio, "sceAudioRoutingSetMode(%08x)", mode); int previousMode = defaultRoutingMode; defaultRoutingMode = mode; return previousMode; } static u32 sceAudioRoutingGetMode() { - ERROR_LOG_REPORT(Log::sceAudio, "sceAudioRoutingGetMode()"); + ERROR_LOG(Log::sceAudio, "sceAudioRoutingGetMode()"); return defaultRoutingMode; } static u32 sceAudioRoutingSetVolumeMode(u32 mode) { - ERROR_LOG_REPORT(Log::sceAudio, "sceAudioRoutingSetVolumeMode(%08x)", mode); + ERROR_LOG(Log::sceAudio, "sceAudioRoutingSetVolumeMode(%08x)", mode); int previousMode = defaultRoutingVolMode; defaultRoutingVolMode = mode; return previousMode; } static u32 sceAudioRoutingGetVolumeMode() { - ERROR_LOG_REPORT(Log::sceAudio, "sceAudioRoutingGetVolumeMode()"); + ERROR_LOG(Log::sceAudio, "sceAudioRoutingGetVolumeMode()"); return defaultRoutingVolMode; } diff --git a/Core/HLE/sceDisplay.cpp b/Core/HLE/sceDisplay.cpp index 05f245e257..d9708edfca 100644 --- a/Core/HLE/sceDisplay.cpp +++ b/Core/HLE/sceDisplay.cpp @@ -369,7 +369,7 @@ void __DisplayVblankBeginCallback(SceUID threadID, SceUID prevCallbackId) { } if (waitData.threadID != threadID) { - WARN_LOG_REPORT(Log::sceDisplay, "sceDisplayWaitVblankCB: could not find waiting thread info."); + WARN_LOG(Log::sceDisplay, "sceDisplayWaitVblankCB: could not find waiting thread info."); return; } @@ -890,7 +890,7 @@ void __DisplayWaitForVblanks(const char *reason, int vblanks, bool callbacks) { static u32 sceDisplaySetMode(int displayMode, int displayWidth, int displayHeight) { if (displayMode != PSP_DISPLAY_MODE_LCD || displayWidth != 480 || displayHeight != 272) { - WARN_LOG_REPORT(Log::sceDisplay, "Video out requested, not supported: mode=%d size=%d,%d", displayMode, displayWidth, displayHeight); + WARN_LOG(Log::sceDisplay, "Video out requested, not supported: mode=%d size=%d,%d", displayMode, displayWidth, displayHeight); } if (displayMode != PSP_DISPLAY_MODE_LCD) { return hleLogWarning(Log::sceDisplay, SCE_KERNEL_ERROR_INVALID_MODE, "invalid mode"); diff --git a/Core/HLE/sceFont.cpp b/Core/HLE/sceFont.cpp index f8c171ac98..0c8d225276 100644 --- a/Core/HLE/sceFont.cpp +++ b/Core/HLE/sceFont.cpp @@ -1149,13 +1149,13 @@ static u32 sceFontNewLib(u32 paramPtr, u32 errorCodePtr) { auto errorCode = PSPPointer::Create(errorCodePtr); if (!params.IsValid() || !errorCode.IsValid()) { - ERROR_LOG_REPORT(Log::sceFont, "sceFontNewLib(%08x, %08x): invalid addresses", paramPtr, errorCodePtr); + ERROR_LOG(Log::sceFont, "sceFontNewLib(%08x, %08x): invalid addresses", paramPtr, errorCodePtr); // The PSP would crash in this situation, not a real error code. return hleLogError(Log::sceFont, SCE_KERNEL_ERROR_ILLEGAL_ADDR); } if (!Memory::IsValidAddress(params->allocFuncAddr) || !Memory::IsValidAddress(params->freeFuncAddr)) { - ERROR_LOG_REPORT(Log::sceFont, "sceFontNewLib(%08x, %08x): missing alloc func", paramPtr, errorCodePtr); + ERROR_LOG(Log::sceFont, "sceFontNewLib(%08x, %08x): missing alloc func", paramPtr, errorCodePtr); *errorCode = SCE_FONT_ERROR_INVALID_PARAMETER; return hleLogError(Log::sceFont, 0); } @@ -1269,7 +1269,7 @@ static u32 sceFontOpenUserFile(u32 libHandle, const char *fileName, u32 mode, u3 // TODO: Technically, we only do this if mode = 1. Mode 0 uses the handlers. if (mode != 1) { - WARN_LOG_REPORT(Log::sceFont, "Loading file directly instead of using handlers: %s", fileName); + WARN_LOG(Log::sceFont, "Loading file directly instead of using handlers: %s", fileName); } std::vector buffer; @@ -1372,19 +1372,19 @@ static int sceFontFindOptimumFont(u32 libHandle, u32 fontStylePtr, u32 errorCode static int sceFontFindFont(u32 libHandle, u32 fontStylePtr, u32 errorCodePtr) { auto errorCode = PSPPointer::Create(errorCodePtr); if (!errorCode.IsValid()) { - ERROR_LOG_REPORT(Log::sceFont, "sceFontFindFont(%x, %x, %x): invalid error address", libHandle, fontStylePtr, errorCodePtr); + ERROR_LOG(Log::sceFont, "sceFontFindFont(%x, %x, %x): invalid error address", libHandle, fontStylePtr, errorCodePtr); return hleNoLog(SCE_KERNEL_ERROR_INVALID_ARGUMENT); } FontLib *fontLib = GetFontLib(libHandle); if (!fontLib) { - ERROR_LOG_REPORT(Log::sceFont, "sceFontFindFont(%08x, %08x, %08x): invalid font lib", libHandle, fontStylePtr, errorCodePtr); + ERROR_LOG(Log::sceFont, "sceFontFindFont(%08x, %08x, %08x): invalid font lib", libHandle, fontStylePtr, errorCodePtr); *errorCode = SCE_FONT_ERROR_INVALID_LIBID; return hleNoLog(0); } if (!Memory::IsValidAddress(fontStylePtr)) { - ERROR_LOG_REPORT(Log::sceFont, "sceFontFindFont(%08x, %08x, %08x): invalid style address", libHandle, fontStylePtr, errorCodePtr); + ERROR_LOG(Log::sceFont, "sceFontFindFont(%08x, %08x, %08x): invalid style address", libHandle, fontStylePtr, errorCodePtr); *errorCode = SCE_FONT_ERROR_INVALID_PARAMETER; return hleNoLog(0); } @@ -1580,7 +1580,7 @@ static int sceFontSetAltCharacterCode(u32 fontLibHandle, u32 charCode) { charCode &= 0xffff; FontLib *fl = GetFontLib(fontLibHandle); if (!fl) { - ERROR_LOG_REPORT(Log::sceFont, "sceFontSetAltCharacterCode(%08x, %08x): invalid font lib", fontLibHandle, charCode); + ERROR_LOG(Log::sceFont, "sceFontSetAltCharacterCode(%08x, %08x): invalid font lib", fontLibHandle, charCode); return hleNoLog(SCE_FONT_ERROR_INVALID_LIBID); } @@ -1591,7 +1591,7 @@ static int sceFontSetAltCharacterCode(u32 fontLibHandle, u32 charCode) { static int sceFontFlush(u32 fontHandle) { LoadedFont *font = GetLoadedFont(fontHandle, true); if (!font) { - ERROR_LOG_REPORT(Log::sceFont, "sceFontFlush(%08x): bad font", fontHandle); + ERROR_LOG(Log::sceFont, "sceFontFlush(%08x): bad font", fontHandle); return hleNoLog(SCE_FONT_ERROR_INVALID_PARAMETER); } @@ -1607,11 +1607,11 @@ static int sceFontGetFontList(u32 fontLibHandle, u32 fontStylePtr, int numFonts) auto fontStyles = PSPPointer::Create(fontStylePtr); FontLib *fl = GetFontLib(fontLibHandle); if (!fl) { - ERROR_LOG_REPORT(Log::sceFont, "sceFontGetFontList(%08x, %08x, %i): invalid font lib", fontLibHandle, fontStylePtr, numFonts); + ERROR_LOG(Log::sceFont, "sceFontGetFontList(%08x, %08x, %i): invalid font lib", fontLibHandle, fontStylePtr, numFonts); return SCE_FONT_ERROR_INVALID_LIBID; } if (!fontStyles.IsValid()) { - ERROR_LOG_REPORT(Log::sceFont, "sceFontGetFontList(%08x, %08x, %i): invalid style pointer", fontLibHandle, fontStylePtr, numFonts); + ERROR_LOG(Log::sceFont, "sceFontGetFontList(%08x, %08x, %i): invalid style pointer", fontLibHandle, fontStylePtr, numFonts); return SCE_FONT_ERROR_INVALID_PARAMETER; } @@ -1654,12 +1654,12 @@ static int sceFontSetResolution(u32 fontLibHandle, float hRes, float vRes) { static float sceFontPixelToPointH(int fontLibHandle, float fontPixelsH, u32 errorCodePtr) { auto errorCode = PSPPointer::Create(errorCodePtr); if (!errorCode.IsValid()) { - ERROR_LOG_REPORT(Log::sceFont, "sceFontPixelToPointH(%08x, %f, %08x): invalid error address", fontLibHandle, fontPixelsH, errorCodePtr); + ERROR_LOG(Log::sceFont, "sceFontPixelToPointH(%08x, %f, %08x): invalid error address", fontLibHandle, fontPixelsH, errorCodePtr); return 0.0f; } FontLib *fl = GetFontLib(fontLibHandle); if (!fl) { - ERROR_LOG_REPORT(Log::sceFont, "sceFontPixelToPointH(%08x, %f, %08x): invalid font lib", fontLibHandle, fontPixelsH, errorCodePtr); + ERROR_LOG(Log::sceFont, "sceFontPixelToPointH(%08x, %f, %08x): invalid font lib", fontLibHandle, fontPixelsH, errorCodePtr); *errorCode = SCE_FONT_ERROR_INVALID_LIBID; return 0.0f; } @@ -1671,12 +1671,12 @@ static float sceFontPixelToPointH(int fontLibHandle, float fontPixelsH, u32 erro static float sceFontPixelToPointV(int fontLibHandle, float fontPixelsV, u32 errorCodePtr) { auto errorCode = PSPPointer::Create(errorCodePtr); if (!errorCode.IsValid()) { - ERROR_LOG_REPORT(Log::sceFont, "sceFontPixelToPointV(%08x, %f, %08x): invalid error address", fontLibHandle, fontPixelsV, errorCodePtr); + ERROR_LOG(Log::sceFont, "sceFontPixelToPointV(%08x, %f, %08x): invalid error address", fontLibHandle, fontPixelsV, errorCodePtr); return 0.0f; } FontLib *fl = GetFontLib(fontLibHandle); if (!fl) { - ERROR_LOG_REPORT(Log::sceFont, "sceFontPixelToPointV(%08x, %f, %08x): invalid font lib", fontLibHandle, fontPixelsV, errorCodePtr); + ERROR_LOG(Log::sceFont, "sceFontPixelToPointV(%08x, %f, %08x): invalid font lib", fontLibHandle, fontPixelsV, errorCodePtr); *errorCode = SCE_FONT_ERROR_INVALID_LIBID; return 0.0f; } @@ -1688,12 +1688,12 @@ static float sceFontPixelToPointV(int fontLibHandle, float fontPixelsV, u32 erro static float sceFontPointToPixelH(int fontLibHandle, float fontPointsH, u32 errorCodePtr) { auto errorCode = PSPPointer::Create(errorCodePtr); if (!errorCode.IsValid()) { - ERROR_LOG_REPORT(Log::sceFont, "sceFontPointToPixelH(%08x, %f, %08x): invalid error address", fontLibHandle, fontPointsH, errorCodePtr); + ERROR_LOG(Log::sceFont, "sceFontPointToPixelH(%08x, %f, %08x): invalid error address", fontLibHandle, fontPointsH, errorCodePtr); return 0.0f; } FontLib *fl = GetFontLib(fontLibHandle); if (!fl) { - ERROR_LOG_REPORT(Log::sceFont, "sceFontPointToPixelH(%08x, %f, %08x): invalid font lib", fontLibHandle, fontPointsH, errorCodePtr); + ERROR_LOG(Log::sceFont, "sceFontPointToPixelH(%08x, %f, %08x): invalid font lib", fontLibHandle, fontPointsH, errorCodePtr); *errorCode = SCE_FONT_ERROR_INVALID_LIBID; return 0.0f; } @@ -1705,12 +1705,12 @@ static float sceFontPointToPixelH(int fontLibHandle, float fontPointsH, u32 erro static float sceFontPointToPixelV(int fontLibHandle, float fontPointsV, u32 errorCodePtr) { auto errorCode = PSPPointer::Create(errorCodePtr); if (!errorCode.IsValid()) { - ERROR_LOG_REPORT(Log::sceFont, "sceFontPointToPixelV(%08x, %f, %08x): invalid error address", fontLibHandle, fontPointsV, errorCodePtr); + ERROR_LOG(Log::sceFont, "sceFontPointToPixelV(%08x, %f, %08x): invalid error address", fontLibHandle, fontPointsV, errorCodePtr); return 0.0f; } FontLib *fl = GetFontLib(fontLibHandle); if (!fl) { - ERROR_LOG_REPORT(Log::sceFont, "sceFontPointToPixelV(%08x, %f, %08x): invalid font lib", fontLibHandle, fontPointsV, errorCodePtr); + ERROR_LOG(Log::sceFont, "sceFontPointToPixelV(%08x, %f, %08x): invalid font lib", fontLibHandle, fontPointsV, errorCodePtr); *errorCode = SCE_FONT_ERROR_INVALID_LIBID; return 0.0f; } @@ -1720,7 +1720,7 @@ static float sceFontPointToPixelV(int fontLibHandle, float fontPointsV, u32 erro } static int sceFontCalcMemorySize() { - ERROR_LOG_REPORT(Log::sceFont, "UNIMPL sceFontCalcMemorySize()"); + ERROR_LOG(Log::sceFont, "UNIMPL sceFontCalcMemorySize()"); return hleNoLog(0); } @@ -1732,7 +1732,7 @@ static int sceFontGetShadowGlyphImage(u32 fontHandle, u32 charCode, u32 glyphIma } LoadedFont *font = GetLoadedFont(fontHandle, true); if (!font) { - ERROR_LOG_REPORT(Log::sceFont, "sceFontGetShadowGlyphImage(%x, %x, %x): bad font", fontHandle, charCode, glyphImagePtr); + ERROR_LOG(Log::sceFont, "sceFontGetShadowGlyphImage(%x, %x, %x): bad font", fontHandle, charCode, glyphImagePtr); return hleNoLog(SCE_FONT_ERROR_INVALID_PARAMETER); } @@ -1749,7 +1749,7 @@ static int sceFontGetShadowGlyphImage_Clip(u32 fontHandle, u32 charCode, u32 gly } LoadedFont *font = GetLoadedFont(fontHandle, true); if (!font) { - ERROR_LOG_REPORT(Log::sceFont, "sceFontGetShadowGlyphImage_Clip(%08x, %i, %08x, %i, %i, %i, %i): bad font", fontHandle, charCode, glyphImagePtr, clipXPos, clipYPos, clipWidth, clipHeight); + ERROR_LOG(Log::sceFont, "sceFontGetShadowGlyphImage_Clip(%08x, %i, %08x, %i, %i, %i, %i): bad font", fontHandle, charCode, glyphImagePtr, clipXPos, clipYPos, clipWidth, clipHeight); return hleNoLog(SCE_FONT_ERROR_INVALID_PARAMETER); } diff --git a/Core/HLE/sceGe.cpp b/Core/HLE/sceGe.cpp index e58fdf8210..2c6cfb4cf3 100644 --- a/Core/HLE/sceGe.cpp +++ b/Core/HLE/sceGe.cpp @@ -81,7 +81,7 @@ public: } if (!dl->interruptsEnabled) { - ERROR_LOG_REPORT(Log::sceGe, "Unable to run GE interrupt: list has interrupts disabled, should not happen"); + ERROR_LOG(Log::sceGe, "Unable to run GE interrupt: list has interrupts disabled, should not happen"); return false; } @@ -172,7 +172,7 @@ public: DisplayList* dl = gpu->getList(intrdata.listid); if (!dl->interruptsEnabled) { - ERROR_LOG_REPORT(Log::sceGe, "Unable to finish GE interrupt: list has interrupts disabled, should not happen"); + ERROR_LOG(Log::sceGe, "Unable to finish GE interrupt: list has interrupts disabled, should not happen"); return; } @@ -185,7 +185,7 @@ public: //if(dl->status < 0 || dl->status > PSP_GE_LIST_PAUSED) // ERROR_LOG(Log::sceGe, "Weird DL status after signal suspend %x", dl->status); if (newState != PSP_GE_DL_STATE_RUNNING) { - DEBUG_LOG_REPORT(Log::sceGe, "GE Interrupt: newState might be %d", newState); + DEBUG_LOG(Log::sceGe, "GE Interrupt: newState might be %d", newState); } if (dl->state != PSP_GE_DL_STATE_NONE && dl->state != PSP_GE_DL_STATE_COMPLETED) { @@ -346,7 +346,7 @@ void __GeWaitCurrentThread(GPUSyncType type, SceUID waitId, const char *reason) listWaitingThreads[waitId].push_back(__KernelGetCurThread()); waitType = WAITTYPE_GELISTSYNC; } else { - ERROR_LOG_REPORT(Log::sceGe, "__GeWaitCurrentThread: bad wait type"); + ERROR_LOG(Log::sceGe, "__GeWaitCurrentThread: bad wait type"); return; } @@ -371,7 +371,7 @@ bool __GeTriggerWait(GPUSyncType type, SceUID waitId) { else if (type == GPU_SYNC_LIST || (WaitType)type == WAITTYPE_GELISTSYNC) return __GeTriggerWait(WAITTYPE_GELISTSYNC, waitId, listWaitingThreads[waitId]); else - ERROR_LOG_REPORT(Log::sceGe, "__GeTriggerWait: bad wait type"); + ERROR_LOG(Log::sceGe, "__GeTriggerWait: bad wait type"); return false; } @@ -521,10 +521,10 @@ static int sceGeBreak(u32 mode, u32 unknownPtr) { } // Not sure what this is supposed to be for... if ((int)unknownPtr < 0 || (int)(unknownPtr + 16) < 0) { - WARN_LOG_REPORT(Log::sceGe, "sceGeBreak(mode=%d, unknown=%08x): invalid ptr", mode, unknownPtr); + WARN_LOG(Log::sceGe, "sceGeBreak(mode=%d, unknown=%08x): invalid ptr", mode, unknownPtr); return SCE_KERNEL_ERROR_PRIV_REQUIRED; } else if (unknownPtr != 0) { - WARN_LOG_REPORT_ONCE(gebreak_unkptr, Log::sceGe, "sceGeBreak(mode=%d, unknown=%08x): unknown ptr (%s)", mode, unknownPtr, Memory::IsValidAddress(unknownPtr) ? "valid" : "invalid"); + WARN_LOG_ONCE(gebreak_unkptr, Log::sceGe, "sceGeBreak(mode=%d, unknown=%08x): unknown ptr (%s)", mode, unknownPtr, Memory::IsValidAddress(unknownPtr) ? "valid" : "invalid"); } //mode => 0 : current dlist 1: all drawing @@ -670,7 +670,7 @@ static u32 sceGeGetCmd(int cmd) { } static int sceGeGetStack(int index, u32 stackPtr) { - return hleReportWarning(Log::sceGe, gpu->GetStack(index, stackPtr)); + return hleLogWarning(Log::sceGe, gpu->GetStack(index, stackPtr)); } static u32 sceGeEdramSetAddrTranslation(u32 new_size) { diff --git a/Core/HLE/sceKernelHeap.cpp b/Core/HLE/sceKernelHeap.cpp index f60f763f05..4c7c5d33dc 100644 --- a/Core/HLE/sceKernelHeap.cpp +++ b/Core/HLE/sceKernelHeap.cpp @@ -142,8 +142,7 @@ static u32 sceKernelPartitionMaxFreeMemSize(int partitionId) { return hleLogWarning(Log::sceKernel, allocator->GetLargestFreeBlockSize()); } -static u32 sceKernelGetUidmanCB() -{ +static u32 sceKernelGetUidmanCB() { ERROR_LOG_REPORT(Log::sceKernel, "UNIMP sceKernelGetUidmanCB"); return 0; } diff --git a/Core/HLE/sceKernelInterrupt.cpp b/Core/HLE/sceKernelInterrupt.cpp index 95db13592f..0a7847adb8 100644 --- a/Core/HLE/sceKernelInterrupt.cpp +++ b/Core/HLE/sceKernelInterrupt.cpp @@ -734,8 +734,7 @@ struct PspIntrHandlerOptionParam { u32 max_clock_hi; //+34 }; //=38 -static int QueryIntrHandlerInfo() -{ +static int QueryIntrHandlerInfo() { ERROR_LOG_REPORT(Log::sceIntc, "QueryIntrHandlerInfo()"); return 0; } diff --git a/Core/HLE/sceMpeg.cpp b/Core/HLE/sceMpeg.cpp index d9964d6716..a0625cfcc3 100644 --- a/Core/HLE/sceMpeg.cpp +++ b/Core/HLE/sceMpeg.cpp @@ -296,7 +296,7 @@ static void AnalyzeMpeg(const u8 *buffer, u32 validSize, MpegContext *ctx) { // Sanity Check ctx->mpegFirstTimestamp if (ctx->mpegFirstTimestamp != 90000) { - WARN_LOG_REPORT(Log::Mpeg, "Unexpected mpeg first timestamp: %llx / %lld", ctx->mpegFirstTimestamp, ctx->mpegFirstTimestamp); + WARN_LOG(Log::Mpeg, "Unexpected mpeg first timestamp: %llx / %lld", ctx->mpegFirstTimestamp, ctx->mpegFirstTimestamp); } if (ctx->mpegMagic != PSMF_MAGIC || ctx->mpegVersion < 0 || @@ -464,22 +464,22 @@ static u32 sceMpegRingbufferQueryMemSize(int packets) { static u32 sceMpegRingbufferConstruct(u32 ringbufferAddr, u32 numPackets, u32 data, u32 size, u32 callbackAddr, u32 callbackArg) { if (!Memory::IsValidAddress(ringbufferAddr)) { - ERROR_LOG_REPORT(Log::Mpeg, "sceMpegRingbufferConstruct(%08x, %i, %08x, %08x, %08x, %08x): bad ringbuffer, should crash", ringbufferAddr, numPackets, data, size, callbackAddr, callbackArg); + ERROR_LOG(Log::Mpeg, "sceMpegRingbufferConstruct(%08x, %i, %08x, %08x, %08x, %08x): bad ringbuffer, should crash", ringbufferAddr, numPackets, data, size, callbackAddr, callbackArg); return hleNoLog(SCE_KERNEL_ERROR_ILLEGAL_ADDRESS); } if ((int)size < 0) { - ERROR_LOG_REPORT(Log::Mpeg, "sceMpegRingbufferConstruct(%08x, %i, %08x, %08x, %08x, %08x): invalid size", ringbufferAddr, numPackets, data, size, callbackAddr, callbackArg); + ERROR_LOG(Log::Mpeg, "sceMpegRingbufferConstruct(%08x, %i, %08x, %08x, %08x, %08x): invalid size", ringbufferAddr, numPackets, data, size, callbackAddr, callbackArg); return hleNoLog(SCE_MPEG_ERROR_NO_MEMORY); } if (__MpegRingbufferQueryMemSize(numPackets) > size) { if (numPackets < 0x00100000) { - ERROR_LOG_REPORT(Log::Mpeg, "sceMpegRingbufferConstruct(%08x, %i, %08x, %08x, %08x, %08x): too many packets for buffer", ringbufferAddr, numPackets, data, size, callbackAddr, callbackArg); + ERROR_LOG(Log::Mpeg, "sceMpegRingbufferConstruct(%08x, %i, %08x, %08x, %08x, %08x): too many packets for buffer", ringbufferAddr, numPackets, data, size, callbackAddr, callbackArg); return hleNoLog(SCE_MPEG_ERROR_NO_MEMORY); } else { // The PSP's firmware allows some cases here, due to a bug in its validation. - ERROR_LOG_REPORT(Log::Mpeg, "sceMpegRingbufferConstruct(%08x, %i, %08x, %08x, %08x, %08x): too many packets for buffer, bogus size", ringbufferAddr, numPackets, data, size, callbackAddr, callbackArg); + ERROR_LOG(Log::Mpeg, "sceMpegRingbufferConstruct(%08x, %i, %08x, %08x, %08x, %08x): too many packets for buffer, bogus size", ringbufferAddr, numPackets, data, size, callbackAddr, callbackArg); } } @@ -552,7 +552,7 @@ static u32 sceMpegCreate(u32 mpegAddr, u32 dataPtr, u32 size, u32 ringbufferAddr } MpegContext *ctx = new MpegContext(); if (g_mpegCtxs.find(mpegHandle) != g_mpegCtxs.end()) { - WARN_LOG_REPORT(Log::HLE, "Replacing existing mpeg context at %08x", mpegAddr); + WARN_LOG(Log::HLE, "Replacing existing mpeg context at %08x", mpegAddr); // Otherwise, it would leak. delete g_mpegCtxs[mpegHandle]; } @@ -1593,7 +1593,7 @@ static u32 sceMpegRingbufferPut(u32 ringbufferAddr, int numPackets, int availabl hleEnqueueCall(ringbuffer->callback_addr, 3, args, action); } } else { - ERROR_LOG_REPORT(Log::Mpeg, "sceMpegRingbufferPut: callback_addr zero"); + ERROR_LOG(Log::Mpeg, "sceMpegRingbufferPut: callback_addr zero"); } return hleNoLog(0); } @@ -1729,7 +1729,7 @@ static int sceMpegGetAtracAu(u32 mpeg, u32 streamId, u32 auAddr, u32 attrAddr) streamInfo->second.needsReset = false; } if (streamInfo == ctx->streamMap.end()) { - WARN_LOG_REPORT(Log::Mpeg, "sceMpegGetAtracAu: invalid audio stream %08x", streamId); + WARN_LOG(Log::Mpeg, "sceMpegGetAtracAu: invalid audio stream %08x", streamId); // TODO: Why was this changed to not return an error? } @@ -2205,7 +2205,7 @@ static u32 sceMpegNextAvcRpAu(u32 mpeg, u32 streamUid) { return hleLogWarning(Log::Mpeg, -1, "UNIMPL / bad mpeg handle"); } - ERROR_LOG_REPORT(Log::Mpeg, "UNIMPL sceMpegNextAvcRpAu(%08x, %08x)", mpeg, streamUid); + ERROR_LOG(Log::Mpeg, "UNIMPL sceMpegNextAvcRpAu(%08x, %08x)", mpeg, streamUid); return 0; } @@ -2215,7 +2215,7 @@ static u32 sceMpegGetAvcNalAu(u32 mpeg) { return hleLogWarning(Log::Mpeg, -1, "UNIMPL / bad mpeg handle"); } - ERROR_LOG_REPORT(Log::Mpeg, "UNIMPL sceMpegGetAvcNalAu(%08x)", mpeg); + ERROR_LOG(Log::Mpeg, "UNIMPL sceMpegGetAvcNalAu(%08x)", mpeg); return 0; } @@ -2225,7 +2225,7 @@ static u32 sceMpegAvcDecodeDetailIndex(u32 mpeg) { return hleLogWarning(Log::Mpeg, -1, "UNIMPL / bad mpeg handle"); } - ERROR_LOG_REPORT(Log::Mpeg, "UNIMPL sceMpegAvcDecodeDetailIndex(%08x)", mpeg); + ERROR_LOG(Log::Mpeg, "UNIMPL sceMpegAvcDecodeDetailIndex(%08x)", mpeg); return 0; } @@ -2235,7 +2235,7 @@ static u32 sceMpegAvcDecodeDetail2(u32 mpeg) { return hleLogWarning(Log::Mpeg, -1, "UNIMPL / bad mpeg handle"); } - ERROR_LOG_REPORT(Log::Mpeg, "UNIMPL sceMpegAvcDecodeDetail2(%08x)", mpeg); + ERROR_LOG(Log::Mpeg, "UNIMPL sceMpegAvcDecodeDetail2(%08x)", mpeg); return 0; } @@ -2245,7 +2245,7 @@ static u32 sceMpegGetAvcEsAu(u32 mpeg) { return hleLogWarning(Log::Mpeg, -1, "UNIMPL / bad mpeg handle"); } - ERROR_LOG_REPORT(Log::Mpeg, "UNIMPL sceMpegGetAvcEsAu(%08x)", mpeg); + ERROR_LOG(Log::Mpeg, "UNIMPL sceMpegGetAvcEsAu(%08x)", mpeg); return 0; } @@ -2255,7 +2255,7 @@ static u32 sceMpegAvcCscInfo(u32 mpeg) { return hleLogWarning(Log::Mpeg, -1, "UNIMPL / bad mpeg handle"); } - ERROR_LOG_REPORT(Log::Mpeg, "UNIMPL sceMpegAvcCscInfo(%08x)", mpeg); + ERROR_LOG(Log::Mpeg, "UNIMPL sceMpegAvcCscInfo(%08x)", mpeg); return 0; } @@ -2265,7 +2265,7 @@ static u32 sceMpegAvcCscMode(u32 mpeg) { return hleLogWarning(Log::Mpeg, -1, "UNIMPL / bad mpeg handle"); } - ERROR_LOG_REPORT(Log::Mpeg, "UNIMPL sceMpegAvcCscMode(%08x)", mpeg); + ERROR_LOG(Log::Mpeg, "UNIMPL sceMpegAvcCscMode(%08x)", mpeg); return 0; } @@ -2276,7 +2276,7 @@ static u32 sceMpegFlushAu(u32 mpeg) return hleLogWarning(Log::Mpeg, -1, "UNIMPL / bad mpeg handle"); } - ERROR_LOG_REPORT(Log::Mpeg, "UNIMPL sceMpegFlushAu(%08x)", mpeg); + ERROR_LOG(Log::Mpeg, "UNIMPL sceMpegFlushAu(%08x)", mpeg); return 0; } diff --git a/Core/HLE/scePsmf.cpp b/Core/HLE/scePsmf.cpp index c0fca1d799..eec5957a25 100644 --- a/Core/HLE/scePsmf.cpp +++ b/Core/HLE/scePsmf.cpp @@ -398,7 +398,7 @@ Psmf::Psmf(const u8 *ptr, u32 data) { int type = PSMF_ATRAC_STREAM; int privateStreamId = currentStreamAddr[1]; if ((privateStreamId & 0xF0) != 0) { - WARN_LOG_REPORT(Log::ME, "Unknown private stream type, assuming PCM: %02x", privateStreamId); + WARN_LOG(Log::ME, "Unknown private stream type, assuming PCM: %02x", privateStreamId); type = PSMF_PCM_STREAM; } stream = new PsmfStream(type, privateStreamId & 0x0F); @@ -1257,7 +1257,7 @@ static int _PsmfPlayerSetPsmfOffset(u32 psmfPlayer, const char *filename, int of const u32 magic = *(u32_le *)buf; if (magic != PSMF_MAGIC) { // TODO: Let's keep trying as we were before. - ERROR_LOG_REPORT(Log::ME, "scePsmfPlayerSetPsmf*: incorrect PSMF magic (%08x), bad data", magic); + ERROR_LOG(Log::ME, "scePsmfPlayerSetPsmf*: incorrect PSMF magic (%08x), bad data", magic); //return hleReportError(Log::ME, SCE_KERNEL_ERROR_ILLEGAL_ARGUMENT, "incorrect PSMF magic (%08x), bad data", magic); } @@ -1288,7 +1288,7 @@ static int _PsmfPlayerSetPsmfOffset(u32 psmfPlayer, const char *filename, int of } else if ((streamId & PSMF_AUDIO_STREAM_ID) == PSMF_AUDIO_STREAM_ID) { ++psmfplayer->totalAudioStreams; } else { - WARN_LOG_REPORT(Log::ME, "scePsmfPlayerSetPsmf*: unexpected streamID %x", streamId); + WARN_LOG(Log::ME, "scePsmfPlayerSetPsmf*: unexpected streamID %x", streamId); } } // TODO: It seems like it's invalid if there's not at least 1 video stream. @@ -1381,20 +1381,20 @@ static int scePsmfPlayerStart(u32 psmfPlayer, u32 psmfPlayerData, int initPts) if (psmfplayer->totalAudioStreams > 0) { if (playerData->audioCodec != 0x0F && playerData->audioCodec != 0x01) { - ERROR_LOG_REPORT(Log::ME, "scePsmfPlayerStart(%08x, %08x, %d): invalid audio codec %02x", psmfPlayer, psmfPlayerData, initPts, playerData->audioCodec); + ERROR_LOG(Log::ME, "scePsmfPlayerStart(%08x, %08x, %d): invalid audio codec %02x", psmfPlayer, psmfPlayerData, initPts, playerData->audioCodec); return hleNoLog(SCE_PSMFPLAYER_ERROR_INVALID_STREAM); } if (playerData->audioStreamNum >= psmfplayer->totalAudioStreams) { - ERROR_LOG_REPORT(Log::ME, "scePsmfPlayerStart(%08x, %08x, %d): unable to change audio stream to %d", psmfPlayer, psmfPlayerData, initPts, playerData->audioStreamNum); + ERROR_LOG(Log::ME, "scePsmfPlayerStart(%08x, %08x, %d): unable to change audio stream to %d", psmfPlayer, psmfPlayerData, initPts, playerData->audioStreamNum); return hleNoLog(SCE_PSMFPLAYER_ERROR_INVALID_CONFIG); } } if (playerData->videoCodec != 0x0E && playerData->videoCodec != 0x00) { - ERROR_LOG_REPORT(Log::ME, "scePsmfPlayerStart(%08x, %08x, %d): invalid video codec %02x", psmfPlayer, psmfPlayerData, initPts, playerData->videoCodec); + ERROR_LOG(Log::ME, "scePsmfPlayerStart(%08x, %08x, %d): invalid video codec %02x", psmfPlayer, psmfPlayerData, initPts, playerData->videoCodec); return hleNoLog(SCE_PSMFPLAYER_ERROR_INVALID_STREAM); } if (playerData->videoStreamNum < 0 || playerData->videoStreamNum >= psmfplayer->totalVideoStreams) { - ERROR_LOG_REPORT(Log::ME, "scePsmfPlayerStart(%08x, %08x, %d): unable to change video stream to %d", psmfPlayer, psmfPlayerData, initPts, playerData->videoStreamNum); + ERROR_LOG(Log::ME, "scePsmfPlayerStart(%08x, %08x, %d): unable to change video stream to %d", psmfPlayer, psmfPlayerData, initPts, playerData->videoStreamNum); return hleNoLog(SCE_PSMFPLAYER_ERROR_INVALID_CONFIG); } @@ -1402,10 +1402,10 @@ static int scePsmfPlayerStart(u32 psmfPlayer, u32 psmfPlayerData, int initPts) case PSMF_PLAYER_MODE_FORWARD: case PSMF_PLAYER_MODE_REWIND: if (psmfplayer->playerVersion == PSMF_PLAYER_VERSION_BASIC) { - WARN_LOG_REPORT(Log::ME, "scePsmfPlayerStart(%08x, %08x, %d): no EP data for FORWARD/REWIND", psmfPlayer, psmfPlayerData, initPts); + WARN_LOG(Log::ME, "scePsmfPlayerStart(%08x, %08x, %d): no EP data for FORWARD/REWIND", psmfPlayer, psmfPlayerData, initPts); return SCE_PSMFPLAYER_ERROR_INVALID_PARAM; } - WARN_LOG_REPORT(Log::ME, "scePsmfPlayerStart(%08x, %08x, %d): unsupported playMode", psmfPlayer, psmfPlayerData, initPts); + WARN_LOG(Log::ME, "scePsmfPlayerStart(%08x, %08x, %d): unsupported playMode", psmfPlayer, psmfPlayerData, initPts); break; case PSMF_PLAYER_MODE_PLAY: @@ -1413,7 +1413,7 @@ static int scePsmfPlayerStart(u32 psmfPlayer, u32 psmfPlayerData, int initPts) break; default: - WARN_LOG_REPORT(Log::ME, "scePsmfPlayerStart(%08x, %08x, %d): unsupported playMode", psmfPlayer, psmfPlayerData, initPts); + WARN_LOG(Log::ME, "scePsmfPlayerStart(%08x, %08x, %d): unsupported playMode", psmfPlayer, psmfPlayerData, initPts); break; } @@ -1827,17 +1827,17 @@ static u32 scePsmfPlayerChangePlayMode(u32 psmfPlayer, int playMode, int playSpe case PSMF_PLAYER_MODE_FORWARD: case PSMF_PLAYER_MODE_REWIND: if (psmfplayer->playerVersion == PSMF_PLAYER_VERSION_BASIC) { - ERROR_LOG_REPORT(Log::ME, "scePsmfPlayerChangePlayMode(%08x, %i, %i): no EP data for FORWARD/REWIND", psmfPlayer, playMode, playSpeed); + ERROR_LOG(Log::ME, "scePsmfPlayerChangePlayMode(%08x, %i, %i): no EP data for FORWARD/REWIND", psmfPlayer, playMode, playSpeed); return SCE_PSMFPLAYER_ERROR_INVALID_STREAM; } psmfplayer->playSpeed = playSpeed; - WARN_LOG_REPORT(Log::ME, "scePsmfPlayerChangePlayMode(%08x, %i, %i): unsupported playMode", psmfPlayer, playMode, playSpeed); + WARN_LOG(Log::ME, "scePsmfPlayerChangePlayMode(%08x, %i, %i): unsupported playMode", psmfPlayer, playMode, playSpeed); break; case PSMF_PLAYER_MODE_PLAY: case PSMF_PLAYER_MODE_PAUSE: if (psmfplayer->playSpeed != playSpeed) { - WARN_LOG_REPORT(Log::ME, "scePsmfPlayerChangePlayMode(%08x, %i, %i): play speed not changed", psmfPlayer, playMode, playSpeed); + WARN_LOG(Log::ME, "scePsmfPlayerChangePlayMode(%08x, %i, %i): play speed not changed", psmfPlayer, playMode, playSpeed); } else { DEBUG_LOG(Log::ME, "scePsmfPlayerChangePlayMode(%08x, %i, %i)", psmfPlayer, playMode, playSpeed); } @@ -1845,9 +1845,9 @@ static u32 scePsmfPlayerChangePlayMode(u32 psmfPlayer, int playMode, int playSpe default: if (psmfplayer->playSpeed != playSpeed) { - WARN_LOG_REPORT(Log::ME, "scePsmfPlayerChangePlayMode(%08x, %i, %i): play speed not changed", psmfPlayer, playMode, playSpeed); + WARN_LOG(Log::ME, "scePsmfPlayerChangePlayMode(%08x, %i, %i): play speed not changed", psmfPlayer, playMode, playSpeed); } - WARN_LOG_REPORT(Log::ME, "scePsmfPlayerChangePlayMode(%08x, %i, %i): unsupported playMode", psmfPlayer, playMode, playSpeed); + WARN_LOG(Log::ME, "scePsmfPlayerChangePlayMode(%08x, %i, %i): unsupported playMode", psmfPlayer, playMode, playSpeed); break; } @@ -1873,7 +1873,7 @@ static u32 scePsmfPlayerSelectAudio(u32 psmfPlayer) return hleReportError(Log::ME, SCE_PSMFPLAYER_ERROR_INVALID_STREAM, "no stream to switch to"); } - WARN_LOG_REPORT(Log::ME, "scePsmfPlayerSelectAudio(%08x)", psmfPlayer); + WARN_LOG(Log::ME, "scePsmfPlayerSelectAudio(%08x)", psmfPlayer); psmfplayer->audioStreamNum = next; return 0; } @@ -1896,7 +1896,7 @@ static u32 scePsmfPlayerSelectVideo(u32 psmfPlayer) return hleReportError(Log::ME, SCE_PSMFPLAYER_ERROR_INVALID_STREAM, "no stream to switch to"); } - WARN_LOG_REPORT(Log::ME, "scePsmfPlayerSelectVideo(%08x)", psmfPlayer); + WARN_LOG(Log::ME, "scePsmfPlayerSelectVideo(%08x)", psmfPlayer); psmfplayer->videoStreamNum = next; return 0; } diff --git a/Core/HLE/sceReg.cpp b/Core/HLE/sceReg.cpp index 60c3133000..e8418d0325 100644 --- a/Core/HLE/sceReg.cpp +++ b/Core/HLE/sceReg.cpp @@ -1274,8 +1274,9 @@ int sceRegRemoveCategory(int regHandle, const char *name) { return hleLogError(Log::sceReg, 0, "UNIMPL"); } +// Not very interesting, called after writes. int sceRegFlushCategory(int regHandle) { - return hleLogError(Log::sceReg, 0, "UNIMPL"); + return hleLogDebug(Log::sceReg, 0, "UNIMPL"); } // Key level diff --git a/Core/HW/MediaEngine.cpp b/Core/HW/MediaEngine.cpp index 504e88b877..c2055c69fa 100644 --- a/Core/HW/MediaEngine.cpp +++ b/Core/HW/MediaEngine.cpp @@ -248,13 +248,13 @@ bool MediaEngine::SetupStreams() { #ifdef USE_FFMPEG const u32 magic = *(u32_le *)&m_mpegheader[0]; if (magic != PSMF_MAGIC) { - WARN_LOG_REPORT(Log::ME, "Could not setup streams, bad magic: %08x", magic); + WARN_LOG(Log::ME, "Could not setup streams, bad magic: %08x", magic); return false; } int numStreams = *(u16_be *)&m_mpegheader[0x80]; if (numStreams <= 0 || numStreams > 8) { // Looks crazy. Let's bail out and let FFmpeg handle it. - WARN_LOG_REPORT(Log::ME, "Could not setup streams, unexpected stream count: %d", numStreams); + WARN_LOG(Log::ME, "Could not setup streams, unexpected stream count: %d", numStreams); return false; } @@ -319,7 +319,7 @@ bool MediaEngine::openContext(bool keepReadPos) { } if (m_videoStream >= (int)m_pFormatCtx->nb_streams) { - WARN_LOG_REPORT(Log::ME, "Bad video stream %d", m_videoStream); + WARN_LOG(Log::ME, "Bad video stream %d", m_videoStream); m_videoStream = -1; } @@ -541,13 +541,13 @@ bool MediaEngine::setVideoStream(int streamNum, bool force) { #if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57, 33, 100) AVCodec *pCodec = avcodec_find_decoder(stream->codecpar->codec_id); if (!pCodec) { - WARN_LOG_REPORT(Log::ME, "Could not find decoder for %d", (int)stream->codecpar->codec_id); + WARN_LOG(Log::ME, "Could not find decoder for %d", (int)stream->codecpar->codec_id); return false; } AVCodecContext *m_pCodecCtx = avcodec_alloc_context3(pCodec); int paramResult = avcodec_parameters_to_context(m_pCodecCtx, stream->codecpar); if (paramResult < 0) { - WARN_LOG_REPORT(Log::ME, "Failed to prepare context parameters: %08x", paramResult); + WARN_LOG(Log::ME, "Failed to prepare context parameters: %08x", paramResult); return false; } #else @@ -887,7 +887,7 @@ int MediaEngine::writeVideoImage(u32 bufferPtr, int frameWidth, int videoPixelMo if (frameWidth <= 0 || frameWidth > 2048 || videoImageSize < 0 || !Memory::IsValidRange(bufferPtr, videoImageSize)) { // Clearly invalid values. Let's just not. - ERROR_LOG_REPORT(Log::ME, "Ignoring invalid video decode address %08x/%x", bufferPtr, frameWidth); + ERROR_LOG(Log::ME, "Ignoring invalid video decode address %08x/%x", bufferPtr, frameWidth); return 0; } @@ -939,7 +939,7 @@ int MediaEngine::writeVideoImage(u32 bufferPtr, int frameWidth, int videoPixelMo break; default: - ERROR_LOG_REPORT(Log::ME, "Unsupported video pixel format %d", videoPixelMode); + ERROR_LOG(Log::ME, "Unsupported video pixel format %d", videoPixelMode); break; } @@ -978,7 +978,7 @@ int MediaEngine::writeVideoImageWithRange(u32 bufferPtr, int frameWidth, int vid if (frameWidth <= 0 || frameWidth > 2048 || videoImageSize < 0 || !Memory::IsValidRange(bufferPtr, videoImageSize)) { // Clearly invalid values. Let's just not. - ERROR_LOG_REPORT(Log::ME, "Ignoring invalid video decode address %08x/%x", bufferPtr, frameWidth); + ERROR_LOG(Log::ME, "Ignoring invalid video decode address %08x/%x", bufferPtr, frameWidth); return 0; } @@ -1039,7 +1039,7 @@ int MediaEngine::writeVideoImageWithRange(u32 bufferPtr, int frameWidth, int vid break; default: - ERROR_LOG_REPORT(Log::ME, "Unsupported video pixel format %d", videoPixelMode); + ERROR_LOG(Log::ME, "Unsupported video pixel format %d", videoPixelMode); break; } @@ -1103,7 +1103,7 @@ int MediaEngine::getNextAudioFrame(u8 **buf, int *headerCode1, int *headerCode2) int MediaEngine::getAudioSamples(u32 bufferPtr) { int16_t *buffer = (int16_t *)Memory::GetPointerWriteRangeOrException(bufferPtr, 8192); if (buffer == nullptr) { - ERROR_LOG_REPORT(Log::ME, "Ignoring bad audio decode address %08x during video playback", bufferPtr); + ERROR_LOG(Log::ME, "Ignoring bad audio decode address %08x during video playback", bufferPtr); } if (!m_demux) { return 0; diff --git a/Core/MIPS/IR/IRFrontend.cpp b/Core/MIPS/IR/IRFrontend.cpp index 084062f885..4754216396 100644 --- a/Core/MIPS/IR/IRFrontend.cpp +++ b/Core/MIPS/IR/IRFrontend.cpp @@ -163,7 +163,7 @@ bool IRFrontend::CheckRounding(u32 blockAddress) { // Drat. The VFPU hit an uneaten prefix at the end of a block. if (js.startDefaultPrefix && js.MayHavePrefix()) { - WARN_LOG_REPORT(Log::JIT, "An uneaten prefix at end of block for %08x", blockAddress); + WARN_LOG(Log::JIT, "An uneaten prefix at end of block for %08x", blockAddress); logBlocks = 1; js.LogPrefix(); diff --git a/Core/MIPS/InterpreterVFPU.cpp b/Core/MIPS/InterpreterVFPU.cpp index ea1e0a5ccc..fa091cb114 100644 --- a/Core/MIPS/InterpreterVFPU.cpp +++ b/Core/MIPS/InterpreterVFPU.cpp @@ -144,8 +144,8 @@ static void ApplyPrefixST(MIPSState *mips, float *r, u32 data, VectorSize size, if (!constants) { if (regnum >= n) { - // We mostly handle this now, but still worth reporting. - ERROR_LOG_REPORT(Log::CPU, "Invalid VFPU swizzle: %08x: %i / %d at PC = %08x (%s)", data, regnum, n, mips->pc, MIPSDisasmAt(mips->pc).c_str()); + // We handle this now, let's log anyway. + ERROR_LOG(Log::CPU, "Invalid VFPU swizzle: %08x: %i / %d at PC = %08x (%s)", data, regnum, n, mips->pc, MIPSDisasmAt(mips->pc).c_str()); } r[i] = origV[regnum]; if (abs) @@ -939,7 +939,7 @@ namespace MIPSInt break; default: - ERROR_LOG_REPORT(Log::CPU, "vf2h with invalid elements"); + ERROR_LOG(Log::CPU, "vf2h with invalid elements"); break; } ApplyPrefixD(mips, reinterpret_cast(d), outsize); @@ -1009,7 +1009,7 @@ namespace MIPSInt break; default: - ERROR_LOG_REPORT(Log::CPU, "vus2i with more than 2 elements"); + ERROR_LOG(Log::CPU, "vus2i with more than 2 elements"); break; } break; @@ -1035,7 +1035,7 @@ namespace MIPSInt break; default: - ERROR_LOG_REPORT(Log::CPU, "vs2i with more than 2 elements"); + ERROR_LOG(Log::CPU, "vs2i with more than 2 elements"); break; } break; @@ -2202,7 +2202,7 @@ namespace MIPSInt break; default: - ERROR_LOG_REPORT(Log::CPU, "vcrsp/vqmul with invalid elements"); + ERROR_LOG(Log::CPU, "vcrsp/vqmul with invalid elements"); break; } diff --git a/Core/MIPS/LoongArch64/LoongArch64RegCache.cpp b/Core/MIPS/LoongArch64/LoongArch64RegCache.cpp index df4c77d729..6db48370d8 100644 --- a/Core/MIPS/LoongArch64/LoongArch64RegCache.cpp +++ b/Core/MIPS/LoongArch64/LoongArch64RegCache.cpp @@ -758,7 +758,7 @@ LoongArch64Reg LoongArch64RegCache::R(IRReg mipsReg) { if (mr[mipsReg].loc == MIPSLoc::REG || mr[mipsReg].loc == MIPSLoc::REG_IMM) { return (LoongArch64Reg)mr[mipsReg].nReg; } else { - ERROR_LOG_REPORT(Log::JIT, "Reg %i not in LoongArch64 reg", mipsReg); + ERROR_LOG(Log::JIT, "Reg %i not in LoongArch64 reg", mipsReg); return INVALID_REG; // BAAAD } } @@ -778,7 +778,7 @@ LoongArch64Reg LoongArch64RegCache::RPtr(IRReg mipsReg) { return INVALID_REG; } } else { - ERROR_LOG_REPORT(Log::JIT, "Reg %i not in LoongArch64 reg", mipsReg); + ERROR_LOG(Log::JIT, "Reg %i not in LoongArch64 reg", mipsReg); return INVALID_REG; // BAAAD } } @@ -789,7 +789,7 @@ LoongArch64Reg LoongArch64RegCache::F(IRReg mipsReg) { if (mr[mipsReg + 32].loc == MIPSLoc::FREG) { return (LoongArch64Reg)mr[mipsReg + 32].nReg; } else { - ERROR_LOG_REPORT(Log::JIT, "Reg %i not in LoongArch64 reg", mipsReg); + ERROR_LOG(Log::JIT, "Reg %i not in LoongArch64 reg", mipsReg); return INVALID_REG; // BAAAD } } diff --git a/Core/MIPS/RiscV/RiscVRegCache.cpp b/Core/MIPS/RiscV/RiscVRegCache.cpp index e1d07f656e..a3936f4b80 100644 --- a/Core/MIPS/RiscV/RiscVRegCache.cpp +++ b/Core/MIPS/RiscV/RiscVRegCache.cpp @@ -420,7 +420,7 @@ RiscVReg RiscVRegCache::R(IRReg mipsReg) { if (mr[mipsReg].loc == MIPSLoc::REG || mr[mipsReg].loc == MIPSLoc::REG_IMM) { return (RiscVReg)mr[mipsReg].nReg; } else { - ERROR_LOG_REPORT(Log::JIT, "Reg %i not in riscv reg", mipsReg); + ERROR_LOG(Log::JIT, "Reg %i not in riscv reg", mipsReg); return INVALID_REG; // BAAAD } } @@ -440,7 +440,7 @@ RiscVReg RiscVRegCache::RPtr(IRReg mipsReg) { return INVALID_REG; } } else { - ERROR_LOG_REPORT(Log::JIT, "Reg %i not in riscv reg", mipsReg); + ERROR_LOG(Log::JIT, "Reg %i not in riscv reg", mipsReg); return INVALID_REG; // BAAAD } } @@ -451,7 +451,7 @@ RiscVReg RiscVRegCache::F(IRReg mipsReg) { if (mr[mipsReg + 32].loc == MIPSLoc::FREG) { return (RiscVReg)mr[mipsReg + 32].nReg; } else { - ERROR_LOG_REPORT(Log::JIT, "Reg %i not in riscv reg", mipsReg); + ERROR_LOG(Log::JIT, "Reg %i not in riscv reg", mipsReg); return INVALID_REG; // BAAAD } } diff --git a/GPU/Common/TextureCacheCommon.cpp b/GPU/Common/TextureCacheCommon.cpp index 533d92b7f0..78f64d2e7c 100644 --- a/GPU/Common/TextureCacheCommon.cpp +++ b/GPU/Common/TextureCacheCommon.cpp @@ -1942,7 +1942,7 @@ static TextureAlpha DecodeDXTBlocks(uint8_t *out, int outPitch, uint32_t texaddr const uint32_t neededBlocks = SourceExtent(rowBlocks, blocksPerRow, blockRows); if (!Memory::IsValidRange(texaddr, neededBlocks * sizeof(DXTBlock))) { - ERROR_LOG_REPORT(Log::TexCache, "DXT%d texture extends beyond valid RAM: %08x + %d x %d (w=%d)", n, texaddr, bufw, h, w); + ERROR_LOG(Log::TexCache, "DXT%d texture extends beyond valid RAM: %08x + %d x %d (w=%d)", n, texaddr, bufw, h, w); const uint32_t limited = Memory::ClampValidSizeAt(texaddr, neededBlocks * sizeof(DXTBlock)); // Drop block rows until the last one's blocks fit too. This might land on 0, but try to // decode what we can (might even be how the PSP behaves.) @@ -2070,7 +2070,7 @@ TextureAlpha TextureCacheCommon::DecodeTextureLevel(u8 *out, int outPitch, GETex const uint32_t rows = swizzled ? ((h + 7) & ~7) : h; const uint32_t neededBytes = (bpp * SourceExtent(w, bufw, rows) + 7) / 8; if (bytesPerRow > 0 && !isPPGE && !Memory::IsValidRange(texaddr, neededBytes)) { - ERROR_LOG_REPORT(Log::TexCache, "Texture extends beyond valid RAM: %08x + %d x %d (w=%d)", texaddr, bufw, h, w); + ERROR_LOG(Log::TexCache, "Texture extends beyond valid RAM: %08x + %d x %d (w=%d)", texaddr, bufw, h, w); const uint32_t limited = Memory::ClampValidSizeAt(texaddr, neededBytes); // Drop rows until the last one's w texels fit too, not just its bufw stride. const uint32_t availableTexels = (limited * 8) / bpp; diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index f8272ccf3e..68a4812fbf 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -545,7 +545,7 @@ u32 GPUCommon::EnqueueList(u32 listpc, u32 stall, int subIntrBase, PSPPointerpc = target - 4; #ifdef _DEBUG if (!Memory::IsValidAddress(currentList->pc)) { - ERROR_LOG_REPORT(Log::G3D, "Invalid DL PC %08x on return", currentList->pc); + ERROR_LOG(Log::G3D, "Invalid DL PC %08x on return", currentList->pc); UpdateState(GPUSTATE_ERROR); } #endif @@ -1331,7 +1331,7 @@ void GPUCommon::Execute_End(u32 op, u32 diff) { } if (!Memory::IsValidAddress(target)) { - ERROR_LOG_REPORT(Log::G3D, "Signal with Jump (%s): bad address. signal/end: %04x %04x", targetType, signal, enddata); + ERROR_LOG(Log::G3D, "Signal with Jump (%s): bad address. signal/end: %04x %04x", targetType, signal, enddata); UpdateState(GPUSTATE_ERROR); } else { UpdatePC(currentList->pc, target); @@ -1358,9 +1358,9 @@ void GPUCommon::Execute_End(u32 op, u32 diff) { } if (currentList->stackptr == ARRAY_SIZE(currentList->stack)) { - ERROR_LOG_REPORT(Log::G3D, "Signal with Call (%s): stack full. signal/end: %04x %04x", targetType, signal, enddata); + ERROR_LOG(Log::G3D, "Signal with Call (%s): stack full. signal/end: %04x %04x", targetType, signal, enddata); } else if (!Memory::IsValidAddress(target)) { - ERROR_LOG_REPORT(Log::G3D, "Signal with Call (%s): bad address. signal/end: %04x %04x", targetType, signal, enddata); + ERROR_LOG(Log::G3D, "Signal with Call (%s): bad address. signal/end: %04x %04x", targetType, signal, enddata); UpdateState(GPUSTATE_ERROR); } else { // TODO: This might save/restore other state... @@ -1379,7 +1379,7 @@ void GPUCommon::Execute_End(u32 op, u32 diff) { trigger = false; currentList->signal = behaviour; if (currentList->stackptr == 0) { - ERROR_LOG_REPORT(Log::G3D, "Signal with Return: stack empty. signal/end: %04x %04x", signal, enddata); + ERROR_LOG(Log::G3D, "Signal with Return: stack empty. signal/end: %04x %04x", signal, enddata); } else { // TODO: This might save/restore other state... auto &stackEntry = currentList->stack[--currentList->stackptr]; @@ -1392,7 +1392,7 @@ void GPUCommon::Execute_End(u32 op, u32 diff) { } break; default: - ERROR_LOG_REPORT(Log::G3D, "UNKNOWN Signal UNIMPLEMENTED %i ! signal/end: %04x %04x", behaviour, signal, enddata); + ERROR_LOG(Log::G3D, "UNKNOWN Signal UNIMPLEMENTED %i ! signal/end: %04x %04x", behaviour, signal, enddata); break; } // TODO: Technically, jump/call/ret should generate an interrupt, but before the pc change maybe? diff --git a/GPU/Software/Sampler.cpp b/GPU/Software/Sampler.cpp index fa92c99ab5..1276fed8bd 100644 --- a/GPU/Software/Sampler.cpp +++ b/GPU/Software/Sampler.cpp @@ -90,7 +90,7 @@ static inline u32 LookupColor(unsigned int index, unsigned int level, const Samp return samplerID.cached.clut32[index + clutSharingOffset]; default: - ERROR_LOG_REPORT(Log::G3D, "Software: Unsupported palette format: %x", samplerID.ClutFmt()); + ERROR_LOG(Log::G3D, "Software: Unsupported palette format: %x", samplerID.ClutFmt()); return 0; } } @@ -209,7 +209,7 @@ inline static Nearest4 SOFTRAST_CALL SampleNearest(const int u[N], const int v[N return res; default: - ERROR_LOG_REPORT(Log::G3D, "Software: Unsupported texture format: %x", samplerID.TexFmt()); + ERROR_LOG(Log::G3D, "Software: Unsupported texture format: %x", samplerID.TexFmt()); memset(res.v, 0, sizeof(res.v)); return res; } diff --git a/GPU/Software/SoftGpu.cpp b/GPU/Software/SoftGpu.cpp index abc31c7afb..108988a723 100644 --- a/GPU/Software/SoftGpu.cpp +++ b/GPU/Software/SoftGpu.cpp @@ -570,7 +570,7 @@ void SoftGPU::ConvertTextureDescFrom16(Draw::TextureDesc &desc, int srcwidth, in break; default: - ERROR_LOG_REPORT(Log::G3D, "Software: Unexpected framebuffer format: %d", displayFormat_); + ERROR_LOG(Log::G3D, "Software: Unexpected framebuffer format: %d", displayFormat_); break; } } @@ -961,7 +961,7 @@ void SoftGPU::Execute_Prim(u32 op, u32 diff) { FlushImm(); if (!Memory::IsValidAddress(gstate_c.vertexAddr)) { - ERROR_LOG_REPORT(Log::G3D, "Software: Bad vertex address %08x!", gstate_c.vertexAddr); + ERROR_LOG(Log::G3D, "Software: Bad vertex address %08x!", gstate_c.vertexAddr); return; } @@ -971,7 +971,7 @@ void SoftGPU::Execute_Prim(u32 op, u32 diff) { const u32 vertType = gstate.vertType; if ((vertType & GE_VTYPE_IDX_MASK) != GE_VTYPE_IDX_NONE) { if (!Memory::IsValidAddress(gstate_c.indexAddr)) { - ERROR_LOG_REPORT(Log::G3D, "Software: Bad index address %08x!", gstate_c.indexAddr); + ERROR_LOG(Log::G3D, "Software: Bad index address %08x!", gstate_c.indexAddr); return; } indices = Memory::GetPointerUnchecked(gstate_c.indexAddr); @@ -1041,7 +1041,7 @@ void SoftGPU::Execute_Bezier(u32 op, u32 diff) { } if (!Memory::IsValidAddress(gstate_c.vertexAddr)) { - ERROR_LOG_REPORT(Log::G3D, "Bad vertex address %08x!", gstate_c.vertexAddr); + ERROR_LOG(Log::G3D, "Bad vertex address %08x!", gstate_c.vertexAddr); return; } @@ -1050,14 +1050,14 @@ void SoftGPU::Execute_Bezier(u32 op, u32 diff) { const u32 vertType = gstate.vertType; if ((vertType & GE_VTYPE_IDX_MASK) != GE_VTYPE_IDX_NONE) { if (!Memory::IsValidAddress(gstate_c.indexAddr)) { - ERROR_LOG_REPORT(Log::G3D, "Bad index address %08x!", gstate_c.indexAddr); + ERROR_LOG(Log::G3D, "Bad index address %08x!", gstate_c.indexAddr); return; } indices = Memory::GetPointerUnchecked(gstate_c.indexAddr); } if ((vertType & GE_VTYPE_MORPHCOUNT_MASK) || vertTypeIsSkinningEnabled(vertType)) { - DEBUG_LOG_REPORT(Log::G3D, "Unusual bezier/spline vtype: %08x, morph: %d, bones: %d", vertType, (vertType & GE_VTYPE_MORPHCOUNT_MASK) >> GE_VTYPE_MORPHCOUNT_SHIFT, vertTypeGetNumBoneWeights(vertType)); + DEBUG_LOG(Log::G3D, "Unusual bezier/spline vtype: %08x, morph: %d, bones: %d", vertType, (vertType & GE_VTYPE_MORPHCOUNT_MASK) >> GE_VTYPE_MORPHCOUNT_SHIFT, vertTypeGetNumBoneWeights(vertType)); } Spline::BezierSurface surface; @@ -1094,7 +1094,7 @@ void SoftGPU::Execute_Spline(u32 op, u32 diff) { } if (!Memory::IsValidAddress(gstate_c.vertexAddr)) { - ERROR_LOG_REPORT(Log::G3D, "Bad vertex address %08x!", gstate_c.vertexAddr); + ERROR_LOG(Log::G3D, "Bad vertex address %08x!", gstate_c.vertexAddr); return; } @@ -1103,14 +1103,14 @@ void SoftGPU::Execute_Spline(u32 op, u32 diff) { const u32 vertType = gstate.vertType; if ((vertType & GE_VTYPE_IDX_MASK) != GE_VTYPE_IDX_NONE) { if (!Memory::IsValidAddress(gstate_c.indexAddr)) { - ERROR_LOG_REPORT(Log::G3D, "Bad index address %08x!", gstate_c.indexAddr); + ERROR_LOG(Log::G3D, "Bad index address %08x!", gstate_c.indexAddr); return; } indices = Memory::GetPointerUnchecked(gstate_c.indexAddr); } if ((vertType & GE_VTYPE_MORPHCOUNT_MASK) || vertTypeIsSkinningEnabled(vertType)) { - DEBUG_LOG_REPORT(Log::G3D, "Unusual bezier/spline vtype: %08x, morph: %d, bones: %d", vertType, (vertType & GE_VTYPE_MORPHCOUNT_MASK) >> GE_VTYPE_MORPHCOUNT_SHIFT, vertTypeGetNumBoneWeights(vertType)); + DEBUG_LOG(Log::G3D, "Unusual bezier/spline vtype: %08x, morph: %d, bones: %d", vertType, (vertType & GE_VTYPE_MORPHCOUNT_MASK) >> GE_VTYPE_MORPHCOUNT_SHIFT, vertTypeGetNumBoneWeights(vertType)); } Spline::SplineSurface surface;