![]() |
libElysianVMU 1.6.0
Full-featured, accurate, cross-platform library emulating the Dreamcast's Visual Memory Unit
|
Go to the source code of this file.
Data Structures | |
struct | EvmuInstructionFormat |
struct | EvmuInstruction |
struct | EvmuOperands |
struct | EvmuDecodedInstruction |
Macros | |
#define | EVMU_OPCODE_NOP 0x00 |
#define | EVMU_OPCODE_BR 0x01 |
#define | EVMU_OPCODE_LD 0x02 |
#define | EVMU_OPCODE_LD_IND 0x04 |
#define | EVMU_OPCODE_CALL 0x08 |
#define | EVMU_OPCODE_CALLR 0x10 |
#define | EVMU_OPCODE_BRF 0x11 |
#define | EVMU_OPCODE_ST 0x12 |
#define | EVMU_OPCODE_ST_IND 0x14 |
#define | EVMU_OPCODE_CALLF 0x20 |
#define | EVMU_OPCODE_JMPF 0x21 |
#define | EVMU_OPCODE_MOV 0x22 |
#define | EVMU_OPCODE_MOV_IND 0x24 |
#define | EVMU_OPCODE_JMP 0x28 |
#define | EVMU_OPCODE_MUL 0x30 |
#define | EVMU_OPCODE_BEI 0x31 |
#define | EVMU_OPCODE_BE 0x32 |
#define | EVMU_OPCODE_BE_IND 0x34 |
#define | EVMU_OPCODE_DIV 0x40 |
#define | EVMU_OPCODE_BNEI 0x41 |
#define | EVMU_OPCODE_BNE 0x42 |
#define | EVMU_OPCODE_BNE_IND 0x44 |
#define | EVMU_OPCODE_BPC 0x48 |
#define | EVMU_OPCODE_LDF 0x50 |
#define | EVMU_OPCODE_STF 0x51 |
#define | EVMU_OPCODE_DBNZ 0x52 |
#define | EVMU_OPCODE_DBNZ_IND 0x54 |
#define | EVMU_OPCODE_PUSH 0x60 |
#define | EVMU_OPCODE_INC 0x62 |
#define | EVMU_OPCODE_INC_IND 0x64 |
#define | EVMU_OPCODE_BP 0x68 |
#define | EVMU_OPCODE_POP 0x70 |
#define | EVMU_OPCODE_DEC 0x72 |
#define | EVMU_OPCODE_DEC_IND 0x74 |
#define | EVMU_OPCODE_BZ 0x80 |
#define | EVMU_OPCODE_ADDI 0x81 |
#define | EVMU_OPCODE_ADD 0x82 |
#define | EVMU_OPCODE_ADD_IND 0x84 |
#define | EVMU_OPCODE_BN 0x88 |
#define | EVMU_OPCODE_BNZ 0x90 |
#define | EVMU_OPCODE_ADDCI 0x91 |
#define | EVMU_OPCODE_ADDC 0x92 |
#define | EVMU_OPCODE_ADDC_IND 0x94 |
#define | EVMU_OPCODE_RET 0xa0 |
#define | EVMU_OPCODE_SUBI 0xa1 |
#define | EVMU_OPCODE_SUB 0xa2 |
#define | EVMU_OPCODE_SUB_IND 0xa4 |
#define | EVMU_OPCODE_NOT1 0xa8 |
#define | EVMU_OPCODE_RETI 0xb0 |
#define | EVMU_OPCODE_SUBCI 0xb1 |
#define | EVMU_OPCODE_SUBC 0xb2 |
#define | EVMU_OPCODE_SUBC_IND 0xb4 |
#define | EVMU_OPCODE_ROR 0xc0 |
#define | EVMU_OPCODE_LDC 0xc1 |
#define | EVMU_OPCODE_XCH 0xc2 |
#define | EVMU_OPCODE_XCH_IND 0xc4 |
#define | EVMU_OPCODE_CLR1 0xc8 |
#define | EVMU_OPCODE_RORC 0xd0 |
#define | EVMU_OPCODE_ORI 0xd1 |
#define | EVMU_OPCODE_OR 0xd2 |
#define | EVMU_OPCODE_OR_IND 0xd4 |
#define | EVMU_OPCODE_ROL 0xe0 |
#define | EVMU_OPCODE_ANDI 0xe1 |
#define | EVMU_OPCODE_AND 0xe2 |
#define | EVMU_OPCODE_AND_IND 0xe4 |
#define | EVMU_OPCODE_SET1 0xe8 |
#define | EVMU_OPCODE_ROLC 0xf0 |
#define | EVMU_OPCODE_XORI 0xf1 |
#define | EVMU_OPCODE_XOR 0xf2 |
#define | EVMU_OPCODE_XOR_IND 0xf4 |
Program Status Word Flags | |
Flags which may be modified by a particular instruction | |
#define | EVMU_ISA_PSW_SYSTEM_POS 3 |
#define | EVMU_ISA_PSW_SYSTEM_MASK 0x8 |
#define | EVMU_ISA_PSW_CY_POS 2 |
#define | EVMU_ISA_PSW_CY_MASK 0x4 |
#define | EVMU_ISA_PSW_AC_POS 1 |
#define | EVMU_ISA_PSW_AC_MASK 0x2 |
#define | EVMU_ISA_PSW_OV_POS 0 |
#define | EVMU_ISA_PSW_OV_MASK 0x1 |
#define | EVMU_ISA_PSW_NONE 0x0 |
Argument Packs | |
Macros for handling packed argument types | |
#define | EVMU_ISA_ARG_FORMAT_PACK(...) GBL_VA_OVERLOAD_CALL(EVMU_ISA_ARG_FORMAT_PACK, GBL_VA_OVERLOAD_SUFFIXER_ARGC, __VA_ARGS__) |
#define | EVMU_ISA_ARG_FORMAT_UNPACK(argFormat, field) ((argFormat >> (field * 8u)) & 0xff) |
#define | EVMU_ISA_ARGC(argFmt) |
Typedefs | |
typedef uint32_t | EvmuIsaFlags |
typedef uint32_t | EvmuIsaArgFormat |
Enumerations | |
enum | EVMU_ISA_ARG_TYPE |
enum | EVMU_ISA_ARG |
enum | EVMU_INSTRUCTION_BYTE |
Functions | |
const EvmuInstructionFormat * | EvmuIsa_format (EvmuWord firstByte) |
EVMU_RESULT | EvmuIsa_fetch (EvmuInstruction *pEncoded, const void *pBuffer, size_t *pBytes) |
EVMU_RESULT | EvmuIsa_decode (const EvmuInstruction *pEncoded, EvmuDecodedInstruction *pDecoded) |
Instruction set, opcode, and operand info.
This file provides the API for everything relating to the instruction set architecture of the Sanyo LC86K:
Definition in file evmu_isa.h.
#define EVMU_ISA_ARG_FORMAT_PACK | ( | ... | ) | GBL_VA_OVERLOAD_CALL(EVMU_ISA_ARG_FORMAT_PACK, GBL_VA_OVERLOAD_SUFFIXER_ARGC, __VA_ARGS__) |
Packs the given argument types into an EvmuIsaArgFormat.
Definition at line 132 of file evmu_isa.h.
#define EVMU_ISA_ARG_FORMAT_UNPACK | ( | argFormat, | |
field | |||
) | ((argFormat >> (field * 8u)) & 0xff) |
Unpacks the given field from the EvmuIsaArgFormat provided as argFormat.
Definition at line 136 of file evmu_isa.h.
#define EVMU_ISA_ARGC | ( | argFmt | ) |
Returns the number of arguments encoded within an EvmuIsaArgFormat.
Definition at line 140 of file evmu_isa.h.
#define EVMU_ISA_PSW_AC_MASK 0x2 |
Auxiliary carry mask.
Definition at line 121 of file evmu_isa.h.
#define EVMU_ISA_PSW_AC_POS 1 |
Auxiliary carry bit.
Definition at line 120 of file evmu_isa.h.
#define EVMU_ISA_PSW_CY_MASK 0x4 |
Carry mask.
Definition at line 119 of file evmu_isa.h.
#define EVMU_ISA_PSW_CY_POS 2 |
Carry bit.
Definition at line 118 of file evmu_isa.h.
#define EVMU_ISA_PSW_NONE 0x0 |
No PSW flags effected.
Definition at line 124 of file evmu_isa.h.
#define EVMU_ISA_PSW_OV_MASK 0x1 |
Overflow mask.
Definition at line 123 of file evmu_isa.h.
#define EVMU_ISA_PSW_OV_POS 0 |
Overflow bit.
Definition at line 122 of file evmu_isa.h.
#define EVMU_ISA_PSW_SYSTEM_MASK 0x8 |
System mask.
Definition at line 117 of file evmu_isa.h.
#define EVMU_ISA_PSW_SYSTEM_POS 3 |
System bit.
Definition at line 116 of file evmu_isa.h.
typedef uint32_t EvmuIsaArgFormat |
Type for holding encoded instruction argument types in EvmuInstructionFormat::args.
Definition at line 152 of file evmu_isa.h.
typedef uint32_t EvmuIsaFlags |
Flags type for EvmuInstructionFormat::flags.
Definition at line 149 of file evmu_isa.h.
Enumeration containing each byte within an encoded EvmuInstruction.
Definition at line 198 of file evmu_isa.h.
enum EVMU_ISA_ARG |
Enumeration for each argument position in an EvmuIaArgFormat.
Enumerator | |
---|---|
EVMU_ISA_ARG1 | First argument. |
EVMU_ISA_ARG2 | Second argument. |
EVMU_ISA_ARG3 | Third argument. |
EVMU_ISA_ARG_COUNT | Size of argument pack. |
Definition at line 171 of file evmu_isa.h.
enum EVMU_ISA_ARG_TYPE |
Enumeration with every type of instruction argument.
Definition at line 157 of file evmu_isa.h.
EVMU_RESULT EvmuIsa_decode | ( | const EvmuInstruction * | pEncoded, |
EvmuDecodedInstruction * | pDecoded | ||
) |
Decodes an instruction into an EvmuDecodedInstruction.
EVMU_RESULT EvmuIsa_fetch | ( | EvmuInstruction * | pEncoded, |
const void * | pBuffer, | ||
size_t * | pBytes | ||
) |
Fetches an encoded instruction from a buffer.
const EvmuInstructionFormat * EvmuIsa_format | ( | EvmuWord | firstByte | ) |
Fetches information on an instruction from the internal database.