mirror of
https://github.com/gbdk-2020/gbdk-2020.git
synced 2026-03-13 10:48:15 +01:00
180 lines
16 KiB
HTML
180 lines
16 KiB
HTML
<!-- HTML header for doxygen 1.8.14-->
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="cache-control" content="max-age=86400"/>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.9.1"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>GBDK 2020 Docs: gbdk-lib/include/gbdk/emu_debug.h Source File</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="resize.js"></script>
|
|
<script type="text/javascript" src="navtreedata.js"></script>
|
|
<script type="text/javascript" src="navtree.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
<link href="doxygen_extra.css" rel="stylesheet" type="text/css"/>
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">GBDK 2020 Docs
|
|
 <span id="projectnumber">4.1.1</span>
|
|
</div>
|
|
<div id="projectbrief">API Documentation for GBDK 2020</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.9.1 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */</script>
|
|
<div id="main-nav"></div>
|
|
</div><!-- top -->
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
<div id="nav-sync" class="sync"></div>
|
|
</div>
|
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(document).ready(function(){initNavTree('gbdk_2emu__debug_8h_source.html',''); initResizable(); });
|
|
/* @license-end */
|
|
</script>
|
|
<div id="doc-content">
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">emu_debug.h</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<a href="gbdk_2emu__debug_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>  </div>
|
|
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor">#ifndef __GBDK_EMU_DEBUG_H_INCLUDE</span></div>
|
|
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="preprocessor">#define __GBDK_EMU_DEBUG_H_INCLUDE</span></div>
|
|
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>  </div>
|
|
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="preprocessor">#include <types.h></span></div>
|
|
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>  </div>
|
|
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor">#if defined(__TARGET_gb) || defined(__TARGET_ap) || defined(__TARGET_sms) || defined(__TARGET_gg)</span></div>
|
|
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>  </div>
|
|
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="gbdk_2emu__debug_8h.html#a5624be3849bf5308c6cc05bc4a624557"> 43</a></span> <span class="preprocessor">#define EMU_MESSAGE(message_text) EMU_MESSAGE1(EMU_MACRONAME(__LINE__), message_text)</span></div>
|
|
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="gbdk_2emu__debug_8h.html#aabd48c83af8f69ed624bb8a83347fa39"> 44</a></span> <span class="preprocessor">#define BGB_MESSAGE(message_text) EMU_MESSAGE(message_text)</span></div>
|
|
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  </div>
|
|
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="preprocessor">#define EMU_MACRONAME(A) EMU_MACRONAME1(A)</span></div>
|
|
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span> <span class="preprocessor">#define EMU_MACRONAME1(A) EMULOG##A</span></div>
|
|
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  </div>
|
|
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="preprocessor">#define EMU_MESSAGE1(name, message_text) \</span></div>
|
|
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="preprocessor">__asm \</span></div>
|
|
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="preprocessor">.MACRO name msg_t, ?llbl\</span></div>
|
|
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span> <span class="preprocessor"> ld d, d \</span></div>
|
|
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="preprocessor"> jr llbl \</span></div>
|
|
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="preprocessor"> .dw 0x6464 \</span></div>
|
|
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <span class="preprocessor"> .dw 0x0000 \</span></div>
|
|
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span> <span class="preprocessor"> .ascii msg_t \</span></div>
|
|
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span> <span class="preprocessor">llbl: \</span></div>
|
|
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span> <span class="preprocessor">.ENDM \</span></div>
|
|
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span> <span class="preprocessor">name ^/message_text/ \</span></div>
|
|
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span> <span class="preprocessor">__endasm</span></div>
|
|
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  </div>
|
|
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span> <span class="preprocessor">#define EMU_MESSAGE_SUFFIX(message_text, message_suffix) EMU_MESSAGE3(EMU_MACRONAME(__LINE__), message_text, message_suffix)</span></div>
|
|
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span> <span class="preprocessor">#define EMU_MESSAGE3(name, message_text, message_suffix) \</span></div>
|
|
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span> <span class="preprocessor">__asm \</span></div>
|
|
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span> <span class="preprocessor">.MACRO name msg_t, msg_s, ?llbl\</span></div>
|
|
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span> <span class="preprocessor"> ld d, d \</span></div>
|
|
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span> <span class="preprocessor"> jr llbl \</span></div>
|
|
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span> <span class="preprocessor"> .dw 0x6464 \</span></div>
|
|
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span> <span class="preprocessor"> .dw 0x0000 \</span></div>
|
|
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span> <span class="preprocessor"> .ascii msg_t \</span></div>
|
|
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span> <span class="preprocessor"> .ascii msg_s \</span></div>
|
|
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span> <span class="preprocessor">llbl: \</span></div>
|
|
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span> <span class="preprocessor">.ENDM \</span></div>
|
|
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span> <span class="preprocessor">name ^/message_text/, ^/message_suffix/ \</span></div>
|
|
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span> <span class="preprocessor">__endasm</span></div>
|
|
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  </div>
|
|
<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="gbdk_2emu__debug_8h.html#a5359c3e6ddab89f41f1de770cc3640d4"> 89</a></span> <span class="preprocessor">#define EMU_PROFILE_BEGIN(MSG) EMU_MESSAGE_SUFFIX(MSG, "%ZEROCLKS%"</span>);</div>
|
|
<div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="gbdk_2emu__debug_8h.html#ab5b05deda52856c84f274fb28578b6ee"> 90</a></span> <span class="preprocessor">#define BGB_PROFILE_BEGIN(MSG) EMU_PROFILE_BEGIN(MSG)</span></div>
|
|
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span> <span class="preprocessor">#if defined(NINTENDO)</span></div>
|
|
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span> <span class="preprocessor">#define EMU_PROFILE_END(MSG) EMU_MESSAGE_SUFFIX(MSG,"%-8+LASTCLKS%"</span>);</div>
|
|
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span> <span class="preprocessor">#define BGB_PROFILE_END(MSG) EMU_PROFILE_END(MSG)</span></div>
|
|
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span> <span class="preprocessor">#elif defined(SEGA)</span></div>
|
|
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span> <span class="preprocessor">#define EMU_PROFILE_END(MSG) EMU_MESSAGE_SUFFIX(MSG,"%-16+LASTCLKS%"</span>);</div>
|
|
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span> <span class="preprocessor">#define BGB_PROFILE_END(MSG) EMU_PROFILE_END(MSG)</span></div>
|
|
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span> <span class="preprocessor">#endif</span></div>
|
|
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  </div>
|
|
<div class="line"><a name="l00124"></a><span class="lineno"><a class="line" href="gbdk_2emu__debug_8h.html#ad1ca656789d7d285b352afeaa4cc56bd"> 124</a></span> <span class="preprocessor">#define EMU_TEXT(MSG) EMU_MESSAGE(MSG)</span></div>
|
|
<div class="line"><a name="l00125"></a><span class="lineno"><a class="line" href="gbdk_2emu__debug_8h.html#a6afa665bd7d093e7ca2d310cc92b08a9"> 125</a></span> <span class="preprocessor">#define BGB_TEXT(MSG) EMU_TEXT(MSG)</span></div>
|
|
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  </div>
|
|
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span> <span class="preprocessor">#if defined(NINTENDO)</span></div>
|
|
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span> <span class="keywordtype">void</span> EMU_profiler_message(<span class="keywordtype">void</span>);</div>
|
|
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span> <span class="preprocessor">#define BGB_profiler_message EMU_profiler_message()</span></div>
|
|
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span> <span class="preprocessor">#endif </span><span class="comment">// NINTENDO</span></div>
|
|
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  </div>
|
|
<div class="line"><a name="l00161"></a><span class="lineno"><a class="line" href="gbdk_2emu__debug_8h.html#a586ce1ddfba9c35726887ca31f933963"> 161</a></span> <span class="keywordtype">void</span> <a class="code" href="gbdk_2emu__debug_8h.html#a586ce1ddfba9c35726887ca31f933963">EMU_printf</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *format, ...) <a class="code" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a>;</div>
|
|
<div class="line"><a name="l00162"></a><span class="lineno"><a class="line" href="gbdk_2emu__debug_8h.html#a892ddea0cd396141c1ae05e384303cbf"> 162</a></span> <span class="preprocessor">#define BGB_printf(...) EMU_printf(__VA_ARGS__)</span></div>
|
|
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  </div>
|
|
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span> <span class="preprocessor">#ifdef NINTENDO</span></div>
|
|
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span> <span class="keyword">static</span> <span class="keywordtype">void</span> * __EMU_PROFILER_INIT = &EMU_profiler_message;</div>
|
|
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span> <span class="preprocessor">#endif </span><span class="comment">// NINTENDO</span></div>
|
|
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  </div>
|
|
<div class="line"><a name="l00170"></a><span class="lineno"><a class="line" href="gbdk_2emu__debug_8h.html#a9e856b4691d63bb41c5148b9097bd2bb"> 170</a></span> <span class="preprocessor">#define EMU_BREAKPOINT __asm__("ld b, b"</span>);</div>
|
|
<div class="line"><a name="l00171"></a><span class="lineno"><a class="line" href="gbdk_2emu__debug_8h.html#a95c9ae3faadfe6f93a3cac87085b3481"> 171</a></span> <span class="preprocessor">#define BGB_BREAKPOINT EMU_BREAKPOINT</span></div>
|
|
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  </div>
|
|
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span> <span class="preprocessor">#elif defined(__TARGET_duck)</span></div>
|
|
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span> <span class="preprocessor"> #error Not implemented yet</span></div>
|
|
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span> <span class="preprocessor">#else</span></div>
|
|
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span> <span class="preprocessor"> #error Unrecognized port</span></div>
|
|
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span> <span class="preprocessor">#endif</span></div>
|
|
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  </div>
|
|
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span> <span class="preprocessor">#endif</span></div>
|
|
<div class="ttc" id="aasm_2types_8h_html_a0971918860055db2e50dacea4da8f3bc"><div class="ttname"><a href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></div><div class="ttdeci">#define OLDCALL</div><div class="ttdef"><b>Definition:</b> types.h:21</div></div>
|
|
<div class="ttc" id="agbdk_2emu__debug_8h_html_a586ce1ddfba9c35726887ca31f933963"><div class="ttname"><a href="gbdk_2emu__debug_8h.html#a586ce1ddfba9c35726887ca31f933963">EMU_printf</a></div><div class="ttdeci">void EMU_printf(const char *format,...) OLDCALL</div></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<!-- HTML footer for doxygen 1.8.14-->
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
</div>
|
|
</body>
|
|
</html>
|