Files

123 lines
15 KiB
HTML

<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta http-equiv="X-UA-Compatible" content="IE=edge"><title>dos_mapper.h</title><link rel="stylesheet" type="text/css" href="../styles/main.css" /><script type="text/javascript" src="../styles/main.js"></script><script type="text/javascript">NDLoader.LoadJS("Content", "../styles/");</script></head>
<!-- Generated by Natural Docs, version 2.2 -->
<!-- saved from url=(0016)http://localhost -->
<body onload="NDLoader.OnLoad('Content');" class="NDPage NDContentPage">
<a name="Core"></a><a name="Topic1351"></a><div class="CTopic TGroup LC first">
<div class="CTitle">Core</div>
</div>
<a name="DOSMapper_Init"></a><a name="Topic1352"></a><div class="CTopic TFunction LC">
<div class="CTitle">DOSMapper_Init</div>
<div id="NDPrototype1352" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">bool</span> DOSMapper_Init()</div></div>
<div class="CBody"><p>Initializes DOS extended BIOS</p></div>
</div>
<a name="DOSMapper_GetVarTable"></a><a name="Topic1353"></a><div class="CTopic TFunction LC">
<div class="CTitle">DOSMapper_GetVarTable</div>
<div id="NDPrototype1353" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">inline</span> DOS_VarTable* DOSMapper_GetVarTable()</div></div>
<div class="CBody"><p>Gets Memory Mappers variable table</p><div class="CHeading">Return</div><p>Pointer to DOS_VarTable structure with information about all available Memory mappers</p></div>
</div>
<a name="Allocation"></a><a name="Topic1354"></a><div class="CTopic TGroup LC">
<div class="CTitle">Allocation</div>
</div>
<a name="DOSMapper_Alloc"></a><a name="Topic1355"></a><div class="CTopic TFunction LC">
<div class="CTitle">DOSMapper_Alloc</div>
<div id="NDPrototype1355" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">bool</span> DOSMapper_Alloc(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8&nbsp;</td><td class="PName last">type,</td></tr><tr><td class="PType first">u8&nbsp;</td><td class="PName last">slot,</td></tr><tr><td class="PType first">DOS_Segment*&nbsp;</td><td class="PName last">seg</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Allocates a segment.&nbsp; Implementation of extenpended BIOS's ALL_SEG routine.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">type<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>Type of segment to allocate. Can be DOS_ALLOC_USER or DOS_ALLOC_SYS</p></td></tr><tr><td class="CDLEntry">slot<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>Slot to allocate (FxxxSSPP format). You have to or your segment number with those flags:</p></td></tr></table><pre class="CText">DOS_SEGSLOT_THIS Allocate a segment to the specified slot<br />DOS_SEGSLOT_OTHER Allocate a segment in another slot than the one specified<br />DOS_SEGSLOT_THISFIRST Allocate a segment to the specified slot if free, otherwise in another slot<br />DOS_SEGSLOT_OTHERFIRST Allocate a segment in another slot than the one specified if free otherwise try in specified slot</pre><p>seg - Information about allocated segment</p><div class="CHeading">Return</div><p>TRUE the segment have been allocated</p></div>
</div>
<a name="DOSMapper_Free"></a><a name="Topic1356"></a><div class="CTopic TFunction LC">
<div class="CTitle">DOSMapper_Free</div>
<div id="NDPrototype1356" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">bool</span> DOSMapper_Free(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8&nbsp;</td><td class="PName last">seg,</td></tr><tr><td class="PType first">u8&nbsp;</td><td class="PName last">slot</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Frees a segment.&nbsp; Implementation of extenpended BIOS's FRE_SEG routine.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">seg<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>Segment number to free</p></td></tr><tr><td class="CDLEntry">slot<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>Slot of the Memory mapper</p></td></tr></table><div class="CHeading">Return</div><p>TRUE the segment have been freed</p></div>
</div>
<a name="DOSMapper_FreeStruct"></a><a name="Topic1357"></a><div class="CTopic TFunction LC">
<div class="CTitle">DOSMapper_FreeStruct</div>
<div id="NDPrototype1357" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> <span class="SHKeyword">bool</span> DOSMapper_FreeStruct(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">DOS_Segment*&nbsp;</td><td class="PName last">seg</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Frees a segment through a structure.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">seg<div class="CDLParameterType">DOS_Segment*</div></td><td class="CDLDefinition"><p>Segment structure (contain segment number and Memory mapper slot)</p></td></tr></table><div class="CHeading">Return</div><p>TRUE the segment have been freed</p></div>
</div>
<a name="Page_I/O"></a><a name="Topic1358"></a><div class="CTopic TGroup LC">
<div class="CTitle">Page I/O</div>
</div>
<a name="DOSMapper_ReadByte"></a><a name="Topic1359"></a><div class="CTopic TFunction LC">
<div class="CTitle">DOSMapper_ReadByte</div>
<div id="NDPrototype1359" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters">u8 DOSMapper_ReadByte(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8&nbsp;</td><td class="PName last">seg,</td></tr><tr><td class="PType first">u16&nbsp;</td><td class="PName last">addr</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Reads byte from given address.&nbsp; Implementation of extenpended BIOS's RD_SEG routine.&nbsp; /!\ Warning: The mapper RAM slot must be selected in page-2 when this routine is called.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">seg<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>Segment number to read from</p></td></tr><tr><td class="CDLEntry">addr<div class="CDLParameterType">u16</div></td><td class="CDLDefinition"><p>Address within the segment (0000h~3FFFh)</p></td></tr></table><div class="CHeading">Return</div><p>Value at the given address</p></div>
</div>
<a name="DOSMapper_WriteByte"></a><a name="Topic1360"></a><div class="CTopic TFunction LC">
<div class="CTitle">DOSMapper_WriteByte</div>
<div id="NDPrototype1360" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">void</span> DOSMapper_WriteByte(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8&nbsp;</td><td class="PName last">seg,</td></tr><tr><td class="PType first">u16&nbsp;</td><td class="PName last">addr,</td></tr><tr><td class="PType first">u8&nbsp;</td><td class="PName last">val</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Writes byte to given address.&nbsp; Implementation of extenpended BIOS's WR_SEG routine.&nbsp; /!\ Warning: The mapper RAM slot must be selected in page-2 when this routine is called.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">seg<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>Segment number to write at</p></td></tr><tr><td class="CDLEntry">addr<div class="CDLParameterType">u16</div></td><td class="CDLDefinition"><p>Address within the segment (0000h~3FFFh)</p></td></tr><tr><td class="CDLEntry">val<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>Value to write</p></td></tr></table></div>
</div>
<a name="Page_handling"></a><a name="Topic1361"></a><div class="CTopic TGroup LC">
<div class="CTitle">Page handling</div>
</div>
<a name="DOSMapper_SetPage"></a><a name="Topic1362"></a><div class="CTopic TFunction LC">
<div class="CTitle">DOSMapper_SetPage</div>
<div id="NDPrototype1362" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">void</span> DOSMapper_SetPage(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8&nbsp;</td><td class="PName last">page,</td></tr><tr><td class="PType first">u8&nbsp;</td><td class="PName last">seg</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Selects a segment on the corresponding memory page at the specified address.&nbsp; Implementation of extenpended BIOS's PUT_PH routine.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">page<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>Page to set the segment</p></td></tr><tr><td class="CDLEntry">seg<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>Segment number to set</p></td></tr></table></div>
</div>
<a name="DOSMapper_SetPage0"></a><a name="Topic1363"></a><div class="CTopic TFunction LC">
<div class="CTitle">DOSMapper_SetPage0</div>
<div id="NDPrototype1363" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">void</span> DOSMapper_SetPage0(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8&nbsp;</td><td class="PName last">seg</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Selects a segment on page 0 (0000h~3FFFh).&nbsp; Implementation of extenpended BIOS's PUT_P0 routine.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">seg<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>Segment number to set</p></td></tr></table></div>
</div>
<a name="DOSMapper_SetPage1"></a><a name="Topic1364"></a><div class="CTopic TFunction LC">
<div class="CTitle">DOSMapper_SetPage1</div>
<div id="NDPrototype1364" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">void</span> DOSMapper_SetPage1(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8&nbsp;</td><td class="PName last">seg</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Selects a segment on page 1 (4000h~7FFFh).&nbsp; Implementation of extenpended BIOS's PUT_P1 routine.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">seg<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>Segment number to set</p></td></tr></table></div>
</div>
<a name="DOSMapper_SetPage2"></a><a name="Topic1365"></a><div class="CTopic TFunction LC">
<div class="CTitle">DOSMapper_SetPage2</div>
<div id="NDPrototype1365" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">void</span> DOSMapper_SetPage2(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8&nbsp;</td><td class="PName last">seg</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Selects a segment on page 2 (8000h~BFFFh).&nbsp; Implementation of extenpended BIOS's PUT_P2 routine.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">seg<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>Segment number to set</p></td></tr></table></div>
</div>
<a name="DOSMapper_GetPage"></a><a name="Topic1366"></a><div class="CTopic TFunction LC">
<div class="CTitle">DOSMapper_GetPage</div>
<div id="NDPrototype1366" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters">u8 DOSMapper_GetPage(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8&nbsp;</td><td class="PName last">page</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Gets the selected segment number on the corresponding memory page at the specified address.&nbsp; Implementation of extenpended BIOS's GET_PH routine.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">page<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>Page to get the current selected segment</p></td></tr></table><div class="CHeading">Return</div><p>Segment number selected on the given page</p></div>
</div>
<a name="DOSMapper_GetPage0"></a><a name="Topic1367"></a><div class="CTopic TFunction LC">
<div class="CTitle">DOSMapper_GetPage0</div>
<div id="NDPrototype1367" class="NDPrototype"><div class="PSection PPlainSection">u8 DOSMapper_GetPage0()</div></div>
<div class="CBody"><p>Gets the segment number on page 0 (0000h~3FFFh).&nbsp; Implementation of extenpended BIOS's GET_P0 routine.</p><div class="CHeading">Return</div><p>Segment number</p></div>
</div>
<a name="DOSMapper_GetPage1"></a><a name="Topic1368"></a><div class="CTopic TFunction LC">
<div class="CTitle">DOSMapper_GetPage1</div>
<div id="NDPrototype1368" class="NDPrototype"><div class="PSection PPlainSection">u8 DOSMapper_GetPage1()</div></div>
<div class="CBody"><p>Gets the segment number on page 1 (4000h~7FFFh).&nbsp; Implementation of extenpended BIOS's GET_P1 routine.</p><div class="CHeading">Return</div><p>Segment number</p></div>
</div>
<a name="DOSMapper_GetPage2"></a><a name="Topic1369"></a><div class="CTopic TFunction LC">
<div class="CTitle">DOSMapper_GetPage2</div>
<div id="NDPrototype1369" class="NDPrototype"><div class="PSection PPlainSection">u8 DOSMapper_GetPage2()</div></div>
<div class="CBody"><p>Gets the segment number on page 2 (8000h~BFFFh).&nbsp; Implementation of extenpended BIOS's GET_P2 routine.</p><div class="CHeading">Return</div><p>Segment number</p></div>
</div>
<a name="DOSMapper_GetPage3"></a><a name="Topic1370"></a><div class="CTopic TFunction LC last">
<div class="CTitle">DOSMapper_GetPage3</div>
<div id="NDPrototype1370" class="NDPrototype"><div class="PSection PPlainSection">u8 DOSMapper_GetPage3()</div></div>
<div class="CBody"><p>Gets the segment number on page 3 (C000h~FFFFh).&nbsp; Implementation of extenpended BIOS's GET_P3 routine.</p><div class="CHeading">Return</div><p>Segment number</p></div>
</div>
</body></html>