Files
gbdk-2020/docs/api/docs_faq.html
2021-03-16 20:02:32 +03:00

184 lines
8.5 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.20"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>GBDK 2020 Docs: Frequently Asked Questions (FAQ)</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
</div>
<div id="projectbrief">API Documentation for GBDK 2020</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.20 -->
<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');
/* @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('docs_faq.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="PageDoc"><div class="header">
<div class="headertitle">
<div class="title">Frequently Asked Questions (FAQ) </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p><a class="anchor" id="toolchain_faq"></a> </p>
<h1><a class="anchor" id="autotoc_md41"></a>
Frequently Asked Questions</h1>
<ul>
<li>How do I set the ROM's title?<ul>
<li>Use the <a class="el" href="docs_toolchain.html#makebin">makebin</a> <code>-yn</code> flag. For example with <a class="el" href="docs_toolchain.html#lcc">lcc</a> <code>-Wm-yn"MYTITLE"</code> or with <a class="el" href="docs_toolchain.html#makebin">makebin</a> directly <code>-yn "MYTITLE"</code>. The maximum length is up to 15 characters, but may be shorter.</li>
<li>See "0134-0143 - Title" in <a class="el" href="docs_links_and_tools.html#Pandocs">Pandocs</a> for more details.</li>
</ul>
</li>
</ul>
<p><br />
</p>
<p><a class="anchor" id="faq_gb_type_header_setting"></a></p><ul>
<li>How do I set SGB, Color only and Color compatibility in the ROM header?<ul>
<li>Use the following <a class="el" href="docs_toolchain.html#makebin">makebin</a> flags. Prefix them with <code>-Wm</code> if using <a class="el" href="docs_toolchain.html#lcc">lcc</a>.<ul>
<li><code>-yc</code> : GameBoy Color compatible</li>
<li><code>-yC</code> : GameBoy Color only</li>
<li><code>-ys</code> : Super GameBoy compatible</li>
</ul>
</li>
</ul>
</li>
</ul>
<p><br />
</p>
<ul>
<li>How do I set the ROM <a class="el" href="docs_rombanking_mbcs.html#MBC">MBC</a> type?<ul>
<li>See <a class="el" href="docs_rombanking_mbcs.html#setting_mbc_and_rom_ram_banks">setting_mbc_and_rom_ram_banks</a></li>
</ul>
</li>
</ul>
<p><br />
</p>
<p><a class="anchor" id="faq_bank_overflow_errors"></a></p><ul>
<li><p class="startli">What do these kinds of warnings / errors mean? <code>WARNING: possibly wrote twice at addr 4000 (93-&gt;3E)</code> <code>Warning: Write from one bank spans into the next. 7ff7 -&gt; 8016 (bank 1 -&gt; 2)</code></p>
<p class="startli">You may have a overflow in one of your ROM banks. If there is more data allocated to a bank than it can hold it then will spill over into the next bank. The warnings are generated by <a class="el" href="docs_toolchain.html#ihxcheck">ihxcheck</a> during conversion of an .ihx file into a ROM file.</p>
<p class="startli">See the section <a class="el" href="docs_rombanking_mbcs.html">ROM/RAM Banking and MBCs</a> for more details about how banks work and what their size is. You may want to use a tool such as <a class="el" href="docs_links_and_tools.html#romusage">romusage</a> to calculate the amount of free and used space.</p>
</li>
</ul>
<p><br />
</p>
<ul>
<li>Why is the compiler so slow, or why did it suddenly get much slower?<ul>
<li>This may happen if you have large initialized arrays declared without the <code>const</code> keyword. It's important to use the const keyword for read-only data. See <a class="el" href="docs_coding_guidelines.html#const_gbtd_gbmb">const_gbtd_gbmb</a> and <a class="el" href="docs_coding_guidelines.html#const_array_data">const_array_data</a></li>
</ul>
</li>
</ul>
<p><br />
</p>
<ul>
<li>What flags should be enabled for debugging?<ul>
<li>You can use the <a class="el" href="docs_toolchain.html#lcc_debug">lcc debug flag</a></li>
</ul>
</li>
</ul>
<p><br />
</p>
<ul>
<li>Why are 8 bit numbers not printing correctly with <a class="el" href="stdio_8h.html#a79c1db3e4a2aaa60d5afa76f7d984d0b">printf()</a>?<ul>
<li>To correctly pass chars/uint8s for printing, they must be explicitly re-cast as such when calling the function. See docs_chars_varargs for more details.</li>
</ul>
</li>
</ul>
<p><br />
</p>
<ul>
<li>How can maps larger than 32x32 tiles be scrolled? &amp; Why is the map wrapping around to the left side when setting a map wider than 32 tiles with <a class="el" href="gb_8h.html#a48579cba9ac2d81ff7214cf3ff25563d">set_bkg_data()</a>?<ul>
<li>The hardware Background map is 32 x 32 tiles. The screen viewport that can be scrolled around that map is 20 x 18 tiles. In order to scroll around within a much larger map, new tiles must be loaded at the edges of the screen viewport in the direction that it is being scrolled. <a class="el" href="gb_8h.html#a9369a5771b340680f4af3386ac4e19b2">set_bkg_submap</a> can be used to load those rows and columns of tiles from the desired sub-region of the large map.</li>
<li>See the "Large Map" example program and <a class="el" href="gb_8h.html#a9369a5771b340680f4af3386ac4e19b2">set_bkg_submap()</a></li>
<li>Writes that exceed coordinate 31 of the Background tile map on the x or y axis will wrap around to the Left and Top edges.</li>
</ul>
</li>
</ul>
<p><br />
</p>
<ul>
<li>When using gbt_player with music in banks, how can the current bank be restored after calling gbt_update()? (since it changes the currently active bank without restoring it).<ul>
<li>See <a class="el" href="docs_rombanking_mbcs.html#banking_current_bank">restoring the current bank</a></li>
</ul>
</li>
</ul>
<p><br />
</p>
</div></div><!-- contents -->
</div><!-- PageDoc -->
</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>