mirror of
https://github.com/zeldaret/oot.git
synced 2025-05-12 03:53:47 +00:00
Add T macro for translated debug strings (#2064)
* Add T macro for translated debug strings * Hyral -> Hyrule * put some more care into z_std_dma
This commit is contained in:
parent
bdfa56e72d
commit
98ba7ad2ab
14 changed files with 163 additions and 157 deletions
|
@ -7,6 +7,13 @@
|
||||||
#define BAD_RETURN(type) void
|
#define BAD_RETURN(type) void
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The T macro holds translations in English for original debug strings written in Japanese.
|
||||||
|
* The translated strings match the original debug strings, they are only direct translations.
|
||||||
|
* For example, any original name is left as is rather than being replaced with the name in the codebase.
|
||||||
|
*/
|
||||||
|
#define T(jp, en) jp
|
||||||
|
|
||||||
#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
|
#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
|
||||||
#define ARRAY_COUNTU(arr) (u32)(sizeof(arr) / sizeof(arr[0]))
|
#define ARRAY_COUNTU(arr) (u32)(sizeof(arr) / sizeof(arr[0]))
|
||||||
|
|
||||||
|
|
|
@ -112,8 +112,8 @@ s32 DmaMgr_DmaRomToRam(uintptr_t rom, void* ram, size_t size) {
|
||||||
ioMsg.size = buffSize;
|
ioMsg.size = buffSize;
|
||||||
|
|
||||||
if (gDmaMgrVerbose == 10) {
|
if (gDmaMgrVerbose == 10) {
|
||||||
PRINTF("%10lld ノーマルDMA %08x %08x %08x (%d)\n", OS_CYCLES_TO_USEC(osGetTime()), ioMsg.dramAddr,
|
PRINTF("%10lld " T("ノーマルDMA", "Normal DMA") " %08x %08x %08x (%d)\n", OS_CYCLES_TO_USEC(osGetTime()),
|
||||||
ioMsg.devAddr, ioMsg.size, MQ_GET_COUNT(&gPiMgrCmdQueue));
|
ioMsg.dramAddr, ioMsg.devAddr, ioMsg.size, MQ_GET_COUNT(&gPiMgrCmdQueue));
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = osEPiStartDma(gCartHandle, &ioMsg, OS_READ);
|
ret = osEPiStartDma(gCartHandle, &ioMsg, OS_READ);
|
||||||
|
@ -122,12 +122,14 @@ s32 DmaMgr_DmaRomToRam(uintptr_t rom, void* ram, size_t size) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gDmaMgrVerbose == 10) {
|
if (gDmaMgrVerbose == 10) {
|
||||||
PRINTF("%10lld ノーマルDMA START (%d)\n", OS_CYCLES_TO_USEC(osGetTime()), MQ_GET_COUNT(&gPiMgrCmdQueue));
|
PRINTF("%10lld " T("ノーマルDMA", "Normal DMA") " START (%d)\n", OS_CYCLES_TO_USEC(osGetTime()),
|
||||||
|
MQ_GET_COUNT(&gPiMgrCmdQueue));
|
||||||
}
|
}
|
||||||
|
|
||||||
osRecvMesg(&queue, NULL, OS_MESG_BLOCK);
|
osRecvMesg(&queue, NULL, OS_MESG_BLOCK);
|
||||||
if (gDmaMgrVerbose == 10) {
|
if (gDmaMgrVerbose == 10) {
|
||||||
PRINTF("%10lld ノーマルDMA END (%d)\n", OS_CYCLES_TO_USEC(osGetTime()), MQ_GET_COUNT(&gPiMgrCmdQueue));
|
PRINTF("%10lld " T("ノーマルDMA", "Normal DMA") " END (%d)\n", OS_CYCLES_TO_USEC(osGetTime()),
|
||||||
|
MQ_GET_COUNT(&gPiMgrCmdQueue));
|
||||||
}
|
}
|
||||||
|
|
||||||
size -= buffSize;
|
size -= buffSize;
|
||||||
|
@ -146,8 +148,8 @@ s32 DmaMgr_DmaRomToRam(uintptr_t rom, void* ram, size_t size) {
|
||||||
ioMsg.size = size;
|
ioMsg.size = size;
|
||||||
|
|
||||||
if (gDmaMgrVerbose == 10) {
|
if (gDmaMgrVerbose == 10) {
|
||||||
PRINTF("%10lld ノーマルDMA %08x %08x %08x (%d)\n", OS_CYCLES_TO_USEC(osGetTime()), ioMsg.dramAddr,
|
PRINTF("%10lld " T("ノーマルDMA", "Normal DMA") " %08x %08x %08x (%d)\n", OS_CYCLES_TO_USEC(osGetTime()),
|
||||||
ioMsg.devAddr, ioMsg.size, MQ_GET_COUNT(&gPiMgrCmdQueue));
|
ioMsg.dramAddr, ioMsg.devAddr, ioMsg.size, MQ_GET_COUNT(&gPiMgrCmdQueue));
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = osEPiStartDma(gCartHandle, &ioMsg, OS_READ);
|
ret = osEPiStartDma(gCartHandle, &ioMsg, OS_READ);
|
||||||
|
@ -157,7 +159,8 @@ s32 DmaMgr_DmaRomToRam(uintptr_t rom, void* ram, size_t size) {
|
||||||
|
|
||||||
osRecvMesg(&queue, NULL, OS_MESG_BLOCK);
|
osRecvMesg(&queue, NULL, OS_MESG_BLOCK);
|
||||||
if (gDmaMgrVerbose == 10) {
|
if (gDmaMgrVerbose == 10) {
|
||||||
PRINTF("%10lld ノーマルDMA END (%d)\n", OS_CYCLES_TO_USEC(osGetTime()), MQ_GET_COUNT(&gPiMgrCmdQueue));
|
PRINTF("%10lld " T("ノーマルDMA", "Normal DMA") " END (%d)\n", OS_CYCLES_TO_USEC(osGetTime()),
|
||||||
|
MQ_GET_COUNT(&gPiMgrCmdQueue));
|
||||||
}
|
}
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
@ -185,8 +188,8 @@ s32 DmaMgr_AudioDmaHandler(OSPiHandle* pihandle, OSIoMesg* mb, s32 direction) {
|
||||||
ASSERT(mb != NULL, "mb != NULL", "../z_std_dma.c", 532);
|
ASSERT(mb != NULL, "mb != NULL", "../z_std_dma.c", 532);
|
||||||
|
|
||||||
if (gDmaMgrVerbose == 10) {
|
if (gDmaMgrVerbose == 10) {
|
||||||
PRINTF("%10lld サウンドDMA %08x %08x %08x (%d)\n", OS_CYCLES_TO_USEC(osGetTime()), mb->dramAddr, mb->devAddr,
|
PRINTF("%10lld " T("サウンドDMA", "Sound DMA") " %08x %08x %08x (%d)\n", OS_CYCLES_TO_USEC(osGetTime()),
|
||||||
mb->size, MQ_GET_COUNT(&gPiMgrCmdQueue));
|
mb->dramAddr, mb->devAddr, mb->size, MQ_GET_COUNT(&gPiMgrCmdQueue));
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = osEPiStartDma(pihandle, mb, direction);
|
ret = osEPiStartDma(pihandle, mb, direction);
|
||||||
|
@ -244,8 +247,7 @@ NORETURN void DmaMgr_Error(DmaRequest* req, const char* filename, const char* er
|
||||||
|
|
||||||
PRINTF("%c", BEL);
|
PRINTF("%c", BEL);
|
||||||
PRINTF(VT_FGCOL(RED));
|
PRINTF(VT_FGCOL(RED));
|
||||||
// "DMA Fatal Error"
|
PRINTF(T("DMA致命的エラー(%s)\n", "DMA Fatal Error (%s)\n") "ROM:%X RAM:%X SIZE:%X %s\n",
|
||||||
PRINTF("DMA致命的エラー(%s)\nROM:%X RAM:%X SIZE:%X %s\n",
|
|
||||||
errorDesc != NULL ? errorDesc : (errorName != NULL ? errorName : "???"), vrom, ram, size,
|
errorDesc != NULL ? errorDesc : (errorName != NULL ? errorName : "???"), vrom, ram, size,
|
||||||
filename != NULL ? filename : "???");
|
filename != NULL ? filename : "???");
|
||||||
|
|
||||||
|
@ -360,9 +362,10 @@ void DmaMgr_ProcessRequest(DmaRequest* req) {
|
||||||
if (iter->file.vromEnd < vrom + size) {
|
if (iter->file.vromEnd < vrom + size) {
|
||||||
// Error, vrom + size ends up in a different file than it started in
|
// Error, vrom + size ends up in a different file than it started in
|
||||||
|
|
||||||
// "DMA transfers cannot cross segment boundaries"
|
|
||||||
DMA_ERROR(req, filename, "Segment Alignment Error",
|
DMA_ERROR(req, filename, "Segment Alignment Error",
|
||||||
"セグメント境界をまたがってDMA転送することはできません", "../z_std_dma.c", 726);
|
T("セグメント境界をまたがってDMA転送することはできません",
|
||||||
|
"DMA transfers cannot cross segment boundaries"),
|
||||||
|
"../z_std_dma.c", 726);
|
||||||
}
|
}
|
||||||
|
|
||||||
DmaMgr_DmaRomToRam(iter->romStart + (vrom - iter->file.vromStart), ram, size);
|
DmaMgr_DmaRomToRam(iter->romStart + (vrom - iter->file.vromStart), ram, size);
|
||||||
|
@ -380,17 +383,19 @@ void DmaMgr_ProcessRequest(DmaRequest* req) {
|
||||||
if (vrom != iter->file.vromStart) {
|
if (vrom != iter->file.vromStart) {
|
||||||
// Error, requested vrom is not the start of a file
|
// Error, requested vrom is not the start of a file
|
||||||
|
|
||||||
// "DMA transfer cannot be performed from the middle of a compressed segment"
|
|
||||||
DMA_ERROR(req, filename, "Can't Transfer Segment",
|
DMA_ERROR(req, filename, "Can't Transfer Segment",
|
||||||
"圧縮されたセグメントの途中からはDMA転送することはできません", "../z_std_dma.c", 746);
|
T("圧縮されたセグメントの途中からはDMA転送することはできません",
|
||||||
|
"DMA transfer cannot be performed from the middle of a compressed segment"),
|
||||||
|
"../z_std_dma.c", 746);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (size != iter->file.vromEnd - iter->file.vromStart) {
|
if (size != iter->file.vromEnd - iter->file.vromStart) {
|
||||||
// Error, only part of the file was requested
|
// Error, only part of the file was requested
|
||||||
|
|
||||||
// "It is not possible to DMA only part of a compressed segment"
|
|
||||||
DMA_ERROR(req, filename, "Can't Transfer Segment",
|
DMA_ERROR(req, filename, "Can't Transfer Segment",
|
||||||
"圧縮されたセグメントの一部だけをDMA転送することはできません", "../z_std_dma.c", 752);
|
T("圧縮されたセグメントの一部だけをDMA転送することはできません",
|
||||||
|
"It is not possible to DMA only part of a compressed segment"),
|
||||||
|
"../z_std_dma.c", 752);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reduce the thread priority and decompress the file, the decompression routine handles the DMA
|
// Reduce the thread priority and decompress the file, the decompression routine handles the DMA
|
||||||
|
@ -415,15 +420,15 @@ void DmaMgr_ProcessRequest(DmaRequest* req) {
|
||||||
if (sDmaMgrIsRomCompressed) {
|
if (sDmaMgrIsRomCompressed) {
|
||||||
// Error, rom is compressed so DMA may only be requested within the filesystem bounds
|
// Error, rom is compressed so DMA may only be requested within the filesystem bounds
|
||||||
|
|
||||||
// "Corresponding data does not exist"
|
DMA_ERROR(req, NULL, "DATA DON'T EXIST",
|
||||||
DMA_ERROR(req, NULL, "DATA DON'T EXIST", "該当するデータが存在しません", "../z_std_dma.c", 771);
|
T("該当するデータが存在しません", "Corresponding data does not exist"), "../z_std_dma.c", 771);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
// ROM is uncompressed, allow arbitrary DMA even if the region is not marked in the filesystem
|
// ROM is uncompressed, allow arbitrary DMA even if the region is not marked in the filesystem
|
||||||
DmaMgr_DmaRomToRam(vrom, ram, size);
|
DmaMgr_DmaRomToRam(vrom, ram, size);
|
||||||
|
|
||||||
if (0) {
|
if (0) {
|
||||||
PRINTF("No Press ROM:%08X RAM:%08X SIZE:%08X (非公式)\n", vrom, ram, size);
|
PRINTF("No Press ROM:%08X RAM:%08X SIZE:%08X (" T("非公式", "informal") ")\n", vrom, ram, size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -433,8 +438,7 @@ void DmaMgr_ThreadEntry(void* arg) {
|
||||||
OSMesg msg;
|
OSMesg msg;
|
||||||
DmaRequest* req;
|
DmaRequest* req;
|
||||||
|
|
||||||
// "DMA manager thread execution start"
|
PRINTF(T("DMAマネージャスレッド実行開始\n", "DMA manager thread execution start\n"));
|
||||||
PRINTF("DMAマネージャスレッド実行開始\n");
|
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
// Wait for DMA Requests to arrive from other threads
|
// Wait for DMA Requests to arrive from other threads
|
||||||
|
@ -445,7 +449,7 @@ void DmaMgr_ThreadEntry(void* arg) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0) {
|
if (0) {
|
||||||
PRINTF("DMA登録受付 dmap=%08x\n", req);
|
PRINTF(T("DMA登録受付", "DMA registration acceptance") " dmap=%08x\n", req);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process the DMA request
|
// Process the DMA request
|
||||||
|
@ -460,8 +464,7 @@ void DmaMgr_ThreadEntry(void* arg) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// "DMA manager thread execution end"
|
PRINTF(T("DMAマネージャスレッド実行終了\n", "DMA manager thread execution end\n"));
|
||||||
PRINTF("DMAマネージャスレッド実行終了\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -487,7 +490,8 @@ s32 DmaMgr_RequestAsync(DmaRequest* req, void* ram, uintptr_t vrom, size_t size,
|
||||||
// The line numbers for `DMA_ERROR` are only used in retail builds, but this usage was removed so
|
// The line numbers for `DMA_ERROR` are only used in retail builds, but this usage was removed so
|
||||||
// its line number is unknown.
|
// its line number is unknown.
|
||||||
//! @bug `req` is passed to `DMA_ERROR` without rom, ram and size being set
|
//! @bug `req` is passed to `DMA_ERROR` without rom, ram and size being set
|
||||||
DMA_ERROR(req, NULL, "ILLIGAL DMA-FUNCTION CALL", "パラメータ異常です", "../z_std_dma.c", 0);
|
DMA_ERROR(req, NULL, "ILLIGAL DMA-FUNCTION CALL", T("パラメータ異常です", "Parameter error"), "../z_std_dma.c",
|
||||||
|
0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -503,8 +507,8 @@ s32 DmaMgr_RequestAsync(DmaRequest* req, void* ram, uintptr_t vrom, size_t size,
|
||||||
sDmaMgrQueueFullLogged++;
|
sDmaMgrQueueFullLogged++;
|
||||||
PRINTF("%c", BEL);
|
PRINTF("%c", BEL);
|
||||||
PRINTF(VT_FGCOL(RED));
|
PRINTF(VT_FGCOL(RED));
|
||||||
// "dmaEntryMsgQ is full. Reconsider your queue size."
|
PRINTF(T("dmaEntryMsgQが一杯です。キューサイズの再検討をおすすめします。",
|
||||||
PRINTF("dmaEntryMsgQが一杯です。キューサイズの再検討をおすすめします。");
|
"dmaEntryMsgQ is full. Reconsider your queue size."));
|
||||||
LOG_NUM("(sizeof(dmaEntryMsgBufs) / sizeof(dmaEntryMsgBufs[0]))", ARRAY_COUNT(sDmaMgrMsgBuf), "../z_std_dma.c",
|
LOG_NUM("(sizeof(dmaEntryMsgBufs) / sizeof(dmaEntryMsgBufs[0]))", ARRAY_COUNT(sDmaMgrMsgBuf), "../z_std_dma.c",
|
||||||
952);
|
952);
|
||||||
PRINTF(VT_RST);
|
PRINTF(VT_RST);
|
||||||
|
|
|
@ -745,9 +745,9 @@ void __osDisplayArena(Arena* arena) {
|
||||||
freeSize = 0;
|
freeSize = 0;
|
||||||
allocatedSize = 0;
|
allocatedSize = 0;
|
||||||
|
|
||||||
osSyncPrintf("アリーナの内容 (0x%08x)\n", arena); // "Arena contents (0x%08x)"
|
osSyncPrintf(T("アリーナの内容 (0x%08x)\n", "Arena contents (0x%08x)\n"), arena);
|
||||||
// "Memory node range status size [time s ms us ns: TID: src: line]"
|
osSyncPrintf(T("メモリブロック範囲 status サイズ [時刻 s ms us ns: TID:src:行]\n",
|
||||||
osSyncPrintf("メモリブロック範囲 status サイズ [時刻 s ms us ns: TID:src:行]\n");
|
"Memory node range status size [time s ms us ns: TID:src:line]\n"));
|
||||||
|
|
||||||
iter = arena->head;
|
iter = arena->head;
|
||||||
while (iter != NULL) {
|
while (iter != NULL) {
|
||||||
|
@ -755,8 +755,7 @@ void __osDisplayArena(Arena* arena) {
|
||||||
next = iter->next;
|
next = iter->next;
|
||||||
osSyncPrintf("%08x-%08x%c %s %08x", iter, ((u32)iter + sizeof(ArenaNode) + iter->size),
|
osSyncPrintf("%08x-%08x%c %s %08x", iter, ((u32)iter + sizeof(ArenaNode) + iter->size),
|
||||||
(next == NULL) ? '$' : (iter != next->prev ? '!' : ' '),
|
(next == NULL) ? '$' : (iter != next->prev ? '!' : ' '),
|
||||||
iter->isFree ? "空き" : "確保", //? "Free" : "Secure"
|
iter->isFree ? T("空き", "Free") : T("確保", "Secure"), iter->size);
|
||||||
iter->size);
|
|
||||||
|
|
||||||
if (!iter->isFree) {
|
if (!iter->isFree) {
|
||||||
osSyncPrintf(" [%016llu:%2d:%s:%d]", OS_CYCLES_TO_NSEC(iter->time), iter->threadId,
|
osSyncPrintf(" [%016llu:%2d:%s:%d]", OS_CYCLES_TO_NSEC(iter->time), iter->threadId,
|
||||||
|
@ -780,12 +779,10 @@ void __osDisplayArena(Arena* arena) {
|
||||||
iter = next;
|
iter = next;
|
||||||
}
|
}
|
||||||
|
|
||||||
// "Total reserved node size 0x%08x bytes"
|
osSyncPrintf(T("確保ブロックサイズの合計 0x%08x バイト\n", "Total reserved node size 0x%08x bytes\n"),
|
||||||
osSyncPrintf("確保ブロックサイズの合計 0x%08x バイト\n", allocatedSize);
|
allocatedSize);
|
||||||
// "Total free node size 0x%08x bytes"
|
osSyncPrintf(T("空きブロックサイズの合計 0x%08x バイト\n", "Total free node size 0x%08x bytes\n"), freeSize);
|
||||||
osSyncPrintf("空きブロックサイズの合計 0x%08x バイト\n", freeSize);
|
osSyncPrintf(T("最大空きブロックサイズ 0x%08x バイト\n", "Maximum free node size 0x%08x bytes\n"), maxFree);
|
||||||
// "Maximum free node size 0x%08x bytes"
|
|
||||||
osSyncPrintf("最大空きブロックサイズ 0x%08x バイト\n", maxFree);
|
|
||||||
|
|
||||||
ArenaImpl_Unlock(arena);
|
ArenaImpl_Unlock(arena);
|
||||||
}
|
}
|
||||||
|
@ -846,16 +843,17 @@ u32 __osCheckArena(Arena* arena) {
|
||||||
u32 error = 0;
|
u32 error = 0;
|
||||||
|
|
||||||
ArenaImpl_Lock(arena);
|
ArenaImpl_Lock(arena);
|
||||||
// "Checking the contents of the arena. . . (%08x)"
|
osSyncPrintf(
|
||||||
osSyncPrintf("アリーナの内容をチェックしています... (%08x)\n", arena);
|
T("アリーナの内容をチェックしています... (%08x)\n", "Checking the contents of the arena... (%08x)\n"),
|
||||||
|
arena);
|
||||||
iter = arena->head;
|
iter = arena->head;
|
||||||
while (iter != NULL) {
|
while (iter != NULL) {
|
||||||
if (iter && iter->magic == NODE_MAGIC) {
|
if (iter && iter->magic == NODE_MAGIC) {
|
||||||
// "Oops!! (%08x %08x)"
|
|
||||||
#if OOT_DEBUG
|
#if OOT_DEBUG
|
||||||
osSyncPrintf(VT_COL(RED, WHITE) "おおっと!! (%08x %08x)\n" VT_RST, iter, iter->magic);
|
osSyncPrintf(VT_COL(RED, WHITE) T("おおっと!! (%08x %08x)\n", "Oops!! (%08x %08x)\n") VT_RST, iter,
|
||||||
|
iter->magic);
|
||||||
#else
|
#else
|
||||||
osSyncPrintf("おおっと!! (%08x %08x)\n", iter, iter->magic);
|
osSyncPrintf(T("おおっと!! (%08x %08x)\n", "Oops!! (%08x %08x)\n"), iter, iter->magic);
|
||||||
#endif
|
#endif
|
||||||
error = 1;
|
error = 1;
|
||||||
break;
|
break;
|
||||||
|
@ -863,7 +861,7 @@ u32 __osCheckArena(Arena* arena) {
|
||||||
iter = NODE_GET_NEXT(iter);
|
iter = NODE_GET_NEXT(iter);
|
||||||
}
|
}
|
||||||
if (error == 0) {
|
if (error == 0) {
|
||||||
osSyncPrintf("アリーナはまだ、いけそうです\n"); // "The arena is still going well"
|
osSyncPrintf(T("アリーナはまだ、いけそうです\n", "The arena is still going well\n"));
|
||||||
}
|
}
|
||||||
ArenaImpl_Unlock(arena);
|
ArenaImpl_Unlock(arena);
|
||||||
|
|
||||||
|
|
|
@ -81,8 +81,8 @@ void AudioMgr_HandleRetrace(AudioMgr* audioMgr) {
|
||||||
* @see Audio_PreNMI
|
* @see Audio_PreNMI
|
||||||
*/
|
*/
|
||||||
void AudioMgr_HandlePreNMI(AudioMgr* audioMgr) {
|
void AudioMgr_HandlePreNMI(AudioMgr* audioMgr) {
|
||||||
// "Audio manager received OS_SC_PRE_NMI_MSG"
|
PRINTF(
|
||||||
PRINTF("オーディオマネージャが OS_SC_PRE_NMI_MSG を受け取りました\n");
|
T("オーディオマネージャが OS_SC_PRE_NMI_MSG を受け取りました\n", "Audio manager received OS_SC_PRE_NMI_MSG\n"));
|
||||||
Audio_PreNMI();
|
Audio_PreNMI();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,8 +91,7 @@ void AudioMgr_ThreadEntry(void* arg) {
|
||||||
IrqMgrClient irqClient;
|
IrqMgrClient irqClient;
|
||||||
s16* msg = NULL;
|
s16* msg = NULL;
|
||||||
|
|
||||||
// "Start running audio manager thread"
|
PRINTF(T("オーディオマネージャスレッド実行開始\n", "Start running audio manager thread\n"));
|
||||||
PRINTF("オーディオマネージャスレッド実行開始\n");
|
|
||||||
|
|
||||||
// Initialize audio driver
|
// Initialize audio driver
|
||||||
Audio_Init();
|
Audio_Init();
|
||||||
|
|
|
@ -187,8 +187,9 @@ void GameState_Draw(GameState* gameState, GraphicsContext* gfxCtx) {
|
||||||
s32 pad;
|
s32 pad;
|
||||||
DebugArena_Display();
|
DebugArena_Display();
|
||||||
SystemArena_Display();
|
SystemArena_Display();
|
||||||
// "%08x bytes left until the death of Hyrule (game_alloc)"
|
PRINTF(T("ハイラル滅亡まであと %08x バイト(game_alloc)\n",
|
||||||
PRINTF("ハイラル滅亡まであと %08x バイト(game_alloc)\n", THA_GetRemaining(&gameState->tha));
|
"%08x bytes left until Hyrule is destroyed (game_alloc)\n"),
|
||||||
|
THA_GetRemaining(&gameState->tha));
|
||||||
#endif
|
#endif
|
||||||
R_ENABLE_ARENA_DBG = 0;
|
R_ENABLE_ARENA_DBG = 0;
|
||||||
}
|
}
|
||||||
|
@ -341,15 +342,15 @@ void GameState_Update(GameState* gameState) {
|
||||||
void GameState_InitArena(GameState* gameState, size_t size) {
|
void GameState_InitArena(GameState* gameState, size_t size) {
|
||||||
void* arena;
|
void* arena;
|
||||||
|
|
||||||
PRINTF("ハイラル確保 サイズ=%u バイト\n", size); // "Hyrule reserved size = %u bytes"
|
PRINTF(T("ハイラル確保 サイズ=%u バイト\n", "Hyrule reserved size = %u bytes\n"), size);
|
||||||
arena = GAME_ALLOC_MALLOC(&gameState->alloc, size, "../game.c", 992);
|
arena = GAME_ALLOC_MALLOC(&gameState->alloc, size, "../game.c", 992);
|
||||||
|
|
||||||
if (arena != NULL) {
|
if (arena != NULL) {
|
||||||
THA_Init(&gameState->tha, arena, size);
|
THA_Init(&gameState->tha, arena, size);
|
||||||
PRINTF("ハイラル確保成功\n"); // "Successful Hyral"
|
PRINTF(T("ハイラル確保成功\n", "Hyrule successfully secured\n"));
|
||||||
} else {
|
} else {
|
||||||
THA_Init(&gameState->tha, NULL, 0);
|
THA_Init(&gameState->tha, NULL, 0);
|
||||||
PRINTF("ハイラル確保失敗\n"); // "Failure to secure Hyrule"
|
PRINTF(T("ハイラル確保失敗\n", "Failure to secure Hyrule\n"));
|
||||||
HUNGUP_AND_CRASH("../game.c", 999);
|
HUNGUP_AND_CRASH("../game.c", 999);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -364,28 +365,28 @@ void GameState_Realloc(GameState* gameState, size_t size) {
|
||||||
|
|
||||||
THA_Destroy(&gameState->tha);
|
THA_Destroy(&gameState->tha);
|
||||||
GameAlloc_Free(alloc, thaStart);
|
GameAlloc_Free(alloc, thaStart);
|
||||||
PRINTF("ハイラル一時解放!!\n"); // "Hyrule temporarily released!!"
|
PRINTF(T("ハイラル一時解放!!\n", "Hyrule temporarily released!!\n"));
|
||||||
SystemArena_GetSizes(&systemMaxFree, &systemFree, &systemAlloc);
|
SystemArena_GetSizes(&systemMaxFree, &systemFree, &systemAlloc);
|
||||||
if ((systemMaxFree - 0x10) < size) {
|
if ((systemMaxFree - 0x10) < size) {
|
||||||
PRINTF("%c", BEL);
|
PRINTF("%c", BEL);
|
||||||
PRINTF(VT_FGCOL(RED));
|
PRINTF(VT_FGCOL(RED));
|
||||||
|
|
||||||
// "Not enough memory. Change the hyral size to the largest possible value"
|
PRINTF(T("メモリが足りません。ハイラルサイズを可能な最大値に変更します\n",
|
||||||
PRINTF("メモリが足りません。ハイラルサイズを可能な最大値に変更します\n");
|
"Not enough memory. Change Hyrule size to maximum possible value\n"));
|
||||||
PRINTF("(hyral=%08x max=%08x free=%08x alloc=%08x)\n", size, systemMaxFree, systemFree, systemAlloc);
|
PRINTF("(hyral=%08x max=%08x free=%08x alloc=%08x)\n", size, systemMaxFree, systemFree, systemAlloc);
|
||||||
PRINTF(VT_RST);
|
PRINTF(VT_RST);
|
||||||
size = systemMaxFree - 0x10;
|
size = systemMaxFree - 0x10;
|
||||||
}
|
}
|
||||||
|
|
||||||
PRINTF("ハイラル再確保 サイズ=%u バイト\n", size); // "Hyral reallocate size = %u bytes"
|
PRINTF(T("ハイラル再確保 サイズ=%u バイト\n", "Hyrule reallocate size = %u bytes\n"), size);
|
||||||
|
|
||||||
gameArena = GAME_ALLOC_MALLOC(alloc, size, "../game.c", 1033);
|
gameArena = GAME_ALLOC_MALLOC(alloc, size, "../game.c", 1033);
|
||||||
if (gameArena != NULL) {
|
if (gameArena != NULL) {
|
||||||
THA_Init(&gameState->tha, gameArena, size);
|
THA_Init(&gameState->tha, gameArena, size);
|
||||||
PRINTF("ハイラル再確保成功\n"); // "Successful reacquisition of Hyrule"
|
PRINTF(T("ハイラル再確保成功\n", "Successful reacquisition of Hyrule\n"));
|
||||||
} else {
|
} else {
|
||||||
THA_Init(&gameState->tha, NULL, 0);
|
THA_Init(&gameState->tha, NULL, 0);
|
||||||
PRINTF("ハイラル再確保失敗\n"); // "Failure to secure Hyral"
|
PRINTF(T("ハイラル再確保失敗\n", "Failure to secure Hyrule\n"));
|
||||||
|
|
||||||
#if OOT_DEBUG
|
#if OOT_DEBUG
|
||||||
SystemArena_Display();
|
SystemArena_Display();
|
||||||
|
@ -398,7 +399,7 @@ void GameState_Init(GameState* gameState, GameStateFunc init, GraphicsContext* g
|
||||||
OSTime startTime;
|
OSTime startTime;
|
||||||
OSTime endTime;
|
OSTime endTime;
|
||||||
|
|
||||||
PRINTF("game コンストラクタ開始\n"); // "game constructor start"
|
PRINTF(T("game コンストラクタ開始\n", "game constructor start\n"));
|
||||||
gameState->gfxCtx = gfxCtx;
|
gameState->gfxCtx = gfxCtx;
|
||||||
gameState->frames = 0;
|
gameState->frames = 0;
|
||||||
gameState->main = NULL;
|
gameState->main = NULL;
|
||||||
|
@ -413,23 +414,22 @@ void GameState_Init(GameState* gameState, GameStateFunc init, GraphicsContext* g
|
||||||
{
|
{
|
||||||
s32 requiredScopeTemp;
|
s32 requiredScopeTemp;
|
||||||
endTime = osGetTime();
|
endTime = osGetTime();
|
||||||
// "game_set_next_game_null processing time %d us"
|
PRINTF(T("game_set_next_game_null 処理時間 %d us\n", "game_set_next_game_null processing time %d us\n"),
|
||||||
PRINTF("game_set_next_game_null 処理時間 %d us\n", OS_CYCLES_TO_USEC(endTime - startTime));
|
OS_CYCLES_TO_USEC(endTime - startTime));
|
||||||
startTime = endTime;
|
startTime = endTime;
|
||||||
GameAlloc_Init(&gameState->alloc);
|
GameAlloc_Init(&gameState->alloc);
|
||||||
}
|
}
|
||||||
|
|
||||||
endTime = osGetTime();
|
endTime = osGetTime();
|
||||||
// "gamealloc_init processing time %d us"
|
PRINTF(T("gamealloc_init 処理時間 %d us\n", "gamealloc_init processing time %d us\n"),
|
||||||
PRINTF("gamealloc_init 処理時間 %d us\n", OS_CYCLES_TO_USEC(endTime - startTime));
|
OS_CYCLES_TO_USEC(endTime - startTime));
|
||||||
startTime = endTime;
|
startTime = endTime;
|
||||||
GameState_InitArena(gameState, 0x100000);
|
GameState_InitArena(gameState, 0x100000);
|
||||||
|
|
||||||
R_UPDATE_RATE = 3;
|
R_UPDATE_RATE = 3;
|
||||||
init(gameState);
|
init(gameState);
|
||||||
endTime = osGetTime();
|
endTime = osGetTime();
|
||||||
// "init processing time %d us"
|
PRINTF(T("init 処理時間 %d us\n", "init processing time %d us\n"), OS_CYCLES_TO_USEC(endTime - startTime));
|
||||||
PRINTF("init 処理時間 %d us\n", OS_CYCLES_TO_USEC(endTime - startTime));
|
|
||||||
|
|
||||||
startTime = endTime;
|
startTime = endTime;
|
||||||
LOG_UTILS_CHECK_NULL_POINTER("this->cleanup", gameState->destroy, "../game.c", 1088);
|
LOG_UTILS_CHECK_NULL_POINTER("this->cleanup", gameState->destroy, "../game.c", 1088);
|
||||||
|
@ -443,18 +443,18 @@ void GameState_Init(GameState* gameState, GameStateFunc init, GraphicsContext* g
|
||||||
Rumble_Init();
|
Rumble_Init();
|
||||||
osSendMesg(&gameState->gfxCtx->queue, NULL, OS_MESG_BLOCK);
|
osSendMesg(&gameState->gfxCtx->queue, NULL, OS_MESG_BLOCK);
|
||||||
endTime = osGetTime();
|
endTime = osGetTime();
|
||||||
// "Other initialization processing time %d us"
|
PRINTF(T("その他初期化 処理時間 %d us\n", "Other initialization processing time %d us\n"),
|
||||||
PRINTF("その他初期化 処理時間 %d us\n", OS_CYCLES_TO_USEC(endTime - startTime));
|
OS_CYCLES_TO_USEC(endTime - startTime));
|
||||||
|
|
||||||
#if OOT_DEBUG
|
#if OOT_DEBUG
|
||||||
Fault_AddClient(&sGameFaultClient, GameState_FaultPrint, NULL, NULL);
|
Fault_AddClient(&sGameFaultClient, GameState_FaultPrint, NULL, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PRINTF("game コンストラクタ終了\n"); // "game constructor end"
|
PRINTF(T("game コンストラクタ終了\n", "game constructor end\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameState_Destroy(GameState* gameState) {
|
void GameState_Destroy(GameState* gameState) {
|
||||||
PRINTF("game デストラクタ開始\n"); // "game destructor start"
|
PRINTF(T("game デストラクタ開始\n", "game destructor start\n"));
|
||||||
AudioMgr_StopAllSfx();
|
AudioMgr_StopAllSfx();
|
||||||
Audio_Update();
|
Audio_Update();
|
||||||
osRecvMesg(&gameState->gfxCtx->queue, NULL, OS_MESG_BLOCK);
|
osRecvMesg(&gameState->gfxCtx->queue, NULL, OS_MESG_BLOCK);
|
||||||
|
@ -478,7 +478,7 @@ void GameState_Destroy(GameState* gameState) {
|
||||||
Fault_RemoveClient(&sGameFaultClient);
|
Fault_RemoveClient(&sGameFaultClient);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PRINTF("game デストラクタ終了\n"); // "game destructor end"
|
PRINTF(T("game デストラクタ終了\n", "game destructor end\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
GameStateFunc GameState_GetInit(GameState* gameState) {
|
GameStateFunc GameState_GetInit(GameState* gameState) {
|
||||||
|
@ -501,14 +501,14 @@ void* GameState_Alloc(GameState* gameState, size_t size, const char* file, int l
|
||||||
PRINTF("ハイラルは滅亡している\n");
|
PRINTF("ハイラルは滅亡している\n");
|
||||||
ret = NULL;
|
ret = NULL;
|
||||||
} else if ((u32)THA_GetRemaining(&gameState->tha) < size) {
|
} else if ((u32)THA_GetRemaining(&gameState->tha) < size) {
|
||||||
// "Hyral on the verge of extinction does not have %d bytes left (%d bytes until extinction)"
|
PRINTF(T("滅亡寸前のハイラルには %d バイトの余力もない(滅亡まであと %d バイト)\n",
|
||||||
PRINTF("滅亡寸前のハイラルには %d バイトの余力もない(滅亡まであと %d バイト)\n", size,
|
"Hyrule on the verge of extinction does not have %d bytes left (%d bytes until extinction)\n"),
|
||||||
THA_GetRemaining(&gameState->tha));
|
size, THA_GetRemaining(&gameState->tha));
|
||||||
ret = NULL;
|
ret = NULL;
|
||||||
} else {
|
} else {
|
||||||
ret = THA_AllocTailAlign16(&gameState->tha, size);
|
ret = THA_AllocTailAlign16(&gameState->tha, size);
|
||||||
if (THA_IsCrash(&gameState->tha)) {
|
if (THA_IsCrash(&gameState->tha)) {
|
||||||
PRINTF("ハイラルは滅亡してしまった\n"); // "Hyrule has been destroyed"
|
PRINTF(T("ハイラルは滅亡してしまった\n", "Hyrule has been destroyed\n"));
|
||||||
ret = NULL;
|
ret = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -184,7 +184,7 @@ void Graph_TaskSet00(GraphicsContext* gfxCtx) {
|
||||||
if (msg == (OSMesg)666) {
|
if (msg == (OSMesg)666) {
|
||||||
#if OOT_DEBUG
|
#if OOT_DEBUG
|
||||||
PRINTF(VT_FGCOL(RED));
|
PRINTF(VT_FGCOL(RED));
|
||||||
PRINTF("RCPが帰ってきませんでした。"); // "RCP did not return."
|
PRINTF(T("RCPが帰ってきませんでした。", "RCP did not return."));
|
||||||
PRINTF(VT_RST);
|
PRINTF(VT_RST);
|
||||||
|
|
||||||
LogUtils_LogHexDump((void*)PHYS_TO_K1(SP_BASE_REG), 0x20);
|
LogUtils_LogHexDump((void*)PHYS_TO_K1(SP_BASE_REG), 0x20);
|
||||||
|
@ -364,8 +364,8 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
|
||||||
if (pool->headMagic != GFXPOOL_HEAD_MAGIC) {
|
if (pool->headMagic != GFXPOOL_HEAD_MAGIC) {
|
||||||
//! @bug (?) : "problem = true;" may be missing
|
//! @bug (?) : "problem = true;" may be missing
|
||||||
PRINTF("%c", BEL);
|
PRINTF("%c", BEL);
|
||||||
// "Dynamic area head is destroyed"
|
PRINTF(VT_COL(RED, WHITE) T("ダイナミック領域先頭が破壊されています\n", "Dynamic area head is destroyed\n")
|
||||||
PRINTF(VT_COL(RED, WHITE) "ダイナミック領域先頭が破壊されています\n" VT_RST);
|
VT_RST);
|
||||||
#if PLATFORM_N64
|
#if PLATFORM_N64
|
||||||
Fault_AddHungupAndCrash("../graph.c", 951);
|
Fault_AddHungupAndCrash("../graph.c", 951);
|
||||||
#else
|
#else
|
||||||
|
@ -375,8 +375,8 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
|
||||||
if (pool->tailMagic != GFXPOOL_TAIL_MAGIC) {
|
if (pool->tailMagic != GFXPOOL_TAIL_MAGIC) {
|
||||||
problem = true;
|
problem = true;
|
||||||
PRINTF("%c", BEL);
|
PRINTF("%c", BEL);
|
||||||
// "Dynamic region tail is destroyed"
|
PRINTF(VT_COL(RED, WHITE)
|
||||||
PRINTF(VT_COL(RED, WHITE) "ダイナミック領域末尾が破壊されています\n" VT_RST);
|
T("ダイナミック領域末尾が破壊されています\n", "Dynamic region tail is destroyed\n") VT_RST);
|
||||||
#if PLATFORM_N64
|
#if PLATFORM_N64
|
||||||
Fault_AddHungupAndCrash("../graph.c", 957);
|
Fault_AddHungupAndCrash("../graph.c", 957);
|
||||||
#else
|
#else
|
||||||
|
@ -388,20 +388,20 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
|
||||||
if (THGA_IsCrash(&gfxCtx->polyOpa)) {
|
if (THGA_IsCrash(&gfxCtx->polyOpa)) {
|
||||||
problem = true;
|
problem = true;
|
||||||
PRINTF("%c", BEL);
|
PRINTF("%c", BEL);
|
||||||
// "Zelda 0 is dead"
|
PRINTF(VT_COL(RED, WHITE) T("ゼルダ0は死んでしまった(graph_alloc is empty)\n",
|
||||||
PRINTF(VT_COL(RED, WHITE) "ゼルダ0は死んでしまった(graph_alloc is empty)\n" VT_RST);
|
"Zelda 0 is dead (graph_alloc is empty)\n") VT_RST);
|
||||||
}
|
}
|
||||||
if (THGA_IsCrash(&gfxCtx->polyXlu)) {
|
if (THGA_IsCrash(&gfxCtx->polyXlu)) {
|
||||||
problem = true;
|
problem = true;
|
||||||
PRINTF("%c", BEL);
|
PRINTF("%c", BEL);
|
||||||
// "Zelda 1 is dead"
|
PRINTF(VT_COL(RED, WHITE) T("ゼルダ1は死んでしまった(graph_alloc is empty)\n",
|
||||||
PRINTF(VT_COL(RED, WHITE) "ゼルダ1は死んでしまった(graph_alloc is empty)\n" VT_RST);
|
"Zelda 1 is dead (graph_alloc is empty)\n") VT_RST);
|
||||||
}
|
}
|
||||||
if (THGA_IsCrash(&gfxCtx->overlay)) {
|
if (THGA_IsCrash(&gfxCtx->overlay)) {
|
||||||
problem = true;
|
problem = true;
|
||||||
PRINTF("%c", BEL);
|
PRINTF("%c", BEL);
|
||||||
// "Zelda 4 is dead"
|
PRINTF(VT_COL(RED, WHITE) T("ゼルダ4は死んでしまった(graph_alloc is empty)\n",
|
||||||
PRINTF(VT_COL(RED, WHITE) "ゼルダ4は死んでしまった(graph_alloc is empty)\n" VT_RST);
|
"Zelda 4 is dead (graph_alloc is empty)\n") VT_RST);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!problem) {
|
if (!problem) {
|
||||||
|
@ -438,8 +438,8 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gIsCtrlr2Valid && PreNmiBuff_IsResetting(gAppNmiBufferPtr) && !gameState->inPreNMIState) {
|
if (gIsCtrlr2Valid && PreNmiBuff_IsResetting(gAppNmiBufferPtr) && !gameState->inPreNMIState) {
|
||||||
// "To reset mode"
|
PRINTF(VT_COL(YELLOW, BLACK) T("PRE-NMIによりリセットモードに移行します\n",
|
||||||
PRINTF(VT_COL(YELLOW, BLACK) "PRE-NMIによりリセットモードに移行します\n" VT_RST);
|
"PRE-NMI causes the system to transition to reset mode\n") VT_RST);
|
||||||
SET_NEXT_GAMESTATE(gameState, PreNMI_Init, PreNMIState);
|
SET_NEXT_GAMESTATE(gameState, PreNMI_Init, PreNMIState);
|
||||||
gameState->running = false;
|
gameState->running = false;
|
||||||
}
|
}
|
||||||
|
@ -453,7 +453,7 @@ void Graph_ThreadEntry(void* arg0) {
|
||||||
GameStateOverlay* nextOvl = &gGameStateOverlayTable[GAMESTATE_SETUP];
|
GameStateOverlay* nextOvl = &gGameStateOverlayTable[GAMESTATE_SETUP];
|
||||||
GameStateOverlay* ovl;
|
GameStateOverlay* ovl;
|
||||||
|
|
||||||
PRINTF("グラフィックスレッド実行開始\n"); // "Start graphic thread execution"
|
PRINTF(T("グラフィックスレッド実行開始\n", "Start graphic thread execution\n"));
|
||||||
Graph_Init(&gfxCtx);
|
Graph_Init(&gfxCtx);
|
||||||
|
|
||||||
while (nextOvl != NULL) {
|
while (nextOvl != NULL) {
|
||||||
|
@ -461,7 +461,7 @@ void Graph_ThreadEntry(void* arg0) {
|
||||||
Overlay_LoadGameState(ovl);
|
Overlay_LoadGameState(ovl);
|
||||||
|
|
||||||
size = ovl->instanceSize;
|
size = ovl->instanceSize;
|
||||||
PRINTF("クラスサイズ=%dバイト\n", size); // "Class size = %d bytes"
|
PRINTF(T("クラスサイズ=%dバイト\n", "Class size = %d bytes\n"), size);
|
||||||
|
|
||||||
gameState = SYSTEM_ARENA_MALLOC(size, "../graph.c", 1196);
|
gameState = SYSTEM_ARENA_MALLOC(size, "../graph.c", 1196);
|
||||||
|
|
||||||
|
@ -469,7 +469,7 @@ void Graph_ThreadEntry(void* arg0) {
|
||||||
#if OOT_DEBUG
|
#if OOT_DEBUG
|
||||||
char faultMsg[0x50];
|
char faultMsg[0x50];
|
||||||
|
|
||||||
PRINTF("確保失敗\n"); // "Failure to secure"
|
PRINTF(T("確保失敗\n", "Failure to secure\n"));
|
||||||
|
|
||||||
sprintf(faultMsg, "CLASS SIZE= %d bytes", size);
|
sprintf(faultMsg, "CLASS SIZE= %d bytes", size);
|
||||||
Fault_AddHungupAndCrashImpl("GAME CLASS MALLOC FAILED", faultMsg);
|
Fault_AddHungupAndCrashImpl("GAME CLASS MALLOC FAILED", faultMsg);
|
||||||
|
@ -492,7 +492,7 @@ void Graph_ThreadEntry(void* arg0) {
|
||||||
Overlay_FreeGameState(ovl);
|
Overlay_FreeGameState(ovl);
|
||||||
}
|
}
|
||||||
Graph_Destroy(&gfxCtx);
|
Graph_Destroy(&gfxCtx);
|
||||||
PRINTF("グラフィックスレッド実行終了\n"); // "End of graphic thread execution"
|
PRINTF(T("グラフィックスレッド実行終了\n", "End of graphic thread execution\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void* Graph_Alloc(GraphicsContext* gfxCtx, size_t size) {
|
void* Graph_Alloc(GraphicsContext* gfxCtx, size_t size) {
|
||||||
|
|
|
@ -32,9 +32,9 @@ OSMesg sSerialMsgBuf[1];
|
||||||
#if OOT_DEBUG
|
#if OOT_DEBUG
|
||||||
void Main_LogSystemHeap(void) {
|
void Main_LogSystemHeap(void) {
|
||||||
PRINTF(VT_FGCOL(GREEN));
|
PRINTF(VT_FGCOL(GREEN));
|
||||||
// "System heap size% 08x (% dKB) Start address% 08x"
|
PRINTF(
|
||||||
PRINTF("システムヒープサイズ %08x(%dKB) 開始アドレス %08x\n", gSystemHeapSize, gSystemHeapSize / 1024,
|
T("システムヒープサイズ %08x(%dKB) 開始アドレス %08x\n", "System heap size %08x (%dKB) Start address %08x\n"),
|
||||||
_buffersSegmentEnd);
|
gSystemHeapSize, gSystemHeapSize / 1024, _buffersSegmentEnd);
|
||||||
PRINTF(VT_RST);
|
PRINTF(VT_RST);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -46,7 +46,7 @@ void Main(void* arg) {
|
||||||
uintptr_t systemHeapStart;
|
uintptr_t systemHeapStart;
|
||||||
uintptr_t fb;
|
uintptr_t fb;
|
||||||
|
|
||||||
PRINTF("mainproc 実行開始\n"); // "Start running"
|
PRINTF(T("mainproc 実行開始\n", "mainproc Start running\n"));
|
||||||
gScreenWidth = SCREEN_WIDTH;
|
gScreenWidth = SCREEN_WIDTH;
|
||||||
gScreenHeight = SCREEN_HEIGHT;
|
gScreenHeight = SCREEN_HEIGHT;
|
||||||
gAppNmiBufferPtr = (PreNmiBuff*)osAppNMIBuffer;
|
gAppNmiBufferPtr = (PreNmiBuff*)osAppNMIBuffer;
|
||||||
|
@ -56,8 +56,8 @@ void Main(void* arg) {
|
||||||
systemHeapStart = (uintptr_t)_buffersSegmentEnd;
|
systemHeapStart = (uintptr_t)_buffersSegmentEnd;
|
||||||
fb = (uintptr_t)SysCfb_GetFbPtr(0);
|
fb = (uintptr_t)SysCfb_GetFbPtr(0);
|
||||||
gSystemHeapSize = fb - systemHeapStart;
|
gSystemHeapSize = fb - systemHeapStart;
|
||||||
// "System heap initalization"
|
PRINTF(T("システムヒープ初期化 %08x-%08x %08x\n", "System heap initalization %08x-%08x %08x\n"), systemHeapStart,
|
||||||
PRINTF("システムヒープ初期化 %08x-%08x %08x\n", systemHeapStart, fb, gSystemHeapSize);
|
fb, gSystemHeapSize);
|
||||||
SystemHeap_Init((void*)systemHeapStart, gSystemHeapSize); // initializes the system heap
|
SystemHeap_Init((void*)systemHeapStart, gSystemHeapSize); // initializes the system heap
|
||||||
|
|
||||||
#if OOT_DEBUG
|
#if OOT_DEBUG
|
||||||
|
@ -93,7 +93,7 @@ void Main(void* arg) {
|
||||||
StackCheck_Init(&sIrqMgrStackInfo, sIrqMgrStack, STACK_TOP(sIrqMgrStack), 0, 0x100, "irqmgr");
|
StackCheck_Init(&sIrqMgrStackInfo, sIrqMgrStack, STACK_TOP(sIrqMgrStack), 0, 0x100, "irqmgr");
|
||||||
IrqMgr_Init(&gIrqMgr, STACK_TOP(sIrqMgrStack), THREAD_PRI_IRQMGR, 1);
|
IrqMgr_Init(&gIrqMgr, STACK_TOP(sIrqMgrStack), THREAD_PRI_IRQMGR, 1);
|
||||||
|
|
||||||
PRINTF("タスクスケジューラの初期化\n"); // "Initialize the task scheduler"
|
PRINTF(T("タスクスケジューラの初期化\n", "Initialize the task scheduler\n"));
|
||||||
StackCheck_Init(&sSchedStackInfo, sSchedStack, STACK_TOP(sSchedStack), 0, 0x100, "sched");
|
StackCheck_Init(&sSchedStackInfo, sSchedStack, STACK_TOP(sSchedStack), 0, 0x100, "sched");
|
||||||
Sched_Init(&gScheduler, STACK_TOP(sSchedStack), THREAD_PRI_SCHED, gViConfigModeType, 1, &gIrqMgr);
|
Sched_Init(&gScheduler, STACK_TOP(sSchedStack), THREAD_PRI_SCHED, gViConfigModeType, 1, &gIrqMgr);
|
||||||
|
|
||||||
|
@ -120,13 +120,13 @@ void Main(void* arg) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (*msg == OS_SC_PRE_NMI_MSG) {
|
if (*msg == OS_SC_PRE_NMI_MSG) {
|
||||||
PRINTF("main.c: リセットされたみたいだよ\n"); // "Looks like it's been reset"
|
PRINTF(T("main.c: リセットされたみたいだよ\n", "main.c: Looks like it's been reset\n"));
|
||||||
PreNmiBuff_SetReset(gAppNmiBufferPtr);
|
PreNmiBuff_SetReset(gAppNmiBufferPtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PRINTF("mainproc 後始末\n"); // "Cleanup"
|
PRINTF(T("mainproc 後始末\n", "mainproc Cleanup\n"));
|
||||||
osDestroyThread(&sGraphThread);
|
osDestroyThread(&sGraphThread);
|
||||||
RcpUtils_Reset();
|
RcpUtils_Reset();
|
||||||
PRINTF("mainproc 実行終了\n"); // "End of execution"
|
PRINTF(T("mainproc 実行終了\n", "mainproc End of execution\n"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,13 +31,12 @@
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "terminal.h"
|
#include "terminal.h"
|
||||||
|
|
||||||
#define PADMGR_LOG(controllerNum, msg) \
|
#define PADMGR_LOG(controllerNum, msg) \
|
||||||
if (OOT_DEBUG) { \
|
if (OOT_DEBUG) { \
|
||||||
PRINTF(VT_FGCOL(YELLOW)); \
|
PRINTF(VT_FGCOL(YELLOW)); \
|
||||||
/* padmgr: Controller %d: %s */ \
|
PRINTF(T("padmgr: %dコン: %s\n", "padmgr: Controller %d: %s\n"), (controllerNum) + 1, (msg)); \
|
||||||
PRINTF("padmgr: %dコン: %s\n", (controllerNum) + 1, (msg)); \
|
PRINTF(VT_RST); \
|
||||||
PRINTF(VT_RST); \
|
} \
|
||||||
} \
|
|
||||||
(void)0
|
(void)0
|
||||||
|
|
||||||
#define LOG_SEVERITY_NOLOG 0
|
#define LOG_SEVERITY_NOLOG 0
|
||||||
|
@ -73,17 +72,18 @@ OSMesgQueue* PadMgr_AcquireSerialEventQueue(PadMgr* padMgr) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (gPadMgrLogSeverity >= LOG_SEVERITY_VERBOSE) {
|
if (gPadMgrLogSeverity >= LOG_SEVERITY_VERBOSE) {
|
||||||
// "serialMsgQ Waiting for lock"
|
PRINTF(T("%2d %d serialMsgQロック待ち %08x %08x %08x\n",
|
||||||
PRINTF("%2d %d serialMsgQロック待ち %08x %08x %08x\n", osGetThreadId(NULL),
|
"%2d %d serialMsgQ Waiting for lock %08x %08x %08x\n"),
|
||||||
MQ_GET_COUNT(&padMgr->serialLockQueue), padMgr, &padMgr->serialLockQueue, &serialEventQueue);
|
osGetThreadId(NULL), MQ_GET_COUNT(&padMgr->serialLockQueue), padMgr, &padMgr->serialLockQueue,
|
||||||
|
&serialEventQueue);
|
||||||
}
|
}
|
||||||
|
|
||||||
osRecvMesg(&padMgr->serialLockQueue, (OSMesg*)&serialEventQueue, OS_MESG_BLOCK);
|
osRecvMesg(&padMgr->serialLockQueue, (OSMesg*)&serialEventQueue, OS_MESG_BLOCK);
|
||||||
|
|
||||||
if (gPadMgrLogSeverity >= LOG_SEVERITY_VERBOSE) {
|
if (gPadMgrLogSeverity >= LOG_SEVERITY_VERBOSE) {
|
||||||
// "serialMsgQ Locked"
|
PRINTF(T("%2d %d serialMsgQをロックしました %08x\n",
|
||||||
PRINTF("%2d %d serialMsgQをロックしました %08x\n", osGetThreadId(NULL),
|
"%2d %d serialMsgQ Locked %08x\n"),
|
||||||
MQ_GET_COUNT(&padMgr->serialLockQueue), serialEventQueue);
|
osGetThreadId(NULL), MQ_GET_COUNT(&padMgr->serialLockQueue), serialEventQueue);
|
||||||
}
|
}
|
||||||
|
|
||||||
return serialEventQueue;
|
return serialEventQueue;
|
||||||
|
@ -98,17 +98,17 @@ OSMesgQueue* PadMgr_AcquireSerialEventQueue(PadMgr* padMgr) {
|
||||||
*/
|
*/
|
||||||
void PadMgr_ReleaseSerialEventQueue(PadMgr* padMgr, OSMesgQueue* serialEventQueue) {
|
void PadMgr_ReleaseSerialEventQueue(PadMgr* padMgr, OSMesgQueue* serialEventQueue) {
|
||||||
if (gPadMgrLogSeverity >= LOG_SEVERITY_VERBOSE) {
|
if (gPadMgrLogSeverity >= LOG_SEVERITY_VERBOSE) {
|
||||||
// "serialMsgQ Unlock"
|
PRINTF(T("%2d %d serialMsgQロック解除します %08x %08x %08x\n", "%2d %d serialMsgQ Unlock %08x %08x %08x\n"),
|
||||||
PRINTF("%2d %d serialMsgQロック解除します %08x %08x %08x\n", osGetThreadId(NULL),
|
osGetThreadId(NULL), MQ_GET_COUNT(&padMgr->serialLockQueue), padMgr, &padMgr->serialLockQueue,
|
||||||
MQ_GET_COUNT(&padMgr->serialLockQueue), padMgr, &padMgr->serialLockQueue, serialEventQueue);
|
serialEventQueue);
|
||||||
}
|
}
|
||||||
|
|
||||||
osSendMesg(&padMgr->serialLockQueue, (OSMesg)serialEventQueue, OS_MESG_BLOCK);
|
osSendMesg(&padMgr->serialLockQueue, (OSMesg)serialEventQueue, OS_MESG_BLOCK);
|
||||||
|
|
||||||
if (gPadMgrLogSeverity >= LOG_SEVERITY_VERBOSE) {
|
if (gPadMgrLogSeverity >= LOG_SEVERITY_VERBOSE) {
|
||||||
// "serialMsgQ Unlocked"
|
PRINTF(T("%2d %d serialMsgQロック解除しました %08x %08x %08x\n", "%2d %d serialMsgQ Unlocked %08x %08x %08x\n"),
|
||||||
PRINTF("%2d %d serialMsgQロック解除しました %08x %08x %08x\n", osGetThreadId(NULL),
|
osGetThreadId(NULL), MQ_GET_COUNT(&padMgr->serialLockQueue), padMgr, &padMgr->serialLockQueue,
|
||||||
MQ_GET_COUNT(&padMgr->serialLockQueue), padMgr, &padMgr->serialLockQueue, serialEventQueue);
|
serialEventQueue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -401,8 +401,8 @@ void PadMgr_HandleRetrace(PadMgr* padMgr) {
|
||||||
mask |= 1 << i;
|
mask |= 1 << i;
|
||||||
} else {
|
} else {
|
||||||
LOG_HEX("this->pad_status[i].type", padMgr->padStatus[i].type, "../padmgr.c", 458);
|
LOG_HEX("this->pad_status[i].type", padMgr->padStatus[i].type, "../padmgr.c", 458);
|
||||||
// "An unknown type of controller is connected"
|
PRINTF(T("知らない種類のコントローラが接続されています\n",
|
||||||
PRINTF("知らない種類のコントローラが接続されています\n");
|
"An unknown type of controller is connected\n"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -476,13 +476,13 @@ void PadMgr_ThreadEntry(PadMgr* padMgr) {
|
||||||
s16* msg = NULL;
|
s16* msg = NULL;
|
||||||
s32 exit;
|
s32 exit;
|
||||||
|
|
||||||
PRINTF("コントローラスレッド実行開始\n"); // "Controller thread execution start"
|
PRINTF(T("コントローラスレッド実行開始\n", "Controller thread execution start"));
|
||||||
|
|
||||||
exit = false;
|
exit = false;
|
||||||
while (!exit) {
|
while (!exit) {
|
||||||
if (gPadMgrLogSeverity >= LOG_SEVERITY_VERBOSE && MQ_IS_EMPTY(&padMgr->interruptQueue)) {
|
if (gPadMgrLogSeverity >= LOG_SEVERITY_VERBOSE && MQ_IS_EMPTY(&padMgr->interruptQueue)) {
|
||||||
// "Waiting for controller thread event"
|
PRINTF(T("コントローラスレッドイベント待ち %lld\n", "Waiting for controller thread event %lld\n"),
|
||||||
PRINTF("コントローラスレッドイベント待ち %lld\n", OS_CYCLES_TO_USEC(osGetTime()));
|
OS_CYCLES_TO_USEC(osGetTime()));
|
||||||
}
|
}
|
||||||
|
|
||||||
osRecvMesg(&padMgr->interruptQueue, (OSMesg*)&msg, OS_MESG_BLOCK);
|
osRecvMesg(&padMgr->interruptQueue, (OSMesg*)&msg, OS_MESG_BLOCK);
|
||||||
|
@ -511,11 +511,11 @@ void PadMgr_ThreadEntry(PadMgr* padMgr) {
|
||||||
|
|
||||||
IrqMgr_RemoveClient(padMgr->irqMgr, &padMgr->irqClient);
|
IrqMgr_RemoveClient(padMgr->irqMgr, &padMgr->irqClient);
|
||||||
|
|
||||||
PRINTF("コントローラスレッド実行終了\n"); // "Controller thread execution end"
|
PRINTF(T("コントローラスレッド実行終了\n", "Controller thread execution end\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PadMgr_Init(PadMgr* padMgr, OSMesgQueue* serialEventQueue, IrqMgr* irqMgr, OSId id, OSPri priority, void* stack) {
|
void PadMgr_Init(PadMgr* padMgr, OSMesgQueue* serialEventQueue, IrqMgr* irqMgr, OSId id, OSPri priority, void* stack) {
|
||||||
PRINTF("パッドマネージャ作成 padmgr_Create()\n"); // "Pad Manager creation"
|
PRINTF(T("パッドマネージャ作成 padmgr_Create()\n", "Pad Manager creation padmgr_Create()\n"));
|
||||||
|
|
||||||
bzero(padMgr, sizeof(PadMgr));
|
bzero(padMgr, sizeof(PadMgr));
|
||||||
padMgr->irqMgr = irqMgr;
|
padMgr->irqMgr = irqMgr;
|
||||||
|
|
|
@ -8,19 +8,18 @@ void SysCfb_Init(s32 n64dd) {
|
||||||
uintptr_t tmpFbEnd;
|
uintptr_t tmpFbEnd;
|
||||||
|
|
||||||
if (osMemSize >= 0x800000) {
|
if (osMemSize >= 0x800000) {
|
||||||
// "8MB or more memory is installed"
|
PRINTF(T("8Mバイト以上のメモリが搭載されています\n", "8MB or more memory is installed\n"));
|
||||||
PRINTF("8Mバイト以上のメモリが搭載されています\n");
|
|
||||||
tmpFbEnd = 0x8044BE80;
|
tmpFbEnd = 0x8044BE80;
|
||||||
if (n64dd == 1) {
|
if (n64dd == 1) {
|
||||||
PRINTF("RAM 8M mode (N64DD対応)\n"); // "RAM 8M mode (N64DD compatible)"
|
PRINTF(T("RAM 8M mode (N64DD対応)\n", "RAM 8M mode (N64DD compatible)\n"));
|
||||||
#if OOT_DEBUG
|
#if OOT_DEBUG
|
||||||
sSysCfbEnd = 0x805FB000;
|
sSysCfbEnd = 0x805FB000;
|
||||||
#else
|
#else
|
||||||
sSysCfbEnd = 0x80600000;
|
sSysCfbEnd = 0x80600000;
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
// "The margin for this version is %dK bytes"
|
PRINTF(T("このバージョンのマージンは %dK バイトです\n", "The margin for this version is %dK bytes\n"),
|
||||||
PRINTF("このバージョンのマージンは %dK バイトです\n", (0x4BC00 / 1024));
|
(0x4BC00 / 1024));
|
||||||
#if OOT_DEBUG
|
#if OOT_DEBUG
|
||||||
sSysCfbEnd = tmpFbEnd;
|
sSysCfbEnd = tmpFbEnd;
|
||||||
#else
|
#else
|
||||||
|
@ -39,12 +38,12 @@ void SysCfb_Init(s32 n64dd) {
|
||||||
|
|
||||||
if (1) {}
|
if (1) {}
|
||||||
|
|
||||||
// "The final address used by the system is %08x"
|
PRINTF(T("システムが使用する最終アドレスは %08x です\n", "The final address used by the system is %08x\n"),
|
||||||
PRINTF("システムが使用する最終アドレスは %08x です\n", sSysCfbEnd);
|
sSysCfbEnd);
|
||||||
sSysCfbFbPtr[0] = sSysCfbEnd - (screenSize * 4);
|
sSysCfbFbPtr[0] = sSysCfbEnd - (screenSize * 4);
|
||||||
sSysCfbFbPtr[1] = sSysCfbEnd - (screenSize * 2);
|
sSysCfbFbPtr[1] = sSysCfbEnd - (screenSize * 2);
|
||||||
// "Frame buffer addresses are %08x and %08x"
|
PRINTF(T("フレームバッファのアドレスは %08x と %08x です\n", "Frame buffer addresses are %08x and %08x\n"),
|
||||||
PRINTF("フレームバッファのアドレスは %08x と %08x です\n", sSysCfbFbPtr[0], sSysCfbFbPtr[1]);
|
sSysCfbFbPtr[0], sSysCfbFbPtr[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SysCfb_Reset(void) {
|
void SysCfb_Reset(void) {
|
||||||
|
|
|
@ -12,14 +12,12 @@ s32 gSystemArenaLogSeverity = LOG_SEVERITY_NOLOG;
|
||||||
void SystemArena_CheckPointer(void* ptr, u32 size, const char* name, const char* action) {
|
void SystemArena_CheckPointer(void* ptr, u32 size, const char* name, const char* action) {
|
||||||
if (ptr == NULL) {
|
if (ptr == NULL) {
|
||||||
if (gSystemArenaLogSeverity >= LOG_SEVERITY_ERROR) {
|
if (gSystemArenaLogSeverity >= LOG_SEVERITY_ERROR) {
|
||||||
// "%s: %u bytes %s failed\n"
|
PRINTF(T("%s: %u バイトの%sに失敗しました\n", "%s: %u bytes %s failed\n"), name, size, action);
|
||||||
PRINTF("%s: %u バイトの%sに失敗しました\n", name, size, action);
|
|
||||||
__osDisplayArena(&gSystemArena);
|
__osDisplayArena(&gSystemArena);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (gSystemArenaLogSeverity >= LOG_SEVERITY_VERBOSE) {
|
} else if (gSystemArenaLogSeverity >= LOG_SEVERITY_VERBOSE) {
|
||||||
// "%s: %u bytes %s succeeded\n"
|
PRINTF(T("%s: %u バイトの%sに成功しました\n", "%s: %u bytes %s succeeded\n"), name, size, action);
|
||||||
PRINTF("%s: %u バイトの%sに成功しました\n", name, size, action);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,7 +97,7 @@ void* SystemArena_Calloc(u32 num, u32 size) {
|
||||||
|
|
||||||
#if OOT_DEBUG
|
#if OOT_DEBUG
|
||||||
void SystemArena_Display(void) {
|
void SystemArena_Display(void) {
|
||||||
PRINTF("システムヒープ表示\n"); // "System heap display"
|
PRINTF(T("システムヒープ表示\n", "System heap display\n"));
|
||||||
__osDisplayArena(&gSystemArena);
|
__osDisplayArena(&gSystemArena);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
|
||||||
void Setup_InitImpl(SetupState* this) {
|
void Setup_InitImpl(SetupState* this) {
|
||||||
PRINTF("ゼルダ共通データ初期化\n"); // "Zelda common data initalization"
|
PRINTF(T("ゼルダ共通データ初期化\n", "Zelda common data initalization\n"));
|
||||||
SaveContext_Init();
|
SaveContext_Init();
|
||||||
this->state.running = false;
|
this->state.running = false;
|
||||||
SET_NEXT_GAMESTATE(&this->state, ConsoleLogo_Init, ConsoleLogoState);
|
SET_NEXT_GAMESTATE(&this->state, ConsoleLogo_Init, ConsoleLogoState);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
void Overlay_LoadGameState(GameStateOverlay* overlayEntry) {
|
void Overlay_LoadGameState(GameStateOverlay* overlayEntry) {
|
||||||
if (overlayEntry->loadedRamAddr != NULL) {
|
if (overlayEntry->loadedRamAddr != NULL) {
|
||||||
PRINTF("既にリンクされています\n"); // "Already linked"
|
PRINTF(T("既にリンクされています\n", "Already linked\n"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ void Overlay_LoadGameState(GameStateOverlay* overlayEntry) {
|
||||||
overlayEntry->vramStart, overlayEntry->vramEnd);
|
overlayEntry->vramStart, overlayEntry->vramEnd);
|
||||||
|
|
||||||
if (overlayEntry->loadedRamAddr == NULL) {
|
if (overlayEntry->loadedRamAddr == NULL) {
|
||||||
PRINTF("ロードに失敗しました\n"); // "Loading failed"
|
PRINTF(T("ロードに失敗しました\n", "Loading failed\n"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,7 @@ void Interface_Init(PlayState* play) {
|
||||||
|
|
||||||
parameterSize = (uintptr_t)_parameter_staticSegmentRomEnd - (uintptr_t)_parameter_staticSegmentRomStart;
|
parameterSize = (uintptr_t)_parameter_staticSegmentRomEnd - (uintptr_t)_parameter_staticSegmentRomStart;
|
||||||
|
|
||||||
// "Permanent PARAMETER Segment = %x"
|
PRINTF(T("常駐PARAMETERセグメント=%x\n", "Permanent PARAMETER Segment = %x\n"), parameterSize);
|
||||||
PRINTF("常駐PARAMETERセグメント=%x\n", parameterSize);
|
|
||||||
|
|
||||||
interfaceCtx->parameterSegment = GAME_STATE_ALLOC(&play->state, parameterSize, "../z_construct.c", 159);
|
interfaceCtx->parameterSegment = GAME_STATE_ALLOC(&play->state, parameterSize, "../z_construct.c", 159);
|
||||||
|
|
||||||
|
@ -45,7 +44,7 @@ void Interface_Init(PlayState* play) {
|
||||||
|
|
||||||
interfaceCtx->doActionSegment = GAME_STATE_ALLOC(&play->state, 3 * DO_ACTION_TEX_SIZE, "../z_construct.c", 166);
|
interfaceCtx->doActionSegment = GAME_STATE_ALLOC(&play->state, 3 * DO_ACTION_TEX_SIZE, "../z_construct.c", 166);
|
||||||
|
|
||||||
PRINTF("DOアクション テクスチャ初期=%x\n", 3 * DO_ACTION_TEX_SIZE); // "DO Action Texture Initialization"
|
PRINTF(T("DOアクション テクスチャ初期=%x\n", "DO Action Texture Initialization = %x\n"), 3 * DO_ACTION_TEX_SIZE);
|
||||||
PRINTF("parameter->do_actionSegment=%x\n", interfaceCtx->doActionSegment);
|
PRINTF("parameter->do_actionSegment=%x\n", interfaceCtx->doActionSegment);
|
||||||
|
|
||||||
ASSERT(interfaceCtx->doActionSegment != NULL, "parameter->do_actionSegment != NULL", "../z_construct.c", 169);
|
ASSERT(interfaceCtx->doActionSegment != NULL, "parameter->do_actionSegment != NULL", "../z_construct.c", 169);
|
||||||
|
@ -91,8 +90,8 @@ void Interface_Init(PlayState* play) {
|
||||||
|
|
||||||
interfaceCtx->iconItemSegment = GAME_STATE_ALLOC(&play->state, ICON_ITEM_SEGMENT_SIZE, "../z_construct.c", 190);
|
interfaceCtx->iconItemSegment = GAME_STATE_ALLOC(&play->state, ICON_ITEM_SEGMENT_SIZE, "../z_construct.c", 190);
|
||||||
|
|
||||||
// "Icon Item Texture Initialization = %x"
|
PRINTF(T("アイコンアイテム テクスチャ初期=%x\n", "Icon Item Texture Initialization = %x\n"),
|
||||||
PRINTF("アイコンアイテム テクスチャ初期=%x\n", ICON_ITEM_SEGMENT_SIZE);
|
ICON_ITEM_SEGMENT_SIZE);
|
||||||
PRINTF("parameter->icon_itemSegment=%x\n", interfaceCtx->iconItemSegment);
|
PRINTF("parameter->icon_itemSegment=%x\n", interfaceCtx->iconItemSegment);
|
||||||
|
|
||||||
ASSERT(interfaceCtx->iconItemSegment != NULL, "parameter->icon_itemSegment != NULL", "../z_construct.c", 193);
|
ASSERT(interfaceCtx->iconItemSegment != NULL, "parameter->icon_itemSegment != NULL", "../z_construct.c", 193);
|
||||||
|
@ -165,11 +164,12 @@ void Interface_Init(PlayState* play) {
|
||||||
|
|
||||||
if ((gSaveContext.timerState >= TIMER_STATE_UP_INIT) && (gSaveContext.timerState <= TIMER_STATE_UP_FREEZE)) {
|
if ((gSaveContext.timerState >= TIMER_STATE_UP_INIT) && (gSaveContext.timerState <= TIMER_STATE_UP_FREEZE)) {
|
||||||
gSaveContext.timerState = TIMER_STATE_OFF;
|
gSaveContext.timerState = TIMER_STATE_OFF;
|
||||||
// "Timer Stop!!!!!!!!!!!!!!!!!!!!!!"
|
PRINTF(T("タイマー停止!!!!!!!!!!!!!!!!!!!!! = %d\n",
|
||||||
PRINTF("タイマー停止!!!!!!!!!!!!!!!!!!!!! = %d\n", gSaveContext.timerState);
|
"Timer Stop!!!!!!!!!!!!!!!!!!!!! = %d\n"),
|
||||||
|
gSaveContext.timerState);
|
||||||
}
|
}
|
||||||
|
|
||||||
PRINTF("PARAMETER領域=%x\n", parameterSize + 0x5300); // "Parameter Area = %x"
|
PRINTF(T("PARAMETER領域=%x\n", "Parameter Area = %x\n"), parameterSize + 0x5300);
|
||||||
|
|
||||||
Health_InitMeter(play);
|
Health_InitMeter(play);
|
||||||
Map_Init(play);
|
Map_Init(play);
|
||||||
|
@ -215,7 +215,7 @@ void Message_Init(PlayState* play) {
|
||||||
|
|
||||||
PRINTF("message->fukidashiSegment=%x\n", msgCtx->textboxSegment);
|
PRINTF("message->fukidashiSegment=%x\n", msgCtx->textboxSegment);
|
||||||
|
|
||||||
PRINTF("吹き出しgame_alloc=%x\n", TEXTBOX_SEGMENT_SIZE); // "Textbox game_alloc=%x"
|
PRINTF(T("吹き出しgame_alloc=%x\n", "Textbox game_alloc=%x\n"), TEXTBOX_SEGMENT_SIZE);
|
||||||
ASSERT(msgCtx->textboxSegment != NULL, "message->fukidashiSegment != NULL", "../z_construct.c", 352);
|
ASSERT(msgCtx->textboxSegment != NULL, "message->fukidashiSegment != NULL", "../z_construct.c", 352);
|
||||||
|
|
||||||
Font_LoadOrderedFont(&play->msgCtx.font);
|
Font_LoadOrderedFont(&play->msgCtx.font);
|
||||||
|
|
|
@ -51,7 +51,8 @@ void KaleidoManager_Init(PlayState* play) {
|
||||||
}
|
}
|
||||||
|
|
||||||
PRINTF(VT_FGCOL(GREEN));
|
PRINTF(VT_FGCOL(GREEN));
|
||||||
PRINTF("KaleidoArea の最大サイズは %d バイトを確保します\n", largestSize);
|
PRINTF(T("KaleidoArea の最大サイズは %d バイトを確保します\n", "The maximum size of KaleidoArea is %d bytes\n"),
|
||||||
|
largestSize);
|
||||||
PRINTF(VT_RST);
|
PRINTF(VT_RST);
|
||||||
|
|
||||||
sKaleidoAreaPtr = GAME_STATE_ALLOC(&play->state, largestSize, "../z_kaleido_manager.c", 150);
|
sKaleidoAreaPtr = GAME_STATE_ALLOC(&play->state, largestSize, "../z_kaleido_manager.c", 150);
|
||||||
|
@ -91,7 +92,7 @@ void* KaleidoManager_GetRamAddr(void* vram) {
|
||||||
//! @bug Probably missing iter++ here
|
//! @bug Probably missing iter++ here
|
||||||
}
|
}
|
||||||
|
|
||||||
PRINTF("異常\n"); // "Abnormal"
|
PRINTF(T("異常\n", "Abnormal\n"));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue