diff options
| author | cadmic <cadmic24@gmail.com> | 2024-10-09 04:41:16 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-09 13:41:16 +0200 |
| commit | 2048a65dd89a5aa8c24616d47411e5363eb49fbf (patch) | |
| tree | a3dfd4f77e46498b92eed931bc497c4162da89f3 /src/boot | |
| parent | 7dd8f2b6ad27ef8ec08b21f9575f5ad6f2dc308d (diff) | |
[ntsc-1.0/1.1] Match line numbers in debug strings (#2255)
Diffstat (limited to 'src/boot')
| -rw-r--r-- | src/boot/z_locale.c | 6 | ||||
| -rw-r--r-- | src/boot/z_std_dma.c | 28 |
2 files changed, 21 insertions, 13 deletions
diff --git a/src/boot/z_locale.c b/src/boot/z_locale.c index 6d60af64b..ec752bcd0 100644 --- a/src/boot/z_locale.c +++ b/src/boot/z_locale.c @@ -39,7 +39,11 @@ void Locale_Init(void) { PRINTF(VT_COL(RED, WHITE)); PRINTF(T("z_locale_init: 日本用かアメリカ用か判別できません\n", "z_locale_init: Can't tell if it's for Japan or America\n")); -#if PLATFORM_N64 +#if OOT_VERSION < NTSC_1_1 + LogUtils_HungupThread("../z_locale.c", 86); +#elif OOT_VERSION < PAL_1_0 + LogUtils_HungupThread("../z_locale.c", 92); +#elif OOT_VERSION < GC_JP LogUtils_HungupThread("../z_locale.c", 101); #else LogUtils_HungupThread("../z_locale.c", 118); diff --git a/src/boot/z_std_dma.c b/src/boot/z_std_dma.c index f67e9eeec..d609ce6f1 100644 --- a/src/boot/z_std_dma.c +++ b/src/boot/z_std_dma.c @@ -296,12 +296,14 @@ NORETURN void DmaMgr_Error(DmaRequest* req, const char* filename, const char* er Fault_AddHungupAndCrashImpl(buff1, buff2); } -#define DMA_ERROR(req, filename, errorName, errorDesc, file, n64Line, gcLine) \ +#define DMA_ERROR(req, filename, errorName, errorDesc, file, line1, line2, line3) \ DmaMgr_Error(req, filename, errorName, errorDesc) -#elif PLATFORM_N64 -#define DMA_ERROR(req, filename, errorName, errorDesc, file, n64Line, gcLine) Fault_AddHungupAndCrash(file, n64Line) -#elif PLATFORM_GC -#define DMA_ERROR(req, filename, errorName, errorDesc, file, n64Line, gcLine) Fault_AddHungupAndCrash(file, gcLine) +#elif OOT_VERSION < NTSC_1_1 +#define DMA_ERROR(req, filename, errorName, errorDesc, file, line1, line2, line3) Fault_AddHungupAndCrash(file, line1) +#elif OOT_VERSION < GC_JP +#define DMA_ERROR(req, filename, errorName, errorDesc, file, line1, line2, line3) Fault_AddHungupAndCrash(file, line2) +#else +#define DMA_ERROR(req, filename, errorName, errorDesc, file, line1, line2, line3) Fault_AddHungupAndCrash(file, line3) #endif #if PLATFORM_GC @@ -407,7 +409,7 @@ void DmaMgr_ProcessRequest(DmaRequest* req) { DMA_ERROR(req, filename, "Segment Alignment Error", T("セグメント境界をまたがってDMA転送することはできません", "DMA transfers cannot cross segment boundaries"), - "../z_std_dma.c", 578, 726); + "../z_std_dma.c", 575, 578, 726); } DmaMgr_DmaRomToRam(iter->romStart + (vrom - iter->file.vromStart), ram, size); @@ -428,7 +430,7 @@ void DmaMgr_ProcessRequest(DmaRequest* req) { DMA_ERROR(req, filename, "Can't Transfer Segment", T("圧縮されたセグメントの途中からはDMA転送することはできません", "DMA transfer cannot be performed from the middle of a compressed segment"), - "../z_std_dma.c", 598, 746); + "../z_std_dma.c", 595, 598, 746); } if (size != iter->file.vromEnd - iter->file.vromStart) { @@ -437,7 +439,7 @@ void DmaMgr_ProcessRequest(DmaRequest* req) { DMA_ERROR(req, filename, "Can't Transfer Segment", T("圧縮されたセグメントの一部だけをDMA転送することはできません", "It is not possible to DMA only part of a compressed segment"), - "../z_std_dma.c", 604, 752); + "../z_std_dma.c", 601, 604, 752); } // Reduce the thread priority and decompress the file, the decompression routine handles the DMA @@ -470,8 +472,8 @@ void DmaMgr_ProcessRequest(DmaRequest* req) { // Error, rom is compressed so DMA may only be requested within the filesystem bounds DMA_ERROR(req, NULL, "DATA DON'T EXIST", - T("該当するデータが存在しません", "Corresponding data does not exist"), "../z_std_dma.c", 624, - 771); + T("該当するデータが存在しません", "Corresponding data does not exist"), "../z_std_dma.c", 621, + 624, 771); return; } else { // ROM is uncompressed, allow arbitrary DMA even if the region is not marked in the filesystem @@ -543,7 +545,7 @@ s32 DmaMgr_RequestAsync(DmaRequest* req, void* ram, uintptr_t vrom, size_t size, // its line number is unknown. //! @bug `req` is passed to `DMA_ERROR` without rom, ram and size being set DMA_ERROR(req, NULL, "ILLIGAL DMA-FUNCTION CALL", T("パラメータ異常です", "Parameter error"), "../z_std_dma.c", - 0, 0); + 0, 0, 0); } #endif @@ -645,7 +647,9 @@ void DmaMgr_Init(void) { PRINTF("_bootSegmentRomStart(%08x) != dma_rom_ad[0].rom_b(%08x)\n", _bootSegmentRomStart, gDmaDataTable[0].file.vromEnd); //! @bug The main code file where fault.c resides is not yet loaded -#if PLATFORM_N64 +#if OOT_VERSION < NTSC_1_1 + Fault_AddHungupAndCrash("../z_std_dma.c", 837); +#elif OOT_VERSION < GC_JP Fault_AddHungupAndCrash("../z_std_dma.c", 840); #else Fault_AddHungupAndCrash("../z_std_dma.c", 1055); |
