61 lines
1.8 KiB
C
61 lines
1.8 KiB
C
#ifndef NOVA64_CORE_H
|
|
#define NOVA64_CORE_H
|
|
|
|
#include "nova64_io_interface.h"
|
|
#include "nova64_ppu_interface.h"
|
|
#include <stdarg.h>
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
|
|
|
|
// Cross-platform DLL export/import visibility macros
|
|
#if defined(_WIN32) || defined(__CYGWIN__)
|
|
#ifdef NOVA64_EXPORTS
|
|
#define NOVA64_API __declspec(dllexport)
|
|
#else
|
|
#define NOVA64_API __declspec(dllimport)
|
|
#endif
|
|
#else
|
|
#if __GNUC__ >= 4
|
|
#define NOVA64_API __attribute__((visibility("default")))
|
|
#else
|
|
#define NOVA64_API
|
|
#endif
|
|
#endif
|
|
|
|
/* ========================================================================== */
|
|
/* Engine Core API */
|
|
/* ========================================================================== */
|
|
|
|
/**
|
|
* @brief Initializes the core engine, registers host I/O interface callbacks,
|
|
* and starts the built-in launcher from internal storage in the WASM runtime.
|
|
* @param io_interface Pointer to filled struct containing I/O function
|
|
* pointers.
|
|
* @return True if initialized successfully, false if already initialized or
|
|
* invalid.
|
|
*/
|
|
NOVA64_API bool nova64_init(const nova64_io_interface_t *io_interface,
|
|
const nova64_ppu_interface_t *ppu_interface);
|
|
|
|
/**
|
|
* @brief Starts the main engine runtime and launches the FreeRTOS scheduler.
|
|
* @return 0 on success, negative error code on failure.
|
|
*/
|
|
NOVA64_API int32_t nova64_main();
|
|
|
|
#if defined(NOVA64_SHUTDOWN_AVAILABLE)
|
|
/**
|
|
* @brief Requests shutdown of the FreeRTOS scheduler.
|
|
* @return True if the shutdown request was issued, false otherwise.
|
|
*/
|
|
NOVA64_API bool nova64_shutdown(void);
|
|
#endif
|
|
|
|
/**
|
|
* @brief Retrieves the engine version integer.
|
|
* @return 24-bit packed version number (0xMMmmPP -> Major, Minor, Patch).
|
|
*/
|
|
NOVA64_API uint32_t nova64_get_version(void);
|
|
|
|
#endif // NOVA64_CORE_H
|