shrooms-vb-native/emulation.h

29 lines
798 B
C
Raw Normal View History

#ifndef SHROOMS_VB_NATIVE_EMULATION_
#define SHROOMS_VB_NATIVE_EMULATION_
#include "shrooms-vb-core/core/vb.h"
#include <stdbool.h>
#include <stdint.h>
typedef struct SimContext {
bool hasFrame;
uint32_t samples[2][834];
uint32_t currentSample;
} SimContext;
typedef struct EmulationContext {
VB *sim;
SimContext *ctx;
} EmulationContext;
int emuInit(EmulationContext *emu);
void emuDestroy(EmulationContext *emu);
void emuLoadGame(EmulationContext *emu, uint8_t *rom, uint32_t romSize);
2024-10-30 02:33:48 +00:00
void emuReset(EmulationContext *emu);
void emuTick(EmulationContext *emu);
bool emuReadPixels(EmulationContext *emu, uint8_t *left, uint8_t *right);
void emuReadSamples(EmulationContext *emu, void **data, uint32_t *bytes);
void emuSetKeys(EmulationContext *emu, uint16_t keys);
#endif