Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > 63e90c6f974301ed6e037d93940ef271 > files > 132

gens-gs-2.16.7-4.mga5.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
	"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<title>MDP - mdp_error.h: Error Codes</title>
	<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
	<link rel='stylesheet' href='mdp.css' type='text/css'>
</head>

<body>

<h1 class='doc_title'>MDP - mdp_error.h: Error Codes</h1>
<h4 class='doc_set'>Mega Drive Plugins v1.0.0<br>Revision 0</h4>

<div class='navbar'>
	<span class='navitem'><a href="index.html">Index</a></span>
	<span class='navarrow'>→</span>
	<span class='navitem'><a href="mdp_error_h.html">mdp_error.h</a></span>
</div>

<p>
It can happen that a function doesn't succeed for some reason. MDP provides a
full set of error codes that can be used to determine if an error occurred,
and to determine what error happened specifically.
</p>

<p>
MDP uses POSIX notation for return values. That is, a negative return value
from any function indicates an error code. For instance, if invalid parameters
were passed to an MDP host services function, the function would return the
value -<span class='macro'>MDP_ERR_INVALID_PARAMETERS</span>.
</p>

<p>
Error codes are split up into various different categories. The high word
of an error code indicates the category, and the low word indicates the
actual error.
</p>

<table>
	<tr><th colspan='3'>MDP General Errors (category == 0x0000)</th></tr>
	<tr>
		<th>Name</th>
		<th>Value</th>
		<th>Description</th>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_OK</td>
		<td class='value'>0x00000000</td>
		<td>No error occurred.</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_CANNOT_OPEN_DLL</td>
		<td class='value'>0x00000001</td>
		<td>
			The emulator could not open an MDP plugin.<br>
			Possible reasons include that the plugin was compiled<br>
			for a different architecture or operating system.
		</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_NO_MDP_SYMBOL</td>
		<td class='value'>0x00000002</td>
		<td>No MDP symbol was found in the plugin.</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_INCORRECT_MAJOR_VERSION</td>
		<td class='value'>0x00000003</td>
		<td>
			The plugin's major MDP interface version number is<br>
			different than the emulator's major MDP interface<br>
			version number.
		</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_DUPLICATE_UUID</td>
		<td class='value'>0x00000004</td>
		<td>
			The plugin's UUID is the same as another plugin<br>
			that was previously loaded.
		</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_NEEDS_CPUFLAGS</td>
		<td class='value'>0x00000005</td>
		<td>
			The plugin requires certain CPU features that are<br>
			not present on the current system.
		</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_INVALID_LICENSE</td>
		<td class='value'>0x00000006</td>
		<td>
			The plugin's license is not compatible with the	emulator.
		</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_FUNCTION_NOT_IMPLEMENTED</td>
		<td class='value'>0x00000101</td>
		<td>
			A plugin called an MDP Host Services function marked as<br>
			"No (NULL)" in
			<a href="mdp_host_h.html"><span class='filename'>mdp_host.h</span></a>,
			and the emulator does not<br>
			implement it.
		</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_INVALID_PARAMETERS</td>
		<td class='value'>0x00000102</td>
		<td>Invalid parameters were passed to a function.</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_OUT_OF_MEMORY</td>
		<td class='value'>0x00000103</td>
		<td>The emulator ran out of memory.</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_UNKNOWN_PTRID</td>
		<td class='value'>0x00000201</td>
		<td>Unused. This is a leftover from MDP v0.1.0.</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_UNKNOWN_VALID</td>
		<td class='value'>0x00000202</td>
		<td>
			An unknown MDP value was requested in<br>
			<span class='struct'>mdp_host_t</span>-><span class='function'>val_get()</span>
			or
			<span class='struct'>mdp_host_t</span>-><span class='function'>val_set()</span>.<br>
			See <span class='enum'><a href="mdp_host_h.html#MDP_VAL">MDP_VAL</a></span>
			for a list of valid value IDs.
		</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_VAL_READ_ONLY</td>
		<td class='value'>0x00000203</td>
		<td>
			The plugin attempted to set an MDP value that is marked<br>
			as read-only.
		</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_UNSUPPORTED_UI</td>
		<td class='value'>0x00000204</td>
		<td>The plugin does not support the current UI subsystem.</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_ROM_NOT_LOADED</td>
		<td class='value'>0x00000205</td>
		<td>
			The plugin attempted to do something that requires a ROM<br>
			to be loaded, but no ROM is loaded.
		</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_UNKNOWN</td>
		<td class='value'>0x0000FFFF</td>
		<td>Unknown error. This should not happen!</td>
	</tr>
