Skip to content

Commit

Permalink
Deploying to gh-pages from @ da5c5b5 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
MegaMech committed Jan 20, 2024
1 parent 59a96b5 commit 3031184
Show file tree
Hide file tree
Showing 89 changed files with 1,513 additions and 1,272 deletions.
4 changes: 2 additions & 2 deletions actors.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
<div class="textblock"><h1><a class="anchor" id="autotoc_md0"></a>
Actors</h1>
<p>If you are familiar with oot or sm64 prepare to be very disappointed. Both games split actors into separate files. In an unorderly fashion, mk64 appears to place all actors in the same file save for the odd exception.</p>
<p><a class="el" href="structActor.html">Actor</a> setup: </p><div class="fragment"><div class="line"><span class="comment">// Loop through the actor list and run that particular actors behaviour.</span></div>
<p>Example actor setup based on <a class="el" href="actors_8h.html#aa6387502059c64a81d32c944b39d78f9">update_course_actors</a> </p><div class="fragment"><div class="line"><span class="comment">// Loop through the actor list and run that particular actors behaviour.</span></div>
<div class="line"><span class="keywordflow">for</span> actorListSize {</div>
<div class="line"> actor = <a class="code" href="code__800029B0_8c.html#a37d0e0553a4cd552f52174f4b33b798d">gActorList</a>[i]</div>
<div class="line"> <span class="keywordflow">switch</span>(actor-&gt;type) {</div>
Expand Down Expand Up @@ -119,7 +119,7 @@
</div><!-- fragment --><p> Check <a class="el" href="actor__types_8h.html">actor_types.h</a> for a full list of options. You can create a new actor struct for your actor and customize it or use a predefined one. All actor structs must retain the same size. Generally, the types in the struct may be modified so long as <code>type</code> and <code>flags</code> stay the same as those are used elsewhere.</p>
<p>See <code>update_obj_railroad_crossing</code> for an example of how a timer may be setup and used. <br />
</p>
<p>Audio may be activated in the following method: <code>func_800C98B8(actor-&gt;pos, actor-&gt;velocity, s32_audio_flag);</code></p>
<p>Audio may be activated using the following method: <a class="el" href="actors_8h.html#a2f37ef11eaac95c7a485cb0f4c42365b">func_800C98B8</a></p>
<p>For more complex uses such as distanceFrom and collision, you will need to analyze the other actors. </p>
</div></div><!-- contents -->
</div><!-- PageDoc -->
Expand Down
4 changes: 2 additions & 2 deletions actorsmenu.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@
<p><code>gActorList</code> contains: </p><div class="fragment"><div class="line">trees, bushes, falling rocks, kiwano-fruit, banana, shells, piranha-plant, train wheels, rail-road crossing, cows, yoshi-valley&#39;s egg, spinning signs, palm trees, paddle for the paddle-wheeled boat, wheels for cars/trucks, etc.</div>
</div><!-- fragment --><p> The actor code has two main parts; the update code and the render code. The update code alters the position/rotation of the object whereas the render code displays the object on the screen. <br />
</p>
<p><code>gObjectList</code> contains: </p><div class="fragment"><div class="line">thwomps, bowser fire-breath, moles, hedgehogs, snowmen, crabs, etc (also, probably penguins and birds).</div>
<p><code>gObjectList</code> contains: </p><div class="fragment"><div class="line">thwomps, bowser fire-breath, moles, hedgehogs, snowmen, crabs, particles, leaves, etc (also, probably penguins and birds).</div>
</div><!-- fragment --><p> The object system is much more complex than actors and is not well documented.</p>
<p>
<br><br>
<br>
<style>
.pagebutton {
display: inline-block;
Expand Down
2 changes: 1 addition & 1 deletion actorsmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ var actorsmenu =
[ "Actors", "actors.html#autotoc_md0", null ]
] ],
[ "objects", "objects.html", [
[ "Objects", "objects.html#autotoc_md28", null ]
[ "Objects", "objects.html#autotoc_md40", null ]
] ]
];
10 changes: 4 additions & 6 deletions basics.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,9 @@
}
.pagelink:hover {
box-shadow: 0 5px 15px 5px rgba(0,0,0,1);

}
.pagelink:hover img {
transform: scale3d(1.1,1.1,1.1);

}
.pageimg {
display: inline-block;
Expand Down Expand Up @@ -189,9 +187,9 @@
<div class="pagelink">
<div class="pageimg"><img width=320 src="buttonimage.png" /></div>
<div class="content">
<div class="pageheading">Control Flow</div>
<div class="pageheading">Codebase Overview</div>
<div class="pagedescription">
<p>Introduction to mk64's operating states and threading. Acclimate to the codebase with this essential read.</p>
<p>Introduction to mk64's functionality, operating states, and threading. Acclimate to the codebase with this essential read.</p>
</div>
</div>
</div>
Expand All @@ -209,7 +207,7 @@ <h2>Foundational Knowledge</h2>
<div class="content">
<div class="pageheading">Basic Concepts</div>
<div class="pagedescription">
<p>Decomp, hexadecimal, cpu threads, addresses, and types to provide foundation knowledge.</p>
<p>n64 addressing, alignment, and basic types.</p>
</div>
</div>
</div>
Expand All @@ -231,7 +229,7 @@ <h2>Foundational Knowledge</h2>
</div>

</p>
<p><a class="el" href="compiling.html">Installing mk64 Decomp</a> <a class="el" href="concepts.html">Basic Concepts</a> <a class="el" href="controlflow.html">Control Flow</a> <a class="el" href="terminology.html">Terminology</a> <a class="el" href="buildwindows.html">Compiling for Windows</a> </p>
<p><a class="el" href="compiling.html">Installing mk64 Decomp</a> <a class="el" href="concepts.html">Basic Concepts</a> <a class="el" href="controlflow.html">Codebase Overview</a> <a class="el" href="terminology.html">Terminology</a> <a class="el" href="buildwindows.html">Compiling for Windows</a> </p>
</div></div><!-- contents -->
</div><!-- PageDoc -->
</div><!-- doc-content -->
Expand Down
40 changes: 34 additions & 6 deletions basics.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,39 @@
var basics =
[
[ "Installing mk64 Decomp", "compiling.html", null ],
[ "Basic Concepts", "concepts.html", null ],
[ "Control Flow", "controlflow.html", [
[ "Introduction to State", "controlflow.html#autotoc_md24", null ],
[ "Threading", "controlflow.html#autotoc_md25", null ],
[ "Overall Control Flow", "controlflow.html#autotoc_md26", null ]
[ "Installing mk64 Decomp", "compiling.html", [
[ "Build Instructions", "compiling.html#autotoc_md17", null ],
[ "Linux", "compiling.html#autotoc_md18", null ],
[ "Windows", "compiling.html#autotoc_md20", null ],
[ "macOS", "compiling.html#autotoc_md21", null ],
[ "Docker", "compiling.html#autotoc_md22", null ],
[ "Building US", "compiling.html#autotoc_md23", null ],
[ "Building EU", "compiling.html#autotoc_md24", null ]
] ],
[ "Basic Concepts", "concepts.html", [
[ "Addresses", "concepts.html#autotoc_md1", null ],
[ "How Errors Happen", "concepts.html#autotoc_md2", [
[ "Array Overflows", "concepts.html#autotoc_md3", null ]
] ],
[ "Code", "concepts.html#autotoc_md4", null ]
] ],
[ "Codebase Overview", "controlflow.html", [
[ "Paradigm", "controlflow.html#autotoc_md25", null ],
[ "Threading", "controlflow.html#autotoc_md26", null ],
[ "Overall Control Flow", "controlflow.html#autotoc_md27", null ],
[ "Segments", "controlflow.html#autotoc_md28", null ],
[ "Code Breakdown", "controlflow.html#autotoc_md29", [
[ "Players", "controlflow.html#autotoc_md30", null ],
[ "Actors", "controlflow.html#autotoc_md31", null ],
[ "Objects", "controlflow.html#autotoc_md32", null ],
[ "Courses", "controlflow.html#autotoc_md33", [
[ "Arch", "compiling.html#autotoc_md19", null ],
[ "Course Folder", "controlflow.html#autotoc_md34", null ]
] ],
[ "UI & Other 2D Screen data", "controlflow.html#autotoc_md35", null ],
[ "Engine", "controlflow.html#autotoc_md36", null ],
[ "Math", "controlflow.html#autotoc_md37", null ],
[ "Ending", "controlflow.html#autotoc_md38", null ]
] ]
] ],
[ "Terminology", "terminology.html", null ],
[ "Compiling for Windows", "buildwindows.html", null ]
Expand Down
10 changes: 5 additions & 5 deletions boostramps.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<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>Mario Kart 64: Boostramps</title>
<title>Mario Kart 64: Boost Ramps</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>
Expand Down Expand Up @@ -84,12 +84,12 @@

<div class="PageDoc"><div class="header">
<div class="headertitle">
<div class="title">Boostramps </div> </div>
<div class="title">Boost Ramps </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h1><a class="anchor" id="autotoc_md31"></a>
Boostramps</h1>
<p>Boostramps use a surface-type and is part of the course geography. </p>
<div class="textblock"><h1><a class="anchor" id="autotoc_md42"></a>
Boost Ramps</h1>
<p>Boost ramps use a surface-type and is part of the course geography. </p>
</div></div><!-- contents -->
</div><!-- PageDoc -->
</div><!-- doc-content -->
Expand Down
32 changes: 16 additions & 16 deletions buildwindows.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,45 +87,45 @@
<div class="title">Compiling for Windows </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h2><a class="anchor" id="autotoc_md3"></a>
<div class="textblock"><h2><a class="anchor" id="autotoc_md5"></a>
Compiling mk64 Decomp In Windows</h2>
<p><em><b>This method is not recommended nor supported. However, it is the only solution to build in W7/W8. WSL is the path of least resistance, use that not this</b></em></p>
<blockquote class="doxtable">
<p>Building decomp using msys on Windows is a journey.. A journey akin to crawling over broken glass in the dark. </p>
</blockquote>
<p>- leogames</p>
<p>The extraneous and convoluted process to building mk64 decomp on Windows begins with disabling your anti-virus program or adding an exception to the mk64 decomp folder and the msys2 installation folder. Please note that this action may impact the security of your system. Prior to proceeding, make sure to understand the increased security risks that may result from this step. Nobody except you, is responsible and liable for your system and its security.</p>
<h3><a class="anchor" id="autotoc_md4"></a>
<h3><a class="anchor" id="autotoc_md6"></a>
Preamble</h3>
<p>Any misteps may require a complete uninstall of <code>MSYS2 MinGW x64</code> and restarting from the very beginning. <br />
It is unknown if <code>MSYS MinGW x32</code> is supported (most likely not).</p>
<h3><a class="anchor" id="autotoc_md5"></a>
<h3><a class="anchor" id="autotoc_md7"></a>
Step 1: Download MSYS2 MinGW x64</h3>
<p><a href="https://www.msys2.org/">https://www.msys2.org/</a></p>
<p>Follow the initial instructions to update the base packages. Ignore installing any extra packages in-case they conflict with the below steps.</p>
<p>MinGW is a separate program from Msys2. However, it must be wrapped right into msys2. Compiling recomp requires steps using<br />
<code>MSYS2 MSYS</code> <em>and</em> <code>MSYS2 MinGW x64</code>. The instructions will clearly differentiate which terminal program to launch and run in the section titles.</p>
<p><a class="anchor" id="autotoc_md6"></a> </p><h5><em>Why flip-flop between both?</em></h5>
<p><a class="anchor" id="autotoc_md8"></a> </p><h5><em>Why flip-flop between both?</em></h5>
<p>Compiling the recomp executable that generates the source files for compiling the compiler requires capstone. A disassembly, analysis, and reverse-engineering framework. Capstone is only available on <code>MSYS2 MinGW x64</code>. It is not available on <code>MSYS2 MSYS</code>. However, compiling the compiler itself requires <code>MSYS2 MSYS</code> because it contains an equivallent dependency for <code>mman</code>. A memory mapping library. <code>MSYS2 MinGW x64</code> does not contain an equivallent dependancy.</p>
<h3><a class="anchor" id="autotoc_md7"></a>
<h3><a class="anchor" id="autotoc_md9"></a>
Step 2: Install Dependancies in MSYS2 MinGW x64</h3>
<div class="fragment"><div class="line">pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-capstone pkgconf make python3 git</div>
</div><!-- fragment --><h3><a class="anchor" id="autotoc_md8"></a>
</div><!-- fragment --><h3><a class="anchor" id="autotoc_md10"></a>
Step 3: Install Dependencies in MSYS2 MSYS</h3>
<div class="fragment"><div class="line">pacman -S gcc</div>
</div><!-- fragment --><h3><a class="anchor" id="autotoc_md9"></a>
</div><!-- fragment --><h3><a class="anchor" id="autotoc_md11"></a>
Step 3.5: Rename include in recomp.cpp</h3>
<p>For some reason on Windows capstone is inside of a capstone folder. </p><div class="fragment"><div class="line">#include &lt;capstone/capstone.h&gt;</div>
</div><!-- fragment --><h3><a class="anchor" id="autotoc_md10"></a>
</div><!-- fragment --><h3><a class="anchor" id="autotoc_md12"></a>
Step 4: Get Binutils</h3>
<p>Download and install the mips64 tool chain: <br />
<a href="https://github.com/N64-tools/mips64-gcc-toolchain">https://github.com/N64-tools/mips64-gcc-toolchain</a></p>
<p>Merge the inner folders (bin, share, etc.) with the respective folders in <code>C:\msys64\mingw64\</code></p>
<h3><a class="anchor" id="autotoc_md11"></a>
Step 5: Compiling recomp.exe in &lt;tt&gt;MSYS2 MinGW x64&lt;/tt&gt;</h3>
<h3><a class="anchor" id="autotoc_md13"></a>
Step 5: Compiling recomp.exe in MSYS2 MinGW x64</h3>
<p>In <code>MSYS2 MinGW x64</code> run in <code>mk64/tools/ido5.3_recomp/</code>: </p><div class="fragment"><div class="line">g++ recomp.cpp -o recomp -g -lcapstone -Dugen53</div>
</div><!-- fragment --><h3><a class="anchor" id="autotoc_md12"></a>
Step 6: Generate Recomp Source Files in &lt;tt&gt;MSYS2 MinGW x64&lt;/tt&gt;</h3>
</div><!-- fragment --><h3><a class="anchor" id="autotoc_md14"></a>
Step 6: Generate Recomp Source Files in MSYS2 MinGW x64</h3>
<p>Generate the .c files which will compile into the recomp binaries. mk64 requires the following compiler binaries: <code>as1, cc, cfe, copt, ugen, ujoin, uld, umerge, uopt</code></p>
<p>In <code>MSYS2 MinGW x64</code> run in the directory <code>mk64/tools/ido5.3_recomp/</code>: </p><div class="fragment"><div class="line">./recomp ../ido5.3_compiler/usr/lib/as1 &gt; as1_c.c</div>
<div class="line">./recomp ../ido5.3_compiler/usr/lib/cc &gt; cc_c.c</div>
Expand All @@ -137,8 +137,8 @@ <h3><a class="anchor" id="autotoc_md11"></a>
<div class="line">./recomp ../ido5.3_compiler/usr/lib/umerge &gt; umerge_c.c</div>
<div class="line">./recomp ../ido5.3_compiler/usr/lib/uopt &gt; uopt_c.c</div>
</div><!-- fragment --><p> If you get an assertion failed error. Then the directory to the compiler is incorrect. The binary for cc is in <code>/ido5.3_compiler/usr/bin/</code> so do: </p><div class="fragment"><div class="line">./recomp ../ido5.3_compiler/usr/bin/cc &gt; cc_c.c</div>
</div><!-- fragment --> <h3><a class="anchor" id="autotoc_md13"></a>
Step 7: Compiling the recomp compiler in &lt;tt&gt;MSYS2 MSYS&lt;/tt&gt;</h3>
</div><!-- fragment --> <h3><a class="anchor" id="autotoc_md15"></a>
Step 7: Compiling the recomp compiler in MSYS2 MSYS</h3>
<p>In <code>MSYS2 MSYS</code> run in the directory <code>mk64/tools/ido5.3_recomp/</code>: </p><div class="fragment"><div class="line">gcc libc_impl.c as1_c.c -o as1 -g -fno-strict-aliasing -lm -no-pie -DIDO53 -O2</div>
<div class="line">gcc libc_impl.c cc_c.c -o cc -g -fno-strict-aliasing -lm -no-pie -DIDO53 -O2</div>
<div class="line">gcc libc_impl.c cfe_c.c -o cfe -g -fno-strict-aliasing -lm -no-pie -DIDO53 -O2</div>
Expand All @@ -150,8 +150,8 @@ <h3><a class="anchor" id="autotoc_md11"></a>
<div class="line">gcc libc_impl.c uopt_c.c -o uopt -g -fno-strict-aliasing -lm -no-pie -DIDO53 -O2</div>
</div><!-- fragment --><p> <code>-O2</code> is an optional optimization flag. <br />
</p>
<h3><a class="anchor" id="autotoc_md14"></a>
Step 8: Compile mk64 in &lt;tt&gt;MSYS2 MinGW x64&lt;/tt&gt;</h3>
<h3><a class="anchor" id="autotoc_md16"></a>
Step 8: Compile mk64 in MSYS2 MinGW x64</h3>
<p>In <code>/mk64/</code> run: </p><div class="fragment"><div class="line">make -j#</div>
</div><!-- fragment --><p> Replace # with your number of CPU cores for quicker compilation. </p>
</div></div><!-- contents -->
Expand Down
Loading

0 comments on commit 3031184

Please sign in to comment.