cscg22-gearboy

CSCG 2022 Challenge 'Gearboy'
git clone https://git.sinitax.com/sinitax/cscg22-gearboy
Log | Files | Refs | sfeed.txt

emu__debug_8h.html (25783B)


      1<!-- HTML header for doxygen 1.8.14-->
      2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      3<html xmlns="http://www.w3.org/1999/xhtml">
      4<head>
      5<meta http-equiv="cache-control" content="max-age=86400"/>
      6<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
      7<meta http-equiv="X-UA-Compatible" content="IE=9"/>
      8<meta name="generator" content="Doxygen 1.8.20"/>
      9<meta name="viewport" content="width=device-width, initial-scale=1"/>
     10<title>GBDK 2020 Docs: gb/emu_debug.h File Reference</title>
     11<link href="tabs.css" rel="stylesheet" type="text/css"/>
     12<script type="text/javascript" src="jquery.js"></script>
     13<script type="text/javascript" src="dynsections.js"></script>
     14<link href="navtree.css" rel="stylesheet" type="text/css"/>
     15<script type="text/javascript" src="resize.js"></script>
     16<script type="text/javascript" src="navtreedata.js"></script>
     17<script type="text/javascript" src="navtree.js"></script>
     18<link href="search/search.css" rel="stylesheet" type="text/css"/>
     19<script type="text/javascript" src="search/searchdata.js"></script>
     20<script type="text/javascript" src="search/search.js"></script>
     21<link href="doxygen.css" rel="stylesheet" type="text/css" />
     22<link href="doxygen_extra.css" rel="stylesheet" type="text/css"/>
     23</head>
     24<body>
     25<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
     26<div id="titlearea">
     27<table cellspacing="0" cellpadding="0">
     28 <tbody>
     29 <tr style="height: 56px;">
     30  <td id="projectalign" style="padding-left: 0.5em;">
     31   <div id="projectname">GBDK 2020 Docs
     32   &#160;<span id="projectnumber">4.0.6</span>
     33   </div>
     34   <div id="projectbrief">API Documentation for GBDK 2020</div>
     35  </td>
     36 </tr>
     37 </tbody>
     38</table>
     39</div>
     40<!-- end header part -->
     41<!-- Generated by Doxygen 1.8.20 -->
     42<script type="text/javascript">
     43/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
     44var searchBox = new SearchBox("searchBox", "search",false,'Search');
     45/* @license-end */
     46</script>
     47<script type="text/javascript" src="menudata.js"></script>
     48<script type="text/javascript" src="menu.js"></script>
     49<script type="text/javascript">
     50/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
     51$(function() {
     52  initMenu('',true,false,'search.php','Search');
     53  $(document).ready(function() { init_search(); });
     54});
     55/* @license-end */</script>
     56<div id="main-nav"></div>
     57</div><!-- top -->
     58<div id="side-nav" class="ui-resizable side-nav-resizable">
     59  <div id="nav-tree">
     60    <div id="nav-tree-contents">
     61      <div id="nav-sync" class="sync"></div>
     62    </div>
     63  </div>
     64  <div id="splitbar" style="-moz-user-select:none;" 
     65       class="ui-resizable-handle">
     66  </div>
     67</div>
     68<script type="text/javascript">
     69/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
     70$(document).ready(function(){initNavTree('emu__debug_8h.html',''); initResizable(); });
     71/* @license-end */
     72</script>
     73<div id="doc-content">
     74<!-- window showing the filter options -->
     75<div id="MSearchSelectWindow"
     76     onmouseover="return searchBox.OnSearchSelectShow()"
     77     onmouseout="return searchBox.OnSearchSelectHide()"
     78     onkeydown="return searchBox.OnSearchSelectKey(event)">
     79</div>
     80
     81<!-- iframe showing the search results (closed by default) -->
     82<div id="MSearchResultsWindow">
     83<iframe src="javascript:void(0)" frameborder="0" 
     84        name="MSearchResults" id="MSearchResults">
     85</iframe>
     86</div>
     87
     88<div class="header">
     89  <div class="summary">
     90<a href="#define-members">Macros</a> &#124;
     91<a href="#func-members">Functions</a>  </div>
     92  <div class="headertitle">
     93<div class="title">emu_debug.h File Reference</div>  </div>
     94</div><!--header-->
     95<div class="contents">
     96<div class="textblock"><code>#include &lt;types.h&gt;</code><br />
     97</div>
     98<p><a href="emu__debug_8h_source.html">Go to the source code of this file.</a></p>
     99<table class="memberdecls">
    100<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
    101Macros</h2></td></tr>
    102<tr class="memitem:a5624be3849bf5308c6cc05bc4a624557"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="emu__debug_8h.html#a5624be3849bf5308c6cc05bc4a624557">EMU_MESSAGE</a>(message_text)&#160;&#160;&#160;EMU_MESSAGE1(EMU_MACRONAME(__LINE__), message_text)</td></tr>
    103<tr class="separator:a5624be3849bf5308c6cc05bc4a624557"><td class="memSeparator" colspan="2">&#160;</td></tr>
    104<tr class="memitem:aabd48c83af8f69ed624bb8a83347fa39"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="emu__debug_8h.html#aabd48c83af8f69ed624bb8a83347fa39">BGB_MESSAGE</a>(message_text)&#160;&#160;&#160;<a class="el" href="emu__debug_8h.html#a5624be3849bf5308c6cc05bc4a624557">EMU_MESSAGE</a>(message_text)</td></tr>
    105<tr class="separator:aabd48c83af8f69ed624bb8a83347fa39"><td class="memSeparator" colspan="2">&#160;</td></tr>
    106<tr class="memitem:a5359c3e6ddab89f41f1de770cc3640d4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="emu__debug_8h.html#a5359c3e6ddab89f41f1de770cc3640d4">EMU_PROFILE_BEGIN</a>(MSG)&#160;&#160;&#160;EMU_MESSAGE_SUFFIX(MSG, &quot;%ZEROCLKS%&quot;);</td></tr>
    107<tr class="separator:a5359c3e6ddab89f41f1de770cc3640d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
    108<tr class="memitem:ab5b05deda52856c84f274fb28578b6ee"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="emu__debug_8h.html#ab5b05deda52856c84f274fb28578b6ee">BGB_PROFILE_BEGIN</a>(MSG)&#160;&#160;&#160;<a class="el" href="emu__debug_8h.html#a5359c3e6ddab89f41f1de770cc3640d4">EMU_PROFILE_BEGIN</a>(MSG)</td></tr>
    109<tr class="separator:ab5b05deda52856c84f274fb28578b6ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
    110<tr class="memitem:acce78126775a7ca3c862459e28203aba"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="emu__debug_8h.html#acce78126775a7ca3c862459e28203aba">EMU_PROFILE_END</a>(MSG)&#160;&#160;&#160;EMU_MESSAGE_SUFFIX(MSG,&quot;%-8+LASTCLKS%&quot;);</td></tr>
    111<tr class="separator:acce78126775a7ca3c862459e28203aba"><td class="memSeparator" colspan="2">&#160;</td></tr>
    112<tr class="memitem:ab43f94064dc523e99c4aefb440e2c3ed"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="emu__debug_8h.html#ab43f94064dc523e99c4aefb440e2c3ed">BGB_PROFILE_END</a>(MSG)&#160;&#160;&#160;<a class="el" href="emu__debug_8h.html#acce78126775a7ca3c862459e28203aba">EMU_PROFILE_END</a>(MSG)</td></tr>
    113<tr class="separator:ab43f94064dc523e99c4aefb440e2c3ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
    114<tr class="memitem:ad1ca656789d7d285b352afeaa4cc56bd"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="emu__debug_8h.html#ad1ca656789d7d285b352afeaa4cc56bd">EMU_TEXT</a>(MSG)&#160;&#160;&#160;<a class="el" href="emu__debug_8h.html#a5624be3849bf5308c6cc05bc4a624557">EMU_MESSAGE</a>(MSG)</td></tr>
    115<tr class="separator:ad1ca656789d7d285b352afeaa4cc56bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
    116<tr class="memitem:a6afa665bd7d093e7ca2d310cc92b08a9"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="emu__debug_8h.html#a6afa665bd7d093e7ca2d310cc92b08a9">BGB_TEXT</a>(MSG)&#160;&#160;&#160;<a class="el" href="emu__debug_8h.html#ad1ca656789d7d285b352afeaa4cc56bd">EMU_TEXT</a>(MSG)</td></tr>
    117<tr class="separator:a6afa665bd7d093e7ca2d310cc92b08a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
    118<tr class="memitem:a47c147586d9a21282ce72a83947508e9"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="emu__debug_8h.html#a47c147586d9a21282ce72a83947508e9">BGB_profiler_message</a>()&#160;&#160;&#160;<a class="el" href="emu__debug_8h.html#a1e2adc0111203ce0f551bcb1d99395df">EMU_profiler_message</a>()</td></tr>
    119<tr class="separator:a47c147586d9a21282ce72a83947508e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
    120<tr class="memitem:a892ddea0cd396141c1ae05e384303cbf"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="emu__debug_8h.html#a892ddea0cd396141c1ae05e384303cbf">BGB_printf</a>(...)&#160;&#160;&#160;<a class="el" href="emu__debug_8h.html#a586ce1ddfba9c35726887ca31f933963">EMU_printf</a>(__VA_ARGS__)</td></tr>
    121<tr class="separator:a892ddea0cd396141c1ae05e384303cbf"><td class="memSeparator" colspan="2">&#160;</td></tr>
    122<tr class="memitem:a9e856b4691d63bb41c5148b9097bd2bb"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="emu__debug_8h.html#a9e856b4691d63bb41c5148b9097bd2bb">EMU_BREAKPOINT</a>&#160;&#160;&#160;__asm__(&quot;ld <a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>, <a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>&quot;);</td></tr>
    123<tr class="separator:a9e856b4691d63bb41c5148b9097bd2bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
    124<tr class="memitem:a95c9ae3faadfe6f93a3cac87085b3481"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="emu__debug_8h.html#a95c9ae3faadfe6f93a3cac87085b3481">BGB_BREAKPOINT</a>&#160;&#160;&#160;<a class="el" href="emu__debug_8h.html#a9e856b4691d63bb41c5148b9097bd2bb">EMU_BREAKPOINT</a></td></tr>
    125<tr class="separator:a95c9ae3faadfe6f93a3cac87085b3481"><td class="memSeparator" colspan="2">&#160;</td></tr>
    126</table><table class="memberdecls">
    127<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
    128Functions</h2></td></tr>
    129<tr class="memitem:a1e2adc0111203ce0f551bcb1d99395df"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="emu__debug_8h.html#a1e2adc0111203ce0f551bcb1d99395df">EMU_profiler_message</a> ()</td></tr>
    130<tr class="separator:a1e2adc0111203ce0f551bcb1d99395df"><td class="memSeparator" colspan="2">&#160;</td></tr>
    131<tr class="memitem:a586ce1ddfba9c35726887ca31f933963"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="emu__debug_8h.html#a586ce1ddfba9c35726887ca31f933963">EMU_printf</a> (const char *format,...) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></td></tr>
    132<tr class="separator:a586ce1ddfba9c35726887ca31f933963"><td class="memSeparator" colspan="2">&#160;</td></tr>
    133</table>
    134<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
    135<div class="textblock"><p>Debug window logging and profiling support for emulators (BGB, Emulicious, etc).</p>
    136<p>Also see the <code>emu_debug</code> example project included with gbdk.</p>
    137<p>See the BGB Manual for more information ("expressions, breakpoint conditions, and debug messages") <a href="http://bgb.bircd.org/manual.html#expressions">http://bgb.bircd.org/manual.html#expressions</a> </p>
    138</div><h2 class="groupheader">Macro Definition Documentation</h2>
    139<a id="a5624be3849bf5308c6cc05bc4a624557"></a>
    140<h2 class="memtitle"><span class="permalink"><a href="#a5624be3849bf5308c6cc05bc4a624557">&#9670;&nbsp;</a></span>EMU_MESSAGE</h2>
    141
    142<div class="memitem">
    143<div class="memproto">
    144      <table class="memname">
    145        <tr>
    146          <td class="memname">#define EMU_MESSAGE</td>
    147          <td>(</td>
    148          <td class="paramtype">&#160;</td>
    149          <td class="paramname">message_text</td><td>)</td>
    150          <td>&#160;&#160;&#160;EMU_MESSAGE1(EMU_MACRONAME(__LINE__), message_text)</td>
    151        </tr>
    152      </table>
    153</div><div class="memdoc">
    154<p>Macro to display a message in the emulator debug message window</p>
    155<dl class="params"><dt>Parameters</dt><dd>
    156  <table class="params">
    157    <tr><td class="paramname">message_text</td><td>Quoted text string to display in the debug message window</td></tr>
    158  </table>
    159  </dd>
    160</dl>
    161<p>The following special parameters can be used when bracketed with "%" characters. </p><ul>
    162<li>CPU registers: AF, BC, DE, HL, SP, PC, B, C, D, E, H, L, A, ZERO, ZF, Z, CARRY, CY, IME, ALLREGS </li>
    163<li>Other state values: ROMBANK, XRAMBANK, SRAMBANK, WRAMBANK, VRAMBANK, TOTALCLKS, LASTCLKS, CLKS2VBLANK</li>
    164</ul>
    165<p>Example: print a message along with the currently active ROM bank. </p><div class="fragment"><div class="line"><a class="code" href="emu__debug_8h.html#a5624be3849bf5308c6cc05bc4a624557">EMU_MESSAGE</a>(<span class="stringliteral">&quot;Current ROM Bank is: %ROMBANK%&quot;</span>);</div>
    166</div><!-- fragment --><p>See the BGB Manual for more information ("expressions, breakpoint conditions, and debug messages") <a href="http://bgb.bircd.org/manual.html#expressions">http://bgb.bircd.org/manual.html#expressions</a></p>
    167<dl class="section see"><dt>See also</dt><dd><a class="el" href="emu__debug_8h.html#a5359c3e6ddab89f41f1de770cc3640d4">EMU_PROFILE_BEGIN()</a>, <a class="el" href="emu__debug_8h.html#acce78126775a7ca3c862459e28203aba">EMU_PROFILE_END()</a> </dd></dl>
    168
    169</div>
    170</div>
    171<a id="aabd48c83af8f69ed624bb8a83347fa39"></a>
    172<h2 class="memtitle"><span class="permalink"><a href="#aabd48c83af8f69ed624bb8a83347fa39">&#9670;&nbsp;</a></span>BGB_MESSAGE</h2>
    173
    174<div class="memitem">
    175<div class="memproto">
    176      <table class="memname">
    177        <tr>
    178          <td class="memname">#define BGB_MESSAGE</td>
    179          <td>(</td>
    180          <td class="paramtype">&#160;</td>
    181          <td class="paramname">message_text</td><td>)</td>
    182          <td>&#160;&#160;&#160;<a class="el" href="emu__debug_8h.html#a5624be3849bf5308c6cc05bc4a624557">EMU_MESSAGE</a>(message_text)</td>
    183        </tr>
    184      </table>
    185</div><div class="memdoc">
    186
    187</div>
    188</div>
    189<a id="a5359c3e6ddab89f41f1de770cc3640d4"></a>
    190<h2 class="memtitle"><span class="permalink"><a href="#a5359c3e6ddab89f41f1de770cc3640d4">&#9670;&nbsp;</a></span>EMU_PROFILE_BEGIN</h2>
    191
    192<div class="memitem">
    193<div class="memproto">
    194      <table class="memname">
    195        <tr>
    196          <td class="memname">#define EMU_PROFILE_BEGIN</td>
    197          <td>(</td>
    198          <td class="paramtype">&#160;</td>
    199          <td class="paramname">MSG</td><td>)</td>
    200          <td>&#160;&#160;&#160;EMU_MESSAGE_SUFFIX(MSG, &quot;%ZEROCLKS%&quot;);</td>
    201        </tr>
    202      </table>
    203</div><div class="memdoc">
    204<p>Macro to <b>Start</b> a profiling block for the emulator (BGB, Emulicious, etc)</p>
    205<dl class="params"><dt>Parameters</dt><dd>
    206  <table class="params">
    207    <tr><td class="paramname">MSG</td><td>Quoted text string to display in the debug message window along with the result</td></tr>
    208  </table>
    209  </dd>
    210</dl>
    211<p>To complete the profiling block and print the result call <a class="el" href="emu__debug_8h.html#acce78126775a7ca3c862459e28203aba">EMU_PROFILE_END</a>.</p>
    212<dl class="section see"><dt>See also</dt><dd><a class="el" href="emu__debug_8h.html#acce78126775a7ca3c862459e28203aba">EMU_PROFILE_END()</a>, <a class="el" href="emu__debug_8h.html#a5624be3849bf5308c6cc05bc4a624557">EMU_MESSAGE()</a> </dd></dl>
    213
    214</div>
    215</div>
    216<a id="ab5b05deda52856c84f274fb28578b6ee"></a>
    217<h2 class="memtitle"><span class="permalink"><a href="#ab5b05deda52856c84f274fb28578b6ee">&#9670;&nbsp;</a></span>BGB_PROFILE_BEGIN</h2>
    218
    219<div class="memitem">
    220<div class="memproto">
    221      <table class="memname">
    222        <tr>
    223          <td class="memname">#define BGB_PROFILE_BEGIN</td>
    224          <td>(</td>
    225          <td class="paramtype">&#160;</td>
    226          <td class="paramname">MSG</td><td>)</td>
    227          <td>&#160;&#160;&#160;<a class="el" href="emu__debug_8h.html#a5359c3e6ddab89f41f1de770cc3640d4">EMU_PROFILE_BEGIN</a>(MSG)</td>
    228        </tr>
    229      </table>
    230</div><div class="memdoc">
    231
    232</div>
    233</div>
    234<a id="acce78126775a7ca3c862459e28203aba"></a>
    235<h2 class="memtitle"><span class="permalink"><a href="#acce78126775a7ca3c862459e28203aba">&#9670;&nbsp;</a></span>EMU_PROFILE_END</h2>
    236
    237<div class="memitem">
    238<div class="memproto">
    239      <table class="memname">
    240        <tr>
    241          <td class="memname">#define EMU_PROFILE_END</td>
    242          <td>(</td>
    243          <td class="paramtype">&#160;</td>
    244          <td class="paramname">MSG</td><td>)</td>
    245          <td>&#160;&#160;&#160;EMU_MESSAGE_SUFFIX(MSG,&quot;%-8+LASTCLKS%&quot;);</td>
    246        </tr>
    247      </table>
    248</div><div class="memdoc">
    249<p>Macro to <b>End</b> a profiling block and print the results in the emulator debug message window</p>
    250<dl class="params"><dt>Parameters</dt><dd>
    251  <table class="params">
    252    <tr><td class="paramname">MSG</td><td>Quoted text string to display in the debug message window along with the result</td></tr>
    253  </table>
    254  </dd>
    255</dl>
    256<p>This should only be called after a previous call to <a class="el" href="emu__debug_8h.html#a5359c3e6ddab89f41f1de770cc3640d4">EMU_PROFILE_BEGIN()</a></p>
    257<p>The results are in Emulator clock units, which are "1 nop in [CGB] doublespeed mode".</p>
    258<p>So when running in Normal Speed mode (i.e. non-CGB doublespeed) the printed result should be <b>divided by 2</b> to get the actual ellapsed cycle count.</p>
    259<p>If running in CB Double Speed mode use the below call instead, it correctly compensates for the speed difference. In this scenario, the result does <b>not need to be divided by 2</b> to get the ellapsed cycle count. </p><div class="fragment"><div class="line"><a class="code" href="emu__debug_8h.html#a5624be3849bf5308c6cc05bc4a624557">EMU_MESSAGE</a>(<span class="stringliteral">&quot;NOP TIME: %-4+LASTCLKS%&quot;</span>);</div>
    260</div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="emu__debug_8h.html#a5359c3e6ddab89f41f1de770cc3640d4">EMU_PROFILE_BEGIN()</a>, <a class="el" href="emu__debug_8h.html#a5624be3849bf5308c6cc05bc4a624557">EMU_MESSAGE()</a> </dd></dl>
    261
    262</div>
    263</div>
    264<a id="ab43f94064dc523e99c4aefb440e2c3ed"></a>
    265<h2 class="memtitle"><span class="permalink"><a href="#ab43f94064dc523e99c4aefb440e2c3ed">&#9670;&nbsp;</a></span>BGB_PROFILE_END</h2>
    266
    267<div class="memitem">
    268<div class="memproto">
    269      <table class="memname">
    270        <tr>
    271          <td class="memname">#define BGB_PROFILE_END</td>
    272          <td>(</td>
    273          <td class="paramtype">&#160;</td>
    274          <td class="paramname">MSG</td><td>)</td>
    275          <td>&#160;&#160;&#160;<a class="el" href="emu__debug_8h.html#acce78126775a7ca3c862459e28203aba">EMU_PROFILE_END</a>(MSG)</td>
    276        </tr>
    277      </table>
    278</div><div class="memdoc">
    279
    280</div>
    281</div>
    282<a id="ad1ca656789d7d285b352afeaa4cc56bd"></a>
    283<h2 class="memtitle"><span class="permalink"><a href="#ad1ca656789d7d285b352afeaa4cc56bd">&#9670;&nbsp;</a></span>EMU_TEXT</h2>
    284
    285<div class="memitem">
    286<div class="memproto">
    287      <table class="memname">
    288        <tr>
    289          <td class="memname">#define EMU_TEXT</td>
    290          <td>(</td>
    291          <td class="paramtype">&#160;</td>
    292          <td class="paramname">MSG</td><td>)</td>
    293          <td>&#160;&#160;&#160;<a class="el" href="emu__debug_8h.html#a5624be3849bf5308c6cc05bc4a624557">EMU_MESSAGE</a>(MSG)</td>
    294        </tr>
    295      </table>
    296</div><div class="memdoc">
    297
    298</div>
    299</div>
    300<a id="a6afa665bd7d093e7ca2d310cc92b08a9"></a>
    301<h2 class="memtitle"><span class="permalink"><a href="#a6afa665bd7d093e7ca2d310cc92b08a9">&#9670;&nbsp;</a></span>BGB_TEXT</h2>
    302
    303<div class="memitem">
    304<div class="memproto">
    305      <table class="memname">
    306        <tr>
    307          <td class="memname">#define BGB_TEXT</td>
    308          <td>(</td>
    309          <td class="paramtype">&#160;</td>
    310          <td class="paramname">MSG</td><td>)</td>
    311          <td>&#160;&#160;&#160;<a class="el" href="emu__debug_8h.html#ad1ca656789d7d285b352afeaa4cc56bd">EMU_TEXT</a>(MSG)</td>
    312        </tr>
    313      </table>
    314</div><div class="memdoc">
    315
    316</div>
    317</div>
    318<a id="a47c147586d9a21282ce72a83947508e9"></a>
    319<h2 class="memtitle"><span class="permalink"><a href="#a47c147586d9a21282ce72a83947508e9">&#9670;&nbsp;</a></span>BGB_profiler_message</h2>
    320
    321<div class="memitem">
    322<div class="memproto">
    323      <table class="memname">
    324        <tr>
    325          <td class="memname">#define BGB_profiler_message</td>
    326          <td>(</td>
    327          <td class="paramname"></td><td>)</td>
    328          <td>&#160;&#160;&#160;<a class="el" href="emu__debug_8h.html#a1e2adc0111203ce0f551bcb1d99395df">EMU_profiler_message</a>()</td>
    329        </tr>
    330      </table>
    331</div><div class="memdoc">
    332
    333</div>
    334</div>
    335<a id="a892ddea0cd396141c1ae05e384303cbf"></a>
    336<h2 class="memtitle"><span class="permalink"><a href="#a892ddea0cd396141c1ae05e384303cbf">&#9670;&nbsp;</a></span>BGB_printf</h2>
    337
    338<div class="memitem">
    339<div class="memproto">
    340      <table class="memname">
    341        <tr>
    342          <td class="memname">#define BGB_printf</td>
    343          <td>(</td>
    344          <td class="paramtype">&#160;</td>
    345          <td class="paramname"><em>...</em></td><td>)</td>
    346          <td>&#160;&#160;&#160;<a class="el" href="emu__debug_8h.html#a586ce1ddfba9c35726887ca31f933963">EMU_printf</a>(__VA_ARGS__)</td>
    347        </tr>
    348      </table>
    349</div><div class="memdoc">
    350
    351</div>
    352</div>
    353<a id="a9e856b4691d63bb41c5148b9097bd2bb"></a>
    354<h2 class="memtitle"><span class="permalink"><a href="#a9e856b4691d63bb41c5148b9097bd2bb">&#9670;&nbsp;</a></span>EMU_BREAKPOINT</h2>
    355
    356<div class="memitem">
    357<div class="memproto">
    358      <table class="memname">
    359        <tr>
    360          <td class="memname">#define EMU_BREAKPOINT&#160;&#160;&#160;__asm__(&quot;ld <a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>, <a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>&quot;);</td>
    361        </tr>
    362      </table>
    363</div><div class="memdoc">
    364<p>The Emulator will break into debugger when encounters this line </p>
    365
    366</div>
    367</div>
    368<a id="a95c9ae3faadfe6f93a3cac87085b3481"></a>
    369<h2 class="memtitle"><span class="permalink"><a href="#a95c9ae3faadfe6f93a3cac87085b3481">&#9670;&nbsp;</a></span>BGB_BREAKPOINT</h2>
    370
    371<div class="memitem">
    372<div class="memproto">
    373      <table class="memname">
    374        <tr>
    375          <td class="memname">#define BGB_BREAKPOINT&#160;&#160;&#160;<a class="el" href="emu__debug_8h.html#a9e856b4691d63bb41c5148b9097bd2bb">EMU_BREAKPOINT</a></td>
    376        </tr>
    377      </table>
    378</div><div class="memdoc">
    379
    380</div>
    381</div>
    382<h2 class="groupheader">Function Documentation</h2>
    383<a id="a1e2adc0111203ce0f551bcb1d99395df"></a>
    384<h2 class="memtitle"><span class="permalink"><a href="#a1e2adc0111203ce0f551bcb1d99395df">&#9670;&nbsp;</a></span>EMU_profiler_message()</h2>
    385
    386<div class="memitem">
    387<div class="memproto">
    388      <table class="memname">
    389        <tr>
    390          <td class="memname">void EMU_profiler_message </td>
    391          <td>(</td>
    392          <td class="paramname"></td><td>)</td>
    393          <td></td>
    394        </tr>
    395      </table>
    396</div><div class="memdoc">
    397<p>Display preset debug information in the Emulator debug messages window.</p>
    398<p>This function is equivalent to: </p><div class="fragment"><div class="line"><a class="code" href="emu__debug_8h.html#a5624be3849bf5308c6cc05bc4a624557">EMU_MESSAGE</a>(<span class="stringliteral">&quot;PROFILE,%(SP+$0)%,%(SP+$1)%,%A%,%TOTALCLKS%,%ROMBANK%,%WRAMBANK%&quot;</span>);</div>
    399</div><!-- fragment --> 
    400</div>
    401</div>
    402<a id="a586ce1ddfba9c35726887ca31f933963"></a>
    403<h2 class="memtitle"><span class="permalink"><a href="#a586ce1ddfba9c35726887ca31f933963">&#9670;&nbsp;</a></span>EMU_printf()</h2>
    404
    405<div class="memitem">
    406<div class="memproto">
    407      <table class="memname">
    408        <tr>
    409          <td class="memname">void EMU_printf </td>
    410          <td>(</td>
    411          <td class="paramtype">const char *&#160;</td>
    412          <td class="paramname"><em>format</em>, </td>
    413        </tr>
    414        <tr>
    415          <td class="paramkey"></td>
    416          <td></td>
    417          <td class="paramtype">&#160;</td>
    418          <td class="paramname"><em>...</em>&#160;</td>
    419        </tr>
    420        <tr>
    421          <td></td>
    422          <td>)</td>
    423          <td></td><td></td>
    424        </tr>
    425      </table>
    426</div><div class="memdoc">
    427<p>Print the string and arguments given by format to the emulator debug message window</p>
    428<dl class="params"><dt>Parameters</dt><dd>
    429  <table class="params">
    430    <tr><td class="paramname">format</td><td>The format string as per printf</td></tr>
    431  </table>
    432  </dd>
    433</dl>
    434<p>Does not return the number of characters printed. Result string MUST BE LESS OR EQUAL THAN 128 BYTES LONG, INCLUDING THE TRAILIG ZERO BYTE!</p>
    435<p>Currently supported: </p><ul>
    436<li>%hx (char as hex) </li>
    437<li>%hu (unsigned char) </li>
    438<li>%hd (signed char) </li>
    439<li>%c (character) </li>
    440<li>%u (unsigned int) </li>
    441<li>%d (signed int) </li>
    442<li>%x (unsigned int as hex) </li>
    443<li>%s (string)</li>
    444</ul>
    445<p>Warning: to correctly pass chars for printing as chars, they <em>must</em> be explicitly re-cast as such when calling the function. See <a class="el" href="docs_coding_guidelines.html#docs_chars_varargs">docs_chars_varargs</a> for more details. </p>
    446
    447</div>
    448</div>
    449</div><!-- contents -->
    450</div><!-- doc-content -->
    451<div class="ttc" id="aemu__debug_8h_html_a5624be3849bf5308c6cc05bc4a624557"><div class="ttname"><a href="emu__debug_8h.html#a5624be3849bf5308c6cc05bc4a624557">EMU_MESSAGE</a></div><div class="ttdeci">#define EMU_MESSAGE(message_text)</div><div class="ttdef"><b>Definition:</b> emu_debug.h:40</div></div>
    452<!-- HTML footer for doxygen 1.8.14-->
    453<!-- start footer part -->
    454<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
    455</div>
    456</body>
    457</html>