Files
gbdk-2020/docs/api/nes_8h_source.html
2025-05-09 23:47:16 -07:00

638 lines
125 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/nes/nes.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
&#160;<span id="projectnumber">4.4.0</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&amp;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&amp;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&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('nes_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">nes.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="nes_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>&#160; </div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="preprocessor">#ifndef _NES_H</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="preprocessor">#define _NES_H</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160; </div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="preprocessor">#include &lt;types.h&gt;</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="stdint_8h.html">stdint.h</a>&gt;</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="version_8h.html">gbdk/version.h</a>&gt;</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="nes_2hardware_8h.html">nes/hardware.h</a>&gt;</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="rgb__to__nes__macro_8h.html">nes/rgb_to_nes_macro.h</a>&gt;</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160; </div>
<div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="nes_8h.html#a418f95f7c7744aa18840d4101388916a"> 13</a></span>&#160;<span class="preprocessor">#define NINTENDO_NES</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160; </div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment">// Here NINTENDO means Game Boy &amp; related clones</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="preprocessor">#ifdef NINTENDO</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="preprocessor">#undef NINTENDO</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160; </div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#ifdef SEGA</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="preprocessor">#undef SEGA</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160; </div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#ifdef MSX</span></div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#undef MSX</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160; </div>
<div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="nes_8h.html#a1e73068b3ffdb8436eaa3362f104ba74"> 28</a></span>&#160;<span class="preprocessor">#define SYSTEM_BITS_NTSC 0x00</span></div>
<div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="nes_8h.html#a599f3df346be94f25498749e2442bde8"> 29</a></span>&#160;<span class="preprocessor">#define SYSTEM_BITS_PAL 0x40</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="nes_8h.html#aa370f208d677a232346ddf00a8ef7243"> 30</a></span>&#160;<span class="preprocessor">#define SYSTEM_BITS_DENDY 0x80</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="nes_8h.html#a78fd7730ed37db84f52bcfc9ff41873f">_SYSTEM</a>;</div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; </div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="nes_8h.html#a99bca2df4c6fde16a659797b4e584036"> 33</a></span>&#160;<span class="preprocessor">#define SYSTEM_60HZ 0x00</span></div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="nes_8h.html#ad6329c19927cf02579e2503e40c0bbde"> 34</a></span>&#160;<span class="preprocessor">#define SYSTEM_50HZ 0x01</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; </div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="nes_8h.html#ae85f322d3e5c6f1f1ebc934ae22f51ea"> 36</a></span>&#160;<span class="preprocessor">#define TIMER_VBLANK_PARITY_MODE_SYSTEM_60HZ 0x78</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="nes_8h.html#a9a99bab8bac700048df9d8797bed56ce"> 37</a></span>&#160;<span class="preprocessor">#define TIMER_VBLANK_PARITY_MODE_SYSTEM_50HZ 0x5D</span></div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; </div>
<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="nes_8h.html#a4a118ad3ee36468a3fa616977a64864e"> 39</a></span>&#160;<span class="preprocessor">#define RGB(r,g,b) RGB_TO_NES(((r) | ((g) &lt;&lt; 2) | ((b) &lt;&lt; 4)))</span></div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="nes_8h.html#a7d2ed0f10b2b74123a544327bbfd7564"> 40</a></span>&#160;<span class="preprocessor">#define RGB8(r,g,b) RGB_TO_NES((((r) &gt;&gt; 6) | (((g) &gt;&gt; 6) &lt;&lt; 2) | (((b) &gt;&gt; 6) &lt;&lt; 4)))</span></div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="nes_8h.html#ab5a6e450fcf10402278fe585a421dbbd"> 41</a></span>&#160;<span class="preprocessor">#define RGBHTML(RGB24bit) RGB_TO_NES((((RGB24bit) &gt;&gt; 22) | ((((RGB24bit) &amp; 0xFFFF) &gt;&gt; 14) &lt;&lt; 2) | ((((RGB24bit) &amp; 0xFF) &gt;&gt; 6) &lt;&lt; 4)))</span></div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; </div>
<div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="nes_8h.html#aa039288455af8a3812a35aa1e7b903e4"> 48</a></span>&#160;<span class="preprocessor">#define RGB_RED 0x16 </span><span class="comment">// EGA12</span></div>
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="nes_8h.html#ae29b6947ac7dca7db513e59f1cfcbf51"> 49</a></span>&#160;<span class="preprocessor">#define RGB_DARKRED 0x06 </span><span class="comment">// EGA4</span></div>
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="nes_8h.html#ab6c97468034c02fe204fd37036d9be15"> 50</a></span>&#160;<span class="preprocessor">#define RGB_GREEN 0x2A </span><span class="comment">// EGA10</span></div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="nes_8h.html#a1ee7a5d8fd635e9132a2820a60f9789d"> 51</a></span>&#160;<span class="preprocessor">#define RGB_DARKGREEN 0x1A </span><span class="comment">// EGA2</span></div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="nes_8h.html#a0eff802f1ca228046476209dc01c76ad"> 52</a></span>&#160;<span class="preprocessor">#define RGB_BLUE 0x12 </span><span class="comment">// EGA9</span></div>
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="nes_8h.html#ad44385fc245bbabf6da787dcc8930385"> 53</a></span>&#160;<span class="preprocessor">#define RGB_DARKBLUE 0x02 </span><span class="comment">// EGA1</span></div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="nes_8h.html#ad74a18fca945f257dc9d1b99f9edbd40"> 54</a></span>&#160;<span class="preprocessor">#define RGB_YELLOW 0x28 </span><span class="comment">// EGA14</span></div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="nes_8h.html#a2727da9f8c0b09a67375575a00186e2a"> 55</a></span>&#160;<span class="preprocessor">#define RGB_DARKYELLOW 0x18 </span><span class="comment">// EGA6</span></div>
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="nes_8h.html#a2ce30ac984869b55594447722b9d0579"> 56</a></span>&#160;<span class="preprocessor">#define RGB_CYAN 0x2C </span><span class="comment">// EGA11</span></div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="nes_8h.html#ae4fe0c6cfa46b0c4804425f23bb48f4c"> 57</a></span>&#160;<span class="preprocessor">#define RGB_AQUA 0x1C </span><span class="comment">// EGA3</span></div>
<div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="nes_8h.html#a59fb596d3d65cfc4d3cb7e5044b8b10a"> 58</a></span>&#160;<span class="preprocessor">#define RGB_PINK 0x24 </span><span class="comment">// EGA13</span></div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="nes_8h.html#a9d5a5f880df6bd4b64e6546839d41101"> 59</a></span>&#160;<span class="preprocessor">#define RGB_PURPLE 0x14 </span><span class="comment">// EGA5</span></div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="nes_8h.html#ae168f0f9864d4ed4be7807b9783f17f1"> 60</a></span>&#160;<span class="preprocessor">#define RGB_BLACK 0x0F </span><span class="comment">// EGA0</span></div>
<div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="nes_8h.html#a29b47e2361025eabcdc3bcbff2308044"> 61</a></span>&#160;<span class="preprocessor">#define RGB_DARKGRAY 0x00 </span><span class="comment">// EGA8</span></div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="nes_8h.html#a80efbf7b13421922fb174f3e6a3e235c"> 62</a></span>&#160;<span class="preprocessor">#define RGB_LIGHTGRAY 0x10 </span><span class="comment">// EGA7</span></div>
<div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="nes_8h.html#ac1771f95d9887118764bd8a074e537e1"> 63</a></span>&#160;<span class="preprocessor">#define RGB_WHITE 0x30 </span><span class="comment">// EGA15</span></div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; </div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="nes_8h.html#aa1843c9b694489b612595631315c1c21"> 65</a></span>&#160;<span class="keyword">typedef</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="nes_8h.html#aa1843c9b694489b612595631315c1c21">palette_color_t</a>;</div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; </div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="nes_8h.html#ab38fda7bad70c80c390aa7017c48b405"> 67</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#ab38fda7bad70c80c390aa7017c48b405">set_bkg_palette</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> first_palette, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_palettes, <span class="keyword">const</span> <a class="code" href="cgb_8h.html#af868d7cdbd052c6b972ef137e02f6495">palette_color_t</a> *rgb_data) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; </div>
<div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="nes_8h.html#a7c75cb6992e73971f24cee46aa31184b"> 69</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a7c75cb6992e73971f24cee46aa31184b">set_sprite_palette</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> first_palette, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_palettes, <span class="keyword">const</span> <a class="code" href="cgb_8h.html#af868d7cdbd052c6b972ef137e02f6495">palette_color_t</a> *rgb_data) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; </div>
<div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="nes_8h.html#aaca025055febe9f4c605bfac12812d0e"> 71</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#aaca025055febe9f4c605bfac12812d0e">set_bkg_palette_entry</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> palette, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> entry, <a class="code" href="cgb_8h.html#af868d7cdbd052c6b972ef137e02f6495">palette_color_t</a> rgb_data) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; </div>
<div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="nes_8h.html#ad2adcd1b3390b43cdade1b73d95123a0"> 73</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#ad2adcd1b3390b43cdade1b73d95123a0">set_sprite_palette_entry</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> palette, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> entry, <a class="code" href="cgb_8h.html#af868d7cdbd052c6b972ef137e02f6495">palette_color_t</a> rgb_data) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; </div>
<div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="nes_8h.html#a05ca817ab32f6da612c3ae26db5abf02"> 88</a></span>&#160;<span class="preprocessor">#define J_UP 0x08U</span></div>
<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="nes_8h.html#ae032c5c544196e37ec0432f6cfad7904"> 89</a></span>&#160;<span class="preprocessor">#define J_DOWN 0x04U</span></div>
<div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="nes_8h.html#ac70894fecac30c1ca9917f07373cf81c"> 90</a></span>&#160;<span class="preprocessor">#define J_LEFT 0x02U</span></div>
<div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="nes_8h.html#a3bad91d11ae09ffcbb3cb0a81873d325"> 91</a></span>&#160;<span class="preprocessor">#define J_RIGHT 0x01U</span></div>
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="nes_8h.html#a31af766e3b598eb7a6b63f55a4988e7a"> 92</a></span>&#160;<span class="preprocessor">#define J_A 0x80U</span></div>
<div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="nes_8h.html#ae47e59a309120f9420993f26816b5e6d"> 93</a></span>&#160;<span class="preprocessor">#define J_B 0x40U</span></div>
<div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="nes_8h.html#ab416a9d96d1582490828f4bac78a8b5b"> 94</a></span>&#160;<span class="preprocessor">#define J_SELECT 0x20U</span></div>
<div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="nes_8h.html#ab769c6e20778298be8bc3321476ceb53"> 95</a></span>&#160;<span class="preprocessor">#define J_START 0x10U</span></div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; </div>
<div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="nes_8h.html#acc9798fc62b5d626c91c8b0f20b522ff"> 101</a></span>&#160;<span class="preprocessor">#define M_DRAWING 0x01U</span></div>
<div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="nes_8h.html#af0e30d6af308ffe5a025fbe85da40f6f"> 102</a></span>&#160;<span class="preprocessor">#define M_TEXT_OUT 0x02U</span></div>
<div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="nes_8h.html#a908826e7180f94a5988ceb8633313a2e"> 103</a></span>&#160;<span class="preprocessor">#define M_TEXT_INOUT 0x03U</span></div>
<div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="nes_8h.html#a04382de20738146fe873ddfb0585052b"> 109</a></span>&#160;<span class="preprocessor">#define M_NO_SCROLL 0x04U</span></div>
<div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="nes_8h.html#aca2855edd2d28f66be551a0f7ec23f07"> 113</a></span>&#160;<span class="preprocessor">#define M_NO_INTERP 0x08U</span></div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; </div>
<div class="line"><a name="l00119"></a><span class="lineno"><a class="line" href="nes_8h.html#a54572cf6791463b6d60623837e0bb5a6"> 119</a></span>&#160;<span class="preprocessor">#define S_PALETTE 0x10U</span></div>
<div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="nes_8h.html#ae97793b4039609f93b0f7f8bddb18011"> 123</a></span>&#160;<span class="preprocessor">#define S_FLIPX 0x40U</span></div>
<div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="nes_8h.html#a4bbb9cd6c38b2317de5256d1d889c63b"> 127</a></span>&#160;<span class="preprocessor">#define S_FLIPY 0x80U</span></div>
<div class="line"><a name="l00132"></a><span class="lineno"><a class="line" href="nes_8h.html#a9506d04c2ec7d2442a52054f67d2b32f"> 132</a></span>&#160;<span class="preprocessor">#define S_PRIORITY 0x20U</span></div>
<div class="line"><a name="l00136"></a><span class="lineno"><a class="line" href="nes_8h.html#a826169925ff12d52f0a0d51f14d2936b"> 136</a></span>&#160;<span class="preprocessor">#define S_PAL(n) n</span></div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; </div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160;<span class="comment">/* Interrupt flags */</span></div>
<div class="line"><a name="l00141"></a><span class="lineno"><a class="line" href="nes_8h.html#aa027abe630d44039f238034bcb2d2f36"> 141</a></span>&#160;<span class="preprocessor">#define EMPTY_IFLAG 0x00U</span></div>
<div class="line"><a name="l00147"></a><span class="lineno"><a class="line" href="nes_8h.html#a2ca7720b9a5da9b2173e1f74dba85541"> 147</a></span>&#160;<span class="preprocessor">#define VBL_IFLAG 0x01U</span></div>
<div class="line"><a name="l00151"></a><span class="lineno"><a class="line" href="nes_8h.html#a61a9e2910380de6abb34df14ef634eb4"> 151</a></span>&#160;<span class="preprocessor">#define LCD_IFLAG 0x02U</span></div>
<div class="line"><a name="l00155"></a><span class="lineno"><a class="line" href="nes_8h.html#a604256210ec5b90b68185e1a18efab49"> 155</a></span>&#160;<span class="preprocessor">#define TIM_IFLAG 0x04U</span></div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; </div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160;<span class="comment">/* DMG Palettes */</span></div>
<div class="line"><a name="l00158"></a><span class="lineno"><a class="line" href="nes_8h.html#ab311e53739c992294ae07ca506a924ad"> 158</a></span>&#160;<span class="preprocessor">#define DMG_BLACK 0x03</span></div>
<div class="line"><a name="l00159"></a><span class="lineno"><a class="line" href="nes_8h.html#a45d13a674e169dd83df7e1f46513ccba"> 159</a></span>&#160;<span class="preprocessor">#define DMG_DARK_GRAY 0x02</span></div>
<div class="line"><a name="l00160"></a><span class="lineno"><a class="line" href="nes_8h.html#a8ccd6732d3bdf390cc0943e8567341f3"> 160</a></span>&#160;<span class="preprocessor">#define DMG_LITE_GRAY 0x01</span></div>
<div class="line"><a name="l00161"></a><span class="lineno"><a class="line" href="nes_8h.html#a11cedc2ee58acfbbfc48dfb2b9a551b3"> 161</a></span>&#160;<span class="preprocessor">#define DMG_WHITE 0x00</span></div>
<div class="line"><a name="l00181"></a><span class="lineno"><a class="line" href="nes_8h.html#a9727caafc483ba6ec65e9344b033d684"> 181</a></span>&#160;<span class="preprocessor">#define DMG_PALETTE(C0, C1, C2, C3) ((uint8_t)((((C3) &amp; 0x03) &lt;&lt; 6) | (((C2) &amp; 0x03) &lt;&lt; 4) | (((C1) &amp; 0x03) &lt;&lt; 2) | ((C0) &amp; 0x03)))</span></div>
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; </div>
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160;<span class="comment">/* Limits */</span></div>
<div class="line"><a name="l00186"></a><span class="lineno"><a class="line" href="nes_8h.html#ada0cc738d27aad251151e69cb8d250e1"> 186</a></span>&#160;<span class="preprocessor">#define SCREENWIDTH DEVICE_SCREEN_PX_WIDTH</span></div>
<div class="line"><a name="l00189"></a><span class="lineno"><a class="line" href="nes_8h.html#ae189e98d0ef9263c37869ce1ff3710a5"> 189</a></span>&#160;<span class="preprocessor">#define SCREENHEIGHT DEVICE_SCREEN_PX_HEIGHT</span></div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; </div>
<div class="line"><a name="l00193"></a><span class="lineno"><a class="line" href="nes_8h.html#a9508f919d9482d1d51534ccac212454d"> 193</a></span>&#160;<span class="keyword">typedef</span> void (*<a class="code" href="nes_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a>)(void) <a class="code" href="asm_2types_8h.html#a7ed081d8dfb6902784b2fc730bbb7f96">NONBANKED</a>;</div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; </div>
<div class="line"><a name="l00202"></a><span class="lineno"><a class="line" href="nes_8h.html#a5cc6bac1f2f0e9f71c7826a3ee8f35d0"> 202</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a5cc6bac1f2f0e9f71c7826a3ee8f35d0">remove_VBL</a>(<a class="code" href="nes_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a> <a class="code" href="gb_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160; </div>
<div class="line"><a name="l00207"></a><span class="lineno"><a class="line" href="nes_8h.html#aca7413d0441f3ce1f30cca15ce4678ab"> 207</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#aca7413d0441f3ce1f30cca15ce4678ab">remove_LCD</a>(<a class="code" href="nes_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a> <a class="code" href="gb_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160; </div>
<div class="line"><a name="l00212"></a><span class="lineno"><a class="line" href="nes_8h.html#a95b3f2754671e9aff7eb86e181d8ab99"> 212</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a95b3f2754671e9aff7eb86e181d8ab99">remove_TIM</a>(<a class="code" href="nes_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a> <a class="code" href="gb_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160; </div>
<div class="line"><a name="l00242"></a><span class="lineno"><a class="line" href="nes_8h.html#a44e3fc6c86253db08fa99fdc448b1df0"> 242</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a44e3fc6c86253db08fa99fdc448b1df0">add_VBL</a>(<a class="code" href="nes_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a> <a class="code" href="gb_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160; </div>
<div class="line"><a name="l00276"></a><span class="lineno"><a class="line" href="nes_8h.html#ad572dce0c703ed78eadcf5cd6cce7dd2"> 276</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#ad572dce0c703ed78eadcf5cd6cce7dd2">add_LCD</a>(<a class="code" href="nes_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a> <a class="code" href="gb_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160; </div>
<div class="line"><a name="l00295"></a><span class="lineno"><a class="line" href="nes_8h.html#ad0cfd2f31b0dc3f15ef7c1305e383676"> 295</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#ad0cfd2f31b0dc3f15ef7c1305e383676">add_TIM</a>(<a class="code" href="nes_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a> <a class="code" href="gb_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160; </div>
<div class="line"><a name="l00299"></a><span class="lineno"><a class="line" href="nes_8h.html#a00573fe55b0f1e2dd03b9647dfe15636"> 299</a></span>&#160;<span class="preprocessor">#define MAX_LCD_ISR_CALLS 4</span></div>
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160; </div>
<div class="line"><a name="l00307"></a><span class="lineno"><a class="line" href="nes_8h.html#ade75173639b6e7be241b8eb31fe825ef"> 307</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#ade75173639b6e7be241b8eb31fe825ef">mode</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> m) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00308"></a><span class="lineno"> 308</span>&#160; </div>
<div class="line"><a name="l00313"></a><span class="lineno"><a class="line" href="nes_8h.html#abac3c04dc3c056618aca0a0052f2cb93"> 313</a></span>&#160;<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="nes_8h.html#abac3c04dc3c056618aca0a0052f2cb93">get_mode</a>(<span class="keywordtype">void</span>) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00314"></a><span class="lineno"> 314</span>&#160; </div>
<div class="line"><a name="l00318"></a><span class="lineno"><a class="line" href="nes_8h.html#a4093fb5f45f807fe8d4a45121f3fffc5"> 318</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="nes_8h.html#a4093fb5f45f807fe8d4a45121f3fffc5">get_system</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l00319"></a><span class="lineno"> 319</span>&#160; <span class="keywordflow">if</span>(<a class="code" href="nes_8h.html#a78fd7730ed37db84f52bcfc9ff41873f">_SYSTEM</a> == <a class="code" href="nes_8h.html#a1e73068b3ffdb8436eaa3362f104ba74">SYSTEM_BITS_NTSC</a>)</div>
<div class="line"><a name="l00320"></a><span class="lineno"> 320</span>&#160; <span class="keywordflow">return</span> <a class="code" href="nes_8h.html#a99bca2df4c6fde16a659797b4e584036">SYSTEM_60HZ</a>;</div>
<div class="line"><a name="l00321"></a><span class="lineno"> 321</span>&#160; <span class="keywordflow">else</span></div>
<div class="line"><a name="l00322"></a><span class="lineno"> 322</span>&#160; <span class="keywordflow">return</span> <a class="code" href="nes_8h.html#ad6329c19927cf02579e2503e40c0bbde">SYSTEM_50HZ</a>;</div>
<div class="line"><a name="l00323"></a><span class="lineno"> 323</span>&#160;}</div>
<div class="line"><a name="l00324"></a><span class="lineno"> 324</span>&#160; </div>
<div class="line"><a name="l00331"></a><span class="lineno"> 331</span>&#160;<span class="keyword">extern</span> <span class="keyword">volatile</span> <a class="code" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> <a class="code" href="nes_8h.html#a78d2fd18666afec116f176d46debb4e7">sys_time</a>;</div>
<div class="line"><a name="l00332"></a><span class="lineno"> 332</span>&#160; </div>
<div class="line"><a name="l00343"></a><span class="lineno"> 343</span>&#160;<span class="keyword">extern</span> <span class="keyword">volatile</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="nes_8h.html#a06bab3f8bce032de0d21fbd86e14c3f3">_current_bank</a>;</div>
<div class="line"><a name="l00344"></a><span class="lineno"><a class="line" href="nes_8h.html#ae042588f20bf5a2349c8ad8716245233"> 344</a></span>&#160;<span class="preprocessor">#define CURRENT_BANK _current_bank</span></div>
<div class="line"><a name="l00345"></a><span class="lineno"> 345</span>&#160; </div>
<div class="line"><a name="l00355"></a><span class="lineno"> 355</span>&#160;<span class="preprocessor">#ifndef BANK</span></div>
<div class="line"><a name="l00356"></a><span class="lineno"><a class="line" href="nes_8h.html#a42705001e2b9897f5167b67fb36c69dd"> 356</a></span>&#160;<span class="preprocessor">#define BANK(VARNAME) ( (uint8_t) &amp; __bank_ ## VARNAME )</span></div>
<div class="line"><a name="l00357"></a><span class="lineno"> 357</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00358"></a><span class="lineno"> 358</span>&#160; </div>
<div class="line"><a name="l00371"></a><span class="lineno"><a class="line" href="nes_8h.html#a086293f2afb4c7945460a4496b20aea3"> 371</a></span>&#160;<span class="preprocessor">#define BANKREF(VARNAME) void __func_ ## VARNAME(void) __banked __naked { \</span></div>
<div class="line"><a name="l00372"></a><span class="lineno"> 372</span>&#160;<span class="preprocessor">__asm \</span></div>
<div class="line"><a name="l00373"></a><span class="lineno"> 373</span>&#160;<span class="preprocessor"> .local b___func_ ## VARNAME \</span></div>
<div class="line"><a name="l00374"></a><span class="lineno"> 374</span>&#160;<span class="preprocessor"> ___bank_ ## VARNAME = b___func_ ## VARNAME \</span></div>
<div class="line"><a name="l00375"></a><span class="lineno"> 375</span>&#160;<span class="preprocessor"> .globl ___bank_ ## VARNAME \</span></div>
<div class="line"><a name="l00376"></a><span class="lineno"> 376</span>&#160;<span class="preprocessor">__endasm; \</span></div>
<div class="line"><a name="l00377"></a><span class="lineno"> 377</span>&#160;<span class="preprocessor">}</span></div>
<div class="line"><a name="l00378"></a><span class="lineno"> 378</span>&#160; </div>
<div class="line"><a name="l00388"></a><span class="lineno"><a class="line" href="nes_8h.html#a261bba55a07b802baf99346feadd9852"> 388</a></span>&#160;<span class="preprocessor">#define BANKREF_EXTERN(VARNAME) extern const void __bank_ ## VARNAME;</span></div>
<div class="line"><a name="l00389"></a><span class="lineno"> 389</span>&#160; </div>
<div class="line"><a name="l00393"></a><span class="lineno"><a class="line" href="nes_8h.html#a412db28bcf6bda7f235d7c5d3c9d52c0"> 393</a></span>&#160;<span class="preprocessor">#define SWITCH_ROM_DUMMY(b)</span></div>
<div class="line"><a name="l00394"></a><span class="lineno"> 394</span>&#160; </div>
<div class="line"><a name="l00398"></a><span class="lineno"><a class="line" href="nes_8h.html#a2d29df5dc3791dbf77488b3322b71d6c"> 398</a></span>&#160;<span class="preprocessor">#define SWITCH_ROM_UNROM(b) _switch_prg0(b)</span></div>
<div class="line"><a name="l00399"></a><span class="lineno"> 399</span>&#160; </div>
<div class="line"><a name="l00405"></a><span class="lineno"><a class="line" href="nes_8h.html#a1e22a3b60368bb5f3705d625ac2d09cc"> 405</a></span>&#160;<span class="preprocessor">#define SWITCH_ROM SWITCH_ROM_UNROM</span></div>
<div class="line"><a name="l00406"></a><span class="lineno"> 406</span>&#160; </div>
<div class="line"><a name="l00411"></a><span class="lineno"><a class="line" href="nes_8h.html#a121feb0c32d124562f52398aa9656e7b"> 411</a></span>&#160;<span class="preprocessor">#define SWITCH_RAM(b) 0</span></div>
<div class="line"><a name="l00412"></a><span class="lineno"> 412</span>&#160; </div>
<div class="line"><a name="l00416"></a><span class="lineno"><a class="line" href="nes_8h.html#a0e9c88657beaac946231a4801481b97f"> 416</a></span>&#160;<span class="preprocessor">#define ENABLE_RAM</span></div>
<div class="line"><a name="l00417"></a><span class="lineno"> 417</span>&#160; </div>
<div class="line"><a name="l00421"></a><span class="lineno"><a class="line" href="nes_8h.html#a649d27b5587de16a66176e03a1b8ebd5"> 421</a></span>&#160;<span class="preprocessor">#define DISABLE_RAM</span></div>
<div class="line"><a name="l00422"></a><span class="lineno"> 422</span>&#160; </div>
<div class="line"><a name="l00427"></a><span class="lineno"><a class="line" href="nes_8h.html#a206e8e54468237daed636cad12a70055"> 427</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a206e8e54468237daed636cad12a70055">delay</a>(<a class="code" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> <a class="code" href="gb_8h.html#a0a3d95ad0ab8ad213016101d2e9c3d3e">d</a>) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00428"></a><span class="lineno"> 428</span>&#160; </div>
<div class="line"><a name="l00438"></a><span class="lineno"><a class="line" href="nes_8h.html#a8feed006393f8c8c070b2d29d91ec8aa"> 438</a></span>&#160;<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="nes_8h.html#a8feed006393f8c8c070b2d29d91ec8aa">joypad</a>(<span class="keywordtype">void</span>) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00439"></a><span class="lineno"> 439</span>&#160; </div>
<div class="line"><a name="l00448"></a><span class="lineno"><a class="line" href="nes_8h.html#a0029224262fa919f42f3337c298bda10"> 448</a></span>&#160;<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="nes_8h.html#a0029224262fa919f42f3337c298bda10">waitpad</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> mask) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00449"></a><span class="lineno"> 449</span>&#160; </div>
<div class="line"><a name="l00453"></a><span class="lineno"><a class="line" href="nes_8h.html#ae192e07aabd7c8b822db52c9bc1e542d"> 453</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#ae192e07aabd7c8b822db52c9bc1e542d">waitpadup</a>(<span class="keywordtype">void</span>) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00454"></a><span class="lineno"> 454</span>&#160; </div>
<div class="line"><a name="l00460"></a><span class="lineno"> 460</span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span>{</div>
<div class="line"><a name="l00461"></a><span class="lineno"> 461</span>&#160; <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> npads;</div>
<div class="line"><a name="l00462"></a><span class="lineno"> 462</span>&#160; <span class="keyword">union </span>{</div>
<div class="line"><a name="l00463"></a><span class="lineno"> 463</span>&#160; <span class="keyword">struct </span>{</div>
<div class="line"><a name="l00464"></a><span class="lineno"> 464</span>&#160; <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> joy0, joy1, joy2, joy3;</div>
<div class="line"><a name="l00465"></a><span class="lineno"> 465</span>&#160; };</div>
<div class="line"><a name="l00466"></a><span class="lineno"> 466</span>&#160; <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> joypads[4];</div>
<div class="line"><a name="l00467"></a><span class="lineno"> 467</span>&#160; };</div>
<div class="line"><a name="l00468"></a><span class="lineno"> 468</span>&#160;} <a class="code" href="structjoypads__t.html">joypads_t</a>;</div>
<div class="line"><a name="l00469"></a><span class="lineno"> 469</span>&#160; </div>
<div class="line"><a name="l00478"></a><span class="lineno"><a class="line" href="nes_8h.html#a54e98484026ce279ea5d3d0d7a3fb87a"> 478</a></span>&#160;<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="nes_8h.html#a54e98484026ce279ea5d3d0d7a3fb87a">joypad_init</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> npads, <a class="code" href="structjoypads__t.html">joypads_t</a> * joypads) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00479"></a><span class="lineno"> 479</span>&#160; </div>
<div class="line"><a name="l00484"></a><span class="lineno"><a class="line" href="nes_8h.html#af3ee931a6c78c8716cadfedd9f627b6e"> 484</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#af3ee931a6c78c8716cadfedd9f627b6e">joypad_ex</a>(<a class="code" href="structjoypads__t.html">joypads_t</a> * joypads) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00485"></a><span class="lineno"> 485</span>&#160; </div>
<div class="line"><a name="l00486"></a><span class="lineno"> 486</span>&#160; </div>
<div class="line"><a name="l00487"></a><span class="lineno"> 487</span>&#160; </div>
<div class="line"><a name="l00496"></a><span class="lineno"><a class="line" href="nes_8h.html#a232883ed798bce00a03b09705c67deef"> 496</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a232883ed798bce00a03b09705c67deef">enable_interrupts</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l00497"></a><span class="lineno"> 497</span>&#160; __asm__(<span class="stringliteral">&quot;cli&quot;</span>);</div>
<div class="line"><a name="l00498"></a><span class="lineno"> 498</span>&#160;}</div>
<div class="line"><a name="l00499"></a><span class="lineno"> 499</span>&#160; </div>
<div class="line"><a name="l00512"></a><span class="lineno"><a class="line" href="nes_8h.html#a2b17818c7916bc2ff75196ff0627b1e9"> 512</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a2b17818c7916bc2ff75196ff0627b1e9">disable_interrupts</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l00513"></a><span class="lineno"> 513</span>&#160; __asm__(<span class="stringliteral">&quot;sei&quot;</span>);</div>
<div class="line"><a name="l00514"></a><span class="lineno"> 514</span>&#160;}</div>
<div class="line"><a name="l00515"></a><span class="lineno"> 515</span>&#160; </div>
<div class="line"><a name="l00521"></a><span class="lineno"><a class="line" href="nes_8h.html#a188c65cfeab067cc2b6dcbc97bf24a82"> 521</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a188c65cfeab067cc2b6dcbc97bf24a82">set_interrupts</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> flags) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00522"></a><span class="lineno"> 522</span>&#160; </div>
<div class="line"><a name="l00534"></a><span class="lineno"><a class="line" href="gb_8h.html#a3aea9deb2a0bfea9ff05a898f4822e31"> 534</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a3aea9deb2a0bfea9ff05a898f4822e31">reset</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l00535"></a><span class="lineno"> 535</span>&#160; __asm__(<span class="stringliteral">&quot;jmp [0xFFFC]&quot;</span>);</div>
<div class="line"><a name="l00536"></a><span class="lineno"> 536</span>&#160;}</div>
<div class="line"><a name="l00537"></a><span class="lineno"> 537</span>&#160; </div>
<div class="line"><a name="l00547"></a><span class="lineno"><a class="line" href="nes_8h.html#a73b4e18d7f5eaf5398bf0241c9c21586"> 547</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a73b4e18d7f5eaf5398bf0241c9c21586">vsync</a>(<span class="keywordtype">void</span>) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00548"></a><span class="lineno"> 548</span>&#160; </div>
<div class="line"><a name="l00551"></a><span class="lineno"><a class="line" href="nes_8h.html#a64538fb78ce148a1a7045245f084a710"> 551</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a64538fb78ce148a1a7045245f084a710">wait_vbl_done</a>(<span class="keywordtype">void</span>) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00552"></a><span class="lineno"> 552</span>&#160; </div>
<div class="line"><a name="l00557"></a><span class="lineno"><a class="line" href="nes_8h.html#a42756a31babdcb4b7e692960a069b13b"> 557</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a42756a31babdcb4b7e692960a069b13b">display_on</a>(<span class="keywordtype">void</span>) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00558"></a><span class="lineno"> 558</span>&#160; </div>
<div class="line"><a name="l00562"></a><span class="lineno"> 562</span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a98aab5a3d75429f9e7861a8100629782">display_off</a>(<span class="keywordtype">void</span>) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00563"></a><span class="lineno"> 563</span>&#160; </div>
<div class="line"><a name="l00566"></a><span class="lineno"><a class="line" href="nes_8h.html#a70802f5e313285aa3ea04b0f73b2700f"> 566</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a70802f5e313285aa3ea04b0f73b2700f">refresh_OAM</a>(<span class="keywordtype">void</span>) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00567"></a><span class="lineno"> 567</span>&#160; </div>
<div class="line"><a name="l00571"></a><span class="lineno"><a class="line" href="nes_8h.html#a5ae6b05b3e1559c97f0d1b2daaaa0ee4"> 571</a></span>&#160;<span class="preprocessor">#define DISPLAY_ON \</span></div>
<div class="line"><a name="l00572"></a><span class="lineno"> 572</span>&#160;<span class="preprocessor"> display_on();</span></div>
<div class="line"><a name="l00573"></a><span class="lineno"> 573</span>&#160; </div>
<div class="line"><a name="l00577"></a><span class="lineno"><a class="line" href="nes_8h.html#ad2ec9831813c5e7069917aa4455af682"> 577</a></span>&#160;<span class="preprocessor">#define DISPLAY_OFF \</span></div>
<div class="line"><a name="l00578"></a><span class="lineno"> 578</span>&#160;<span class="preprocessor"> display_off();</span></div>
<div class="line"><a name="l00579"></a><span class="lineno"> 579</span>&#160; </div>
<div class="line"><a name="l00583"></a><span class="lineno"><a class="line" href="nes_8h.html#a0659212acd317ccdebc0ecf435df330f"> 583</a></span>&#160;<span class="preprocessor">#define HIDE_LEFT_COLUMN \</span></div>
<div class="line"><a name="l00584"></a><span class="lineno"> 584</span>&#160;<span class="preprocessor"> shadow_PPUMASK &amp;= ~(PPUMASK_SHOW_BG_LC | PPUMASK_SHOW_SPR_LC); \</span></div>
<div class="line"><a name="l00585"></a><span class="lineno"> 585</span>&#160;<span class="preprocessor"></span> </div>
<div class="line"><a name="l00589"></a><span class="lineno"><a class="line" href="nes_8h.html#a5497c2255a9474d397446710189eacbe"> 589</a></span>&#160;<span class="preprocessor">#define SHOW_LEFT_COLUMN \</span></div>
<div class="line"><a name="l00590"></a><span class="lineno"> 590</span>&#160;<span class="preprocessor"> shadow_PPUMASK |= (PPUMASK_SHOW_BG_LC | PPUMASK_SHOW_SPR_LC);</span></div>
<div class="line"><a name="l00591"></a><span class="lineno"> 591</span>&#160; </div>
<div class="line"><a name="l00595"></a><span class="lineno"><a class="line" href="nes_8h.html#a3f3f7bd5879b807acbb203ce2aaa1e5d"> 595</a></span>&#160;<span class="preprocessor">#define SET_BORDER_COLOR(C)</span></div>
<div class="line"><a name="l00596"></a><span class="lineno"> 596</span>&#160; </div>
<div class="line"><a name="l00600"></a><span class="lineno"><a class="line" href="nes_8h.html#a8e3f36aa68ac036695816757f2a1322c"> 600</a></span>&#160;<span class="preprocessor">#define SHOW_BKG \</span></div>
<div class="line"><a name="l00601"></a><span class="lineno"> 601</span>&#160;<span class="preprocessor"> shadow_PPUMASK |= PPUMASK_SHOW_BG;</span></div>
<div class="line"><a name="l00602"></a><span class="lineno"> 602</span>&#160; </div>
<div class="line"><a name="l00606"></a><span class="lineno"><a class="line" href="nes_8h.html#a6d25f7c43b1cbbb48b95cda7ab2c3141"> 606</a></span>&#160;<span class="preprocessor">#define HIDE_BKG \</span></div>
<div class="line"><a name="l00607"></a><span class="lineno"> 607</span>&#160;<span class="preprocessor"> shadow_PPUMASK &amp;= ~PPUMASK_SHOW_BG;</span></div>
<div class="line"><a name="l00608"></a><span class="lineno"> 608</span>&#160; </div>
<div class="line"><a name="l00612"></a><span class="lineno"><a class="line" href="nes_8h.html#a495bc9f405f916f02ad5d97e6e730134"> 612</a></span>&#160;<span class="preprocessor">#define SHOW_SPRITES \</span></div>
<div class="line"><a name="l00613"></a><span class="lineno"> 613</span>&#160;<span class="preprocessor"> shadow_PPUMASK |= PPUMASK_SHOW_SPR;</span></div>
<div class="line"><a name="l00614"></a><span class="lineno"> 614</span>&#160; </div>
<div class="line"><a name="l00618"></a><span class="lineno"><a class="line" href="nes_8h.html#a69ef98aee664b8abd8d1a3d45f016dda"> 618</a></span>&#160;<span class="preprocessor">#define HIDE_SPRITES \</span></div>
<div class="line"><a name="l00619"></a><span class="lineno"> 619</span>&#160;<span class="preprocessor"> shadow_PPUMASK &amp;= ~PPUMASK_SHOW_SPR;</span></div>
<div class="line"><a name="l00620"></a><span class="lineno"> 620</span>&#160; </div>
<div class="line"><a name="l00624"></a><span class="lineno"><a class="line" href="nes_8h.html#af91d252f07f4764996154820f970c101"> 624</a></span>&#160;<span class="preprocessor">#define SPRITES_8x16 \</span></div>
<div class="line"><a name="l00625"></a><span class="lineno"> 625</span>&#160;<span class="preprocessor"> shadow_PPUCTRL |= PPUCTRL_SPR_8X16;</span></div>
<div class="line"><a name="l00626"></a><span class="lineno"> 626</span>&#160; </div>
<div class="line"><a name="l00630"></a><span class="lineno"><a class="line" href="nes_8h.html#aa87bec0d134136fdb727f52cb773b792"> 630</a></span>&#160;<span class="preprocessor">#define SPRITES_8x8 \</span></div>
<div class="line"><a name="l00631"></a><span class="lineno"> 631</span>&#160;<span class="preprocessor"> shadow_PPUCTRL &amp;= ~PPUCTRL_SPR_8X16;</span></div>
<div class="line"><a name="l00632"></a><span class="lineno"> 632</span>&#160; </div>
<div class="line"><a name="l00633"></a><span class="lineno"> 633</span>&#160; </div>
<div class="line"><a name="l00634"></a><span class="lineno"> 634</span>&#160; </div>
<div class="line"><a name="l00641"></a><span class="lineno"><a class="line" href="nes_8h.html#a49635449fc261be2481b72d0165f12ad"> 641</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a49635449fc261be2481b72d0165f12ad">set_vram_byte</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> * addr, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> v) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00642"></a><span class="lineno"> 642</span>&#160; </div>
<div class="line"><a name="l00646"></a><span class="lineno"><a class="line" href="nes_8h.html#aa81b3eb2f6ec56d70ccd27c7deae4098"> 646</a></span>&#160;<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> * <a class="code" href="nes_8h.html#aa81b3eb2f6ec56d70ccd27c7deae4098">get_bkg_xy_addr</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00647"></a><span class="lineno"> 647</span>&#160; </div>
<div class="line"><a name="l00648"></a><span class="lineno"><a class="line" href="nes_8h.html#a67f80e65620470b55a4950e2966eb868"> 648</a></span>&#160;<span class="preprocessor">#define COMPAT_PALETTE(C0,C1,C2,C3) ((uint8_t)(((C3) &lt;&lt; 6) | ((C2) &lt;&lt; 4) | ((C1) &lt;&lt; 2) | (C0)))</span></div>
<div class="line"><a name="l00649"></a><span class="lineno"> 649</span>&#160; </div>
<div class="line"><a name="l00652"></a><span class="lineno"><a class="line" href="nes_8h.html#aa224c9bac27c7fd268e62bdf33338a84"> 652</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="nes_8h.html#aa224c9bac27c7fd268e62bdf33338a84">set_2bpp_palette</a>(<a class="code" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> palette) {</div>
<div class="line"><a name="l00653"></a><span class="lineno"> 653</span>&#160; palette;</div>
<div class="line"><a name="l00654"></a><span class="lineno"> 654</span>&#160;}</div>
<div class="line"><a name="l00655"></a><span class="lineno"> 655</span>&#160; </div>
<div class="line"><a name="l00656"></a><span class="lineno"> 656</span>&#160;<span class="keyword">extern</span> <a class="code" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> <a class="code" href="nes_8h.html#a250f5339e05523912926be566e9eb8c0">_current_1bpp_colors</a>;</div>
<div class="line"><a name="l00657"></a><span class="lineno"><a class="line" href="nes_8h.html#a050b8b27fe6af3efcc17cd804f808d7a"> 657</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a050b8b27fe6af3efcc17cd804f808d7a">set_1bpp_colors_ex</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> fgcolor, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> bgcolor, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="nes_8h.html#ade75173639b6e7be241b8eb31fe825ef">mode</a>) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00658"></a><span class="lineno"><a class="line" href="nes_8h.html#adcb394299a1033616fc7d2faec8bd6ad"> 658</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="nes_8h.html#adcb394299a1033616fc7d2faec8bd6ad">set_1bpp_colors</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> fgcolor, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> bgcolor) {</div>
<div class="line"><a name="l00659"></a><span class="lineno"> 659</span>&#160; <a class="code" href="nes_8h.html#a050b8b27fe6af3efcc17cd804f808d7a">set_1bpp_colors_ex</a>(fgcolor, bgcolor, 0);</div>
<div class="line"><a name="l00660"></a><span class="lineno"> 660</span>&#160;}</div>
<div class="line"><a name="l00661"></a><span class="lineno"> 661</span>&#160; </div>
<div class="line"><a name="l00671"></a><span class="lineno"><a class="line" href="nes_8h.html#a4eb0e4c6c672efdeb49c3cdba2fa4d4a"> 671</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a4eb0e4c6c672efdeb49c3cdba2fa4d4a">set_bkg_data</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> first_tile, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_tiles, <span class="keyword">const</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00672"></a><span class="lineno"><a class="line" href="nes_8h.html#ab94bfec130df50d9cb808142f94603a5"> 672</a></span>&#160;<span class="preprocessor">#define set_bkg_2bpp_data set_bkg_data</span></div>
<div class="line"><a name="l00673"></a><span class="lineno"> 673</span>&#160; </div>
<div class="line"><a name="l00685"></a><span class="lineno"><a class="line" href="nes_8h.html#a92d990e45d1cc8e28d98a87b0b9d70ff"> 685</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a92d990e45d1cc8e28d98a87b0b9d70ff">set_bkg_1bpp_data</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> first_tile, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_tiles, <span class="keyword">const</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00686"></a><span class="lineno"> 686</span>&#160; </div>
<div class="line"><a name="l00705"></a><span class="lineno"><a class="line" href="nes_8h.html#a6ab3fa75195d44d8d7e867d4a4cb1131"> 705</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a6ab3fa75195d44d8d7e867d4a4cb1131">set_bkg_tiles</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, <span class="keyword">const</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *tiles) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00706"></a><span class="lineno"><a class="line" href="nes_8h.html#a55f82ff980398dd97036fd936ebd727e"> 706</a></span>&#160;<span class="preprocessor">#define set_tile_map set_bkg_tiles</span></div>
<div class="line"><a name="l00707"></a><span class="lineno"> 707</span>&#160; </div>
<div class="line"><a name="l00731"></a><span class="lineno"><a class="line" href="nes_8h.html#a0254d6e23d4202cb070b1fe54c6a7210"> 731</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a0254d6e23d4202cb070b1fe54c6a7210">set_bkg_attributes_nes16x16</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, <span class="keyword">const</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *attributes) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00732"></a><span class="lineno"> 732</span>&#160; </div>
<div class="line"><a name="l00756"></a><span class="lineno"><a class="line" href="nes_8h.html#a8278909fae5ed243e03f8815ac95bab3"> 756</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a8278909fae5ed243e03f8815ac95bab3">set_bkg_attributes</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, <span class="keyword">const</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *attributes)</div>
<div class="line"><a name="l00757"></a><span class="lineno"> 757</span>&#160;{</div>
<div class="line"><a name="l00758"></a><span class="lineno"> 758</span>&#160; <a class="code" href="nes_8h.html#a0254d6e23d4202cb070b1fe54c6a7210">set_bkg_attributes_nes16x16</a>(x &gt;&gt; 1, y &gt;&gt; 1, (w + 1) &gt;&gt; 1, (<a class="code" href="gb_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a> + 1) &gt;&gt; 1, attributes);</div>
<div class="line"><a name="l00759"></a><span class="lineno"> 759</span>&#160;}</div>
<div class="line"><a name="l00805"></a><span class="lineno"><a class="line" href="nes_8h.html#aadba8b700b97ec97dc9c488496619fd9"> 805</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#aadba8b700b97ec97dc9c488496619fd9">set_bkg_submap_attributes_nes16x16</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, <span class="keyword">const</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *map, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> map_w) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00806"></a><span class="lineno"> 806</span>&#160; </div>
<div class="line"><a name="l00819"></a><span class="lineno"><a class="line" href="nes_8h.html#a34490cffc1e857ac41c880b6bca92c4f"> 819</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a34490cffc1e857ac41c880b6bca92c4f">set_bkg_submap_attributes</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, <span class="keyword">const</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *attributes, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> map_w)</div>
<div class="line"><a name="l00820"></a><span class="lineno"> 820</span>&#160;{</div>
<div class="line"><a name="l00821"></a><span class="lineno"> 821</span>&#160; <a class="code" href="nes_8h.html#aadba8b700b97ec97dc9c488496619fd9">set_bkg_submap_attributes_nes16x16</a>(x &gt;&gt; 1, y &gt;&gt; 1, (w + 1) &gt;&gt; 1, (<a class="code" href="gb_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a> + 1) &gt;&gt; 1, attributes, (map_w + 1) &gt;&gt; 1);</div>
<div class="line"><a name="l00822"></a><span class="lineno"> 822</span>&#160;}</div>
<div class="line"><a name="l00823"></a><span class="lineno"> 823</span>&#160; </div>
<div class="line"><a name="l00824"></a><span class="lineno"> 824</span>&#160; </div>
<div class="line"><a name="l00825"></a><span class="lineno"> 825</span>&#160;<span class="keyword">extern</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="nes_8h.html#aa82205e9629f984d0b3dc8055c211522">_map_tile_offset</a>;</div>
<div class="line"><a name="l00826"></a><span class="lineno"> 826</span>&#160; </div>
<div class="line"><a name="l00845"></a><span class="lineno"><a class="line" href="nes_8h.html#a811c386cac0df2d260aacb5a43608be5"> 845</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a811c386cac0df2d260aacb5a43608be5">set_bkg_based_tiles</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, <span class="keyword">const</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *tiles, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_tile) {</div>
<div class="line"><a name="l00846"></a><span class="lineno"> 846</span>&#160; <a class="code" href="nes_8h.html#aa82205e9629f984d0b3dc8055c211522">_map_tile_offset</a> = base_tile;</div>
<div class="line"><a name="l00847"></a><span class="lineno"> 847</span>&#160; <a class="code" href="nes_8h.html#a6ab3fa75195d44d8d7e867d4a4cb1131">set_bkg_tiles</a>(x, y, w, <a class="code" href="gb_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, tiles);</div>
<div class="line"><a name="l00848"></a><span class="lineno"> 848</span>&#160; <a class="code" href="nes_8h.html#aa82205e9629f984d0b3dc8055c211522">_map_tile_offset</a> = 0;</div>
<div class="line"><a name="l00849"></a><span class="lineno"> 849</span>&#160;}</div>
<div class="line"><a name="l00850"></a><span class="lineno"> 850</span>&#160; </div>
<div class="line"><a name="l00851"></a><span class="lineno"> 851</span>&#160; </div>
<div class="line"><a name="l00880"></a><span class="lineno"> 880</span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#ac2c9fd8d613ad8ba52227c5a056e56fa">set_bkg_submap</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, <span class="keyword">const</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *map, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> map_w) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00881"></a><span class="lineno"><a class="line" href="nes_8h.html#adb5d0970167b81401113812773c90838"> 881</a></span>&#160;<span class="preprocessor">#define set_tile_submap set_bkg_submap</span></div>
<div class="line"><a name="l00882"></a><span class="lineno"> 882</span>&#160; </div>
<div class="line"><a name="l00883"></a><span class="lineno"> 883</span>&#160; </div>
<div class="line"><a name="l00884"></a><span class="lineno"> 884</span>&#160;<span class="keyword">extern</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="nes_8h.html#ab472d9bbb1bcfd141374f5babc71934c">_submap_tile_offset</a>;</div>
<div class="line"><a name="l00885"></a><span class="lineno"> 885</span>&#160; </div>
<div class="line"><a name="l00905"></a><span class="lineno"><a class="line" href="nes_8h.html#abc8bc5808620a9717263b8c9ec2237f0"> 905</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="nes_8h.html#abc8bc5808620a9717263b8c9ec2237f0">set_bkg_based_submap</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, <span class="keyword">const</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *map, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> map_w, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_tile) {</div>
<div class="line"><a name="l00906"></a><span class="lineno"> 906</span>&#160; <a class="code" href="nes_8h.html#ab472d9bbb1bcfd141374f5babc71934c">_submap_tile_offset</a> = base_tile;</div>
<div class="line"><a name="l00907"></a><span class="lineno"> 907</span>&#160; <a class="code" href="nes_8h.html#ac2c9fd8d613ad8ba52227c5a056e56fa">set_bkg_submap</a>(x, y, w, <a class="code" href="gb_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, map, map_w);</div>
<div class="line"><a name="l00908"></a><span class="lineno"> 908</span>&#160; <a class="code" href="nes_8h.html#ab472d9bbb1bcfd141374f5babc71934c">_submap_tile_offset</a> = 0;</div>
<div class="line"><a name="l00909"></a><span class="lineno"> 909</span>&#160;}</div>
<div class="line"><a name="l00910"></a><span class="lineno"> 910</span>&#160; </div>
<div class="line"><a name="l00911"></a><span class="lineno"> 911</span>&#160; </div>
<div class="line"><a name="l00923"></a><span class="lineno"><a class="line" href="nes_8h.html#ab8d3e0c6cb1c5687806defef521f8fd2"> 923</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#ab8d3e0c6cb1c5687806defef521f8fd2">get_bkg_tiles</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *tiles) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00924"></a><span class="lineno"> 924</span>&#160; </div>
<div class="line"><a name="l00925"></a><span class="lineno"> 925</span>&#160; </div>
<div class="line"><a name="l00933"></a><span class="lineno"><a class="line" href="nes_8h.html#a31655c4b138654e803e295bd4413759c"> 933</a></span>&#160;<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> * <a class="code" href="nes_8h.html#a31655c4b138654e803e295bd4413759c">set_bkg_tile_xy</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> t) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00934"></a><span class="lineno"><a class="line" href="nes_8h.html#a3b235c526c517fb02d20cdea780ee2c5"> 934</a></span>&#160;<span class="preprocessor">#define set_tile_xy set_bkg_tile_xy</span></div>
<div class="line"><a name="l00935"></a><span class="lineno"> 935</span>&#160; </div>
<div class="line"><a name="l00943"></a><span class="lineno"><a class="line" href="nes_8h.html#a7b7c27e672467f08097f744f3530bbc7"> 943</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a7b7c27e672467f08097f744f3530bbc7">set_bkg_attribute_xy_nes16x16</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> a) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00944"></a><span class="lineno"> 944</span>&#160; </div>
<div class="line"><a name="l00957"></a><span class="lineno"><a class="line" href="nes_8h.html#a7cd23c81062d37753a4429b794907524"> 957</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a7cd23c81062d37753a4429b794907524">set_bkg_attribute_xy</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> a)</div>
<div class="line"><a name="l00958"></a><span class="lineno"> 958</span>&#160;{</div>
<div class="line"><a name="l00959"></a><span class="lineno"> 959</span>&#160; <a class="code" href="nes_8h.html#a7b7c27e672467f08097f744f3530bbc7">set_bkg_attribute_xy_nes16x16</a>(x &gt;&gt; 1, y &gt;&gt; 1, a);</div>
<div class="line"><a name="l00960"></a><span class="lineno"> 960</span>&#160;}</div>
<div class="line"><a name="l00961"></a><span class="lineno"><a class="line" href="nes_8h.html#ad7a73323735000cf26196e073cbbdcbf"> 961</a></span>&#160;<span class="preprocessor">#define set_attribute_xy set_bkg_attribute_xy</span></div>
<div class="line"><a name="l00962"></a><span class="lineno"> 962</span>&#160; </div>
<div class="line"><a name="l00969"></a><span class="lineno"><a class="line" href="nes_8h.html#adaca04ce3d7213e6d0348196cd592780"> 969</a></span>&#160;<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="nes_8h.html#adaca04ce3d7213e6d0348196cd592780">get_bkg_tile_xy</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l00970"></a><span class="lineno"> 970</span>&#160; </div>
<div class="line"><a name="l00971"></a><span class="lineno"> 971</span>&#160; </div>
<div class="line"><a name="l00985"></a><span class="lineno"><a class="line" href="nes_8h.html#a6261537edc74068e3f7f057e6a3e8a57"> 985</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a6261537edc74068e3f7f057e6a3e8a57">move_bkg</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y) {</div>
<div class="line"><a name="l00986"></a><span class="lineno"> 986</span>&#160; <a class="code" href="nes_2hardware_8h.html#a406100d23af09b16e4b43a2d0eefe741">bkg_scroll_x</a> = x, <a class="code" href="nes_2hardware_8h.html#ad6629a16788cf8cc495555d7fae64d9f">bkg_scroll_y</a> = y;</div>
<div class="line"><a name="l00987"></a><span class="lineno"> 987</span>&#160;}</div>
<div class="line"><a name="l00988"></a><span class="lineno"> 988</span>&#160; </div>
<div class="line"><a name="l00989"></a><span class="lineno"> 989</span>&#160; </div>
<div class="line"><a name="l00999"></a><span class="lineno"><a class="line" href="nes_8h.html#a1f583f7a880daa6145ca78b086a209d1"> 999</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a1f583f7a880daa6145ca78b086a209d1">scroll_bkg</a>(<a class="code" href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a> x, <a class="code" href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a> y) {</div>
<div class="line"><a name="l01000"></a><span class="lineno"> 1000</span>&#160; <a class="code" href="nes_2hardware_8h.html#a406100d23af09b16e4b43a2d0eefe741">bkg_scroll_x</a> += x, <a class="code" href="nes_2hardware_8h.html#ad6629a16788cf8cc495555d7fae64d9f">bkg_scroll_y</a> += y;</div>
<div class="line"><a name="l01001"></a><span class="lineno"> 1001</span>&#160;}</div>
<div class="line"><a name="l01002"></a><span class="lineno"> 1002</span>&#160; </div>
<div class="line"><a name="l01003"></a><span class="lineno"> 1003</span>&#160; </div>
<div class="line"><a name="l01015"></a><span class="lineno"><a class="line" href="nes_8h.html#adc0ef4fa6435ca3a1aac93f533eb85da"> 1015</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#adc0ef4fa6435ca3a1aac93f533eb85da">set_sprite_data</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> first_tile, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_tiles, <span class="keyword">const</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l01016"></a><span class="lineno"><a class="line" href="nes_8h.html#a43b4f0ba65856deef626c0d9e7e41ed4"> 1016</a></span>&#160;<span class="preprocessor">#define set_sprite_2bpp_data set_sprite_data</span></div>
<div class="line"><a name="l01017"></a><span class="lineno"> 1017</span>&#160; </div>
<div class="line"><a name="l01029"></a><span class="lineno"><a class="line" href="nes_8h.html#a6372e69db6290fbc0e73244dbe15f903"> 1029</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a6372e69db6290fbc0e73244dbe15f903">set_sprite_1bpp_data</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> first_tile, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_tiles, <span class="keyword">const</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l01030"></a><span class="lineno"> 1030</span>&#160; </div>
<div class="line"><a name="l01037"></a><span class="lineno"> 1037</span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_o_a_m__item__t.html">OAM_item_t</a> {</div>
<div class="line"><a name="l01038"></a><span class="lineno"> 1038</span>&#160; <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="struct_o_a_m__item__t.html#ad5ad9d3d300858bf0b1cd9e210366a18">y</a>; <span class="comment">//&lt; Y coordinate of the sprite on screen - 1</span></div>
<div class="line"><a name="l01039"></a><span class="lineno"> 1039</span>&#160; <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="struct_o_a_m__item__t.html#a6c269ed01269d02bcf7e36e0de3696f6">tile</a>; <span class="comment">//&lt; Sprite tile number</span></div>
<div class="line"><a name="l01040"></a><span class="lineno"> 1040</span>&#160; <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="struct_o_a_m__item__t.html#a435e018f3bbc0ebaa9eaf96806d386d9">prop</a>; <span class="comment">//&lt; OAM Property Flags</span></div>
<div class="line"><a name="l01041"></a><span class="lineno"> 1041</span>&#160; <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="struct_o_a_m__item__t.html#a3a13fb7441f8c431d9494cd2441c6c0b">x</a>; <span class="comment">//&lt; X coordinate of the sprite on screen</span></div>
<div class="line"><a name="l01042"></a><span class="lineno"><a class="line" href="nes_8h.html#a8e5ea12b86bdfc812448c2f5c4336c03"> 1042</a></span>&#160;} <a class="code" href="nes_8h.html#a8e5ea12b86bdfc812448c2f5c4336c03">OAM_item_t</a>;</div>
<div class="line"><a name="l01043"></a><span class="lineno"> 1043</span>&#160; </div>
<div class="line"><a name="l01044"></a><span class="lineno"> 1044</span>&#160; </div>
<div class="line"><a name="l01047"></a><span class="lineno"> 1047</span>&#160;<span class="keyword">extern</span> <span class="keyword">volatile</span> <span class="keyword">struct </span><a class="code" href="struct_o_a_m__item__t.html">OAM_item_t</a> <a class="code" href="nes_8h.html#a3619f9cb1e3c92238a033ead79a0c551">shadow_OAM</a>[];</div>
<div class="line"><a name="l01048"></a><span class="lineno"> 1048</span>&#160; </div>
<div class="line"><a name="l01051"></a><span class="lineno"> 1051</span>&#160;<span class="keyword">extern</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="nes_8h.html#a6286d69d5fb1133edd0c01c9545c62e4">_shadow_OAM_base</a>;</div>
<div class="line"><a name="l01052"></a><span class="lineno"> 1052</span>&#160; </div>
<div class="line"><a name="l01053"></a><span class="lineno"><a class="line" href="nes_8h.html#a47607089a434dcda7a8583cfca03b604"> 1053</a></span>&#160;<span class="preprocessor">#define DISABLE_OAM_DMA \</span></div>
<div class="line"><a name="l01054"></a><span class="lineno"> 1054</span>&#160;<span class="preprocessor"> _shadow_OAM_base = 0</span></div>
<div class="line"><a name="l01055"></a><span class="lineno"> 1055</span>&#160; </div>
<div class="line"><a name="l01058"></a><span class="lineno"><a class="line" href="nes_8h.html#abfd70bf31185a4900680977c9fb5a5ec"> 1058</a></span>&#160;<span class="preprocessor">#define DISABLE_VBL_TRANSFER DISABLE_OAM_DMA</span></div>
<div class="line"><a name="l01059"></a><span class="lineno"> 1059</span>&#160; </div>
<div class="line"><a name="l01060"></a><span class="lineno"><a class="line" href="nes_8h.html#a20895d53fe9caacb08ce8b071d57ce53"> 1060</a></span>&#160;<span class="preprocessor">#define ENABLE_OAM_DMA \</span></div>
<div class="line"><a name="l01061"></a><span class="lineno"> 1061</span>&#160;<span class="preprocessor"> _shadow_OAM_base = (uint8_t)((uint16_t)&amp;shadow_OAM &gt;&gt; 8)</span></div>
<div class="line"><a name="l01062"></a><span class="lineno"> 1062</span>&#160; </div>
<div class="line"><a name="l01065"></a><span class="lineno"><a class="line" href="nes_8h.html#a77d516c9d3f86f100eddea5e0d133a76"> 1065</a></span>&#160;<span class="preprocessor">#define ENABLE_VBL_TRANSFER ENABLE_OAM_DMA</span></div>
<div class="line"><a name="l01066"></a><span class="lineno"> 1066</span>&#160; </div>
<div class="line"><a name="l01069"></a><span class="lineno"><a class="line" href="nes_8h.html#a8b77608c87a9aef65a03531482b2163b"> 1069</a></span>&#160;<span class="preprocessor">#define MAX_HARDWARE_SPRITES 64</span></div>
<div class="line"><a name="l01070"></a><span class="lineno"> 1070</span>&#160; </div>
<div class="line"><a name="l01073"></a><span class="lineno"><a class="line" href="nes_8h.html#afc296eacbda6a42f2a71aacab376ceb7"> 1073</a></span>&#160;<span class="preprocessor">#define HARDWARE_SPRITE_CAN_FLIP_X 1</span></div>
<div class="line"><a name="l01074"></a><span class="lineno"> 1074</span>&#160; </div>
<div class="line"><a name="l01077"></a><span class="lineno"><a class="line" href="nes_8h.html#a9119d69d971f6bee9e55d0df8f0ac983"> 1077</a></span>&#160;<span class="preprocessor">#define HARDWARE_SPRITE_CAN_FLIP_Y 1</span></div>
<div class="line"><a name="l01078"></a><span class="lineno"> 1078</span>&#160; </div>
<div class="line"><a name="l01081"></a><span class="lineno"><a class="line" href="nes_8h.html#a7e0cdfd6b9a2ae1b7f30384f132d8687"> 1081</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a7e0cdfd6b9a2ae1b7f30384f132d8687">SET_SHADOW_OAM_ADDRESS</a>(<span class="keywordtype">void</span> * address) {</div>
<div class="line"><a name="l01082"></a><span class="lineno"> 1082</span>&#160; <a class="code" href="nes_8h.html#a6286d69d5fb1133edd0c01c9545c62e4">_shadow_OAM_base</a> = (<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>)((<a class="code" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)address &gt;&gt; 8);</div>
<div class="line"><a name="l01083"></a><span class="lineno"> 1083</span>&#160;}</div>
<div class="line"><a name="l01084"></a><span class="lineno"> 1084</span>&#160; </div>
<div class="line"><a name="l01098"></a><span class="lineno"> 1098</span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a2d30754c442641bdd882ab595dd77468">set_sprite_tile</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="struct_o_a_m__item__t.html#a6c269ed01269d02bcf7e36e0de3696f6">tile</a>) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l01099"></a><span class="lineno"> 1099</span>&#160; </div>
<div class="line"><a name="l01100"></a><span class="lineno"> 1100</span>&#160; </div>
<div class="line"><a name="l01107"></a><span class="lineno"> 1107</span>&#160;<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="nes_8h.html#a58eab770442930dad603ffba2b5d28f3">get_sprite_tile</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l01108"></a><span class="lineno"> 1108</span>&#160; </div>
<div class="line"><a name="l01109"></a><span class="lineno"> 1109</span>&#160; </div>
<div class="line"><a name="l01147"></a><span class="lineno"> 1147</span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a96b6dd8b1dcb44f540baa6093b54154b">set_sprite_prop</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="struct_o_a_m__item__t.html#a435e018f3bbc0ebaa9eaf96806d386d9">prop</a>) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l01148"></a><span class="lineno"> 1148</span>&#160; </div>
<div class="line"><a name="l01149"></a><span class="lineno"> 1149</span>&#160; </div>
<div class="line"><a name="l01155"></a><span class="lineno"> 1155</span>&#160;<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="nes_8h.html#a7f2058d3fe9c08127fd6f596a5df41c9">get_sprite_prop</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l01156"></a><span class="lineno"> 1156</span>&#160; </div>
<div class="line"><a name="l01157"></a><span class="lineno"> 1157</span>&#160; </div>
<div class="line"><a name="l01167"></a><span class="lineno"> 1167</span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a3e80bb115f7212eb72a5f341fdc408d7">move_sprite</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="struct_o_a_m__item__t.html#a3a13fb7441f8c431d9494cd2441c6c0b">x</a>, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="struct_o_a_m__item__t.html#ad5ad9d3d300858bf0b1cd9e210366a18">y</a>) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l01168"></a><span class="lineno"> 1168</span>&#160; </div>
<div class="line"><a name="l01169"></a><span class="lineno"> 1169</span>&#160; </div>
<div class="line"><a name="l01180"></a><span class="lineno"> 1180</span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a552685b6419acf2fa4925a4ab5687be9">scroll_sprite</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb, <a class="code" href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a> <a class="code" href="struct_o_a_m__item__t.html#a3a13fb7441f8c431d9494cd2441c6c0b">x</a>, <a class="code" href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a> <a class="code" href="struct_o_a_m__item__t.html#ad5ad9d3d300858bf0b1cd9e210366a18">y</a>) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l01181"></a><span class="lineno"> 1181</span>&#160; </div>
<div class="line"><a name="l01182"></a><span class="lineno"> 1182</span>&#160; </div>
<div class="line"><a name="l01187"></a><span class="lineno"> 1187</span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a92649b68e5fea88d171d933f9a605e50">hide_sprite</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l01188"></a><span class="lineno"> 1188</span>&#160; </div>
<div class="line"><a name="l01189"></a><span class="lineno"> 1189</span>&#160; </div>
<div class="line"><a name="l01190"></a><span class="lineno"> 1190</span>&#160; </div>
<div class="line"><a name="l01198"></a><span class="lineno"><a class="line" href="nes_8h.html#ae1a305a579576715ad2d8f70327265da"> 1198</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#ae1a305a579576715ad2d8f70327265da">set_data</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *vram_addr, <span class="keyword">const</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data, <a class="code" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> len) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l01199"></a><span class="lineno"> 1199</span>&#160; </div>
<div class="line"><a name="l01200"></a><span class="lineno"> 1200</span>&#160; </div>
<div class="line"><a name="l01219"></a><span class="lineno"><a class="line" href="nes_8h.html#a399a0430a177e349cc691c5109427c01"> 1219</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a399a0430a177e349cc691c5109427c01">set_tiles</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="struct_o_a_m__item__t.html#a3a13fb7441f8c431d9494cd2441c6c0b">x</a>, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="struct_o_a_m__item__t.html#ad5ad9d3d300858bf0b1cd9e210366a18">y</a>, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *vram_addr, <span class="keyword">const</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *tiles) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l01220"></a><span class="lineno"> 1220</span>&#160; </div>
<div class="line"><a name="l01226"></a><span class="lineno"><a class="line" href="nes_8h.html#a2539f237ce7da8ff6eb0bad4c8c48a4c"> 1226</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a2539f237ce7da8ff6eb0bad4c8c48a4c">set_tile_data</a>(<a class="code" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> first_tile, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_tiles, <span class="keyword">const</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data) {</div>
<div class="line"><a name="l01227"></a><span class="lineno"> 1227</span>&#160; <span class="keywordflow">if</span> (first_tile &lt; 256) {</div>
<div class="line"><a name="l01228"></a><span class="lineno"> 1228</span>&#160; <a class="code" href="nes_8h.html#a4eb0e4c6c672efdeb49c3cdba2fa4d4a">set_bkg_data</a>(first_tile, nb_tiles, data);</div>
<div class="line"><a name="l01229"></a><span class="lineno"> 1229</span>&#160; <span class="keywordflow">if</span>(first_tile + nb_tiles &gt; 256)</div>
<div class="line"><a name="l01230"></a><span class="lineno"> 1230</span>&#160; <a class="code" href="nes_8h.html#adc0ef4fa6435ca3a1aac93f533eb85da">set_sprite_data</a>(first_tile - 256, nb_tiles, data);</div>
<div class="line"><a name="l01231"></a><span class="lineno"> 1231</span>&#160; } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l01232"></a><span class="lineno"> 1232</span>&#160; <a class="code" href="nes_8h.html#adc0ef4fa6435ca3a1aac93f533eb85da">set_sprite_data</a>(first_tile - 256, nb_tiles, data);</div>
<div class="line"><a name="l01233"></a><span class="lineno"> 1233</span>&#160; }</div>
<div class="line"><a name="l01234"></a><span class="lineno"> 1234</span>&#160;}</div>
<div class="line"><a name="l01235"></a><span class="lineno"> 1235</span>&#160; </div>
<div class="line"><a name="l01247"></a><span class="lineno"> 1247</span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a65860edee9a1a70fe56434dca397819e">set_bkg_native_data</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> first_tile, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_tiles, <span class="keyword">const</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l01248"></a><span class="lineno"> 1248</span>&#160; </div>
<div class="line"><a name="l01258"></a><span class="lineno"> 1258</span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a6c4aa6393c42e2d4079b2f922b9b9c84">set_sprite_native_data</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> first_tile, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_tiles, <span class="keyword">const</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l01259"></a><span class="lineno"> 1259</span>&#160; </div>
<div class="line"><a name="l01273"></a><span class="lineno"><a class="line" href="nes_8h.html#a68651e50243349b48164a8ad983dca4e"> 1273</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a68651e50243349b48164a8ad983dca4e">set_native_tile_data</a>(<a class="code" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> first_tile, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_tiles, <span class="keyword">const</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data) {</div>
<div class="line"><a name="l01274"></a><span class="lineno"> 1274</span>&#160; <span class="keywordflow">if</span> (first_tile &lt; 256) {</div>
<div class="line"><a name="l01275"></a><span class="lineno"> 1275</span>&#160; <a class="code" href="nes_8h.html#a65860edee9a1a70fe56434dca397819e">set_bkg_native_data</a>(first_tile, nb_tiles, data);</div>
<div class="line"><a name="l01276"></a><span class="lineno"> 1276</span>&#160; <span class="keywordflow">if</span>(first_tile + nb_tiles &gt; 256)</div>
<div class="line"><a name="l01277"></a><span class="lineno"> 1277</span>&#160; <a class="code" href="nes_8h.html#a6c4aa6393c42e2d4079b2f922b9b9c84">set_sprite_native_data</a>(first_tile - 256, nb_tiles, data);</div>
<div class="line"><a name="l01278"></a><span class="lineno"> 1278</span>&#160; } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l01279"></a><span class="lineno"> 1279</span>&#160; <a class="code" href="nes_8h.html#a6c4aa6393c42e2d4079b2f922b9b9c84">set_sprite_native_data</a>(first_tile - 256, nb_tiles, data);</div>
<div class="line"><a name="l01280"></a><span class="lineno"> 1280</span>&#160; }</div>
<div class="line"><a name="l01281"></a><span class="lineno"> 1281</span>&#160;}</div>
<div class="line"><a name="l01282"></a><span class="lineno"> 1282</span>&#160; </div>
<div class="line"><a name="l01288"></a><span class="lineno"><a class="line" href="nes_8h.html#ad4e94bfe39cbe8e1b366d65c13adb464"> 1288</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#ad4e94bfe39cbe8e1b366d65c13adb464">init_bkg</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="asm_2sm83_2string_8h.html#a0b3366755f3276b0243c1e0497471b7a">c</a>) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l01289"></a><span class="lineno"> 1289</span>&#160; </div>
<div class="line"><a name="l01297"></a><span class="lineno"><a class="line" href="nes_8h.html#a2b8cf9f9482d5292459ad81d2ef78840"> 1297</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a2b8cf9f9482d5292459ad81d2ef78840">vmemset</a> (<span class="keywordtype">void</span> *s, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="asm_2sm83_2string_8h.html#a0b3366755f3276b0243c1e0497471b7a">c</a>, <span class="keywordtype">size_t</span> n) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l01298"></a><span class="lineno"> 1298</span>&#160; </div>
<div class="line"><a name="l01307"></a><span class="lineno"><a class="line" href="nes_8h.html#a6879d813b6105ff8d9b36ec55c26a36e"> 1307</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a6879d813b6105ff8d9b36ec55c26a36e">fill_bkg_rect</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="struct_o_a_m__item__t.html#a3a13fb7441f8c431d9494cd2441c6c0b">x</a>, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="struct_o_a_m__item__t.html#ad5ad9d3d300858bf0b1cd9e210366a18">y</a>, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="struct_o_a_m__item__t.html#a6c269ed01269d02bcf7e36e0de3696f6">tile</a>) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l01308"></a><span class="lineno"><a class="line" href="nes_8h.html#a47865835d7d007d71b4bc8ae5cefb73a"> 1308</a></span>&#160;<span class="preprocessor">#define fill_rect fill_bkg_rect</span></div>
<div class="line"><a name="l01309"></a><span class="lineno"> 1309</span>&#160; </div>
<div class="line"><a name="l01317"></a><span class="lineno"><a class="line" href="nes_8h.html#a01ad58154ff5a51a439ffdd1bafe92c5"> 1317</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="nes_8h.html#a01ad58154ff5a51a439ffdd1bafe92c5">flush_shadow_attributes</a>(<span class="keywordtype">void</span>) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l01318"></a><span class="lineno"> 1318</span>&#160; </div>
<div class="line"><a name="l01319"></a><span class="lineno"><a class="line" href="nes_8h.html#a7d6c7ed0155e52b62936a04f6d98715d"> 1319</a></span>&#160;<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="nes_8h.html#a7d6c7ed0155e52b62936a04f6d98715d">_switch_prg0</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> bank) NO_OVERLAY_LOCALS;</div>
<div class="line"><a name="l01320"></a><span class="lineno"> 1320</span>&#160; </div>
<div class="line"><a name="l01321"></a><span class="lineno"> 1321</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* _NES_H */</span><span class="preprocessor"></span></div>
<div class="ttc" id="aasm_2sm83_2string_8h_html_a0b3366755f3276b0243c1e0497471b7a"><div class="ttname"><a href="asm_2sm83_2string_8h.html#a0b3366755f3276b0243c1e0497471b7a">c</a></div><div class="ttdeci">char c</div><div class="ttdef"><b>Definition:</b> string.h:20</div></div>
<div class="ttc" id="aasm_2types_8h_html_a7ed081d8dfb6902784b2fc730bbb7f96"><div class="ttname"><a href="asm_2types_8h.html#a7ed081d8dfb6902784b2fc730bbb7f96">NONBANKED</a></div><div class="ttdeci">#define NONBANKED</div><div class="ttdef"><b>Definition:</b> types.h:40</div></div>
<div class="ttc" id="acgb_8h_html_af868d7cdbd052c6b972ef137e02f6495"><div class="ttname"><a href="cgb_8h.html#af868d7cdbd052c6b972ef137e02f6495">palette_color_t</a></div><div class="ttdeci">uint16_t palette_color_t</div><div class="ttdef"><b>Definition:</b> cgb.h:85</div></div>
<div class="ttc" id="agb_8h_html_a0a3d95ad0ab8ad213016101d2e9c3d3e"><div class="ttname"><a href="gb_8h.html#a0a3d95ad0ab8ad213016101d2e9c3d3e">d</a></div><div class="ttdeci">uint8_t d</div><div class="ttdef"><b>Definition:</b> gb.h:419</div></div>
<div class="ttc" id="agb_8h_html_aba4fa6f13f80e53daeb0caa7b1ec8afb"><div class="ttname"><a href="gb_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a></div><div class="ttdeci">uint8_t h</div><div class="ttdef"><b>Definition:</b> gb.h:419</div></div>
<div class="ttc" id="anes_2hardware_8h_html"><div class="ttname"><a href="nes_2hardware_8h.html">hardware.h</a></div></div>
<div class="ttc" id="anes_2hardware_8h_html_a406100d23af09b16e4b43a2d0eefe741"><div class="ttname"><a href="nes_2hardware_8h.html#a406100d23af09b16e4b43a2d0eefe741">bkg_scroll_x</a></div><div class="ttdeci">__SHADOW_REG bkg_scroll_x</div><div class="ttdef"><b>Definition:</b> hardware.h:56</div></div>
<div class="ttc" id="anes_2hardware_8h_html_ad6629a16788cf8cc495555d7fae64d9f"><div class="ttname"><a href="nes_2hardware_8h.html#ad6629a16788cf8cc495555d7fae64d9f">bkg_scroll_y</a></div><div class="ttdeci">__SHADOW_REG bkg_scroll_y</div><div class="ttdef"><b>Definition:</b> hardware.h:57</div></div>
<div class="ttc" id="anes_8h_html_a0029224262fa919f42f3337c298bda10"><div class="ttname"><a href="nes_8h.html#a0029224262fa919f42f3337c298bda10">waitpad</a></div><div class="ttdeci">uint8_t waitpad(uint8_t mask) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_a01ad58154ff5a51a439ffdd1bafe92c5"><div class="ttname"><a href="nes_8h.html#a01ad58154ff5a51a439ffdd1bafe92c5">flush_shadow_attributes</a></div><div class="ttdeci">void flush_shadow_attributes(void) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_a0254d6e23d4202cb070b1fe54c6a7210"><div class="ttname"><a href="nes_8h.html#a0254d6e23d4202cb070b1fe54c6a7210">set_bkg_attributes_nes16x16</a></div><div class="ttdeci">void set_bkg_attributes_nes16x16(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *attributes) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_a050b8b27fe6af3efcc17cd804f808d7a"><div class="ttname"><a href="nes_8h.html#a050b8b27fe6af3efcc17cd804f808d7a">set_1bpp_colors_ex</a></div><div class="ttdeci">void set_1bpp_colors_ex(uint8_t fgcolor, uint8_t bgcolor, uint8_t mode) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_a06bab3f8bce032de0d21fbd86e14c3f3"><div class="ttname"><a href="nes_8h.html#a06bab3f8bce032de0d21fbd86e14c3f3">_current_bank</a></div><div class="ttdeci">volatile uint8_t _current_bank</div><div class="ttdef"><b>Definition:</b> gb.h:534</div></div>
<div class="ttc" id="anes_8h_html_a188c65cfeab067cc2b6dcbc97bf24a82"><div class="ttname"><a href="nes_8h.html#a188c65cfeab067cc2b6dcbc97bf24a82">set_interrupts</a></div><div class="ttdeci">void set_interrupts(uint8_t flags) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_a1e73068b3ffdb8436eaa3362f104ba74"><div class="ttname"><a href="nes_8h.html#a1e73068b3ffdb8436eaa3362f104ba74">SYSTEM_BITS_NTSC</a></div><div class="ttdeci">#define SYSTEM_BITS_NTSC</div><div class="ttdef"><b>Definition:</b> nes.h:28</div></div>
<div class="ttc" id="anes_8h_html_a1f583f7a880daa6145ca78b086a209d1"><div class="ttname"><a href="nes_8h.html#a1f583f7a880daa6145ca78b086a209d1">scroll_bkg</a></div><div class="ttdeci">void scroll_bkg(int8_t x, int8_t y)</div><div class="ttdef"><b>Definition:</b> nes.h:999</div></div>
<div class="ttc" id="anes_8h_html_a206e8e54468237daed636cad12a70055"><div class="ttname"><a href="nes_8h.html#a206e8e54468237daed636cad12a70055">delay</a></div><div class="ttdeci">void delay(uint16_t d) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_a232883ed798bce00a03b09705c67deef"><div class="ttname"><a href="nes_8h.html#a232883ed798bce00a03b09705c67deef">enable_interrupts</a></div><div class="ttdeci">void enable_interrupts(void)</div><div class="ttdef"><b>Definition:</b> nes.h:496</div></div>
<div class="ttc" id="anes_8h_html_a250f5339e05523912926be566e9eb8c0"><div class="ttname"><a href="nes_8h.html#a250f5339e05523912926be566e9eb8c0">_current_1bpp_colors</a></div><div class="ttdeci">uint16_t _current_1bpp_colors</div></div>
<div class="ttc" id="anes_8h_html_a2539f237ce7da8ff6eb0bad4c8c48a4c"><div class="ttname"><a href="nes_8h.html#a2539f237ce7da8ff6eb0bad4c8c48a4c">set_tile_data</a></div><div class="ttdeci">void set_tile_data(uint16_t first_tile, uint8_t nb_tiles, const uint8_t *data)</div><div class="ttdef"><b>Definition:</b> nes.h:1226</div></div>
<div class="ttc" id="anes_8h_html_a2b17818c7916bc2ff75196ff0627b1e9"><div class="ttname"><a href="nes_8h.html#a2b17818c7916bc2ff75196ff0627b1e9">disable_interrupts</a></div><div class="ttdeci">void disable_interrupts(void)</div><div class="ttdef"><b>Definition:</b> nes.h:512</div></div>
<div class="ttc" id="anes_8h_html_a2b8cf9f9482d5292459ad81d2ef78840"><div class="ttname"><a href="nes_8h.html#a2b8cf9f9482d5292459ad81d2ef78840">vmemset</a></div><div class="ttdeci">void vmemset(void *s, uint8_t c, size_t n) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_a2d30754c442641bdd882ab595dd77468"><div class="ttname"><a href="nes_8h.html#a2d30754c442641bdd882ab595dd77468">set_sprite_tile</a></div><div class="ttdeci">void set_sprite_tile(uint8_t nb, uint8_t tile) NO_OVERLAY_LOCALS</div><div class="ttdef"><b>Definition:</b> gb.h:1886</div></div>
<div class="ttc" id="anes_8h_html_a31655c4b138654e803e295bd4413759c"><div class="ttname"><a href="nes_8h.html#a31655c4b138654e803e295bd4413759c">set_bkg_tile_xy</a></div><div class="ttdeci">uint8_t * set_bkg_tile_xy(uint8_t x, uint8_t y, uint8_t t) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_a34490cffc1e857ac41c880b6bca92c4f"><div class="ttname"><a href="nes_8h.html#a34490cffc1e857ac41c880b6bca92c4f">set_bkg_submap_attributes</a></div><div class="ttdeci">void set_bkg_submap_attributes(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *attributes, uint8_t map_w)</div><div class="ttdef"><b>Definition:</b> nes.h:819</div></div>
<div class="ttc" id="anes_8h_html_a3619f9cb1e3c92238a033ead79a0c551"><div class="ttname"><a href="nes_8h.html#a3619f9cb1e3c92238a033ead79a0c551">shadow_OAM</a></div><div class="ttdeci">volatile struct OAM_item_t shadow_OAM[]</div></div>
<div class="ttc" id="anes_8h_html_a399a0430a177e349cc691c5109427c01"><div class="ttname"><a href="nes_8h.html#a399a0430a177e349cc691c5109427c01">set_tiles</a></div><div class="ttdeci">void set_tiles(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint8_t *vram_addr, const uint8_t *tiles) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_a3aea9deb2a0bfea9ff05a898f4822e31"><div class="ttname"><a href="nes_8h.html#a3aea9deb2a0bfea9ff05a898f4822e31">reset</a></div><div class="ttdeci">void reset(void)</div><div class="ttdef"><b>Definition:</b> nes.h:534</div></div>
<div class="ttc" id="anes_8h_html_a3e80bb115f7212eb72a5f341fdc408d7"><div class="ttname"><a href="nes_8h.html#a3e80bb115f7212eb72a5f341fdc408d7">move_sprite</a></div><div class="ttdeci">void move_sprite(uint8_t nb, uint8_t x, uint8_t y) NO_OVERLAY_LOCALS</div><div class="ttdef"><b>Definition:</b> gb.h:1972</div></div>
<div class="ttc" id="anes_8h_html_a4093fb5f45f807fe8d4a45121f3fffc5"><div class="ttname"><a href="nes_8h.html#a4093fb5f45f807fe8d4a45121f3fffc5">get_system</a></div><div class="ttdeci">uint8_t get_system(void)</div><div class="ttdef"><b>Definition:</b> nes.h:318</div></div>
<div class="ttc" id="anes_8h_html_a42756a31babdcb4b7e692960a069b13b"><div class="ttname"><a href="nes_8h.html#a42756a31babdcb4b7e692960a069b13b">display_on</a></div><div class="ttdeci">void display_on(void) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_a44e3fc6c86253db08fa99fdc448b1df0"><div class="ttname"><a href="nes_8h.html#a44e3fc6c86253db08fa99fdc448b1df0">add_VBL</a></div><div class="ttdeci">void add_VBL(int_handler h) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_a49635449fc261be2481b72d0165f12ad"><div class="ttname"><a href="nes_8h.html#a49635449fc261be2481b72d0165f12ad">set_vram_byte</a></div><div class="ttdeci">void set_vram_byte(uint8_t *addr, uint8_t v) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_a4eb0e4c6c672efdeb49c3cdba2fa4d4a"><div class="ttname"><a href="nes_8h.html#a4eb0e4c6c672efdeb49c3cdba2fa4d4a">set_bkg_data</a></div><div class="ttdeci">void set_bkg_data(uint8_t first_tile, uint8_t nb_tiles, const uint8_t *data) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_a54e98484026ce279ea5d3d0d7a3fb87a"><div class="ttname"><a href="nes_8h.html#a54e98484026ce279ea5d3d0d7a3fb87a">joypad_init</a></div><div class="ttdeci">uint8_t joypad_init(uint8_t npads, joypads_t *joypads) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_a552685b6419acf2fa4925a4ab5687be9"><div class="ttname"><a href="nes_8h.html#a552685b6419acf2fa4925a4ab5687be9">scroll_sprite</a></div><div class="ttdeci">void scroll_sprite(uint8_t nb, int8_t x, int8_t y) NO_OVERLAY_LOCALS</div><div class="ttdef"><b>Definition:</b> gb.h:1988</div></div>
<div class="ttc" id="anes_8h_html_a58eab770442930dad603ffba2b5d28f3"><div class="ttname"><a href="nes_8h.html#a58eab770442930dad603ffba2b5d28f3">get_sprite_tile</a></div><div class="ttdeci">uint8_t get_sprite_tile(uint8_t nb) NO_OVERLAY_LOCALS</div><div class="ttdef"><b>Definition:</b> gb.h:1897</div></div>
<div class="ttc" id="anes_8h_html_a5cc6bac1f2f0e9f71c7826a3ee8f35d0"><div class="ttname"><a href="nes_8h.html#a5cc6bac1f2f0e9f71c7826a3ee8f35d0">remove_VBL</a></div><div class="ttdeci">void remove_VBL(int_handler h) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_a6261537edc74068e3f7f057e6a3e8a57"><div class="ttname"><a href="nes_8h.html#a6261537edc74068e3f7f057e6a3e8a57">move_bkg</a></div><div class="ttdeci">void move_bkg(uint8_t x, uint8_t y)</div><div class="ttdef"><b>Definition:</b> nes.h:985</div></div>
<div class="ttc" id="anes_8h_html_a6286d69d5fb1133edd0c01c9545c62e4"><div class="ttname"><a href="nes_8h.html#a6286d69d5fb1133edd0c01c9545c62e4">_shadow_OAM_base</a></div><div class="ttdeci">uint8_t _shadow_OAM_base</div><div class="ttdef"><b>Definition:</b> gb.h:1836</div></div>
<div class="ttc" id="anes_8h_html_a6372e69db6290fbc0e73244dbe15f903"><div class="ttname"><a href="nes_8h.html#a6372e69db6290fbc0e73244dbe15f903">set_sprite_1bpp_data</a></div><div class="ttdeci">void set_sprite_1bpp_data(uint8_t first_tile, uint8_t nb_tiles, const uint8_t *data) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_a64538fb78ce148a1a7045245f084a710"><div class="ttname"><a href="nes_8h.html#a64538fb78ce148a1a7045245f084a710">wait_vbl_done</a></div><div class="ttdeci">void wait_vbl_done(void) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_a65860edee9a1a70fe56434dca397819e"><div class="ttname"><a href="nes_8h.html#a65860edee9a1a70fe56434dca397819e">set_bkg_native_data</a></div><div class="ttdeci">void set_bkg_native_data(uint8_t first_tile, uint8_t nb_tiles, const uint8_t *data) NO_OVERLAY_LOCALS</div><div class="ttdef"><b>Definition:</b> gb.h:2167</div></div>
<div class="ttc" id="anes_8h_html_a68651e50243349b48164a8ad983dca4e"><div class="ttname"><a href="nes_8h.html#a68651e50243349b48164a8ad983dca4e">set_native_tile_data</a></div><div class="ttdeci">void set_native_tile_data(uint16_t first_tile, uint8_t nb_tiles, const uint8_t *data)</div><div class="ttdef"><b>Definition:</b> nes.h:1273</div></div>
<div class="ttc" id="anes_8h_html_a6879d813b6105ff8d9b36ec55c26a36e"><div class="ttname"><a href="nes_8h.html#a6879d813b6105ff8d9b36ec55c26a36e">fill_bkg_rect</a></div><div class="ttdeci">void fill_bkg_rect(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint8_t tile) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_a6ab3fa75195d44d8d7e867d4a4cb1131"><div class="ttname"><a href="nes_8h.html#a6ab3fa75195d44d8d7e867d4a4cb1131">set_bkg_tiles</a></div><div class="ttdeci">void set_bkg_tiles(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *tiles) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_a6c4aa6393c42e2d4079b2f922b9b9c84"><div class="ttname"><a href="nes_8h.html#a6c4aa6393c42e2d4079b2f922b9b9c84">set_sprite_native_data</a></div><div class="ttdeci">void set_sprite_native_data(uint8_t first_tile, uint8_t nb_tiles, const uint8_t *data) NO_OVERLAY_LOCALS</div><div class="ttdef"><b>Definition:</b> gb.h:2184</div></div>
<div class="ttc" id="anes_8h_html_a70802f5e313285aa3ea04b0f73b2700f"><div class="ttname"><a href="nes_8h.html#a70802f5e313285aa3ea04b0f73b2700f">refresh_OAM</a></div><div class="ttdeci">void refresh_OAM(void) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_a73b4e18d7f5eaf5398bf0241c9c21586"><div class="ttname"><a href="nes_8h.html#a73b4e18d7f5eaf5398bf0241c9c21586">vsync</a></div><div class="ttdeci">void vsync(void) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_a78d2fd18666afec116f176d46debb4e7"><div class="ttname"><a href="nes_8h.html#a78d2fd18666afec116f176d46debb4e7">sys_time</a></div><div class="ttdeci">volatile uint16_t sys_time</div></div>
<div class="ttc" id="anes_8h_html_a78fd7730ed37db84f52bcfc9ff41873f"><div class="ttname"><a href="nes_8h.html#a78fd7730ed37db84f52bcfc9ff41873f">_SYSTEM</a></div><div class="ttdeci">const uint8_t _SYSTEM</div></div>
<div class="ttc" id="anes_8h_html_a7b7c27e672467f08097f744f3530bbc7"><div class="ttname"><a href="nes_8h.html#a7b7c27e672467f08097f744f3530bbc7">set_bkg_attribute_xy_nes16x16</a></div><div class="ttdeci">void set_bkg_attribute_xy_nes16x16(uint8_t x, uint8_t y, uint8_t a) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_a7c75cb6992e73971f24cee46aa31184b"><div class="ttname"><a href="nes_8h.html#a7c75cb6992e73971f24cee46aa31184b">set_sprite_palette</a></div><div class="ttdeci">void set_sprite_palette(uint8_t first_palette, uint8_t nb_palettes, const palette_color_t *rgb_data) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_a7cd23c81062d37753a4429b794907524"><div class="ttname"><a href="nes_8h.html#a7cd23c81062d37753a4429b794907524">set_bkg_attribute_xy</a></div><div class="ttdeci">void set_bkg_attribute_xy(uint8_t x, uint8_t y, uint8_t a)</div><div class="ttdef"><b>Definition:</b> nes.h:957</div></div>
<div class="ttc" id="anes_8h_html_a7d6c7ed0155e52b62936a04f6d98715d"><div class="ttname"><a href="nes_8h.html#a7d6c7ed0155e52b62936a04f6d98715d">_switch_prg0</a></div><div class="ttdeci">uint8_t _switch_prg0(uint8_t bank) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_a7e0cdfd6b9a2ae1b7f30384f132d8687"><div class="ttname"><a href="nes_8h.html#a7e0cdfd6b9a2ae1b7f30384f132d8687">SET_SHADOW_OAM_ADDRESS</a></div><div class="ttdeci">void SET_SHADOW_OAM_ADDRESS(void *address)</div><div class="ttdef"><b>Definition:</b> nes.h:1081</div></div>
<div class="ttc" id="anes_8h_html_a7f2058d3fe9c08127fd6f596a5df41c9"><div class="ttname"><a href="nes_8h.html#a7f2058d3fe9c08127fd6f596a5df41c9">get_sprite_prop</a></div><div class="ttdeci">uint8_t get_sprite_prop(uint8_t nb) NO_OVERLAY_LOCALS</div><div class="ttdef"><b>Definition:</b> gb.h:1955</div></div>
<div class="ttc" id="anes_8h_html_a811c386cac0df2d260aacb5a43608be5"><div class="ttname"><a href="nes_8h.html#a811c386cac0df2d260aacb5a43608be5">set_bkg_based_tiles</a></div><div class="ttdeci">void set_bkg_based_tiles(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *tiles, uint8_t base_tile)</div><div class="ttdef"><b>Definition:</b> nes.h:845</div></div>
<div class="ttc" id="anes_8h_html_a8278909fae5ed243e03f8815ac95bab3"><div class="ttname"><a href="nes_8h.html#a8278909fae5ed243e03f8815ac95bab3">set_bkg_attributes</a></div><div class="ttdeci">void set_bkg_attributes(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *attributes)</div><div class="ttdef"><b>Definition:</b> nes.h:756</div></div>
<div class="ttc" id="anes_8h_html_a8e5ea12b86bdfc812448c2f5c4336c03"><div class="ttname"><a href="nes_8h.html#a8e5ea12b86bdfc812448c2f5c4336c03">OAM_item_t</a></div><div class="ttdeci">struct OAM_item_t OAM_item_t</div></div>
<div class="ttc" id="anes_8h_html_a8feed006393f8c8c070b2d29d91ec8aa"><div class="ttname"><a href="nes_8h.html#a8feed006393f8c8c070b2d29d91ec8aa">joypad</a></div><div class="ttdeci">uint8_t joypad(void) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_a92649b68e5fea88d171d933f9a605e50"><div class="ttname"><a href="nes_8h.html#a92649b68e5fea88d171d933f9a605e50">hide_sprite</a></div><div class="ttdeci">void hide_sprite(uint8_t nb) NO_OVERLAY_LOCALS</div><div class="ttdef"><b>Definition:</b> gb.h:2000</div></div>
<div class="ttc" id="anes_8h_html_a92d990e45d1cc8e28d98a87b0b9d70ff"><div class="ttname"><a href="nes_8h.html#a92d990e45d1cc8e28d98a87b0b9d70ff">set_bkg_1bpp_data</a></div><div class="ttdeci">void set_bkg_1bpp_data(uint8_t first_tile, uint8_t nb_tiles, const uint8_t *data) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_a9508f919d9482d1d51534ccac212454d"><div class="ttname"><a href="nes_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a></div><div class="ttdeci">void(* int_handler)(void) NONBANKED</div><div class="ttdef"><b>Definition:</b> nes.h:193</div></div>
<div class="ttc" id="anes_8h_html_a95b3f2754671e9aff7eb86e181d8ab99"><div class="ttname"><a href="nes_8h.html#a95b3f2754671e9aff7eb86e181d8ab99">remove_TIM</a></div><div class="ttdeci">void remove_TIM(int_handler h) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_a96b6dd8b1dcb44f540baa6093b54154b"><div class="ttname"><a href="nes_8h.html#a96b6dd8b1dcb44f540baa6093b54154b">set_sprite_prop</a></div><div class="ttdeci">void set_sprite_prop(uint8_t nb, uint8_t prop) NO_OVERLAY_LOCALS</div><div class="ttdef"><b>Definition:</b> gb.h:1945</div></div>
<div class="ttc" id="anes_8h_html_a98aab5a3d75429f9e7861a8100629782"><div class="ttname"><a href="nes_8h.html#a98aab5a3d75429f9e7861a8100629782">display_off</a></div><div class="ttdeci">void display_off(void) NO_OVERLAY_LOCALS</div><div class="ttdef"><b>Definition:</b> msx.h:248</div></div>
<div class="ttc" id="anes_8h_html_a99bca2df4c6fde16a659797b4e584036"><div class="ttname"><a href="nes_8h.html#a99bca2df4c6fde16a659797b4e584036">SYSTEM_60HZ</a></div><div class="ttdeci">#define SYSTEM_60HZ</div><div class="ttdef"><b>Definition:</b> nes.h:33</div></div>
<div class="ttc" id="anes_8h_html_aa1843c9b694489b612595631315c1c21"><div class="ttname"><a href="nes_8h.html#aa1843c9b694489b612595631315c1c21">palette_color_t</a></div><div class="ttdeci">uint8_t palette_color_t</div><div class="ttdef"><b>Definition:</b> nes.h:65</div></div>
<div class="ttc" id="anes_8h_html_aa224c9bac27c7fd268e62bdf33338a84"><div class="ttname"><a href="nes_8h.html#aa224c9bac27c7fd268e62bdf33338a84">set_2bpp_palette</a></div><div class="ttdeci">void set_2bpp_palette(uint16_t palette)</div><div class="ttdef"><b>Definition:</b> nes.h:652</div></div>
<div class="ttc" id="anes_8h_html_aa81b3eb2f6ec56d70ccd27c7deae4098"><div class="ttname"><a href="nes_8h.html#aa81b3eb2f6ec56d70ccd27c7deae4098">get_bkg_xy_addr</a></div><div class="ttdeci">uint8_t * get_bkg_xy_addr(uint8_t x, uint8_t y) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_aa82205e9629f984d0b3dc8055c211522"><div class="ttname"><a href="nes_8h.html#aa82205e9629f984d0b3dc8055c211522">_map_tile_offset</a></div><div class="ttdeci">uint8_t _map_tile_offset</div></div>
<div class="ttc" id="anes_8h_html_aaca025055febe9f4c605bfac12812d0e"><div class="ttname"><a href="nes_8h.html#aaca025055febe9f4c605bfac12812d0e">set_bkg_palette_entry</a></div><div class="ttdeci">void set_bkg_palette_entry(uint8_t palette, uint8_t entry, palette_color_t rgb_data) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_aadba8b700b97ec97dc9c488496619fd9"><div class="ttname"><a href="nes_8h.html#aadba8b700b97ec97dc9c488496619fd9">set_bkg_submap_attributes_nes16x16</a></div><div class="ttdeci">void set_bkg_submap_attributes_nes16x16(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *map, uint8_t map_w) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_ab38fda7bad70c80c390aa7017c48b405"><div class="ttname"><a href="nes_8h.html#ab38fda7bad70c80c390aa7017c48b405">set_bkg_palette</a></div><div class="ttdeci">void set_bkg_palette(uint8_t first_palette, uint8_t nb_palettes, const palette_color_t *rgb_data) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_ab472d9bbb1bcfd141374f5babc71934c"><div class="ttname"><a href="nes_8h.html#ab472d9bbb1bcfd141374f5babc71934c">_submap_tile_offset</a></div><div class="ttdeci">uint8_t _submap_tile_offset</div></div>
<div class="ttc" id="anes_8h_html_ab8d3e0c6cb1c5687806defef521f8fd2"><div class="ttname"><a href="nes_8h.html#ab8d3e0c6cb1c5687806defef521f8fd2">get_bkg_tiles</a></div><div class="ttdeci">void get_bkg_tiles(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint8_t *tiles) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_abac3c04dc3c056618aca0a0052f2cb93"><div class="ttname"><a href="nes_8h.html#abac3c04dc3c056618aca0a0052f2cb93">get_mode</a></div><div class="ttdeci">uint8_t get_mode(void) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_abc8bc5808620a9717263b8c9ec2237f0"><div class="ttname"><a href="nes_8h.html#abc8bc5808620a9717263b8c9ec2237f0">set_bkg_based_submap</a></div><div class="ttdeci">void set_bkg_based_submap(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *map, uint8_t map_w, uint8_t base_tile)</div><div class="ttdef"><b>Definition:</b> nes.h:905</div></div>
<div class="ttc" id="anes_8h_html_ac2c9fd8d613ad8ba52227c5a056e56fa"><div class="ttname"><a href="nes_8h.html#ac2c9fd8d613ad8ba52227c5a056e56fa">set_bkg_submap</a></div><div class="ttdeci">void set_bkg_submap(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *map, uint8_t map_w) NO_OVERLAY_LOCALS</div><div class="ttdef"><b>Definition:</b> msx.h:627</div></div>
<div class="ttc" id="anes_8h_html_aca7413d0441f3ce1f30cca15ce4678ab"><div class="ttname"><a href="nes_8h.html#aca7413d0441f3ce1f30cca15ce4678ab">remove_LCD</a></div><div class="ttdeci">void remove_LCD(int_handler h) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_ad0cfd2f31b0dc3f15ef7c1305e383676"><div class="ttname"><a href="nes_8h.html#ad0cfd2f31b0dc3f15ef7c1305e383676">add_TIM</a></div><div class="ttdeci">void add_TIM(int_handler h) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_ad2adcd1b3390b43cdade1b73d95123a0"><div class="ttname"><a href="nes_8h.html#ad2adcd1b3390b43cdade1b73d95123a0">set_sprite_palette_entry</a></div><div class="ttdeci">void set_sprite_palette_entry(uint8_t palette, uint8_t entry, palette_color_t rgb_data) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_ad4e94bfe39cbe8e1b366d65c13adb464"><div class="ttname"><a href="nes_8h.html#ad4e94bfe39cbe8e1b366d65c13adb464">init_bkg</a></div><div class="ttdeci">void init_bkg(uint8_t c) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_ad572dce0c703ed78eadcf5cd6cce7dd2"><div class="ttname"><a href="nes_8h.html#ad572dce0c703ed78eadcf5cd6cce7dd2">add_LCD</a></div><div class="ttdeci">void add_LCD(int_handler h) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_ad6329c19927cf02579e2503e40c0bbde"><div class="ttname"><a href="nes_8h.html#ad6329c19927cf02579e2503e40c0bbde">SYSTEM_50HZ</a></div><div class="ttdeci">#define SYSTEM_50HZ</div><div class="ttdef"><b>Definition:</b> nes.h:34</div></div>
<div class="ttc" id="anes_8h_html_adaca04ce3d7213e6d0348196cd592780"><div class="ttname"><a href="nes_8h.html#adaca04ce3d7213e6d0348196cd592780">get_bkg_tile_xy</a></div><div class="ttdeci">uint8_t get_bkg_tile_xy(uint8_t x, uint8_t y) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_adc0ef4fa6435ca3a1aac93f533eb85da"><div class="ttname"><a href="nes_8h.html#adc0ef4fa6435ca3a1aac93f533eb85da">set_sprite_data</a></div><div class="ttdeci">void set_sprite_data(uint8_t first_tile, uint8_t nb_tiles, const uint8_t *data) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_adcb394299a1033616fc7d2faec8bd6ad"><div class="ttname"><a href="nes_8h.html#adcb394299a1033616fc7d2faec8bd6ad">set_1bpp_colors</a></div><div class="ttdeci">void set_1bpp_colors(uint8_t fgcolor, uint8_t bgcolor)</div><div class="ttdef"><b>Definition:</b> nes.h:658</div></div>
<div class="ttc" id="anes_8h_html_ade75173639b6e7be241b8eb31fe825ef"><div class="ttname"><a href="nes_8h.html#ade75173639b6e7be241b8eb31fe825ef">mode</a></div><div class="ttdeci">void mode(uint8_t m) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_ae192e07aabd7c8b822db52c9bc1e542d"><div class="ttname"><a href="nes_8h.html#ae192e07aabd7c8b822db52c9bc1e542d">waitpadup</a></div><div class="ttdeci">void waitpadup(void) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_ae1a305a579576715ad2d8f70327265da"><div class="ttname"><a href="nes_8h.html#ae1a305a579576715ad2d8f70327265da">set_data</a></div><div class="ttdeci">void set_data(uint8_t *vram_addr, const uint8_t *data, uint16_t len) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="anes_8h_html_af3ee931a6c78c8716cadfedd9f627b6e"><div class="ttname"><a href="nes_8h.html#af3ee931a6c78c8716cadfedd9f627b6e">joypad_ex</a></div><div class="ttdeci">void joypad_ex(joypads_t *joypads) NO_OVERLAY_LOCALS</div></div>
<div class="ttc" id="argb__to__nes__macro_8h_html"><div class="ttname"><a href="rgb__to__nes__macro_8h.html">rgb_to_nes_macro.h</a></div></div>
<div class="ttc" id="astdint_8h_html"><div class="ttname"><a href="stdint_8h.html">stdint.h</a></div></div>
<div class="ttc" id="astdint_8h_html_aba7bc1797add20fe3efdf37ced1182c5"><div class="ttname"><a href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a></div><div class="ttdeci">unsigned char uint8_t</div><div class="ttdef"><b>Definition:</b> stdint.h:51</div></div>
<div class="ttc" id="astdint_8h_html_adf4d876453337156dde61095e1f20223"><div class="ttname"><a href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a></div><div class="ttdeci">unsigned short int uint16_t</div><div class="ttdef"><b>Definition:</b> stdint.h:52</div></div>
<div class="ttc" id="astdint_8h_html_aef44329758059c91c76d334e8fc09700"><div class="ttname"><a href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a></div><div class="ttdeci">signed char int8_t</div><div class="ttdef"><b>Definition:</b> stdint.h:43</div></div>
<div class="ttc" id="astruct_o_a_m__item__t_html"><div class="ttname"><a href="struct_o_a_m__item__t.html">OAM_item_t</a></div><div class="ttdef"><b>Definition:</b> gb.h:1823</div></div>
<div class="ttc" id="astruct_o_a_m__item__t_html_a3a13fb7441f8c431d9494cd2441c6c0b"><div class="ttname"><a href="struct_o_a_m__item__t.html#a3a13fb7441f8c431d9494cd2441c6c0b">OAM_item_t::x</a></div><div class="ttdeci">uint8_t x</div><div class="ttdef"><b>Definition:</b> gb.h:1824</div></div>
<div class="ttc" id="astruct_o_a_m__item__t_html_a435e018f3bbc0ebaa9eaf96806d386d9"><div class="ttname"><a href="struct_o_a_m__item__t.html#a435e018f3bbc0ebaa9eaf96806d386d9">OAM_item_t::prop</a></div><div class="ttdeci">uint8_t prop</div><div class="ttdef"><b>Definition:</b> gb.h:1826</div></div>
<div class="ttc" id="astruct_o_a_m__item__t_html_a6c269ed01269d02bcf7e36e0de3696f6"><div class="ttname"><a href="struct_o_a_m__item__t.html#a6c269ed01269d02bcf7e36e0de3696f6">OAM_item_t::tile</a></div><div class="ttdeci">uint8_t tile</div><div class="ttdef"><b>Definition:</b> gb.h:1825</div></div>
<div class="ttc" id="astruct_o_a_m__item__t_html_ad5ad9d3d300858bf0b1cd9e210366a18"><div class="ttname"><a href="struct_o_a_m__item__t.html#ad5ad9d3d300858bf0b1cd9e210366a18">OAM_item_t::y</a></div><div class="ttdeci">uint8_t y</div><div class="ttdef"><b>Definition:</b> gb.h:1824</div></div>
<div class="ttc" id="astructjoypads__t_html"><div class="ttname"><a href="structjoypads__t.html">joypads_t</a></div><div class="ttdef"><b>Definition:</b> gb.h:755</div></div>
<div class="ttc" id="aversion_8h_html"><div class="ttname"><a href="version_8h.html">version.h</a></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>