Make AGBPrint output to our Logging.
We also output using `dbgOutput`, hence the behaviour will not change for users relying on this.
This commit is contained in:
parent
60f05cedc2
commit
d05e8fc141
|
@ -55,10 +55,15 @@ void agbPrintFlush()
|
||||||
uint16_t put = debuggerReadHalfWord(0x9fe20fe);
|
uint16_t put = debuggerReadHalfWord(0x9fe20fe);
|
||||||
|
|
||||||
uint32_t address = (debuggerReadHalfWord(0x9fe20fa) << 16);
|
uint32_t address = (debuggerReadHalfWord(0x9fe20fa) << 16);
|
||||||
|
|
||||||
|
char message[0x10000];
|
||||||
|
size_t index = 0;
|
||||||
|
|
||||||
if (address != 0xfd0000 && address != 0x1fd0000) {
|
if (address != 0xfd0000 && address != 0x1fd0000) {
|
||||||
#ifdef BKPT_SUPPORT
|
#ifdef BKPT_SUPPORT
|
||||||
dbgOutput("Did you forget to call AGBPrintInit?\n", 0);
|
dbgOutput("Did you forget to call AGBPrintInit?\n", 0);
|
||||||
#endif
|
#endif
|
||||||
|
log("AGBprint: Did you forget to call AGBPrintInit?\n");
|
||||||
// get rid of the text otherwise we will continue to be called
|
// get rid of the text otherwise we will continue to be called
|
||||||
debuggerWriteHalfWord(0x9fe20fc, put);
|
debuggerWriteHalfWord(0x9fe20fc, put);
|
||||||
return;
|
return;
|
||||||
|
@ -72,6 +77,8 @@ void agbPrintFlush()
|
||||||
s[0] = c;
|
s[0] = c;
|
||||||
s[1] = 0;
|
s[1] = 0;
|
||||||
|
|
||||||
|
message[index++] = s[0];
|
||||||
|
|
||||||
if (systemVerbose & VERBOSE_AGBPRINT)
|
if (systemVerbose & VERBOSE_AGBPRINT)
|
||||||
{
|
{
|
||||||
#ifdef BKPT_SUPPORT
|
#ifdef BKPT_SUPPORT
|
||||||
|
@ -81,5 +88,11 @@ void agbPrintFlush()
|
||||||
if (c == '\n')
|
if (c == '\n')
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message[index] = '\0';
|
||||||
|
if (systemVerbose & VERBOSE_AGBPRINT)
|
||||||
|
{
|
||||||
|
log("AGBPrint: %s\n", message);
|
||||||
|
}
|
||||||
debuggerWriteHalfWord(0x9fe20fc, get);
|
debuggerWriteHalfWord(0x9fe20fc, get);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue