libretro: update for newer spu code
[pcsx_rearmed.git] / libpcsxcore / misc.h
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#ifndef __MISC_H__
21#define __MISC_H__
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#include "psxcommon.h"
28#include "coff.h"
29#include "plugins.h"
30#include "r3000a.h"
31#include "psxmem.h"
32
33#undef s_addr
34
35typedef struct {
36 unsigned char id[8];
37 u32 text;
38 u32 data;
39 u32 pc0;
40 u32 gp0;
41 u32 t_addr;
42 u32 t_size;
43 u32 d_addr;
44 u32 d_size;
45 u32 b_addr;
46 u32 b_size;
47 u32 s_addr;
48 u32 s_size;
49 u32 SavedSP;
50 u32 SavedFP;
51 u32 SavedGP;
52 u32 SavedRA;
53 u32 SavedS0;
54} EXE_HEADER;
55
56extern char CdromId[10];
57extern char CdromLabel[33];
58
59int LoadCdrom();
60int LoadCdromFile(const char *filename, EXE_HEADER *head);
61int CheckCdrom();
62int Load(const char *ExePath);
63
64int SaveState(const char *file);
65int LoadState(const char *file);
66int CheckState(const char *file);
67
68int SendPcsxInfo();
69int RecvPcsxInfo();
70
71void trim(char *str);
72u16 calcCrc(u8 *d, int len);
73
74#ifdef __cplusplus
75}
76#endif
77#endif