2020-07-30 18:04:41 +00:00
|
|
|
#ifndef __VUE_H__
|
|
|
|
#define __VUE_H__
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* API management */
|
|
|
|
#ifndef VUEAPI
|
|
|
|
#define VUEAPI extern
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Header includes */
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-08-04 01:34:02 +00:00
|
|
|
/*****************************************************************************
|
|
|
|
* 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);
|
2020-08-05 02:17:56 +00:00
|
|
|
VUEAPI vbool vueRead (VUE *vue, uint32_t address, uint8_t *dest, uint32_t length);
|
2020-08-04 01:34:02 +00:00
|
|
|
VUEAPI vbool vueSetROM (VUE *vue, uint8_t *rom, uint32_t size);
|
2020-08-05 02:17:56 +00:00
|
|
|
VUEAPI vbool vueWrite (VUE *vue, uint32_t address, uint8_t *src, uint32_t length);
|
2020-08-04 01:34:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2020-07-30 18:04:41 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif /* __VUE_H__ */
|