-
Notifications
You must be signed in to change notification settings - Fork 1
/
atari_psp.c
69 lines (58 loc) · 1.74 KB
/
atari_psp.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*
* atari_psp.c - Sony PlayStation Portable port code
*
* Copyright (c) 2007 Akop Karapetyan
* Copyright (c) 2005 Atari800 development team (see DOC/CREDITS)
*
* This file is part of the Atari800 emulator project which emulates
* the Atari 400, 800, 800XL, 130XE, and 5200 8-bit computers.
*
* Atari800 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 Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Atari800 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 Atari800; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <pspkernel.h>
#include "pl_snd.h"
#include "video.h"
#include "pl_psp.h"
#include "ctrl.h"
#include "psp/menu.h"
PSP_MODULE_INFO(PSP_APP_NAME, 0, 1, 1);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER);
static void ExitCallback(void* arg)
{
ExitPSP = 1;
}
int main(int argc, char **argv)
{
/* Initialize PSP */
pl_psp_init(argv[0]);
pspCtrlInit();
pspVideoInit();
pl_snd_init(1024, 0);
/* Initialize callbacks */
pl_psp_register_callback(PSP_EXIT_CALLBACK, ExitCallback, NULL);
pl_psp_start_callback_thread();
/* Show the menu */
InitMenu();
DisplayMenu();
TrashMenu();
/* Release PSP resources */
pl_snd_shutdown();
pspVideoShutdown();
pl_psp_shutdown();
return(0);
}