gpu_neon: basic skeleton gpu plugin
[pcsx_rearmed.git] / libpcsxcore / psxcommon.c
CommitLineData
ef79bbde
P
1/***************************************************************************
2 * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, write to the *
16 * Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. *
18 ***************************************************************************/
19
20#include "psxcommon.h"
21#include "r3000a.h"
22#include "psxbios.h"
23
24#include "cheat.h"
25#include "ppf.h"
26
27PcsxConfig Config;
28boolean NetOpened = FALSE;
29
30int Log = 0;
31FILE *emuLog = NULL;
32
33int EmuInit() {
34 return psxInit();
35}
36
37void EmuReset() {
38 FreeCheatSearchResults();
39 FreeCheatSearchMem();
40
41 psxReset();
42}
43
44void EmuShutdown() {
45 ClearAllCheats();
46 FreeCheatSearchResults();
47 FreeCheatSearchMem();
48
49 FreePPFCache();
50
51 psxShutdown();
52}
53
54void EmuUpdate() {
55 // Do not allow hotkeys inside a softcall from HLE BIOS
56 if (!Config.HLE || !hleSoftCall)
57 SysUpdate();
58
59 ApplyCheats();
ab948f7e 60
61 // reamed hack
62 {
63 extern void pl_frame_limit(void);
64 pl_frame_limit();
65 }
ef79bbde
P
66}
67
68void __Log(char *fmt, ...) {
69 va_list list;
70#ifdef LOG_STDOUT
71 char tmp[1024];
72#endif
73
74 va_start(list, fmt);
75#ifndef LOG_STDOUT
76 vfprintf(emuLog, fmt, list);
77#else
78 vsprintf(tmp, fmt, list);
79 SysPrintf(tmp);
80#endif
81 va_end(list);
82}