git.y1.nz

gbdk-2020

GameBoy Development Kit
download: https://git.y1.nz/archives/gbdk.tar.gz
README | Files | Log | Refs | LICENSE

commit 39e22ef511057c825e046fe31d6e6075a8269802
parent e3a7d26bb1dcf7a89e0bd81f02ce0be170d5af2e
Author: bbbbbr <bbbbbr@users.noreply.github.com>
Date:   Tue,  1 Nov 2022 21:18:40 -0700

Merge pull request #439 from bbbbbr/docs_4_1_0

Docs: Migration guide: 4.1.0 update
Diffstat:
Mdocs/api/cgb_8h.html8++++----
Mdocs/api/cgb_8h_source.html4++--
Mdocs/api/docs_migrating_versions.html3++-
Mdocs/pages/09_migrating_new_versions.md3++-
4 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/docs/api/cgb_8h.html b/docs/api/cgb_8h.html @@ -101,9 +101,9 @@ $(document).ready(function(){initNavTree('cgb_8h.html',''); initResizable(); }); <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a> Macros</h2></td></tr> -<tr class="memitem:a4a118ad3ee36468a3fa616977a64864e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(r, g, <a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>)&#160;&#160;&#160;((<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)((((<a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>) &amp; 0x1f) &lt;&lt; 10) | (((g) &amp; 0x1f) &lt;&lt; 5) | (((r) &amp; 0x1f) &lt;&lt; 0)))</td></tr> +<tr class="memitem:a4a118ad3ee36468a3fa616977a64864e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(r, g, <a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>)&#160;&#160;&#160;((<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)((((<a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>) &amp; 0x1f) &lt;&lt; 10) | ((<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)(((g) &amp; 0x1f) &lt;&lt; 5)) | (((r) &amp; 0x1f) &lt;&lt; 0)))</td></tr> <tr class="separator:a4a118ad3ee36468a3fa616977a64864e"><td class="memSeparator" colspan="2">&#160;</td></tr> -<tr class="memitem:a7d2ed0f10b2b74123a544327bbfd7564"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#a7d2ed0f10b2b74123a544327bbfd7564">RGB8</a>(r, g, <a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>)&#160;&#160;&#160;((<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)((((r) &gt;&gt; 3) &amp; 0x1f) | ((((g) &gt;&gt; 3) &amp; 0x1f) &lt;&lt; 5) | ((((<a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>) &gt;&gt; 3) &amp; 0x1f) &lt;&lt; 10)))</td></tr> +<tr class="memitem:a7d2ed0f10b2b74123a544327bbfd7564"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#a7d2ed0f10b2b74123a544327bbfd7564">RGB8</a>(r, g, <a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>)&#160;&#160;&#160;(((<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)((((<a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>) &gt;&gt; 3) &amp; 0x1f) &lt;&lt; 10)) | ((<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)((((g) &gt;&gt; 3) &amp; 0x1f) &lt;&lt; 5)) | (((r) &gt;&gt; 3) &amp; 0x1f))</td></tr> <tr class="separator:a7d2ed0f10b2b74123a544327bbfd7564"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ab5a6e450fcf10402278fe585a421dbbd"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#ab5a6e450fcf10402278fe585a421dbbd">RGBHTML</a>(RGB24bit)&#160;&#160;&#160;(<a class="el" href="nes_8h.html#a7d2ed0f10b2b74123a544327bbfd7564">RGB8</a>((((RGB24bit) &gt;&gt; 16) &amp; 0xff), (((RGB24bit) &gt;&gt; 8) &amp; 0xff), ((RGB24bit) &amp; 0xff)))</td></tr> <tr class="separator:ab5a6e450fcf10402278fe585a421dbbd"><td class="memSeparator" colspan="2">&#160;</td></tr> @@ -210,7 +210,7 @@ Functions</h2></td></tr> <tr> <td></td> <td>)</td> - <td></td><td>&#160;&#160;&#160;((<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)((((<a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>) &amp; 0x1f) &lt;&lt; 10) | (((g) &amp; 0x1f) &lt;&lt; 5) | (((r) &amp; 0x1f) &lt;&lt; 0)))</td> + <td></td><td>&#160;&#160;&#160;((<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)((((<a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>) &amp; 0x1f) &lt;&lt; 10) | ((<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)(((g) &amp; 0x1f) &lt;&lt; 5)) | (((r) &amp; 0x1f) &lt;&lt; 0)))</td> </tr> </table> </div><div class="memdoc"> @@ -255,7 +255,7 @@ Functions</h2></td></tr> <tr> <td></td> <td>)</td> - <td></td><td>&#160;&#160;&#160;((<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)((((r) &gt;&gt; 3) &amp; 0x1f) | ((((g) &gt;&gt; 3) &amp; 0x1f) &lt;&lt; 5) | ((((<a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>) &gt;&gt; 3) &amp; 0x1f) &lt;&lt; 10)))</td> + <td></td><td>&#160;&#160;&#160;(((<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)((((<a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>) &gt;&gt; 3) &amp; 0x1f) &lt;&lt; 10)) | ((<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)((((g) &gt;&gt; 3) &amp; 0x1f) &lt;&lt; 5)) | (((r) &gt;&gt; 3) &amp; 0x1f))</td> </tr> </table> </div><div class="memdoc"> diff --git a/docs/api/cgb_8h_source.html b/docs/api/cgb_8h_source.html @@ -97,9 +97,9 @@ $(document).ready(function(){initNavTree('cgb_8h_source.html',''); initResizable <div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#include &lt;types.h&gt;</span></div> <div class="line"><a name="l00021"></a><span class="lineno"> 21</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="l00022"></a><span class="lineno"> 22</span>&#160; </div> -<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e"> 33</a></span>&#160;<span class="preprocessor">#define RGB(r, g, b) ((uint16_t)((((b) &amp; 0x1f) &lt;&lt; 10) | (((g) &amp; 0x1f) &lt;&lt; 5) | (((r) &amp; 0x1f) &lt;&lt; 0)))</span></div> +<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e"> 33</a></span>&#160;<span class="preprocessor">#define RGB(r, g, b) ((uint16_t)((((b) &amp; 0x1f) &lt;&lt; 10) | ((uint16_t)(((g) &amp; 0x1f) &lt;&lt; 5)) | (((r) &amp; 0x1f) &lt;&lt; 0)))</span></div> <div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; </div> -<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="cgb_8h.html#a7d2ed0f10b2b74123a544327bbfd7564"> 47</a></span>&#160;<span class="preprocessor">#define RGB8(r, g, b) ((uint16_t)((((r) &gt;&gt; 3) &amp; 0x1f) | ((((g) &gt;&gt; 3) &amp; 0x1f) &lt;&lt; 5) | ((((b) &gt;&gt; 3) &amp; 0x1f) &lt;&lt; 10)))</span></div> +<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="cgb_8h.html#a7d2ed0f10b2b74123a544327bbfd7564"> 47</a></span>&#160;<span class="preprocessor">#define RGB8(r, g, b) (((uint16_t)((((b) &gt;&gt; 3) &amp; 0x1f) &lt;&lt; 10)) | ((uint16_t)((((g) &gt;&gt; 3) &amp; 0x1f) &lt;&lt; 5)) | (((r) &gt;&gt; 3) &amp; 0x1f))</span></div> <div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; </div> <div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="cgb_8h.html#ab5a6e450fcf10402278fe585a421dbbd"> 59</a></span>&#160;<span class="preprocessor">#define RGBHTML(RGB24bit) (RGB8((((RGB24bit) &gt;&gt; 16) &amp; 0xff), (((RGB24bit) &gt;&gt; 8) &amp; 0xff), ((RGB24bit) &amp; 0xff)))</span></div> <div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; </div> diff --git a/docs/api/docs_migrating_versions.html b/docs/api/docs_migrating_versions.html @@ -99,7 +99,8 @@ Porting to GBDK-2020 4.1.0</h2> <li>GBDK now requires SDCC 4.2 or higher with GBDK-2020 patches for the the z80 linker</li> <li>The default calling convention changed in SDCC 4.2, see <a class="el" href="docs_coding_guidelines.html#sdcc_calling_convention">Calling Conventions</a> for more details.<ul> <li>If you are linking to libraries compiled with an older version of SDCC / GBDK then you may have to recompile them.</li> -<li>If there are functions written in ASM which receive parameters, they should also be reviewed to make sure they work with the new <code>__sdcccall(1)</code> calling convention, or have their header declaration changed to use <code>OLDCALL</code>.</li> +<li>If there are existing functions written in ASM which <b>receive parameters</b> they should also be reviewed to make sure they work with the new <code>__sdcccall(1)</code> calling convention, or have their header declaration changed to use <code>OLDCALL</code>.</li> +<li>If there are existing functions written in ASM which <b>call other functions written in C</b> the callee C function should be declared OLDCALL.</li> <li>If you are using tools such as <code>rgb2sdas</code> (from hUGETracker/Driver) you may need to edit the resulting .o file and replace <code>-mgbz80</code> with <code>-msm83</code> in addition to using <code>OLDCALL</code></li> </ul> </li> diff --git a/docs/pages/09_migrating_new_versions.md b/docs/pages/09_migrating_new_versions.md @@ -9,7 +9,8 @@ This section contains information that may be useful to know or important when u - GBDK now requires SDCC 4.2 or higher with GBDK-2020 patches for the the z80 linker - The default calling convention changed in SDCC 4.2, see @ref sdcc_calling_convention "Calling Conventions" for more details. - If you are linking to libraries compiled with an older version of SDCC / GBDK then you may have to recompile them. - - If there are functions written in ASM which receive parameters, they should also be reviewed to make sure they work with the new `__sdcccall(1)` calling convention, or have their header declaration changed to use `OLDCALL`. + - If there are existing functions written in ASM which __receive parameters__ they should also be reviewed to make sure they work with the new `__sdcccall(1)` calling convention, or have their header declaration changed to use `OLDCALL`. + - If there are existing functions written in ASM which __call other functions written in C__ the callee C function should be declared OLDCALL. - If you are using tools such as `rgb2sdas` (from hUGETracker/Driver) you may need to edit the resulting .o file and replace `-mgbz80` with `-msm83` in addition to using `OLDCALL` - The SDCC `PORT` name for the Game Boy and related clones changed from `gbz80` to `sm83`. - Additional details in the @ref console_port_plat_settings "Console Port and Platform Settings" section and @ref faq_gbz80_sm83_old_port_name_error "FAQ entry". @ref lcc will error out if the old `PORT` name is passed in.

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.