1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=utf-8"> 5<META http-equiv="Content-Style-Type" content="text/css"> 6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 6.5.0.0 for Windows"> 7<BASE target="main"> 8<TITLE>Operating System Log (OSLog) Overview List</TITLE> 9<LINK rel="stylesheet" href="../../CSS/revolution.css"> 10</HEAD> 11<BODY> 12<H1>Operating System Log (OSLog) Overview List</H1> 13 14<h2>Introduction</h2> 15<p><CODE>OSLog</CODE> is an API extension that can write the output results of <CODE>OSReport</CODE> and <CODE>OSVReport</CODE> to Wii console NAND memory.<br>Developers can choose the output destination from three options: serial output, Wii console NAND memory, and both serial output and Wii console NAND memory at the same time.<br>The <code>OSReportDestination</code> function is effective in cases such as when debugging on hardware that cannot use serial output.<br><br> The following features have been built into the supplied OSReportViewer. <br>- View logs written to Wii console NAND memory<br>- Copy written log to SD Card<br>- Delete written log<br> <br> <b>Note:</b> OSLog features can be used by including <code>revolution/os/OSLog.h</code> and linking <code>oslog.a</code>.<br>In order for <CODE>OS(V)Report</CODE> to write to Wii console NAND memory, you must import and run <CODE>OSReportViewer</CODE> and allocate a memory region.<br> 16<hr> 17<h2>OSLog Library Process Model</h2> 18<h2>(1) Memory Allocation</h2> 19<img src="Image/001.png"><br> <br> Before starting a program to debug, import OSReportViewer and start it.<br> This allocates the memory required by <CODE>OS(V)Report</CODE> to write to Wii console NAND memory.<br> <br> First, go to <code>(REVOLUTION_SDK_ROOT)/RVL/bin/tools</code>.<br> Once Nmenu is started using <CODE>ndrun</CODE>, an Import List is displayed. The file <code>OSReportViewer.wad</code> is included in this list and can be imported to Wii console NAND memory.<br> If you cannot find <code>OSReportViewer.wad</code> using Nmenu, it may be that the <CODE>DvdRoot</CODE> setting is incorrect or that <code>OSReportViewer.wad</code> is not included in <code>DvdRoot/viewer</code>.<br> <br> If import is successful, press the B Button to move to the Title List.<br> If import has been successful, <CODE>0x024f5256</CODE> appears in the Title List.<br> To launch OSReportViewer, press the A Button.<br> If the display goes to a blue screen, a blank page without any errors, it indicates that memory has been allocated successfully.<br> <br> 20<hr> 21<h2>(2) Write Procedure</h2> 22<img src="Image/002.png"><br> <br> <br> Next, start the program you want to debug and create the <CODE>OS(V)Report</CODE> output.<br> You can switch the output destination by setting one of the three argument options for the <code>OSReportDestination</code> function: <code>OS_REPORT_NAND</code>, <code>OS_REPORT_SERIAL</code>, or both <code>OS_REPORT_NAND</code> and <code>OS_REPORT_SERIAL</code> at the same time.<br> <br> 23<hr> 24<h2>(3) Write Back Procedure</h2> 25<img src="Image/003.png"><br> <br> If you call <CODE>OS(V)Report</CODE> with the output destination set to Wii console NAND memory, the string is not written directly to the NAND memory, but rather temporarily stored in a buffer in the console's main memory.<br> OSReportFlush must be called to write this string correctly to Wii console NAND memory.<br> <br>When flushed, the strings in main memory are <b>added to the end of the file used by <CODE>OS(V)Report</CODE> to write to Wii console NAND memory.</b><br>Developers should perform this task at a time convenient for them.<br> <br> 26<hr> 27<h2>(4) View Procedure</h2> 28<img src="Image/004.png"><br> <br> <br> Written logs can be checked by viewing them with OSReportviewer.<br> OSReportViewer can check logs as a NAND application and can delete logs when they have accumulated.<br> A feature for copying written logs to an SD Card is also available.<br> <br> 29 30<H2>Revision History</H2> 31<P> 322009/10/19 Made revisions to correspond with <CODE>OSVReport</CODE>.<BR>2008/11/19 Initial version. 33</P> 34 35<hr><p>CONFIDENTIAL</p></body> 36</HTML> 37