drc: allow recursive calls
[pcsx_rearmed.git] / libpcsxcore / sio.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
21#ifndef _SIO_H_
22#define _SIO_H_
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28#include "psxcommon.h"
29#include "r3000a.h"
30#include "psxmem.h"
31#include "plugins.h"
32#include "psemu_plugin_defs.h"
33
34#define MCD_SIZE (1024 * 8 * 16)
35
36extern char Mcd1Data[MCD_SIZE], Mcd2Data[MCD_SIZE];
37
38void sioWrite8(unsigned char value);
39void sioWriteStat16(unsigned short value);
40void sioWriteMode16(unsigned short value);
41void sioWriteCtrl16(unsigned short value);
42void sioWriteBaud16(unsigned short value);
43
44unsigned char sioRead8();
45unsigned short sioReadStat16();
46unsigned short sioReadMode16();
47unsigned short sioReadCtrl16();
48unsigned short sioReadBaud16();
49
50void netError();
51
52void sioInterrupt();
53int sioFreeze(gzFile f, int Mode);
54
55void LoadMcd(int mcd, char *str);
56void LoadMcds(char *mcd1, char *mcd2);
57void SaveMcd(char *mcd, char *data, uint32_t adr, int size);
58void CreateMcd(char *mcd);
59void ConvertMcd(char *mcd, char *data);
60
61typedef struct {
62 char Title[48 + 1]; // Title in ASCII
63 char sTitle[48 * 2 + 1]; // Title in Shift-JIS
64 char ID[12 + 1];
65 char Name[16 + 1];
66 int IconCount;
67 short Icon[16 * 16 * 3];
68 unsigned char Flags;
69} McdBlock;
70
71void GetMcdBlockInfo(int mcd, int block, McdBlock *info);
72
73#ifdef __cplusplus
74}
75#endif
76#endif