1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css"> 9<title>OSReport</title> 10</head> 11 12<body> 13 14<h1>OSReport</h1> 15 16<h2>Syntax</h2> 17<dl><dd><pre class="construction"> 18#include <revolution/os.h> 19 20void OSReport(const char* msg, ...); 21 22void OSVReport(const char* msg, va_list list); 23</pre></dd></dl> 24 25<h2>Arguments</h2> 26<TABLE class="arguments" border="1" > 27 <tr> 28<TH>msg</TH> 29<TD>Pointer to a null-terminated string including format specification (equivalent to C's standard output function).</TD> 30 </tr> 31 <tr> 32 <TH>...</TH> 33<TD>Optional argument (<code>OSReport</code>).</TD> 34 </tr> 35 <tr> 36<TH>list</TH> 37<TD>Additional argument (<code>OSVReport</code>).</TD> 38 </tr> 39</TABLE> 40 41<h2>Return Values</h2> 42<p>None.</p> 43 44<H2>Description</H2> 45<P>Prints formatted output data to the output port. The <code>OSVReport</code> function is the same as the <code>OSReport</code> function, except that it takes a variable argument list as an additional argument.</P> 46<P><B>Note:</B> When the <a href="../Init/OSGetConsoleType.html"><code>OSGetConsoleType</code></A> function is <CODE>OS_CONSOLE_RETAIL<I>n</I></CODE>, the <code>OS[V]Report</code> function does not output messages on production game consoles.</P> 47<P><B>Note:</B> When devices are connected to Memory Card slot A, the output process may be canceled and the specified message may not be shown in the debugging output.</P> 48<P><B>Tips:</B> By default, the <code>OSReport</code> 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 it is difficult to implement a generic print function for the TV screen due to various graphics configurations, you are free to implement a game-specific version of the <code>OSReport</code> function and use it to replace the one implemented in <code>os[D].a</code>. Because the <code>OSReport</code> function is weakly defined in <code>os[D].a</code>, the game-specific <code>OSReport</code> function will take precedence over the default <code>OSReport</code> function in <code>os[D].a</code>. The following code is the implementation of <code>OSReport</code> in <code>os[D].a</code>.</P> 49 50<P><B>Tips:</B> Debug output to Wii console NAND memory and to SD Cards can be added by using the <a href="../OSLog/OSReportDestination.html"><CODE>OSReportDestination</CODE></a> and <a href="../OSLog/OSReportFlush.html"><CODE>OSReportFlush</CODE></a> functions from the OSLog Library.</P> 51 52<table border="1" width="100%"> 53 <tr> 54 <td width="100%"> 55 <pre><code>/*---------------------------------------------------------------------------* 56 Name: OSReport() 57 58 Description: Outputs a formatted message into the output port 59 60 Arguments: msg pointer to a null-terminated string that contains 61 the format specifications 62 ... optional arguments 63 64 Returns: None. 65 *---------------------------------------------------------------------------*/ 66__declspec(weak) void OSReport(const char* msg, ...) 67{ 68 va_list marker; 69 70 va_start(marker, msg); 71 vprintf(msg, marker); 72 va_end(marker); 73} 74 75__declspec(weak) void OSVReport(const char* msg, va_list list) 76{ 77 vprintf(msg, list); 78}</code></pre> 79 </td> 80 </tr> 81</table> 82 83<h2>See Also</h2> 84<P> 85<A href="../toc.html#Error" target="contents">Error Functions</A><BR> <a href="ASSERT.html"><CODE>ASSERT</CODE></a><BR> <a href="ASSERTMSG.html"><CODE>ASSERTMSG</CODE></a><BR> <a href="../Init/OSGetConsoleType.html"><CODE>OSGetConsoleType</CODE></a><BR> <a href="OSHalt.html"><CODE>OSHalt</CODE></a><BR> <A href="../OSLog/intro.html"><CODE>OSLog Overview</CODE></A><BR> <A href="../toc.html#OSLog" target="contents">Functions for Saving Debug Output</A><BR> <A href="../OSLog/OSReportDestination.html"><CODE>OSReportDestination</CODE></A><BR> <A href="../OSLog/OSReportFlush.html"><CODE>OSReportFlush</CODE></A> 86</p> 87 88<H2>Revision History</H2> 89<P> 902009/01/30 Added a tip regarding OSLog.<br>2008/07/25 Removed Serial Port 1 from a note.<br>2006/03/01 Initial version. 91</P> 92 93<hr><p>CONFIDENTIAL</p></body> 94</html>