libElysianVMU 1.6.0
Full-featured, accurate, cross-platform library emulating the Dreamcast's Visual Memory Unit
Loading...
Searching...
No Matches
evmu_typedefs.h
Go to the documentation of this file.
1/*! \file
2 * \brief Declares common typedefs used throughout the codebase
3 *
4 * \author 2023 Falco Girgis
5 * \copyright MIT License
6 */
7#ifndef EVMU_TYPEDEFS_H
8#define EVMU_TYPEDEFS_H
9
10#include <gimbal/core/gimbal_typedefs.h>
11#include "../evmu_api.h"
12
13#include <stdint.h>
14#include <stdarg.h>
15#include <stdio.h>
16#include <assert.h>
17
18GBL_DECLS_BEGIN
19
20typedef uint64_t EvmuTicks; //!< Represents a delta time in milliseconds
21typedef uint64_t EvmuCycles; //!< Represent a delta time in cycles
22typedef uint32_t EvmuAddress; //!< Represents a generic absolute address
23typedef uint8_t EvmuWord; //!< Represents a single 8-bit CPU word
24
25#define EVMU_META_RESULT_TABLE (
26 ( EVMU_RESULT, Result, "C API Return Status Code", evmuResultString),
27 (
28 (EVMU_RESULT_ERROR_BEGIN, GBL_RESULT_COUNT + 1, ErrorBegin, "First EVMU Error"),
29 (EVMU_RESULT_ERROR_INVALID_ADDRESS, EVMU_RESULT_ERROR_BEGIN + 1, ErrorInvalidAddress, "Invalid Address"),
30 (EVMU_RESULT_ERROR_INVALID_BLOCK, EVMU_RESULT_ERROR_BEGIN + 2, ErrorInvalidBlock, "Invalid Block"),
31 (EVMU_RESULT_ERROR_INVALID_DIR_ENTRY, EVMU_RESULT_ERROR_BEGIN + 3, ErrorInvalidDirEntry, "Invalid Directory Entry"),
32 (EVMU_RESULT_ERROR_INVALID_FILE, EVMU_RESULT_ERROR_BEGIN + 4, ErrorInvalidFile, "Invalid File"),
33 (EVMU_RESULT_ERROR_INVALID_FILE_SYSTEM, EVMU_RESULT_ERROR_BEGIN + 5, ErrorinvalidFileSystem, "Invalid File System"),
34 (EVMU_RESULT_ERROR_INVALID_CONTEXT, EVMU_RESULT_ERROR_BEGIN + 6, ErrorInvalidContext, "Invalid Context"),
35 (EVMU_RESULT_ERROR_INVALID_DEVICE, EVMU_RESULT_ERROR_BEGIN + 7, ErrorInvalidDevice, "Invalid Device"),
36 (EVMU_RESULT_ERROR_INVALID_PERIPHERAL, EVMU_RESULT_ERROR_BEGIN + 8, ErrorInvalidPeripheral, "Invalid Peripheral"),
37 (EVMU_RESULT_ERROR_STACK_UNDERFLOW, EVMU_RESULT_ERROR_BEGIN + 9, ErrorStackUnderflow, "Stack Underflow"),
38 (EVMU_RESULT_ERROR_STACK_OVERFLOW, EVMU_RESULT_ERROR_BEGIN + 10, ErrorStackOverflow, "Stack Overflow"),
39 (EVMU_RESULT_ERROR_FLASH_LOCKED, EVMU_RESULT_ERROR_BEGIN + 11, ErrorFlashLocked, "Flash Locked"),
40 (EVMU_RESULT_ERROR_UNFORMATTED, EVMU_RESULT_ERROR_BEGIN + 12, ErrorUnformatted, "Unformatted"),
41 (EVMU_RESULT_ERROR_EXISTING_GAME, EVMU_RESULT_ERROR_BEGIN + 13, ErrorExistingGame, "Existing GAME"),
42 (EVMU_RESULT_ERROR_NOT_ENOUGH_SPACE, EVMU_RESULT_ERROR_BEGIN + 14, ErrorNotEnoughSpace, "Not Enough Space"),
43 (EVMU_RESULT_ERROR_DEFRAG_FAILED, EVMU_RESULT_ERROR_BEGIN + 15, ErrorDefragFailed, "Defragmentation Failed"),
44 (EVMU_RESULT_ERROR_TOO_MANY_FILES, EVMU_RESULT_ERROR_BEGIN + 16, ErrorTooManyFiles, "Too Many Files")
45 ) \
46)
47
48/*! \enum EVMU_RESULT
49 * \brief extended GBL_RESULT type representing any status for the codebase
50 */
51GBL_ENUM_TABLE_DECLARE(EVMU_META_RESULT_TABLE)
52
53GBL_DECLS_END
54
55#endif // EVMU_TYPEDEFS_H
#define EVMU_META_RESULT_TABLE
uint8_t EvmuWord
Represents a single 8-bit CPU word.
uint64_t EvmuTicks
Represents a delta time in milliseconds.
uint64_t EvmuCycles
Represent a delta time in cycles.
uint32_t EvmuAddress
Represents a generic absolute address.