/[pcsx2_0.9.7]/trunk/pcsx2/RDebug/deci2_drfp.cpp
ViewVC logotype

Contents of /trunk/pcsx2/RDebug/deci2_drfp.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 31 - (show annotations) (download)
Tue Sep 7 03:24:11 2010 UTC (9 years, 5 months ago) by william
File size: 1634 byte(s)
committing r3113 initial commit again...
1 /* Pcsx2 - Pc Ps2 Emulator
2 * Copyright (C) 2002-2008 Pcsx2 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 Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19 #include "Common.h"
20 #include "deci2.h"
21
22 typedef struct tag_DECI2_DCMP_HEADER{
23 DECI2_HEADER h; //+00
24 u8 type, //+08
25 code; //+09
26 u16 _pad; //+0A
27 } DECI2_DCMP_HEADER; //=0C
28
29 extern char d2_message[100];
30
31 void D2_DCMP(char *inbuffer, char *outbuffer, char *message){
32 DECI2_DCMP_HEADER *in=(DECI2_DCMP_HEADER*)inbuffer,
33 *out=(DECI2_DCMP_HEADER*)outbuffer;
34 u8 *data=(u8*)in+sizeof(DECI2_DCMP_HEADER);
35
36 memcpy(outbuffer, inbuffer, 128*1024);//BUFFERSIZE
37 out->h.length=sizeof(DECI2_DCMP_HEADER);
38 switch(in->type){
39 case 4://[OK]
40 sprintf(message, " [DCMP] code=MESSAGE %s", data);//null terminated by the memset with 0 call
41 strcpy(d2_message, data);
42 break;
43 default:
44 sprintf(message, " [DCMP] code=%d[unknown] result=%d", netmp->code, netmp->result);
45 }
46 result->code++;
47 result->result=0; //ok
48 }

  ViewVC Help
Powered by ViewVC 1.1.22