/[pcsx2_0.9.7]/trunk/pcsx2/IopBios.h
ViewVC logotype

Annotation of /trunk/pcsx2/IopBios.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 62 - (hide annotations) (download)
Tue Sep 7 11:08:22 2010 UTC (10 years, 4 months ago) by william
File MIME type: text/plain
File size: 2263 byte(s)
Auto Commited Import of: pcsx2-0.9.7-r3738-debug in ./trunk
1 william 31 /* PCSX2 - PS2 Emulator for PCs
2     * Copyright (C) 2002-2010 PCSX2 Dev Team
3     *
4     * PCSX2 is free software: you can redistribute it and/or modify it under the terms
5     * of the GNU Lesser General Public License as published by the Free Software Found-
6     * ation, either version 3 of the License, or (at your option) any later version.
7     *
8     * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
9     * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10     * PURPOSE. See the GNU General Public License for more details.
11     *
12     * You should have received a copy of the GNU General Public License along with PCSX2.
13     * If not, see <http://www.gnu.org/licenses/>.
14     */
15    
16     #ifndef __PSXBIOS_H__
17     #define __PSXBIOS_H__
18    
19     #define IOP_ENOENT 2
20     #define IOP_EIO 5
21     #define IOP_ENOMEM 12
22     #define IOP_EACCES 13
23     #define IOP_EISDIR 21
24     #define IOP_EMFILE 24
25     #define IOP_EROFS 30
26    
27     #define IOP_O_RDONLY 0x001
28     #define IOP_O_WRONLY 0x002
29     #define IOP_O_RDWR 0x003
30     #define IOP_O_APPEND 0x100
31     #define IOP_O_CREAT 0x200
32     #define IOP_O_TRUNC 0x400
33     #define IOP_O_EXCL 0x800
34    
35     #define IOP_SEEK_SET 0
36     #define IOP_SEEK_CUR 1
37     #define IOP_SEEK_END 2
38    
39     class IOManFile {
40     public:
41     // int open(IOManFile **file, char *name, s32 flags, u16 mode);
42    
43     virtual void close() = 0;
44    
45     virtual int lseek(s32 offset, s32 whence) { return -IOP_EIO; }
46     virtual int read(void *buf, u32 count) { return -IOP_EIO; }
47 william 62 virtual int write(void *buf, u32 count) { return -IOP_EIO; }
48 william 31 };
49    
50     class IOManDir {
51     // Don't think about it until we know the loaded ioman version.
52     // The dirent structure changed between versions.
53     public:
54     virtual void close();
55     };
56    
57     typedef int (*irxHLE)(); // return 1 if handled, otherwise 0
58     typedef void (*irxDEBUG)();
59    
60     namespace R3000A
61     {
62     const char* irxImportLibname(u32 entrypc);
63     const char* irxImportFuncname(const char libname[8], u16 index);
64     irxHLE irxImportHLE(const char libname[8], u16 index);
65     irxDEBUG irxImportDebug(const char libname[8], u16 index);
66     void __fastcall irxImportLog(const char libname[8], u16 index, const char *funcname);
67     int __fastcall irxImportExec(const char libname[8], u16 index);
68    
69     namespace ioman
70     {
71     void reset();
72     }
73     }
74    
75 william 62 extern void Hle_SetElfPath(const char* elfFileName);
76    
77 william 31 #endif /* __PSXBIOS_H__ */

  ViewVC Help
Powered by ViewVC 1.1.22