Commit | Line | Data |
---|---|---|
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 | |
24 | extern "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 | ||
35 | typedef 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 | ||
56 | extern char CdromId[10]; | |
57 | extern char CdromLabel[33]; | |
6a131b03 | 58 | extern int CdromFrontendId; // for frontend use |
ef79bbde | 59 | |
02b1a085 | 60 | int BiosBootBypass(); |
7b75929b | 61 | |
ef79bbde | 62 | int LoadCdrom(); |
1dc68512 | 63 | int LoadCdromFile(const char *filename, EXE_HEADER *head, u8 *time_bcd_out); |
ef79bbde P |
64 | int CheckCdrom(); |
65 | int Load(const char *ExePath); | |
66 | ||
67 | int SaveState(const char *file); | |
68 | int LoadState(const char *file); | |
69 | int CheckState(const char *file); | |
70 | ||
71 | int SendPcsxInfo(); | |
72 | int RecvPcsxInfo(); | |
73 | ||
74 | void trim(char *str); | |
75 | u16 calcCrc(u8 *d, int len); | |
76 | ||
77 | #ifdef __cplusplus | |
78 | } | |
79 | #endif | |
80 | #endif |