2009-04-16 08:22:51 +02:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team *
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU General Public License *
|
|
|
|
* along with this program; if not, write to the *
|
|
|
|
* Free Software Foundation, Inc., *
|
2012-02-19 03:15:18 +01:00
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
|
2009-04-16 08:22:51 +02:00
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _SIO_H_
|
|
|
|
#define _SIO_H_
|
|
|
|
|
2010-05-08 03:16:38 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2009-04-16 08:22:51 +02:00
|
|
|
#include "psxcommon.h"
|
|
|
|
#include "r3000a.h"
|
|
|
|
#include "psxmem.h"
|
|
|
|
#include "plugins.h"
|
|
|
|
#include "psemu_plugin_defs.h"
|
|
|
|
|
2016-03-30 16:07:35 +02:00
|
|
|
#define MCD_SECT_SIZE (8 * 16)
|
|
|
|
#define MCD_SIZE (1024 * MCD_SECT_SIZE)
|
2009-04-16 08:22:51 +02:00
|
|
|
|
|
|
|
extern char Mcd1Data[MCD_SIZE], Mcd2Data[MCD_SIZE];
|
|
|
|
|
|
|
|
void sioWrite8(unsigned char value);
|
2010-05-10 03:43:36 +02:00
|
|
|
void sioWriteStat16(unsigned short value);
|
|
|
|
void sioWriteMode16(unsigned short value);
|
2009-04-16 08:22:51 +02:00
|
|
|
void sioWriteCtrl16(unsigned short value);
|
2010-05-10 03:43:36 +02:00
|
|
|
void sioWriteBaud16(unsigned short value);
|
|
|
|
|
|
|
|
unsigned char sioRead8();
|
|
|
|
unsigned short sioReadStat16();
|
|
|
|
unsigned short sioReadMode16();
|
|
|
|
unsigned short sioReadCtrl16();
|
|
|
|
unsigned short sioReadBaud16();
|
|
|
|
|
2010-05-10 09:27:06 +02:00
|
|
|
void netError();
|
|
|
|
|
2009-04-16 08:22:51 +02:00
|
|
|
void sioInterrupt();
|
|
|
|
int sioFreeze(gzFile f, int Mode);
|
|
|
|
|
|
|
|
void LoadMcd(int mcd, char *str);
|
|
|
|
void LoadMcds(char *mcd1, char *mcd2);
|
2017-07-30 12:57:47 +02:00
|
|
|
void SaveMcd(char *mcd, char *data, uint32_t adr, int size);
|
2009-04-16 08:22:51 +02:00
|
|
|
void CreateMcd(char *mcd);
|
|
|
|
void ConvertMcd(char *mcd, char *data);
|
|
|
|
|
|
|
|
typedef struct {
|
2010-05-23 04:46:22 +02:00
|
|
|
char Title[48 + 1]; // Title in ASCII
|
|
|
|
char sTitle[48 * 2 + 1]; // Title in Shift-JIS
|
|
|
|
char ID[12 + 1];
|
|
|
|
char Name[16 + 1];
|
2009-04-16 08:22:51 +02:00
|
|
|
int IconCount;
|
2010-05-23 04:46:22 +02:00
|
|
|
short Icon[16 * 16 * 3];
|
2009-04-16 08:22:51 +02:00
|
|
|
unsigned char Flags;
|
|
|
|
} McdBlock;
|
|
|
|
|
|
|
|
void GetMcdBlockInfo(int mcd, int block, McdBlock *info);
|
|
|
|
|
2013-02-14 23:44:17 +01:00
|
|
|
void CALLBACK SIO1irq(void);
|
|
|
|
|
2010-05-08 03:16:38 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2009-04-16 08:22:51 +02:00
|
|
|
#endif
|