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 17<h2>C Specification</h2> 18 19<dl> 20<dd><pre><code>#include <revolution/os.h></code></pre> 21 </dd> 22<dd><pre><code>void OSReport(const char* <em>msg</em>, ...); 23 24void OSVReport(const char* msg, va_list list);</code></pre> 25 </dd> 26</dl> 27 28<h2>Arguments</h2> 29<TABLE border="1" cellpadding="3" cellspacing="0.1"> 30 31 <tr> 32<TD valign="top" width="120" bgcolor="#ffffe8"><em><strong><code>msg</code></strong></em></TD> 33<TD width="520">Pointer to a null-terminated string that includes format specification (equivalent to C <CODE>standard output functions</CODE>).</TD> 34 </tr> 35 <tr> 36 <TD valign="top" width="120" bgcolor="#ffffe8"><em><strong><code>...</code></strong></em></TD> 37<TD width="520">Optional argument (<code>OSReport</code>).</TD> 38 </tr> 39 <tr> 40<TD valign="top" width="120" bgcolor="#ffffe8"><code><em><strong><STRONG><EM><CODE>list</CODE></EM></STRONG></strong></em></code></TD> 41<TD width="520">Additional argument (<code>OSVReport</code>).</TD> 42 </tr> 43 44</TABLE> 45<h2>Return Values</h2> 46 47<p>None.</p> 48 49<H2>Description</H2> 50<P>The <code>OSReport</code> function outputs formatted output data to the output port. The <code>OSVReport</code> function and the <code>OSReport</code> function are the same except that the <code>OSVReport</code> function takes the variable argument list as an extra argument.</P> 51<P><STRONG>Note:</STRONG> The <code>OS[V]Report</code> function does not output the message for the production version of the Revolution (I.e., the <a href="../Init/OSGetConsoleType.html"><code>OSGetConsoleType</code></a> function is <code>OS_CONSOLE_RETAIL</code><I><em>n</em></I>).</P> 52<P><STRONG>Note:</STRONG>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.</P> 53<P><em><strong>Tips</strong></em></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 various graphics configurations make implementing a standard output function for the TV screen difficult, you can implement a game-specific version of the <code>OSReport</code> function and 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 takes precedence over the default <code>OSReport</code> function in <code>os[D].a</code>. The following code is the implementation of the <code>OSReport</code> function in <code>os[D].a</code>.</P> 54<table border="1" width="100%"> 55 56 <tr> 57 <td width="100%"> 58 <pre>/*---------------------------------------------------------------------------* 59Name: OSReport() 60 61Description: Outputs a formatted message into the output port 62 63Arguments: msg pointer to a null-terminated string that contains 64the format specifications 65... optional arguments 66 67Returns: None. 68 *---------------------------------------------------------------------------*/ 69__declspec(weak) void OSReport(const char* msg, ...) 70{ 71va_list marker; 72 73va_start(marker, msg); 74vprintf(msg, marker); 75va_end(marker); 76} 77 78__declspec(weak) void OSVReport(const char* msg, va_list list) 79{ 80vprintf(msg, list); 81}</pre> 82 </td> 83 </tr> 84 85</table> 86 87<h2>See Also</h2> 88 89<p><a href="../list.html#Error" target="contents">Error Functions</a>, <code><a href="ASSERT.html">ASSERT</a></code>, <code><a href="ASSERTMSG.html">ASSERTMSG</a></code>,<code><a href="../Init/OSGetConsoleType.html">OSGetConsoleType</a></code>, <code><a href="OSHalt.html">OSHalt</a></code></p> 90<H2>Revision History</H2> 91<P>03/01/2006 Initial version.</P> 92</body> 93</html>