Sio1 plugin (dummy).
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@54273 e17a0e51-4ae3-4d35-97c3-1a29b211df97
This commit is contained in:
parent
2bcdda648d
commit
337765356b
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
July 7, 2010 edgbla <edgbla@yandex.ru>
|
||||
|
||||
* plugins/bladesio1/gui.c: Sio1 plugin (dummy).
|
||||
* plugins/bladesio1/Makefile.am: Likewise.
|
||||
* plugins/bladesio1/settings.c: Likewise.
|
||||
* plugins/bladesio1/settings.h: Likewise.
|
||||
* plugins/bladesio1/sio1.c: Likewise.
|
||||
* plugins/bladesio1/sio1.h: Likewise.
|
||||
* plugins/bladesio1/sio1.glade2: Likewise.
|
||||
|
||||
July 7, 2010 Wei Mingzhi <whistler_wmz@users.sf.net>
|
||||
|
||||
* libpcsxcore/plugins.c: #ifdef'ed out the currently unused Sio1 API.
|
||||
|
|
|
@ -347,17 +347,17 @@ typedef void (CALLBACK* SIO1writeCtrl16)(unsigned short);
|
|||
typedef void (CALLBACK* SIO1writeCtrl32)(unsigned long);
|
||||
typedef void (CALLBACK* SIO1writeBaud16)(unsigned short);
|
||||
typedef void (CALLBACK* SIO1writeBaud32)(unsigned long);
|
||||
typedef uint32_t (CALLBACK* SIO1readData8)(void);
|
||||
typedef uint32_t (CALLBACK* SIO1readData16)(void);
|
||||
typedef uint32_t (CALLBACK* SIO1readData32)(void);
|
||||
typedef uint32_t (CALLBACK* SIO1readStat16)(void);
|
||||
typedef uint32_t (CALLBACK* SIO1readStat32)(void);
|
||||
typedef uint32_t (CALLBACK* SIO1readMode16)(void);
|
||||
typedef uint32_t (CALLBACK* SIO1readMode32)(void);
|
||||
typedef uint32_t (CALLBACK* SIO1readCtrl16)(void);
|
||||
typedef uint32_t (CALLBACK* SIO1readCtrl32)(void);
|
||||
typedef uint32_t (CALLBACK* SIO1readBaud16)(void);
|
||||
typedef uint32_t (CALLBACK* SIO1readBaud32)(void);
|
||||
typedef unsigned char (CALLBACK* SIO1readData8)(void);
|
||||
typedef unsigned short (CALLBACK* SIO1readData16)(void);
|
||||
typedef unsigned long (CALLBACK* SIO1readData32)(void);
|
||||
typedef unsigned short (CALLBACK* SIO1readStat16)(void);
|
||||
typedef unsigned long (CALLBACK* SIO1readStat32)(void);
|
||||
typedef unsigned short (CALLBACK* SIO1readMode16)(void);
|
||||
typedef unsigned long (CALLBACK* SIO1readMode32)(void);
|
||||
typedef unsigned short (CALLBACK* SIO1readCtrl16)(void);
|
||||
typedef unsigned long (CALLBACK* SIO1readCtrl32)(void);
|
||||
typedef unsigned short (CALLBACK* SIO1readBaud16)(void);
|
||||
typedef unsigned long (CALLBACK* SIO1readBaud32)(void);
|
||||
typedef void (CALLBACK* SIO1registerCallback)(void (CALLBACK *callback)(void));
|
||||
|
||||
// SIO1 function pointers
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
bindir = @libdir@/games/psemu/
|
||||
libdir = @libdir@/games/psemu/
|
||||
|
||||
lib_LTLIBRARIES = libBladeSio1.la
|
||||
|
||||
libBladeSio1_la_SOURCES = sio1.c settings.c
|
||||
libBladeSio1_la_LDFLAGS = -module -avoid-version
|
||||
|
||||
INCLUDES = -DPIXMAPDIR=\"${datadir}/pixmaps/\" \
|
||||
-DLOCALE_DIR=\"${datadir}/locale/\" \
|
||||
-DDATADIR=\"${datadir}/psemu/\" \
|
||||
$(GTK2_CFLAGS) $(GLADE2_CFLAGS) \
|
||||
-I../../libpcsxcore -I../../include
|
||||
|
||||
bin_PROGRAMS = cfgBladeSio1
|
||||
cfgBladeSio1_SOURCES = gui.c
|
||||
cfgBladeSio1_LDADD = $(GTK2_LIBS) $(GLADE2_LIBS)
|
||||
|
||||
glade_DATA = sio1.glade2
|
||||
gladedir = $(datadir)/psemu/
|
||||
EXTRA_DIST = $(glade_DATA)
|
|
@ -0,0 +1,32 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <glade/glade.h>
|
||||
|
||||
long CFGopen()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
#ifdef ENABLE_NLS
|
||||
setlocale( LC_ALL, "" );
|
||||
bindtextdomain( GETTEXT_PACKAGE, LOCALE_DIR );
|
||||
bind_textdomain_codeset( GETTEXT_PACKAGE, "UTF-8" );
|
||||
textdomain( GETTEXT_PACKAGE );
|
||||
#endif
|
||||
|
||||
gtk_set_locale();
|
||||
gtk_init( &argc, &argv );
|
||||
|
||||
if( !strcmp(argv[1], "open") )
|
||||
{
|
||||
return CFGopen();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
/***************************************************************************
|
||||
* Copyright (C) 2010 by Blade_Arma *
|
||||
* *
|
||||
* 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., *
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "settings.h"
|
||||
#include "sio1.h"
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
static const char configName[] = "bladesio1.cfg";
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
void settingsRead()
|
||||
{
|
||||
FILE *file;
|
||||
|
||||
file = fopen( configName, "rb" );
|
||||
if( file )
|
||||
{
|
||||
fread( &settings, 1, sizeof(settings), file );
|
||||
fclose( file );
|
||||
}
|
||||
else
|
||||
{
|
||||
settings.player = 1;
|
||||
strcpy( settings.ip, "127.0.0.1" );
|
||||
settings.port = 33307;
|
||||
}
|
||||
}
|
||||
|
||||
void settingsWrite()
|
||||
{
|
||||
FILE *file;
|
||||
|
||||
file = fopen( configName, "wb" );
|
||||
if( file )
|
||||
{
|
||||
fwrite( &settings, 1, sizeof(settings), file );
|
||||
fclose( file );
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
|
@ -0,0 +1,39 @@
|
|||
/***************************************************************************
|
||||
* Copyright (C) 2010 by Blade_Arma *
|
||||
* *
|
||||
* 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., *
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef _SETTINGS_H_
|
||||
#define _SETTINGS_H_
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
typedef struct Settings
|
||||
{
|
||||
long player;
|
||||
char ip[32];
|
||||
unsigned short port;
|
||||
} Settings;
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
void settingsRead();
|
||||
void settingsWrite();
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
#endif // _SETTINGS_H_
|
|
@ -0,0 +1,226 @@
|
|||
/***************************************************************************
|
||||
* Copyright (C) 2010 by Blade_Arma *
|
||||
* *
|
||||
* 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., *
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "settings.h"
|
||||
#include "sio1.h"
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
static char *pluginName = N_("Sio1 Driver");
|
||||
|
||||
static const unsigned char version = 1;
|
||||
static const unsigned char revision = 1;
|
||||
static const unsigned char build = 1;
|
||||
|
||||
Settings settings;
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
long CALLBACK SIO1init()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
long CALLBACK SIO1shutdown()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
long CALLBACK SIOopen( unsigned long *gpuDisp )
|
||||
{
|
||||
settingsRead();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
long CALLBACK SIO1close()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
void CALLBACK SIO1pause()
|
||||
{
|
||||
}
|
||||
|
||||
void CALLBACK SIO1resume()
|
||||
{
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
long CALLBACK SIO1keypressed( int val )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
void CALLBACK SIO1writeData8(unsigned char val)
|
||||
{
|
||||
}
|
||||
|
||||
void CALLBACK SIO1writeData16(unsigned short val)
|
||||
{
|
||||
}
|
||||
|
||||
void CALLBACK SIO1writeData32(unsigned long val)
|
||||
{
|
||||
}
|
||||
|
||||
void CALLBACK SIO1writeStat16(unsigned short val)
|
||||
{
|
||||
}
|
||||
|
||||
void CALLBACK SIO1writeStat32(unsigned long val)
|
||||
{
|
||||
}
|
||||
|
||||
void CALLBACK SIO1writeMode16(unsigned short val)
|
||||
{
|
||||
}
|
||||
|
||||
void CALLBACK SIO1writeMode32(unsigned long val)
|
||||
{
|
||||
}
|
||||
|
||||
void CALLBACK SIO1writeCtrl16(unsigned short val)
|
||||
{
|
||||
}
|
||||
|
||||
void CALLBACK SIO1writeCtrl32(unsigned long val)
|
||||
{
|
||||
}
|
||||
|
||||
void CALLBACK SIO1writeBaud16(unsigned short val)
|
||||
{
|
||||
}
|
||||
|
||||
void CALLBACK SIO1writeBaud32(unsigned long val)
|
||||
{
|
||||
}
|
||||
|
||||
unsigned char CALLBACK SIO1readData8(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned short CALLBACK SIO1readData16(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned long CALLBACK SIO1readData32(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned short CALLBACK SIO1readStat16(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned long CALLBACK SIO1readStat32(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned short CALLBACK SIO1readMode16(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned long CALLBACK SIO1readMode32(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned short CALLBACK SIO1readCtrl16(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned long CALLBACK SIO1readCtrl32(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned short CALLBACK SIO1readBaud16(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned long CALLBACK SIO1readBaud32(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
void CALLBACK SIO1registerCallback(void (CALLBACK *callback)(void))
|
||||
{
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
/*
|
||||
long CALLBACK SIO1queryPlayer()
|
||||
{
|
||||
return settings.player;
|
||||
}
|
||||
*/
|
||||
/******************************************************************************/
|
||||
|
||||
unsigned long CALLBACK PSEgetLibType()
|
||||
{
|
||||
#define PSE_LT_SIO1 32
|
||||
return PSE_LT_SIO1;
|
||||
}
|
||||
|
||||
char* CALLBACK PSEgetLibName()
|
||||
{
|
||||
return _(pluginName);
|
||||
}
|
||||
|
||||
unsigned long CALLBACK PSEgetLibVersion()
|
||||
{
|
||||
return version << 16 | revision << 8 | build;
|
||||
}
|
||||
|
||||
void CALLBACK SIO1about()
|
||||
{
|
||||
}
|
||||
|
||||
long CALLBACK SIO1test()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CALLBACK SIO1configure()
|
||||
{
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
|
@ -0,0 +1,37 @@
|
|||
<?xml version="1.0"?>
|
||||
<glade-interface>
|
||||
<!-- interface-requires gtk+ 2.8 -->
|
||||
<!-- interface-naming-policy project-wide -->
|
||||
<widget class="GtkDialog" id="dialog">
|
||||
<property name="border_width">5</property>
|
||||
<property name="type_hint">normal</property>
|
||||
<property name="has_separator">False</property>
|
||||
<child internal-child="vbox">
|
||||
<widget class="GtkVBox" id="dialog-vbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">2</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child internal-child="action_area">
|
||||
<widget class="GtkHButtonBox" id="dialog-action_area">
|
||||
<property name="visible">True</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</glade-interface>
|
|
@ -0,0 +1,43 @@
|
|||
/***************************************************************************
|
||||
* Copyright (C) 2010 by Blade_Arma *
|
||||
* *
|
||||
* 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., *
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef _SIO1_H_
|
||||
#define _SIO1_H_
|
||||
|
||||
//#include "config.h"
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#include <libintl.h>
|
||||
#include <locale.h>
|
||||
#define _(x) gettext(x)
|
||||
#define N_(x) (x)
|
||||
#else
|
||||
#define _(x) (x)
|
||||
#define N_(x) (x)
|
||||
#endif
|
||||
|
||||
#define CALLBACK
|
||||
|
||||
extern Settings settings;
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
#endif // _SIO1_H_
|
Loading…
Reference in New Issue