diff --git a/apps/agnes/src/croom.nes b/apps/agnes/src/croom.nes index 716d3cc..e0e63e9 100644 Binary files a/apps/agnes/src/croom.nes and b/apps/agnes/src/croom.nes differ diff --git a/uvm32/mini-rv32ima.h b/uvm32/mini-rv32ima.h index f437550..b98e434 100644 --- a/uvm32/mini-rv32ima.h +++ b/uvm32/mini-rv32ima.h @@ -103,7 +103,7 @@ struct MiniRV32IMAState }; #ifndef MINIRV32_STEPPROTO -MINIRV32_DECORATE int32_t MiniRV32IMAStep(void *userdata, struct MiniRV32IMAState * state, uint8_t * image, uint32_t vProcAddress, +MINIRV32_DECORATE int32_t MiniRV32IMAStep(void *userdata, struct MiniRV32IMAState * state, uint8_t * image, #ifndef MINIRV32_NO_TIMERS_NO_CYCLES uint32_t elapsedUs, #endif @@ -120,7 +120,7 @@ int count ); #endif #ifndef MINIRV32_STEPPROTO -MINIRV32_DECORATE int32_t MiniRV32IMAStep(void *userdata, struct MiniRV32IMAState * state, uint8_t * image, uint32_t vProcAddress, +MINIRV32_DECORATE int32_t MiniRV32IMAStep(void *userdata, struct MiniRV32IMAState * state, uint8_t * image, #ifndef MINIRV32_NO_TIMERS_NO_CYCLES uint32_t elapsedUs, #endif diff --git a/uvm32/uvm32.c b/uvm32/uvm32.c index a3e7bbe..f62acbc 100644 --- a/uvm32/uvm32.c +++ b/uvm32/uvm32.c @@ -251,10 +251,9 @@ uint32_t uvm32_run(uvm32_state_t *vmst, uvm32_evt_t *evt, uint32_t instr_meter) // run CPU until no longer in running state while(vmst->_status == UVM32_STATUS_RUNNING && instr_meter > 0) { - uint64_t elapsedUs = 1; uint32_t ret; - ret = MiniRV32IMAStep(vmst, &vmst->_core, vmst->_memory, elapsedUs, 1); + ret = MiniRV32IMAStep(vmst, &vmst->_core, vmst->_memory, 1); instr_meter--; switch(ret) { diff --git a/uvm32/uvm32.h b/uvm32/uvm32.h index d3f4c7a..25571b3 100644 --- a/uvm32/uvm32.h +++ b/uvm32/uvm32.h @@ -38,6 +38,7 @@ SOFTWARE. // Include definitions for required syscalls #include "uvm32_sys.h" +/*! Union for safely casting differently sized types */ typedef union __attribute__((packed)) { uint32_t u32; uint16_t u16; @@ -48,7 +49,7 @@ typedef union __attribute__((packed)) { } uvm32_val_t; // Setup and hooks for mini-rv32ima emulator core -#define MINIRV32_DECORATE static +#define MINIRV32_DECORATE static inline #define MINIRV32_RETURN_TRAP #define MINIRV32_NO_TIMERS_NO_CYCLES #define MINIRV32_NO_ZICSR