From: notaz Date: Sun, 30 Mar 2025 14:09:41 +0000 (+0300) Subject: drop all the net stuff X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=177aadda093b63ee9143a77abca8ec221c6a82ee;p=pcsx_rearmed.git drop all the net stuff it's completely broken and there are no plans to work on it --- diff --git a/frontend/libretro.c b/frontend/libretro.c index a5caf79b..d8462e49 100644 --- a/frontend/libretro.c +++ b/frontend/libretro.c @@ -1931,7 +1931,6 @@ bool retro_load_game(const struct retro_game_info *info) } plugins_opened = 1; - NetOpened = 0; if (OpenPlugins() == -1) { diff --git a/frontend/main.c b/frontend/main.c index b282ec34..e1777ddd 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -116,7 +116,6 @@ static void set_default_paths(void) strcpy(Config.Spu, "builtin_spu"); strcpy(Config.Pad1, "builtin_pad"); strcpy(Config.Pad2, "builtin_pad"); - strcpy(Config.Net, "Disabled"); } void emu_set_default_config(void) diff --git a/frontend/menu.c b/frontend/menu.c index 2c8d658d..4ae49366 100644 --- a/frontend/menu.c +++ b/frontend/menu.c @@ -2102,7 +2102,6 @@ static int reload_plugins(const char *cdimg) set_cd_image(cdimg); LoadPlugins(); pcnt_hook_plugins(); - NetOpened = 0; if (OpenPlugins() == -1) { menu_update_msg("failed to open plugins"); return -1; diff --git a/libpcsxcore/misc.c b/libpcsxcore/misc.c index a3e90e1c..e0445e78 100644 --- a/libpcsxcore/misc.c +++ b/libpcsxcore/misc.c @@ -934,60 +934,6 @@ int CheckState(const char *file) { return 0; } -// NET Function Helpers - -int SendPcsxInfo() { - if (NET_recvData == NULL || NET_sendData == NULL) - return 0; - - boolean Sio_old = 0; - boolean SpuIrq_old = 0; - boolean RCntFix_old = 0; - NET_sendData(&Config.Xa, sizeof(Config.Xa), PSE_NET_BLOCKING); - NET_sendData(&Sio_old, sizeof(Sio_old), PSE_NET_BLOCKING); - NET_sendData(&SpuIrq_old, sizeof(SpuIrq_old), PSE_NET_BLOCKING); - NET_sendData(&RCntFix_old, sizeof(RCntFix_old), PSE_NET_BLOCKING); - NET_sendData(&Config.PsxType, sizeof(Config.PsxType), PSE_NET_BLOCKING); - NET_sendData(&Config.Cpu, sizeof(Config.Cpu), PSE_NET_BLOCKING); - - return 0; -} - -int RecvPcsxInfo() { - int tmp; - - if (NET_recvData == NULL || NET_sendData == NULL) - return 0; - - boolean Sio_old = 0; - boolean SpuIrq_old = 0; - boolean RCntFix_old = 0; - NET_recvData(&Config.Xa, sizeof(Config.Xa), PSE_NET_BLOCKING); - NET_recvData(&Sio_old, sizeof(Sio_old), PSE_NET_BLOCKING); - NET_recvData(&SpuIrq_old, sizeof(SpuIrq_old), PSE_NET_BLOCKING); - NET_recvData(&RCntFix_old, sizeof(RCntFix_old), PSE_NET_BLOCKING); - NET_recvData(&Config.PsxType, sizeof(Config.PsxType), PSE_NET_BLOCKING); - - tmp = Config.Cpu; - NET_recvData(&Config.Cpu, sizeof(Config.Cpu), PSE_NET_BLOCKING); - if (tmp != Config.Cpu) { - psxCpu->Shutdown(); -#ifndef DRC_DISABLE - if (Config.Cpu == CPU_INTERPRETER) psxCpu = &psxInt; - else psxCpu = &psxRec; -#else - psxCpu = &psxInt; -#endif - if (psxCpu->Init() == -1) { - SysClose(); return -1; - } - psxCpu->Reset(); - psxCpu->Notify(R3000ACPU_NOTIFY_AFTER_LOAD, NULL); - } - - return 0; -} - // remove the leading and trailing spaces in a string void trim(char *str) { int pos = 0; diff --git a/libpcsxcore/misc.h b/libpcsxcore/misc.h index f1e319be..3e016644 100644 --- a/libpcsxcore/misc.h +++ b/libpcsxcore/misc.h @@ -68,9 +68,6 @@ int SaveState(const char *file); int LoadState(const char *file); int CheckState(const char *file); -int SendPcsxInfo(); -int RecvPcsxInfo(); - void trim(char *str); u16 calcCrc(const u8 *d, int len); diff --git a/libpcsxcore/plugins.c b/libpcsxcore/plugins.c index d29ee1d4..9953d1cd 100644 --- a/libpcsxcore/plugins.c +++ b/libpcsxcore/plugins.c @@ -89,23 +89,6 @@ PADstartPoll PAD2_startPoll; PADpoll PAD2_poll; PADsetSensitive PAD2_setSensitive; -NETinit NET_init; -NETshutdown NET_shutdown; -NETopen NET_open; -NETclose NET_close; -NETtest NET_test; -NETconfigure NET_configure; -NETabout NET_about; -NETpause NET_pause; -NETresume NET_resume; -NETqueryPlayer NET_queryPlayer; -NETsendData NET_sendData; -NETrecvData NET_recvData; -NETsendPadData NET_sendPadData; -NETrecvPadData NET_recvPadData; -NETsetInfo NET_setInfo; -NETkeypressed NET_keypressed; - #ifdef ENABLE_SIO1API SIO1init SIO1_init; @@ -913,53 +896,6 @@ int padToggleAnalog(unsigned int index) return r; } - -void *hNETDriver = NULL; - -void CALLBACK NET__setInfo(netInfo *info) {} -void CALLBACK NET__keypressed(int key) {} -long CALLBACK NET__configure(void) { return 0; } -long CALLBACK NET__test(void) { return 0; } -void CALLBACK NET__about(void) {} - -#define LoadNetSym1(dest, name) \ - LoadSym(NET_##dest, NET##dest, name, TRUE); - -#define LoadNetSymN(dest, name) \ - LoadSym(NET_##dest, NET##dest, name, FALSE); - -#define LoadNetSym0(dest, name) \ - LoadSym(NET_##dest, NET##dest, name, FALSE); \ - if (NET_##dest == NULL) NET_##dest = (NET##dest) NET__##dest; - -static int LoadNETplugin(const char *NETdll) { - void *drv; - - hNETDriver = SysLoadLibrary(NETdll); - if (hNETDriver == NULL) { - SysMessage (_("Could not load NetPlay plugin %s!"), NETdll); return -1; - } - drv = hNETDriver; - LoadNetSym1(init, "NETinit"); - LoadNetSym1(shutdown, "NETshutdown"); - LoadNetSym1(open, "NETopen"); - LoadNetSym1(close, "NETclose"); - LoadNetSymN(sendData, "NETsendData"); - LoadNetSymN(recvData, "NETrecvData"); - LoadNetSym1(sendPadData, "NETsendPadData"); - LoadNetSym1(recvPadData, "NETrecvPadData"); - LoadNetSym1(queryPlayer, "NETqueryPlayer"); - LoadNetSym1(pause, "NETpause"); - LoadNetSym1(resume, "NETresume"); - LoadNetSym0(setInfo, "NETsetInfo"); - LoadNetSym0(keypressed, "NETkeypressed"); - LoadNetSym0(configure, "NETconfigure"); - LoadNetSym0(test, "NETtest"); - LoadNetSym0(about, "NETabout"); - - return 0; -} - #ifdef ENABLE_SIO1API void *hSIO1Driver = NULL; @@ -1078,14 +1014,6 @@ int LoadPlugins() { sprintf(Plugin, "%s/%s", Config.PluginsDir, Config.Pad2); if (LoadPAD2plugin(Plugin) == -1) return -1; - if (strcmp("Disabled", Config.Net) == 0 || strcmp("", Config.Net) == 0) - Config.UseNet = FALSE; - else { - Config.UseNet = TRUE; - sprintf(Plugin, "%s/%s", Config.PluginsDir, Config.Net); - if (LoadNETplugin(Plugin) == -1) Config.UseNet = FALSE; - } - #ifdef ENABLE_SIO1API sprintf(Plugin, "%s/%s", Config.PluginsDir, Config.Sio1); if (LoadSIO1plugin(Plugin) == -1) return -1; @@ -1102,11 +1030,6 @@ int LoadPlugins() { ret = PAD2_init(2); if (ret < 0) { SysMessage (_("Error initializing Controller 2 plugin: %d"), ret); return -1; } - if (Config.UseNet) { - ret = NET_init(); - if (ret < 0) { SysMessage (_("Error initializing NetPlay plugin: %d"), ret); return -1; } - } - #ifdef ENABLE_SIO1API ret = SIO1_init(); if (ret < 0) { SysMessage (_("Error initializing SIO1 plugin: %d"), ret); return -1; } @@ -1117,29 +1040,17 @@ int LoadPlugins() { } void ReleasePlugins() { - if (Config.UseNet) { - int ret = NET_close(); - if (ret < 0) Config.UseNet = FALSE; - } - NetOpened = FALSE; - cdra_shutdown(); if (hGPUDriver != NULL) GPU_shutdown(); if (hSPUDriver != NULL) SPU_shutdown(); if (hPAD1Driver != NULL) PAD1_shutdown(); if (hPAD2Driver != NULL) PAD2_shutdown(); - if (Config.UseNet && hNETDriver != NULL) NET_shutdown(); - if (hGPUDriver != NULL) { SysCloseLibrary(hGPUDriver); hGPUDriver = NULL; } if (hSPUDriver != NULL) { SysCloseLibrary(hSPUDriver); hSPUDriver = NULL; } if (hPAD1Driver != NULL) { SysCloseLibrary(hPAD1Driver); hPAD1Driver = NULL; } if (hPAD2Driver != NULL) { SysCloseLibrary(hPAD2Driver); hPAD2Driver = NULL; } - if (Config.UseNet && hNETDriver != NULL) { - SysCloseLibrary(hNETDriver); hNETDriver = NULL; - } - #ifdef ENABLE_SIO1API if (hSIO1Driver != NULL) { SIO1_shutdown(); diff --git a/libpcsxcore/plugins.h b/libpcsxcore/plugins.h index 87104e57..bdea9187 100644 --- a/libpcsxcore/plugins.h +++ b/libpcsxcore/plugins.h @@ -32,7 +32,6 @@ extern "C" { typedef long (CALLBACK *GPUopen)(unsigned long *, char *, char *); typedef long (CALLBACK *SPUopen)(void); typedef long (CALLBACK *PADopen)(unsigned long *); -typedef long (CALLBACK *NETopen)(unsigned long *); typedef long (CALLBACK *SIO1open)(unsigned long *); #include "spu.h" @@ -182,57 +181,6 @@ extern PADstartPoll PAD2_startPoll; extern PADpoll PAD2_poll; extern PADsetSensitive PAD2_setSensitive; -// NET Functions -typedef long (CALLBACK* NETinit)(void); -typedef long (CALLBACK* NETshutdown)(void); -typedef long (CALLBACK* NETclose)(void); -typedef long (CALLBACK* NETconfigure)(void); -typedef long (CALLBACK* NETtest)(void); -typedef void (CALLBACK* NETabout)(void); -typedef void (CALLBACK* NETpause)(void); -typedef void (CALLBACK* NETresume)(void); -typedef long (CALLBACK* NETqueryPlayer)(void); -typedef long (CALLBACK* NETsendData)(void *, int, int); -typedef long (CALLBACK* NETrecvData)(void *, int, int); -typedef long (CALLBACK* NETsendPadData)(void *, int); -typedef long (CALLBACK* NETrecvPadData)(void *, int); - -typedef struct { - char EmuName[32]; - char CdromID[9]; // ie. 'SCPH12345', no \0 trailing character - char CdromLabel[11]; - void *psxMem; - PADsetSensitive PAD_setSensitive; - char GPUpath[256]; // paths must be absolute - char SPUpath[256]; - char CDRpath[256]; - char MCD1path[256]; - char MCD2path[256]; - char BIOSpath[256]; // 'HLE' for internal bios - char Unused[1024]; -} netInfo; - -typedef long (CALLBACK* NETsetInfo)(netInfo *); -typedef long (CALLBACK* NETkeypressed)(int); - -// NET function pointers -extern NETinit NET_init; -extern NETshutdown NET_shutdown; -extern NETopen NET_open; -extern NETclose NET_close; -extern NETtest NET_test; -extern NETconfigure NET_configure; -extern NETabout NET_about; -extern NETpause NET_pause; -extern NETresume NET_resume; -extern NETqueryPlayer NET_queryPlayer; -extern NETsendData NET_sendData; -extern NETrecvData NET_recvData; -extern NETsendPadData NET_sendPadData; -extern NETrecvPadData NET_recvPadData; -extern NETsetInfo NET_setInfo; -extern NETkeypressed NET_keypressed; - #ifdef ENABLE_SIO1API // SIO1 Functions (link cable) diff --git a/libpcsxcore/psxcommon.h b/libpcsxcore/psxcommon.h index 9c9bcda5..c852d1ba 100644 --- a/libpcsxcore/psxcommon.h +++ b/libpcsxcore/psxcommon.h @@ -121,7 +121,6 @@ typedef struct { char Spu[MAXPATHLEN]; char Pad1[MAXPATHLEN]; char Pad2[MAXPATHLEN]; - char Net[MAXPATHLEN]; char Sio1[MAXPATHLEN]; char Mcd1[MAXPATHLEN]; char Mcd2[MAXPATHLEN]; @@ -138,7 +137,6 @@ typedef struct { boolean SlowBoot; boolean Debug; boolean PsxOut; - boolean UseNet; boolean icache_emulation; boolean DisableStalls; boolean PreciseExceptions; @@ -161,7 +159,6 @@ typedef struct { } PcsxConfig; extern PcsxConfig Config; -extern boolean NetOpened; struct PcsxSaveFuncs { void *(*open)(const char *name, const char *mode);