mirror of
https://github.com/gbdk-2020/gbdk-2020.git
synced 2026-03-24 16:07:20 +01:00
162 lines
17 KiB
HTML
162 lines
17 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.8.17"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>GBDK 2020 Docs: gbdk-lib/include/nes/hardware.h Source File</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="resize.js"></script>
|
|
<script type="text/javascript" src="navtreedata.js"></script>
|
|
<script type="text/javascript" src="navtree.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
<link href="doxygen_extra.css" rel="stylesheet" type="text/css"/>
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">GBDK 2020 Docs
|
|
 <span id="projectnumber">4.1.1</span>
|
|
</div>
|
|
<div id="projectbrief">API Documentation for GBDK 2020</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.17 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */</script>
|
|
<div id="main-nav"></div>
|
|
</div><!-- top -->
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
<div id="nav-sync" class="sync"></div>
|
|
</div>
|
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(document).ready(function(){initNavTree('nes_2hardware_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">hardware.h</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<a href="nes_2hardware_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>  </div>
|
|
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="preprocessor">#ifndef _HARDWARE_H</span></div>
|
|
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="preprocessor">#define _HARDWARE_H</span></div>
|
|
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>  </div>
|
|
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="preprocessor">#include <types.h></span></div>
|
|
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>  </div>
|
|
<div class="line"><a name="l00010"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#ab2767d5f8f0ad35d8c8ee0bb3f4c51c3"> 10</a></span> <span class="preprocessor">#define __BYTES extern UBYTE</span></div>
|
|
<div class="line"><a name="l00011"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#a3b39604bdf93a32e9ff965c1a55f0df8"> 11</a></span> <span class="preprocessor">#define __BYTE_REG extern volatile UBYTE</span></div>
|
|
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>  </div>
|
|
<div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#a51a8240c7d36ba9d1d27372053ec2dc7"> 13</a></span> <span class="preprocessor">#define PPUCTRL ((uint8_t*)0x2000);</span></div>
|
|
<div class="line"><a name="l00014"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#ad4195c2da9cc37e948b779a3bba574da"> 14</a></span> <span class="preprocessor">#define PPUCTRL_NMI 0b10000000</span></div>
|
|
<div class="line"><a name="l00015"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#a1912c130a459dc70b7814721e62853f3"> 15</a></span> <span class="preprocessor">#define PPUCTRL_SPR_8X8 0b00000000</span></div>
|
|
<div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#a6d712a8ba6ec86c2937aeb1b8b36f340"> 16</a></span> <span class="preprocessor">#define PPUCTRL_SPR_8X16 0b00100000</span></div>
|
|
<div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#a8a693ef1e7481e9d66811dc6848e5575"> 17</a></span> <span class="preprocessor">#define PPUCTRL_BG_CHR 0b00010000</span></div>
|
|
<div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#ab3147e0e9e56b86bebba0bcf1c7609af"> 18</a></span> <span class="preprocessor">#define PPUCTRL_SPR_CHR 0b00001000</span></div>
|
|
<div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#a5709b6a188c2042aa32a4d4abe9f619a"> 19</a></span> <span class="preprocessor">#define PPUCTRL_INC32 0b00000100</span></div>
|
|
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="keyword">extern</span> <span class="keyword">volatile</span> <a class="code" href="asm_2types_8h.html#a280213815420791851f7e59bdc8a3c95">UBYTE</a> <a class="code" href="nes_2hardware_8h.html#a62a82bf7ad9f8aa121e0e2b609d2058a">shadow_PPUCTRL</a>;</div>
|
|
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>  </div>
|
|
<div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#a9b5d0dc0272b5f201ae5958714a557fe"> 22</a></span> <span class="preprocessor">#define PPUMASK ((uint8_t*)0x2001);</span></div>
|
|
<div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#a2c924ea42b8f571a6461bf6d42167491"> 23</a></span> <span class="preprocessor">#define PPUMASK_BLUE 0b10000000</span></div>
|
|
<div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#a32c11331376cfa653f9d66571382d430"> 24</a></span> <span class="preprocessor">#define PPUMASK_RED 0b01000000</span></div>
|
|
<div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#adb6fcefb52ab83fe8aeeafe033391f94"> 25</a></span> <span class="preprocessor">#define PPUMASK_GREEN 0b00100000</span></div>
|
|
<div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#a73dfa1e321b7b5a3835450c0382f7779"> 26</a></span> <span class="preprocessor">#define PPUMASK_SHOW_SPR 0b00010000</span></div>
|
|
<div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#aaf30bd58f6f863e21f605957d547bdd7"> 27</a></span> <span class="preprocessor">#define PPUMASK_SHOW_BG 0b00001000</span></div>
|
|
<div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#add0805a7bbaa88cf568f7a8fa7eb252c"> 28</a></span> <span class="preprocessor">#define PPUMASK_SHOW_SPR_LC 0b00000100</span></div>
|
|
<div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#a0921fb5a3bfa138b479df91189d51f1c"> 29</a></span> <span class="preprocessor">#define PPUMASK_SHOW_BG_LC 0b00000010</span></div>
|
|
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#a4358b756ed8f83ee57451a4428a11829"> 30</a></span> <span class="preprocessor">#define PPUMASK_MONOCHROME 0b00000001</span></div>
|
|
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="keyword">extern</span> <span class="keyword">volatile</span> <a class="code" href="asm_2types_8h.html#a280213815420791851f7e59bdc8a3c95">UBYTE</a> <a class="code" href="nes_2hardware_8h.html#a21d9421b0db7d43d732fd32a4c17d5dd">shadow_PPUMASK</a>;</div>
|
|
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  </div>
|
|
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#abbecfb740287072ee794c1c71fbbe86d"> 33</a></span> <span class="preprocessor">#define PPUSTATUS ((uint8_t*)0x2002);</span></div>
|
|
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#a8c4fddfd97f8facc6045a6be1e98cd01"> 34</a></span> <span class="preprocessor">#define OAMADDR ((uint8_t*)0x2003);</span></div>
|
|
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#a339277c7ae1735d0688d1649c3c68df6"> 35</a></span> <span class="preprocessor">#define OAMDATA ((uint8_t*)0x2004);</span></div>
|
|
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#ad9b169de4641fe89183249b73773d552"> 36</a></span> <span class="preprocessor">#define PPUSCROLL ((uint8_t*)0x2005);</span></div>
|
|
<div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#ad02bc22c80dccee167fb5b19d14d63e7"> 37</a></span> <span class="preprocessor">#define PPUADDR ((uint8_t*)0x2006);</span></div>
|
|
<div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#a3ed76b16a6396fd8c877dbfdd4299d83"> 38</a></span> <span class="preprocessor">#define PPUDATA ((uint8_t*)0x2007);</span></div>
|
|
<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#aa5aceb33d8da812050bd2b7383522be7"> 39</a></span> <span class="preprocessor">#define OAMDMA ((uint8_t*)0x4014);</span></div>
|
|
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  </div>
|
|
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#a519e327cac96f68a8ca9b77e0343672f"> 41</a></span> <span class="preprocessor">#define DEVICE_SCREEN_X_OFFSET 0</span></div>
|
|
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#af334c0e7dd6e434b3dbebd45bcdeb75a"> 42</a></span> <span class="preprocessor">#define DEVICE_SCREEN_Y_OFFSET 0</span></div>
|
|
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#add7f32ba868ef6517798f5fce337e4b2"> 43</a></span> <span class="preprocessor">#define DEVICE_SCREEN_WIDTH 32</span></div>
|
|
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#ad252264fdcf900e5fbf611f7a45962ed"> 44</a></span> <span class="preprocessor">#define DEVICE_SCREEN_HEIGHT 30</span></div>
|
|
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#a491dc081eae8c81e7ca88075ab806291"> 45</a></span> <span class="preprocessor">#define DEVICE_SCREEN_BUFFER_WIDTH 32</span></div>
|
|
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#a81fb56b6778772f829dab4c534e7749e"> 46</a></span> <span class="preprocessor">#define DEVICE_SCREEN_BUFFER_HEIGHT 30</span></div>
|
|
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#a4d682ed7a6158c5ba10afec739b17a8a"> 47</a></span> <span class="preprocessor">#define DEVICE_SCREEN_MAP_ENTRY_SIZE 2</span></div>
|
|
<div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#af531e7ac0c0a58517fa3061631745c31"> 48</a></span> <span class="preprocessor">#define DEVICE_SPRITE_PX_OFFSET_X 0</span></div>
|
|
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#a7f6c8420831388300bbec13ea4cb57a0"> 49</a></span> <span class="preprocessor">#define DEVICE_SPRITE_PX_OFFSET_Y -1</span></div>
|
|
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#a62cb8564bf5e8cdd85ac33bc1c7896f2"> 50</a></span> <span class="preprocessor">#define DEVICE_WINDOW_PX_OFFSET_X 0</span></div>
|
|
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#a3f8565ca9dc8eacd88d0d58313408329"> 51</a></span> <span class="preprocessor">#define DEVICE_WINDOW_PX_OFFSET_Y 0</span></div>
|
|
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#ad14c51cdfb347c34c364f54e67dc978d"> 52</a></span> <span class="preprocessor">#define DEVICE_SCREEN_PX_WIDTH (DEVICE_SCREEN_WIDTH * 8)</span></div>
|
|
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="nes_2hardware_8h.html#a7bd450aa268b881257089cf8cd6697ec"> 53</a></span> <span class="preprocessor">#define DEVICE_SCREEN_PX_HEIGHT (DEVICE_SCREEN_HEIGHT * 8)</span></div>
|
|
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  </div>
|
|
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="comment">// Scrolling coordinates (will be written to PPUSCROLL at end-of-vblank by NMI handler)</span></div>
|
|
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <span class="keyword">extern</span> <span class="keyword">volatile</span> <a class="code" href="asm_2types_8h.html#a280213815420791851f7e59bdc8a3c95">UBYTE</a> <a class="code" href="nes_2hardware_8h.html#a22b533b7a269742440da0512d3373378">bkg_scroll_x</a>;</div>
|
|
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span> <span class="keyword">extern</span> <span class="keyword">volatile</span> <a class="code" href="asm_2types_8h.html#a280213815420791851f7e59bdc8a3c95">UBYTE</a> <a class="code" href="nes_2hardware_8h.html#a746376427b30b28da11b75637993b071">bkg_scroll_y</a>;</div>
|
|
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  </div>
|
|
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span> <span class="preprocessor">#endif</span></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<div class="ttc" id="anes_2hardware_8h_html_a746376427b30b28da11b75637993b071"><div class="ttname"><a href="nes_2hardware_8h.html#a746376427b30b28da11b75637993b071">bkg_scroll_y</a></div><div class="ttdeci">volatile UBYTE bkg_scroll_y</div></div>
|
|
<div class="ttc" id="aasm_2types_8h_html_a280213815420791851f7e59bdc8a3c95"><div class="ttname"><a href="asm_2types_8h.html#a280213815420791851f7e59bdc8a3c95">UBYTE</a></div><div class="ttdeci">UINT8 UBYTE</div><div class="ttdef"><b>Definition:</b> types.h:60</div></div>
|
|
<div class="ttc" id="anes_2hardware_8h_html_a21d9421b0db7d43d732fd32a4c17d5dd"><div class="ttname"><a href="nes_2hardware_8h.html#a21d9421b0db7d43d732fd32a4c17d5dd">shadow_PPUMASK</a></div><div class="ttdeci">volatile UBYTE shadow_PPUMASK</div></div>
|
|
<div class="ttc" id="anes_2hardware_8h_html_a62a82bf7ad9f8aa121e0e2b609d2058a"><div class="ttname"><a href="nes_2hardware_8h.html#a62a82bf7ad9f8aa121e0e2b609d2058a">shadow_PPUCTRL</a></div><div class="ttdeci">volatile UBYTE shadow_PPUCTRL</div></div>
|
|
<div class="ttc" id="anes_2hardware_8h_html_a22b533b7a269742440da0512d3373378"><div class="ttname"><a href="nes_2hardware_8h.html#a22b533b7a269742440da0512d3373378">bkg_scroll_x</a></div><div class="ttdeci">volatile UBYTE bkg_scroll_x</div></div>
|
|
<!-- 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>
|