N64FlashcartMenu/md_docs_99_developer_guide.html
2024-10-20 14:52:17 +00:00

132 lines
6.9 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>N64FlashcartMenu: Developer documentation</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="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" />
</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 id="projectrow">
<td id="projectalign">
<div id="projectname">N64FlashcartMenu
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.5 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "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:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- 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">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
</div><!-- top -->
<div><div class="header">
<div class="headertitle"><div class="title">Developer documentation </div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p >You can use a dev container in VSCode to ease development.</p>
<h2><a class="anchor" id="autotoc_md37"></a>
A quickstart video tutorial on how to set up your environment</h2>
<p ><a href="http://www.youtube.com/watch?v=h05ufOsRgZU" title="Devcontainer quickstart guide"><img src="http://img.youtube.com/vi/h05ufOsRgZU/0.jpg" alt="Devcontainer quickstart guide" class="inline"/></a>.</p>
<h2><a class="anchor" id="autotoc_md38"></a>
To deploy:</h2>
<h3><a class="anchor" id="autotoc_md39"></a>
SC64</h3>
<ul>
<li>Download the deployer <a href="https://github.com/Polprzewodnikowy/SummerCart64/releases/download/v2.20.0/sc64-deployer-windows-v2.20.0.zip">here</a></li>
<li>Extract and place <code>sc64deployer.exe</code> in the <code>tools/sc64</code> directory.</li>
</ul>
<p >Make sure that your firmware is compatible (currently v2.20.0+) See: <a href="https://github.com/Polprzewodnikowy/SummerCart64/blob/v2.20.0/docs/00_quick_startup_guide.md#firmware-backupupdate">here</a></p>
<h4><a class="anchor" id="autotoc_md40"></a>
From the devcontainer</h4>
<p >It is not currently possible to directly communicate with USB devices. BUT, as a workaround you can use a proxy TCP/IP connection Set up a proxy: open a terminal window, <code>cd ./tools/sc64</code> and then <code>./sc64deployer.exe server</code></p>
<p >Then in the dev container, use <code>make run</code> or <code>make run-debug</code></p>
<h4><a class="anchor" id="autotoc_md41"></a>
From your host (Windows) OS</h4>
<ul>
<li>Run <code>./localdeploy.bat</code> from the terminal</li>
</ul>
<p >Toggle the N64 power switch to load the ROM.</p>
<p ><code>ms-vscode.makefile-tools</code> will help (installed automatically in dev container). NOTE: it does not yet work with <code>F5</code>: see <a href="https://devblogs.microsoft.com/cppblog/now-announcing-makefile-support-in-visual-studio-code/">this blog post</a> WORKAROUND: in the dev container terminal, use make directly, i.e.: <code>make</code> The ROM can be found in the <code>output</code> directory.</p>
<p >NOTE: a "release" version of the SC64 menu is called <code>sc64menu.n64</code> and can be created for when you want to add it directly to the SDCard. This is generated by running <code>make all</code> or running <code>make sc64</code>.</p>
<h3><a class="anchor" id="autotoc_md42"></a>
Ares Emulator</h3>
<p >For ease of development and debugging, the menu ROM can run in the <a href="https://ares-emu.net/">Ares emulator</a> (without most flashcart features).</p>
<ul>
<li>Ensure you have the Ares emulator on your computer.</li>
<li>Load the <code>N64FlashcartMenu.n64</code> ROM.</li>
</ul>
<h3><a class="anchor" id="autotoc_md43"></a>
Others</h3>
<ul>
<li>Add the required file to the correct folder on your SD card.</li>
</ul>
<h1><a class="anchor" id="autotoc_md44"></a>
Update Libdragon submodule</h1>
<p >This repo currently uses the <code>preview</code> branch as a submodule at a specific commit. To update to the latest version, use <code>git submodule update --remote</code> from the terminal.</p>
<h1><a class="anchor" id="autotoc_md45"></a>
Generate documentation</h1>
<p >Run <code>doxygen</code> from the dev container terminal. Make sure you fix the warnings before creating a PR! Generated documentation is located in the <code>output/docs</code> folder and auto-published to the <code>gh-pages</code> branch when merged with <code>main</code>.</p>
<p >Once merged, they can be viewed <a href="https://polprzewodnikowy.github.io/N64FlashcartMenu/">here</a></p>
<h2><a class="anchor" id="autotoc_md46"></a>
Test generated docs in the dev-container</h2>
<p >Install Prerequisites: </p><div class="fragment"><div class="line">apt-get install ruby-full build-essential zlib1g-dev</div>
<div class="line">gem install jekyll bundler</div>
</div><!-- fragment --><p >You can then serve the webpage: </p><div class="fragment"><div class="line">cd output/docs &amp;&amp; jekyll serve</div>
</div><!-- fragment --> </div></div><!-- contents -->
</div><!-- PageDoc -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Oct 20 2024 14:52:16 for N64FlashcartMenu by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>