From bdb65596cedf5fd133e58c759bc2d3edfcc13b14 Mon Sep 17 00:00:00 2001 From: negativeExponent Date: Sat, 22 May 2021 08:29:12 +0800 Subject: [PATCH] Libretro: Remove serial emulation workaround These are not needed anymore due to previous 2 commits. --- src/libretro/Makefile | 2 +- src/libretro/libretro.cpp | 66 --------------------------------------- 2 files changed, 1 insertion(+), 67 deletions(-) diff --git a/src/libretro/Makefile b/src/libretro/Makefile index 2c35083e..bb67a911 100644 --- a/src/libretro/Makefile +++ b/src/libretro/Makefile @@ -2,7 +2,7 @@ DEBUG=0 TILED_RENDERING=0 STATIC_LINKING=0 FRONTEND_SUPPORTS_RGB565=1 -NO_LINK=0 +NO_LINK=1 SPACE := SPACE := $(SPACE) $(SPACE) diff --git a/src/libretro/libretro.cpp b/src/libretro/libretro.cpp index fb834fd6..61d3ef05 100644 --- a/src/libretro/libretro.cpp +++ b/src/libretro/libretro.cpp @@ -92,72 +92,6 @@ void (*dbgOutput)(const char* s, uint32_t addr); void (*dbgSignal)(int sig, int number); #endif -// Dummy vars/funcs for serial io emulation without LINK communication related stuff -#ifndef NO_LINK -#include "../gba/GBALink.h" -uint8_t gbSIO_SC; -bool LinkIsWaiting; -bool LinkFirstTime; -bool EmuReseted; -int winGbPrinterEnabled; -bool gba_joybus_active = false; - -#define UPDATE_REG(address, value) WRITE16LE(((uint16_t*)&ioMem[address]), value) - -LinkMode GetLinkMode() -{ - return LINK_DISCONNECTED; -} - -void StartGPLink(uint16_t value) -{ - if (!ioMem) - return; - - UPDATE_REG(COMM_RCNT, value); -} - -void LinkUpdate(int ticks) -{ -} - -void StartLink(uint16_t siocnt) -{ -/* log("'s' siocnt = %04x\n", siocnt); */ - - if (!ioMem) - return; - - if(siocnt & 0x80) - { - siocnt &= 0xff7f; - if(siocnt & 1 && (siocnt & 0x4000)) - { - UPDATE_REG(COMM_SIOCNT, 0xFF); - IF |= 0x80; - UPDATE_REG(0x202, IF); - siocnt &= 0x7f7f; - } - } - UPDATE_REG(COMM_SIOCNT, siocnt); -} - -void CheckLinkConnection() -{ -} - -void gbInitLink() -{ - LinkIsWaiting = false; - LinkFirstTime = true; -} - -uint16_t gbLinkUpdate(uint8_t b, int gbSerialOn) //used on external clock -{ - return (b << 8); -} -#endif - #define GS555(x) (x | (x << 5) | (x << 10)) uint16_t systemGbPalette[24] = { GS555(0x1f), GS555(0x15), GS555(0x0c), 0,