</table>

<p>&nbsp;</p>

<table>
	<tr><th colspan='3'>MDP Renderer Errors (category == 0x0001)</th></tr>
	<tr>
		<th>Name</th>
		<th>Value</th>
		<th>Description</th>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_RENDER_DUPLICATE_TAG</td>
		<td class='value'>0x00010001</td>
		<td>
			The plugin attempted to register a renderer with a tag that<br>
			belongs to a renderer that was previously registered.
		</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_RENDER_INVALID_RENDERINFO</td>
		<td class='value'>0x00010002</td>
		<td>
			One of two possible meanings:<br>
			<ul>
				<li>A plugin attempted to register a renderer with no tag.</li>
				<li>A renderer's blit function received a NULL<br>render information struct.</li>
			</ul>
		</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_RENDER_UNSUPPORTED_FLAG</td>
		<td class='value'>0x00010003</td>
		<td>
			One of two possible meanings:<br>
			<ul>
				<li>A renderer has a feature flag that isn't supported<br>by the emulator.</li>
				<li>The emulator uses a feature flag that isn't supported<br>by the renderer.</li>
			</ul>
		</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_RENDER_UNSUPPORTED_VMODE</td>
		<td class='value'>0x00010004</td>
		<td>
			The emulator is attempting to use a video mode that isn't<br>
			supported by the renderer.
		</td>
	</tr>
</table>

<p>&nbsp;</p>

<table>
	<tr><th colspan='3'>MDP Memory Errors (category == 0x0002)</th></tr>
	<tr>
		<th>Name</th>
		<th>Value</th>
		<th>Description</th>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_MEM_INVALID_MEMID</td>
		<td class='value'>0x00020001</td>
		<td>An invalid memory ID was specified.</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_MEM_NOT_ALLOCATED</td>
		<td class='value'>0x00020002</td>
		<td>
			An attempt was made to access a memory area that hasn't<br>
			been allocated by the emulator, e.g. attempting to read<br>
			32X memory when a standard Mega Drive game is running.
		</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_MEM_OUT_OF_RANGE</td>
		<td class='value'>0x00020003</td>
		<td>
			The specified address and length exceeds the range of<br>
			the specified memory ID.
		</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_MEM_NOT_RESIZABLE</td>
		<td class='value'>0x00020004</td>
		<td>
			An attempt was made to resize a memory area that is<br>
			marked as non-resizable, e.g. Mega Drive main RAM.
		</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_MEM_UNALIGNED</td>
		<td class='value'>0x00020005</td>
		<td>
			An attempt was made to read or write 16-bit or 32-bit<br>
			data from or to an unaligned (odd) address.
		</td>
	</tr>
</table>

<p>&nbsp;</p>

<table>
	<tr><th colspan='3'>MDP Register Errors (category == 0x0003)</th></tr>
	<tr>
		<th>Name</th>
		<th>Value</th>
		<th>Description</th>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_REG_INVALID_ICID</td>
		<td class='value'>0x00030001</td>
		<td>An invalid chip ID was specified.</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_REG_INVALID_REGID</td>
		<td class='value'>0x00030002</td>
		<td>An invalid register ID was specified.</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_REG_NOT_ALLOCATED</td>
		<td class='value'>0x00030003</td>
		<td>
			The specified chip's registers have not been allocated<br>
			by the emulator. For example, this may happen if you try<br>
			to access the SegaCD's 68000's registers while running<br>
			a standard Mega Drive game.
		</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_REG_READ_ONLY</td>
		<td class='value'>0x00030004</td>
		<td>An attempt was made to write to a read-only register.</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_REG_WRITE_ONLY</td>
		<td class='value'>0x00030005</td>
		<td>An attempt was made to read from a write-only register.</td>
	</tr>
</table>

<p>&nbsp;</p>

