fix x86 build
[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];
eedfe806 37extern char McdDisable[2];
ef79bbde
P
38
39void sioWrite8(unsigned char value);
40void sioWriteStat16(unsigned short value);
41void sioWriteMode16(unsigned short value);
42void sioWriteCtrl16(unsigned short value);
43void sioWriteBaud16(unsigned short value);
44
45unsigned char sioRead8();
46unsigned short sioReadStat16();
47unsigned short sioReadMode16();
48unsigned short sioReadCtrl16();
49unsigned short sioReadBaud16();
50
51void netError();
52
53void sioInterrupt();
496d88d4 54int sioFreeze(void *f, int Mode);
ef79bbde
P
55
56void LoadMcd(int mcd, char *str);
57void LoadMcds(char *mcd1, char *mcd2);
58void SaveMcd(char *mcd, char *data, uint32_t adr, int size);
59void CreateMcd(char *mcd);
60void ConvertMcd(char *mcd, char *data);
61
62typedef struct {
63 char Title[48 + 1]; // Title in ASCII
64 char sTitle[48 * 2 + 1]; // Title in Shift-JIS
65 char ID[12 + 1];
66 char Name[16 + 1];
67 int IconCount;
68 short Icon[16 * 16 * 3];
69 unsigned char Flags;
70} McdBlock;
71
72void GetMcdBlockInfo(int mcd, int block, McdBlock *info);
73
74#ifdef __cplusplus
75}
76#endif
77#endif