#ifndef OPENPETE_RECOMP_MODULE_H
#define OPENPETE_RECOMP_MODULE_H

#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef struct CPUState CPUState;

#define OPENPETE_RECOMP_ABI_VERSION 1u

typedef struct openpete_recomp_module {
    uint32_t abi_version;
    const char* codegen_stamp;
    const char* rom_sha256;
    int (*dispatch)(CPUState* cpu, uint32_t addr);
} openpete_recomp_module;

int openpete_recomp_register(const openpete_recomp_module* m);

const openpete_recomp_module* openpete_recomp_module_get(void);

#ifdef __cplusplus
}
#endif

#endif
