Logging migration (forceLogDebug_printf) (#780)

* script changes - no arguments

* script changes with 2 arguments

* script changes with > 2 arguments

* script conversions with 1 argument - pt. 1

* script conversions with 1 argument - pt. 2

* script conversions with 1 argument - pt. 3

* script conversions with 1 argument - pt. 4

* script conversions with 1 argument - pt. 5

Pointer format hunting

* Fixed pointer format

* script conversions with 1 argument - final

* fixed conversion in non utf-8 file

* fixed conversion with capital letter

* actually fixed conversion with capital letter

* fixed another capital lettering issue

* Added conversions with LR removed

* removed LR from logs

* Converted logs that previously contained LR

* converted log that originally specified string length

* fixed log with commas in main text

* fixed multi-line log

* Fixed more logs with commas in main text

* Fixed unformatted pointer

* added conversion with float value

* converted lines with double parameters

* converted missed line

* corrected argument formatting

Co-authored-by: Crementif <26669564+Crementif@users.noreply.github.com>

* Fixed misspellings of "unhandled"

unhandeled -> unhandled

Co-authored-by: Crementif <26669564+Crementif@users.noreply.github.com>

---------

Co-authored-by: Crementif <26669564+Crementif@users.noreply.github.com>
This commit is contained in:
why-keith 2023-04-25 07:43:31 +01:00 committed by GitHub
parent f48ad6a1ca
commit caa57a3cfd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
98 changed files with 469 additions and 469 deletions

View file

@ -336,7 +336,7 @@ void _GX2SubmitToTCL()
// do nothing if called from non-main GX2 core
if (GX2::sGX2MainCoreIndex != coreIndex)
{
forceLogDebug_printf("_GX2SubmitToTCL() called on non-main GX2 core");
cemuLog_logDebug(LogType::Force, "_GX2SubmitToTCL() called on non-main GX2 core");
return;
}
if( gx2WriteGatherPipe.displayListStart[coreIndex] != MPTR_NULL )

View file

@ -22,13 +22,13 @@ void gx2Export_GX2InitColorBufferRegs(PPCInterpreter_t* hCPU)
uint32 pitchHeight = (surfaceInfo.height * surfaceInfo.pitch) >> 6;
#ifdef CEMU_DEBUG_ASSERT
if (colorBuffer->viewNumSlices != _swapEndianU32(1))
forceLogDebug_printf("GX2InitColorBufferRegs(): With unsupported slice count %d", _swapEndianU32(colorBuffer->viewNumSlices));
cemuLog_logDebug(LogType::Force, "GX2InitColorBufferRegs(): With unsupported slice count {}", _swapEndianU32(colorBuffer->viewNumSlices));
if (surfaceInfo.pitch < 7)
forceLogDebug_printf("GX2InitColorBufferRegs(): Pitch too small (pitch = %d)", surfaceInfo.pitch);
cemuLog_logDebug(LogType::Force, "GX2InitColorBufferRegs(): Pitch too small (pitch = {})", surfaceInfo.pitch);
if ((surfaceInfo.pitch & 7) != 0)
forceLogDebug_printf("GX2InitColorBufferRegs(): Pitch has invalid alignment (pitch = %d)", surfaceInfo.pitch);
cemuLog_logDebug(LogType::Force, "GX2InitColorBufferRegs(): Pitch has invalid alignment (pitch = {})", surfaceInfo.pitch);
if (pitchHeight == 0)
forceLogDebug_printf("GX2InitColorBufferRegs(): Invalid value (pitchHeight = %d)", pitchHeight);
cemuLog_logDebug(LogType::Force, "GX2InitColorBufferRegs(): Invalid value (pitchHeight = {})", pitchHeight);
#endif
uint32 cSize = ((surfaceInfo.pitch >> 3) - 1) & 0x3FF;
@ -220,7 +220,7 @@ void gx2Export_GX2SetDepthBuffer(PPCInterpreter_t* hCPU)
if( viewMip > 0 )
{
forceLogDebug_printf("GX2SetDepthBuffer: Unsupported non-zero mip (%d) Pointer: %08X Base: %08X", viewMip, regHTileDataBase, 0);
cemuLog_logDebug(LogType::Force, "GX2SetDepthBuffer: Unsupported non-zero mip ({}) Pointer: {:08x} Base: {:08x}", viewMip, regHTileDataBase, 0);
}
// setup depthbuffer info register

View file

@ -208,7 +208,7 @@ void gx2Surface_GX2CopySurface(GX2Surface* srcSurface, uint32 srcMip, uint32 src
if( srcHwFormat != dstHwFormat )
{
// mismatching format
forceLogDebug_printf("GX2CopySurface(): Format mismatch\n");
cemuLog_logDebug(LogType::Force, "GX2CopySurface(): Format mismatch");
return;
}
@ -379,7 +379,7 @@ typedef struct
void gx2Export_GX2CopySurfaceEx(PPCInterpreter_t* hCPU)
{
forceLogDebug_printf("GX2CopySurfaceEx(0x%08x,%d,%d,0x%08x,%d,%d,%d,0x%08x,0x%08x)", hCPU->gpr[3], hCPU->gpr[4], hCPU->gpr[5], hCPU->gpr[6], hCPU->gpr[7], hCPU->gpr[8], hCPU->gpr[9], hCPU->gpr[10], memory_readU32(hCPU->gpr[1]+0x8));
cemuLog_logDebug(LogType::Force, "GX2CopySurfaceEx(0x{:08x},{},{},0x{:08x},{},{},{},0x{:08x},0x{:08x})", hCPU->gpr[3], hCPU->gpr[4], hCPU->gpr[5], hCPU->gpr[6], hCPU->gpr[7], hCPU->gpr[8], hCPU->gpr[9], hCPU->gpr[10], memory_readU32(hCPU->gpr[1]+0x8));
GX2Surface* srcSurface = (GX2Surface*)memory_getPointerFromVirtualOffset(hCPU->gpr[3]);
uint32 srcMip = hCPU->gpr[4];
uint32 srcSlice = hCPU->gpr[5];
@ -394,7 +394,7 @@ void gx2Export_GX2CopySurfaceEx(PPCInterpreter_t* hCPU)
GX2Point_t* rectDst = (GX2Point_t*)memory_getPointerFromVirtualOffset(pointDstArrayMPTR);
for (sint32 i = 0; i < rectCount; i++)
{
forceLogDebug_printf("rect left-top: %d/%d size: %d/%d", _swapEndianU32(rectSrc->left), _swapEndianU32(rectSrc->top), _swapEndianU32(rectSrc->right) - _swapEndianU32(rectSrc->left), _swapEndianU32(rectSrc->bottom) - _swapEndianU32(rectSrc->top));
cemuLog_logDebug(LogType::Force, "rect left-top: {}/{} size: {}/{}", _swapEndianU32(rectSrc->left), _swapEndianU32(rectSrc->top), _swapEndianU32(rectSrc->right) - _swapEndianU32(rectSrc->left), _swapEndianU32(rectSrc->bottom) - _swapEndianU32(rectSrc->top));
}
#ifdef CEMU_DEBUG_ASSERT

View file

@ -370,8 +370,8 @@ void GX2TilingAperature_RetileTexture(ActiveTilingAperature* tilingAperture, boo
}
//double benchmarkTime = benchmarkTimer_stop(timerTilingStart);
//forceLogDebug_printf("TilingAperture res %04dx%04d fmt %04x tm %02x mip %d isWrite %d", (uint32)tilingAperture->surface.width, (uint32)tilingAperture->surface.height, (uint32)tilingAperture->surface.format, (uint32)tilingAperture->surface.tileMode, tilingAperture->mipLevel, doWrite?1:0);
//forceLogDebug_printf("Tiling took %.4lfms", benchmarkTime);
//cemuLog_logDebug(LogType::Force, "TilingAperture res {:04}x{:04} fmt {:04x} tm {:02x} mip {} isWrite {}", (uint32)tilingAperture->surface.width, (uint32)tilingAperture->surface.height, (uint32)tilingAperture->surface.format, (uint32)tilingAperture->surface.tileMode, tilingAperture->mipLevel, doWrite?1:0);
//cemuLog_logDebug(LogType::Force, "Tiling took {:.4}ms", benchmarkTime);
}
void gx2Export_GX2AllocateTilingApertureEx(PPCInterpreter_t* hCPU)