/***************************************************************************

	psp.c

	Initialize PSP and control threads.

***************************************************************************/

#ifndef PSP_MAIN_H
#define PSP_MAIN_H

#ifndef MAX_PATH
#define MAX_PATH 256
#endif

#include <psptypes.h>
#include <pspkernel.h>
#include <pspaudio.h>
#include <pspctrl.h>
#include <pspdisplay.h>
#include <pspgu.h>
#include <pspiofilemgr.h>
#include <psprtc.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>

#include "psp/config.h"
#include "psp/input.h"
#include "psp/video.h"
#include "psp/filer.h"
#include "psp/help.h"
#include "psp/menu.h"
#include "psp/misc.h"
#include "psp/mp3.h"
#include "psp/png.h"
#include "psp/sound.h"
#include "psp/ticker.h"
#include "psp/usrintrf.h"
#include "psp/mesbox.h"
#include "psp/cmdlist.h"


#define POWER_CB_POWER		0x80000000
#define POWER_CB_HOLDON		0x40000000
#define POWER_CB_STANDBY	0x00080000
#define POWER_CB_RESCOMP	0x00040000
#define POWER_CB_RESUME		0x00020000
#define POWER_CB_SUSPEND	0x00010000
#define POWER_CB_EXT		0x00001000
#define POWER_CB_BATLOW		0x00000100
#define POWER_CB_BATTERY	0x00000080
#define POWER_CB_BATTPOWER	0x0000007F

#define APPNAME_STR "NEO¥GEO CDZ Emulator for PSP"
#define VERSION_STR "0.4.2"

#define VERSION_MAJOR 0
#define VERSION_MINOR 4
#define VERSION_BUILD 2

enum
{
	LOOP_EXIT = 0,
	LOOP_BROWSER,
	LOOP_RESTART,
	LOOP_RESET,
	LOOP_EXEC
};

extern volatile int bLoop;
extern volatile int bSleep;

int get_app_status(void);

#endif /* PSP_MAIN_H */
