RetroArch/dynamic.h

80 lines
2.8 KiB
C
Raw Normal View History

2011-01-17 19:54:58 +00:00
/* SSNES - A Super Nintendo Entertainment System (SNES) Emulator frontend for libsnes.
2011-01-23 19:29:28 +00:00
* Copyright (C) 2010-2011 - Hans-Kristian Arntzen
2010-12-30 12:54:49 +00:00
*
* Some code herein may be based on code found in BSNES.
*
* SSNES is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* SSNES is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with SSNES.
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __DYNAMIC_H
#define __DYNAMIC_H
#include <stdbool.h>
#include <libsnes.hpp>
void init_dlsym(void);
void uninit_dlsym(void);
2011-03-07 19:05:03 +00:00
typedef void *dylib_t;
2011-03-07 18:12:14 +00:00
dylib_t dylib_load(const char *path);
void dylib_close(dylib_t lib);
void* dylib_proc(dylib_t lib, const char *proc);
2010-12-30 12:54:49 +00:00
extern void (*psnes_init)(void);
extern void (*psnes_set_video_refresh)(snes_video_refresh_t);
extern void (*psnes_set_audio_sample)(snes_audio_sample_t);
extern void (*psnes_set_input_poll)(snes_input_poll_t);
extern void (*psnes_set_input_state)(snes_input_state_t);
2011-03-17 00:25:44 +00:00
extern const char* (*psnes_library_id)(void);
2010-12-30 12:54:49 +00:00
extern unsigned (*psnes_library_revision_minor)(void);
extern unsigned (*psnes_library_revision_major)(void);
extern bool (*psnes_load_cartridge_normal)(const char*, const uint8_t*, unsigned);
extern bool (*psnes_load_cartridge_super_game_boy)(
const char*, const uint8_t*, unsigned,
const char*, const uint8_t*, unsigned);
extern bool (*psnes_load_cartridge_bsx)(
const char*, const uint8_t*, unsigned,
const char*, const uint8_t*, unsigned);
extern bool (*psnes_load_cartridge_bsx_slotted)(
const char*, const uint8_t*, unsigned,
const char*, const uint8_t*, unsigned);
extern bool (*psnes_load_cartridge_sufami_turbo)(
const char*, const uint8_t*, unsigned,
const char*, const uint8_t*, unsigned,
const char*, const uint8_t*, unsigned);
2011-01-10 06:58:11 +00:00
extern void (*psnes_set_controller_port_device)(bool, unsigned);
2010-12-30 12:54:49 +00:00
extern bool (*psnes_get_region)(void);
2010-12-30 12:54:49 +00:00
extern unsigned (*psnes_serialize_size)(void);
extern bool (*psnes_serialize)(uint8_t*, unsigned);
extern bool (*psnes_unserialize)(const uint8_t*, unsigned);
extern void (*psnes_reset)(void);
2010-12-30 12:54:49 +00:00
extern void (*psnes_run)(void);
extern void (*psnes_set_cartridge_basename)(const char*);
extern uint8_t* (*psnes_get_memory_data)(unsigned);
extern unsigned (*psnes_get_memory_size)(unsigned);
extern void (*psnes_unload_cartridge)(void);
extern void (*psnes_term)(void);
#endif