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=windows-1252"> 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>OSLog is an extended API that allows OSReport output results to be written 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> OSReportViewer must be imported and started to allocate the memory used by OSReport to write to Wii console NAND memory.<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 OSReport 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 to be debugged and execute actual OSReport 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 OSReport is called while the output destination for OSReport is set to Wii console NAND memory, the string is temporarily stored in a buffer in main memory of the Wii console without writing it directly to Wii console NAND memory.<br> OSReportFlush must be called to write this string correctly to Wii console NAND memory.<br> <br> Strings in main memory at time of flushing <b>are added to the end of the file used by OSReport 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> 322008/11/19 Initial version. 33</P> 34 35<hr><p>CONFIDENTIAL</p></body> 36</HTML> 37