#ifndef __GLOBAL_H_
#define __GLOBAL_H_

#include <stdio.h>

# define true      1
# define false     0

extern int strcasecmp(const char *s1, const char *s2);
extern char *strdup(const char *s);
typedef unsigned char bool;

# define log printf

# define GBA_RENDER_NORMAL     0
# define GBA_RENDER_FIT        1
# define GBA_LAST_RENDER       1

# define MAX_PATH   256
# define GBA_MAX_SAVE_STATE 5

  typedef struct GBA_t {
 
    char gba_save_used[GBA_MAX_SAVE_STATE];
    char gba_save_name[MAX_PATH];
    char gba_home_dir[MAX_PATH];
    int  psp_screenshot_id;
    int  psp_cpu_clock;
    int  psp_reverse_analog;
    int  gba_snd_enable;
    int  gba_render_mode;
    int  psp_skip_max_frame;

  } GBA_t;

  extern GBA_t GBA;

  extern int gba_save_configuration(void);
  extern int gba_parse_configuration(void);
  extern void update_save_name(char *Name);
  extern void reset_save_name();
  extern void gba_kbd_load(void);
  extern int gba_kbd_save(void);
  extern void emulator_reset(void);
  extern int gba_load_rom(char *FileName, int zip_format);
  extern int gba_load_state(char *FileName);
  extern int gba_snapshot_save_slot(int save_id);
  extern int gba_snapshot_load_slot(int load_id);
  extern int gba_snapshot_del_slot(int save_id);
  extern void gba_initialize_config(void);

#endif
