From 4032bdd00071ed11d8dca892eb796ba49e3bc678 Mon Sep 17 00:00:00 2001 From: MooZ Date: Sun, 13 Oct 2024 13:01:40 +0200 Subject: [PATCH] Fix opcodes --- opcodes.c | 6 +++--- opcodes.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/opcodes.c b/opcodes.c index a175904..2dce388 100644 --- a/opcodes.c +++ b/opcodes.c @@ -66,7 +66,7 @@ static char* pce_opstring[PCE_TYPE_COUNT][PCE_ARG_COUNT] = { }; // PC engine opcodes -static opcode_t pce_opcode[256] = { +static Opcode pce_opcode[256] = { /* 00 */ { "brk ", 1 , 0 }, // BRK /* 01 */ { "ora ", 2 , 11 }, // ORA (ZZ, X) /* 02 */ { "sxy ", 1 , 0 }, // SXY @@ -326,12 +326,12 @@ static opcode_t pce_opcode[256] = { }; // Get opcode description. -const opcode_t* opcode_get(uint8_t op) { +const Opcode* opcode_get(uint8_t op) { return &pce_opcode[op]; } // Get opcode description -const char* opcode_format(const opcode_t *op, int i) { +const char* opcode_format(const Opcode *op, int i) { if((i < 0) || (i >= PCE_ARG_COUNT)) { return NULL; } diff --git a/opcodes.h b/opcodes.h index 81bcbfb..d3b3a39 100644 --- a/opcodes.h +++ b/opcodes.h @@ -103,14 +103,14 @@ typedef struct { /// Get opcode description /// \param [in] op Opcode id /// \return Pointer to opcode description -const opcode_t* opcode_get(uint8_t op); +const Opcode* opcode_get(uint8_t op); /// Get opcode format string /// \param [in] op Pointer to opcode description /// \param [in] i Opcode argument id /// \return Argument format string /// \return NULL if the argument id is out of opcode argument count -const char* opcode_format(const opcode_t *op, int i); +const char* opcode_format(const Opcode *op, int i); /// Is the instruction a local jump ? bool opcode_is_local_jump(uint8_t op);