Skip to content

Commit

Permalink
Translating all-7
Browse files Browse the repository at this point in the history
Signed-off-by: Simo <[email protected]>
  • Loading branch information
Simo3ds authored Dec 16, 2023
1 parent e485453 commit 37e1334
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions sysmodules/loader/source/3dsx.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ bool Ldr_Get3dsxSize(u32* pSize, IFile *file)

if (IFile_Read2(file, &hdr, sizeof(hdr), 0) != sizeof(hdr))
{
Log_PrintP("Cannot read 3DSX header");
Log_PrintP("Impossibile leggere l'intestata 3DSX");
return false;
}

if (hdr.magic != _3DSX_MAGIC)
{
Log_PrintP("Not a valid 3DSX file");
Log_PrintP("File 3DSX non valido");
return false;
}

Expand Down Expand Up @@ -122,7 +122,7 @@ Handle Ldr_CodesetFrom3dsx(const char* name, u32* codePages, u32 baseAddr, IFile
{
if (IFile_Read2(file, &extraPage[i*nRelocTables], hdr.relocHdrSize, readOffset) != hdr.relocHdrSize)
{
Log_PrintP("Cannot read relheader %d", i);
Log_PrintP("impossibile leggere l'intestazione correlata %d", i);
return 0;
}
readOffset += hdr.relocHdrSize;
Expand All @@ -131,15 +131,15 @@ Handle Ldr_CodesetFrom3dsx(const char* name, u32* codePages, u32 baseAddr, IFile
// Read the code segment
if (IFile_Read2(file, d.segPtrs[0], hdr.codeSegSize, readOffset) != hdr.codeSegSize)
{
Log_PrintP("Cannot read code segment");
Log_PrintP("Impossibile leggere il segmento di codice");
return 0;
}
readOffset += hdr.codeSegSize;

// Read the rodata segment
if (IFile_Read2(file, d.segPtrs[1], hdr.rodataSegSize, readOffset) != hdr.rodataSegSize)
{
Log_PrintP("Cannot read rodata segment");
Log_PrintP("Impossibile leggere i dati leggibili");
return 0;
}
readOffset += hdr.rodataSegSize;
Expand All @@ -148,7 +148,7 @@ Handle Ldr_CodesetFrom3dsx(const char* name, u32* codePages, u32 baseAddr, IFile
u32 dataLoadSegSize = hdr.dataSegSize - hdr.bssSize;
if (IFile_Read2(file, d.segPtrs[2], dataLoadSegSize, readOffset) != dataLoadSegSize)
{
Log_PrintP("Cannot read data segment");
Log_PrintP("Impossibile leggere il segmento di dati");
return 0;
}
readOffset += dataLoadSegSize;
Expand Down Expand Up @@ -178,7 +178,7 @@ Handle Ldr_CodesetFrom3dsx(const char* name, u32* codePages, u32 baseAddr, IFile
u32 readSize = toDo*sizeof(_3DSX_Reloc);
if (IFile_Read2(file, s_relocBuf, readSize, readOffset) != readSize)
{
Log_PrintP("Cannot read reloc table (%d,%d)", i, j);
Log_PrintP("Impossibile leggere la tavola relocata (%d,%d)", i, j);
return 0;
}
readOffset += readSize;
Expand All @@ -200,7 +200,7 @@ Handle Ldr_CodesetFrom3dsx(const char* name, u32* codePages, u32 baseAddr, IFile
{
if (subType != 0)
{
Log_PrintP("Unsupported absolute reloc subtype (%lu)", subType);
Log_PrintP("Sottotipo di reloc assoluto non supportato (%lu)", subType);
return 0;
}
*pos = addr;
Expand All @@ -214,7 +214,7 @@ Handle Ldr_CodesetFrom3dsx(const char* name, u32* codePages, u32 baseAddr, IFile
case 0: *pos = data; break; // 32-bit signed offset
case 1: *pos = data &~ BIT(31); break; // 31-bit signed offset
default:
Log_PrintP("Unsupported relative reloc subtype (%lu)", subType);
Log_PrintP("Sottotipo di reloc relativo non supportato (%lu)", subType);
return 0;
}
break;
Expand Down

0 comments on commit 37e1334

Please sign in to comment.