#ifndef _GCPLUGIN_H_
#define _GCPLUGIN_H_

/** Load address of game plugin. */
#define HIGH_PLUGIN_BASE ((void*) 0x817FC000)
/** Maximum size of the plugin. */
#define HIGH_PLUGIN_SIZE 0x4000
/** Load address of mios plugin. */
#define MIOS_PLUGIN_BASE ((void*) 0x80f80000)
/** Load address of plugin in reserved exception area. */
#define LOW_PLUGIN_BASE ((void*) 0x80001800)
/** Maximum size of the plugin. */
#define LOW_PLUGIN_SIZE 0x1800

#define RELOAD_MAGIC 0xdeadc0b0

typedef struct {
	//u32 magic;		// All plugins have reloader support for now
	void *dvd_read_replacement;
	void *dvd_read_orig;

	void *dvd_read_id_replacement;
	void *dvd_read_id_orig;

	void *dvd_report_error_replacement;	
	void *dvd_report_error_orig;

	void *dvd_audio_status_replacement;
	void *dvd_audio_status_orig;

	void *dvd_read_audio_replacement;
	void *dvd_audio_config_replacement;

	void *memset_replacement;
	void *memset_orig;

	void *dvd_seek_replacement;

	void *ar_dvd_read_replacement;
	void *ar_dvd_read_disk_id_replacement;
	void (* ar_dvd_wait_for_last_cmd)(void);
	
#ifdef GEKKO_DEBUG
	void *dvd_reset_replacement;
	void *dvd_reset_orig;
	void *dvd_stop_motor_replacement;
	void *dvd_stop_motor_orig;

	void *dvd_callback_entry;

	void *stream_write_replacement;
	void *ar_stream_write_replacement;
	void *ar_stream_write_orig;
	void *printf_replacement;
#endif
} gcplugin_jumptable_t;

#endif
