netplay code added from snes9x
authorJavier S. Pedro <maemo@javispedro.com>
Wed, 26 Aug 2009 00:32:26 +0000 (02:32 +0200)
committerJavier S. Pedro <maemo@javispedro.com>
Wed, 26 Aug 2009 00:32:26 +0000 (02:32 +0200)
Makefile
globals.cpp
netplay.h
port.h

index ee346c3..6b09edf 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ export DESTDIR
 
 # SNES stuff
 OBJS = 2xsaiwin.o apu.o c4.o c4emu.o cheats.o cheats2.o clip.o cpu.o cpuexec.o data.o
-OBJS += dma.o dsp1.o fxemu.o fxinst.o gfx.o globals.o loadzip.o memmap.o ppu.o
+OBJS += dma.o dsp1.o fxemu.o fxinst.o gfx.o globals.o loadzip.o memmap.o netplay.o ppu.o
 OBJS += sdd1.o sdd1emu.o snapshot.o soundux.o spc700.o srtc.o tile.o
 # ASM CPU Core, ripped from Yoyo's OpenSnes9X
 OBJS += os9x_asm_cpu.o os9x_65c816.o spc700a.o
index 06d7abb..8060627 100644 (file)
 #include "soundux.h"
 #include "cheats.h"
 #include "sa1.h"
-// #include "netplay.h" // XXX ?
+
+#ifdef NETPLAY_SUPPORT
+#include "netplay.h"
+#endif
 
 START_EXTERN_C
 char String[513];
index 0e66650..5cfba4c 100644 (file)
--- a/netplay.h
+++ b/netplay.h
@@ -192,6 +192,8 @@ struct SNPServer
 
 #define NP_MAX_ACTION_LEN 200
 
+START_EXTERN_C
+
 struct SNetPlay
 {
     volatile uint8  MySequenceNum;
@@ -222,7 +224,9 @@ struct SNetPlay
     char   WarningMsg [NP_MAX_ACTION_LEN];
 };
 
-extern "C" struct SNetPlay NetPlay;
+extern struct SNetPlay NetPlay;
+
+END_EXTERN_C
 
 //
 // NETPLAY_CLIENT_HELLO message format:
diff --git a/port.h b/port.h
index 14c2ab3..4fe7f82 100644 (file)
--- a/port.h
+++ b/port.h
@@ -107,6 +107,7 @@ typedef int16_t                     int16_32;
 #define ASM_SPC700             1
 //#define SUPER_FX             1
 #define CPU_SHUTDOWN   1
+#define NETPLAY_SUPPORT        1
 
 //Misc Items
 #define VAR_CYCLES