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

Contents of /trunk/pcsx2/IopSio2.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 31 - (show annotations) (download)
Tue Sep 7 03:24:11 2010 UTC (9 years, 4 months ago) by william
File MIME type: text/plain
File size: 2471 byte(s)
committing r3113 initial commit again...
1 /* 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 __PSXSIO2_H__
17 #define __PSXSIO2_H__
18
19
20 #define BUFSIZE 8448
21
22 //from sio2man.c
23
24 struct SIO2_packet {
25 unsigned int recvVal1; // 0x00
26 unsigned int sendArray1[4]; // 0x04-0x10
27 unsigned int sendArray2[4]; // 0x14-0x20
28
29 unsigned int recvVal2; // 0x24
30
31 unsigned int sendArray3[16]; // 0x28-0x64
32
33 unsigned int recvVal3; // 0x68
34
35 int sendSize; // 0x6C
36 int recvSize; // 0x70
37
38 unsigned char *sendBuf; // 0x74
39 unsigned char *recvBuf; // 0x78
40
41 unsigned int dmacAddress1;
42 unsigned int dmacSize1;
43 unsigned int dmacCount1;
44 unsigned int dmacAddress2;
45 unsigned int dmacSize2;
46 unsigned int dmacCount2;
47 };
48
49 struct sio2Struct {
50 struct SIO2_packet packet;
51 u32 ctrl;
52 u32 intr;
53 u32 _8278, _827C;
54 int recvIndex;
55 u32 hackedRecv;
56 int cmdport;
57 int cmdlength; //length of a command sent to a port
58 //is less_equal than the dma send size
59 u8 buf[BUFSIZE];
60 };
61
62 extern sio2Struct sio2;
63
64 void sio2Reset();
65
66 u32 sio2_getRecv1();
67 u32 sio2_getRecv2();
68 u32 sio2_getRecv3();
69 void sio2_setSend1(u32 index, u32 value); //0->3
70 u32 sio2_getSend1(u32 index); //0->3
71 void sio2_setSend2(u32 index, u32 value); //0->3
72 u32 sio2_getSend2(u32 index); //0->3
73 void sio2_setSend3(u32 index, u32 value); //0->15
74 u32 sio2_getSend3(u32 index); //0->15
75
76 void sio2_setCtrl(u32 value);
77 u32 sio2_getCtrl();
78 void sio2_setIntr(u32 value);
79 u32 sio2_getIntr();
80 void sio2_set8278(u32 value);
81 u32 sio2_get8278();
82 void sio2_set827C(u32 value);
83 u32 sio2_get827C();
84
85 void sio2_serialIn(u8 value);
86 void sio2_fifoIn(u8 value);
87 u8 sio2_fifoOut();
88
89 void psxDma11(u32 madr, u32 bcr, u32 chcr);
90 void psxDma12(u32 madr, u32 bcr, u32 chcr);
91
92 void psxDMA11Interrupt();
93 void psxDMA12Interrupt();
94
95 #endif /* __PSXSIO2_H__ */
96

  ViewVC Help
Powered by ViewVC 1.1.22