<table>
	<tr><th colspan='3'>MDP Menu Errors (category == 0x0004)</th></tr>
	<tr>
		<th>Name</th>
		<th>Value</th>
		<th>Description</th>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_MENU_INVALID_MENUID</td>
		<td class='value'>0x00040001</td>
		<td>An invalid menu ID was specified.</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_MENU_TOO_MANY_ITEMS</td>
		<td class='value'>0x00040002</td>
		<td>
			The MDP menu system is full. No more menu items<br>
			can be registered.
		</td>
	</tr>
</table>

<p>&nbsp;</p>

<table>
	<tr><th colspan='3'>MDP Event Errors (category == 0x0005)</th></tr>
	<tr>
		<th>Name</th>
		<th>Value</th>
		<th>Description</th>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_EVENT_INVALID_EVENTID</td>
		<td class='value'>0x00050001</td>
		<td>An invalid event ID was specified.</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_EVENT_NOT_REGISTERED</td>
		<td class='value'>0x00050002</td>
		<td>
			An attempt was made to unregister an event that<br>
			the plugin didn't register in the first place.
		</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_EVENT_NOT_REGISTERED</td>
		<td class='value'>0x00050002</td>
		<td>
			An attempt was made to register an event that<br>
			the plugin already registered.
		</td>
	</tr>
</table>

<p>&nbsp;</p>

<table>
	<tr><th colspan='3'>MDP Window Errors (category == 0x0006)</th></tr>
	<tr>
		<th>Name</th>
		<th>Value</th>
		<th>Description</th>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_WINDOW_INVALID_WINDOW</td>
		<td class='value'>0x00060001</td>
		<td>The specified window is not known to the emulator.</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_WINDOW_ALREADY_REGISTERED</td>
		<td class='value'>0x00060002</td>
		<td>
			An attempt was made to register a window that has<br>
			already been registered.
		</td>
	</tr>
</table>

<p>&nbsp;</p>

<table>
	<tr><th colspan='3'>MDP Emulator Control Errors (category == 0x0007)</th></tr>
	<tr>
		<th>Name</th>
		<th>Value</th>
		<th>Description</th>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_WINDOW_INVALID_FUNCTION</td>
		<td class='value'>0x00070001</td>
		<td>An invalid function ID was specified.</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_WINDOW_FUNCTION_NOT_IMPLEMENTED</td>
		<td class='value'>0x00070002</td>
		<td>The specified function is not implemented<br>in the emulator.</td>
	</tr>
</table>

<p>&nbsp;</p>

<table>
	<tr><th colspan='3'>MDP Directory Errors (category == 0x0008)</th></tr>
	<tr>
		<th>Name</th>
		<th>Value</th>
		<th>Description</th>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_DIR_INVALID_DIRID</td>
		<td class='value'>0x00080001</td>
		<td>An invalid directory ID was specified.</td>
	</tr>
</table>

<p>&nbsp;</p>

<table>
	<tr><th colspan='3'>MDP Compression Errors (category == 0x0009)</th></tr>
	<tr>
		<th>Name</th>
		<th>Value</th>
		<th>Description</th>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_Z_ARCHIVE_NOT_FOUND</td>
		<td class='value'>0x00090001</td>
		<td>The specified archive was not found.</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_Z_EXE_NOT_FOUND</td>
		<td class='value'>0x00090002</td>
		<td>
			An external program is required in order to open<br>
			the specified archive, but the external program<br>
			was not found.
		</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_Z_ARCHIVE_NOT_SUPPORTED</td>
		<td class='value'>0x00090003</td>
		<td>The specified archive is not supported by the emulator.</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_Z_CANT_OPEN_ARCHIVE</td>
		<td class='value'>0x00090004</td>
		<td>The archive could not be opened.</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_Z_NO_FILES_IN_ARCHIVE</td>
		<td class='value'>0x00090005</td>
		<td>No files were found in the specified archive.</td>
	</tr>
	<tr>
		<td class='macro'>MDP_ERR_Z_FILE_NOT_FOUND_IN_ARCHIVE</td>
		<td class='value'>0x00090006</td>
		<td>The requested file was not found in the archive.</td>
	</tr>
</table>

</body>
</html>