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 &lt;revolution/os.h&gt;
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 <CODE>standard output function</CODE>).</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>The <code>OSReport</code> function 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><STRONG>Note:</STRONG> 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<table border="1" width="100%">
51    <tr>
52    <td width="100%">
53      <pre><code>/*---------------------------------------------------------------------------*
54  Name:         OSReport()
55
56  Description:  Outputs a formatted message into the output port
57
58  Arguments:    msg         pointer to a null-terminated string that contains
59                            the format specifications
60                ...         optional arguments
61
62  Returns:      None.
63 *---------------------------------------------------------------------------*/
64__declspec(weak) void OSReport(const char* msg, ...)
65{
66    va_list marker;
67
68    va_start(marker, msg);
69    vprintf(msg, marker);
70    va_end(marker);
71}
72
73__declspec(weak) void OSVReport(const char* msg, va_list list)
74{
75    vprintf(msg, list);
76}</code></pre>
77    </td>
78  </tr>
79</table>
80
81<h2>See Also</h2>
82<P class="reference">
83<A href="../toc.html#Error" target="contents">Error Functions</A>,
84<a href="ASSERT.html">ASSERT</a>,
85<a href="ASSERTMSG.html">ASSERTMSG</a>,
86<a href="../Init/OSGetConsoleType.html">OSGetConsoleType</a>,
87<a href="OSHalt.html">OSHalt</a>
88</p>
89
90<H2>Revision History</H2>
91<P>
922008/07/25 Removed Serial Port 1 from a note.<br>2006/03/01 Initial version.
93</P>
94
95<hr><p>CONFIDENTIAL</p></body>
96</html>