#ifndef __VUE_H__ #define __VUE_H__ #ifdef __cplusplus extern "C" { #endif /* API management */ #ifndef VUEAPI #define VUEAPI extern #endif /* Header includes */ #include #include /***************************************************************************** * Constants * *****************************************************************************/ /* Boolean values */ #define VUE_FALSE 0 #define VUE_TRUE 1 /* Memory access types */ #define VUE_S8 0 #define VUE_U8 1 #define VUE_S16 2 #define VUE_U16 3 #define VUE_S32 4 /***************************************************************************** * Types * *****************************************************************************/ /* Boolean */ typedef int vbool; /* Emulation state */ typedef struct { uint8_t *rom; /* Cartridge ROM */ uint32_t rom_size; /* Number of bytes in cartridge ROM */ uint8_t *sram; /* Cartridge RAM */ uint32_t sram_size; /* Number of bytes in cartridge RAM */ uint8_t wram[0x10000]; /* System memory */ } VUE; /***************************************************************************** * Function Prototypes * *****************************************************************************/ VUEAPI void vueInitialize(VUE *vue); VUEAPI vbool vueRead (VUE *vue, uint32_t address, uint8_t *dest, uint32_t length); VUEAPI vbool vueSetROM (VUE *vue, uint8_t *rom, uint32_t size); VUEAPI vbool vueWrite (VUE *vue, uint32_t address, uint8_t *src, uint32_t length); #ifdef __cplusplus } #endif #endif /* __VUE_H__ */