From: Javier S. Pedro Date: Wed, 26 Aug 2009 00:32:26 +0000 (+0200) Subject: netplay code added from snes9x X-Git-Tag: drnoksnes_0_9_5~13 X-Git-Url: https://vcs.maemo.org/git/?a=commitdiff_plain;h=93759510c4d42d7e8b8cb0ad66b5ef4179c648ef;p=drnoksnes netplay code added from snes9x --- diff --git a/Makefile b/Makefile index ee346c3..6b09edf 100644 --- 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 diff --git a/globals.cpp b/globals.cpp index 06d7abb..8060627 100644 --- a/globals.cpp +++ b/globals.cpp @@ -52,7 +52,10 @@ #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]; diff --git a/netplay.h b/netplay.h index 0e66650..5cfba4c 100644 --- 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 --- 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