libnds
Loading...
Searching...
No Matches
Functions
debug.h File Reference

Currently only used to send debug messages to NO$GBA debug window. More...

Functions

void nocashMessage (const char *message)
 Send a NULL-terminated message to the no$gba debug window.
 
void nocashWrite (const char *message, int len)
 Send a message to the no$gba debug window.
 

Detailed Description

Currently only used to send debug messages to NO$GBA debug window.

This functionality is best accessed via the console stdio integration.

On the ARM7 stderr is setup to print to the no$gba debug console:

fprintf(stderr,"ARM7 %%scanline%%\n");

On the ARM9 stderr is directed to the console by default, but it's possible to direct it to the no$gba debug console:

fprintf(stderr, "ARM9 %%scanline%%\n");
@ DebugDevice_NOCASH
Directs stderr to the no$gba debug window.
Definition console.h:248
void consoleDebugInit(DebugDevice device)
Initializes the debug console output on stderr to the specified device.

Messages can be up to 120 characters long. They can also use special parameters:

r0,r1,r2,...,r15  show register content (displayed as 32bit Hex number)
sp,lr,pc          alias for r13,r14,r15
scanline          show current scanline number
frame             show total number of frames since coldboot
totalclks         show total number of clock cycles since coldboot
lastclks          show number of cycles since previous lastclks (or zeroclks)
zeroclks          resets the 'lastclks' counter

Function Documentation

◆ nocashMessage()

void nocashMessage ( const char *  message)

Send a NULL-terminated message to the no$gba debug window.

Parameters
messageThe message to send (120 characters max).

◆ nocashWrite()

void nocashWrite ( const char *  message,
int  len 
)

Send a message to the no$gba debug window.

Parameters
messageThe message to send.
lenLength of the message.