OSReport

C Specification

#include <revolution/os.h>
void OSReport(const char* msg, ...);

void OSVReport(const char* msg, va_list list);

Arguments

msg Pointer to a null-terminated string that includes format specification (equivalent to C standard output functions).
... Optional argument (OSReport).
list Additional argument (OSVReport).

Return Values

None.

Description

The OSReport function outputs formatted output data to the output port. The OSVReport function and the OSReport function are the same except that the OSVReport function takes the variable argument list as an extra argument.

Note: The OS[V]Report function does not output the message for the production version of the Revolution (I.e., the OSGetConsoleType function is OS_CONSOLE_RETAILn).

Note:While devices attached to Memory Card Slot A and/or Serial Port 1 are active, the output operation may be canceled and the specified message will not be shown in the debug output.

Tips: By default, the OSReport function outputs to the serial port of the development hardware. In the final phase of game development, output to the TV screen rather than to the serial port may be more desirable. Because various graphics configurations make implementing a standard output function for the TV screen difficult, you can implement a game-specific version of the OSReport function and replace the one implemented in os[D].a. Because the OSReport function is weakly defined in os[D].a, the game-specific OSReport function takes precedence over the default OSReport function in os[D].a. The following code is the implementation of the OSReport function in os[D].a.

/*---------------------------------------------------------------------------*
  Name:         OSReport()

  Description:  Outputs a formatted message into the output port

  Arguments:    msg         pointer to a null-terminated string that contains
                            the format specifications
                ...         optional arguments

  Returns:      None.
 *---------------------------------------------------------------------------*/
__declspec(weak) void OSReport(const char* msg, ...)
{
    va_list marker;

    va_start(marker, msg);
    vprintf(msg, marker);
    va_end(marker);
}

__declspec(weak) void OSVReport(const char* msg, va_list list)
{
    vprintf(msg, list);
}

See Also

Error Functions, ASSERT, ASSERTMSG,OSGetConsoleType, OSHalt

Revision History

2006/03/01 Initial version.


CONFIDENTIAL