diff --git a/src/Makefile.cfg b/src/Makefile.cfg
index 3b90bd05a071fdfdd67856f110159b54699e52d8..e3f5b74f637b489bf44dc28d37e8eb77bc3d8dd7 100644
--- a/src/Makefile.cfg
+++ b/src/Makefile.cfg
@@ -345,12 +345,6 @@ endif
 endif
 endif
 
-ifdef GP2X
-ifdef SDL
-	SDL12=1
-endif
-endif
-
 ifdef ARCHNAME
 	OBJDIR:=$(OBJDIR)/$(ARCHNAME)
 	BIN:=$(BIN)/$(ARCHNAME)
diff --git a/src/command.c b/src/command.c
index 8c275c23e5775bca6f3b34e4a0ea1cde66446ec0..62431b6647b5185f2d7596c93155962970e7ef65 100644
--- a/src/command.c
+++ b/src/command.c
@@ -1255,9 +1255,6 @@ static void Got_NetVar(UINT8 **p, INT32 playernum)
 		CONS_Alert(CONS_WARNING, "Netvar not found with netid %hu\n", netid);
 		return;
 	}
-#if 0 //defined (GP2X)
-	CONS_Printf("Netvar received: %s [netid=%d] value %s\n", cvar->name, netid, svalue);
-#endif
 	DEBFILE(va("Netvar received: %s [netid=%d] value %s\n", cvar->name, netid, svalue));
 
 	Setvalue(cvar, svalue, stealth);
diff --git a/src/d_main.c b/src/d_main.c
index 1d8934ca90b84f4f29fb8ac281b5fc420c73af5c..2b3ffc0db0de59aeb093ceef114ae8641b2c7bd0 100644
--- a/src/d_main.c
+++ b/src/d_main.c
@@ -979,7 +979,7 @@ void D_SRB2Main(void)
 	setbuf(stdout, NULL); // non-buffered output
 #endif
 
-#if defined (_WIN32_WCE) //|| defined (_DEBUG) || defined (GP2X)
+#if defined (_WIN32_WCE) //|| defined (_DEBUG)
 	devparm = M_CheckParm("-nodebug") == 0;
 #else
 	devparm = M_CheckParm("-debug") != 0;
@@ -1005,7 +1005,7 @@ void D_SRB2Main(void)
 
 		if (!userhome)
 		{
-#if ((defined (__unix__) && !defined (MSDOS)) || defined(__APPLE__) || defined (UNIXCOMMON)) && !defined (__CYGWIN__) && !defined(GP2X)
+#if ((defined (__unix__) && !defined (MSDOS)) || defined(__APPLE__) || defined (UNIXCOMMON)) && !defined (__CYGWIN__)
 			I_Error("Please set $HOME to your home directory\n");
 #elif defined (_WIN32_WCE) && 0
 			if (dedicated)
@@ -1419,10 +1419,7 @@ const char *D_Home(void)
 		userhome = M_GetNextParm();
 	else
 	{
-#if defined (GP2X)
-		usehome = false; //let use the CWD
-		return NULL;
-#elif !((defined (__unix__) && !defined (MSDOS)) || defined(__APPLE__) || defined (UNIXCOMMON)) && !defined (__APPLE__) && !defined(_WIN32_WCE)
+#if !((defined (__unix__) && !defined (MSDOS)) || defined(__APPLE__) || defined (UNIXCOMMON)) && !defined (__APPLE__) && !defined(_WIN32_WCE)
 		if (FIL_FileOK(CONFIGFILENAME))
 			usehome = false; // Let's NOT use home
 		else
diff --git a/src/d_netcmd.c b/src/d_netcmd.c
index f7390c6b8f1bf4cc5695137937054cd8f10eea8c..f3afc234a39f308479d7727793c1421d784080ed 100644
--- a/src/d_netcmd.c
+++ b/src/d_netcmd.c
@@ -244,7 +244,7 @@ INT32 cv_debug;
 consvar_t cv_usemouse = {"use_mouse", "On", CV_SAVE|CV_CALL,usemouse_cons_t, I_StartupMouse, 0, NULL, NULL, 0, 0, NULL};
 consvar_t cv_usemouse2 = {"use_mouse2", "Off", CV_SAVE|CV_CALL,usemouse_cons_t, I_StartupMouse2, 0, NULL, NULL, 0, 0, NULL};
 
-#if defined (GP2X) || defined (_NDS) //only one joystick
+#if defined (_NDS) //only one joystick
 consvar_t cv_usejoystick = {"use_joystick", "1", CV_SAVE|CV_CALL, usejoystick_cons_t,
 	I_InitJoystick, 0, NULL, NULL, 0, 0, NULL};
 consvar_t cv_usejoystick2 = {"use_joystick2", "0", CV_SAVE|CV_CALL, usejoystick_cons_t,
diff --git a/src/doomdef.h b/src/doomdef.h
index 26bbea985ec6e0b8fac479b27d3bb16a5fc4a495..8f64df782922006bfe115b058a52d9bd7e31cc32 100644
--- a/src/doomdef.h
+++ b/src/doomdef.h
@@ -28,7 +28,7 @@
 
 // Use Mixer interface?
 #ifdef HAVE_MIXER
-    //#if !defined(_WIN32_WCE) && !defined(GP2X)
+    //#if !defined(_WIN32_WCE)
     #define SOUND SOUND_MIXER
     #define NOHS // No HW3SOUND
     #ifdef HW3SOUND
@@ -381,7 +381,7 @@ enum {
 };
 
 // Name of local directory for config files and savegames
-#if !defined(_WIN32_WCE) && !defined(GP2X)
+#if !defined(_WIN32_WCE)
 #if (((defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON)) && !defined (__CYGWIN__)) && !defined (__APPLE__)
 #define DEFAULTDIR ".srb2"
 #else
diff --git a/src/g_input.c b/src/g_input.c
index 39e59f9d8f6746f7c5b8ce6d467d7f4655ced0c7..f864d4c16e062afb705ec4b4d140fe36f42fdd04 100644
--- a/src/g_input.c
+++ b/src/g_input.c
@@ -286,17 +286,7 @@ static keyname_t keynames[] =
 	{KEY_2MOUSEWHEELUP, "Wheel 2 UP"},
 	{KEY_2MOUSEWHEELDOWN, "Wheel 2 Down"},
 
-#if defined (GP2X)
-	{KEY_JOY1+0, "JOYA"},
-	{KEY_JOY1+1, "JOYY"},
-	{KEY_JOY1+2, "JOYB"},
-	{KEY_JOY1+3, "JOYX"},
-	{KEY_JOY1+4, "JOYL"},
-	{KEY_JOY1+5, "JOYR"},
-	{KEY_JOY1+6, "JOYVOLUP"},
-	{KEY_JOY1+7, "JOYVOLDOWN"},
-	{KEY_JOY1+8, "JOYSELECT"},
-#elif defined (_NDS)
+#if defined (_NDS)
 	{KEY_JOY1+0, "JOYA"},
 	{KEY_JOY1+1, "JOYB"},
 	{KEY_JOY1+2, "JOYX"},
@@ -378,18 +368,7 @@ static keyname_t keynames[] =
 	{KEY_DBL2MOUSE1+6, "DBLSEC_MOUSE7"},
 	{KEY_DBL2MOUSE1+7, "DBLSEC_MOUSE8"},
 
-#if defined (GP2X)
-	{KEY_DBLJOY1+0, "DBLJOYA"},
-	{KEY_DBLJOY1+1, "DBLJOYY"},
-	{KEY_DBLJOY1+2, "DBLJOYB"},
-	{KEY_DBLJOY1+3, "DBLJOYX"},
-	{KEY_DBLJOY1+4, "DBLJOYL"},
-	{KEY_DBLJOY1+5, "DBLJOYR"},
-	{KEY_DBLJOY1+6, "DBLJOYVOLUP"},
-	{KEY_DBLJOY1+7, "DBLJOYVOLDOWN"},
-	{KEY_DBLJOY1+8, "DBLJOYSELECT"},
-#define NOMOREJOYBTN_1DBL
-#elif defined (_NDS)
+#if defined (_NDS)
 	{KEY_DBLJOY1+0, "DBLJOYA"},
 	{KEY_DBLJOY1+1, "DBLJOYB"},
 	{KEY_DBLJOY1+2, "DBLJOYX"},
@@ -656,20 +635,7 @@ INT32 G_KeyStringtoNum(const char *keystr)
 	return 0;
 }
 
-#if defined (GP2X)
-void G_Controldefault(void)
-{
-	gamecontrol[gc_fire       ][0] = KEY_JOY1+0; //A
-	gamecontrol[gc_forward    ][0] = KEY_JOY1+1; //Y
-	gamecontrol[gc_jump       ][0] = KEY_JOY1+2; //B
-	gamecontrol[gc_use        ][0] = KEY_JOY1+3; //X
-	gamecontrol[gc_strafeleft ][0] = KEY_JOY1+4; //L
-	gamecontrol[gc_straferight][0] = KEY_JOY1+5; //R
-	gamecontrol[gc_lookup     ][0] = KEY_JOY1+6; //U
-	gamecontrol[gc_lookdown   ][0] = KEY_JOY1+7; //D
-	gamecontrol[gc_pause      ][0] = KEY_JOY1+8; //S
-}
-#elif defined (_NDS)
+#if defined (_NDS)
 void G_Controldefault(void)
 {
 	gamecontrol[gc_fire       ][0] = KEY_JOY1+2; //X
diff --git a/src/s_sound.c b/src/s_sound.c
index 69277fe9f89f5c1a8fa31ac8797da5c1ddf44147..a34b6362f91d708371198bc4a74afcfc7df45c3d 100644
--- a/src/s_sound.c
+++ b/src/s_sound.c
@@ -62,7 +62,7 @@ consvar_t sndserver_arg = {"sndserver_arg", "-quiet", CV_SAVE, NULL, 0, NULL, NU
 #define SURROUND
 #endif
 
-#if defined (_WIN32_WCE) || defined(GP2X)
+#if defined (_WIN32_WCE)
 consvar_t cv_samplerate = {"samplerate", "11025", 0, CV_Unsigned, NULL, 11025, NULL, NULL, 0, 0, NULL}; //Alam: For easy hacking?
 #elif defined(_WINDOWS)
 consvar_t cv_samplerate = {"samplerate", "44100", 0, CV_Unsigned, NULL, 44100, NULL, NULL, 0, 0, NULL}; //Alam: For easy hacking?
@@ -91,7 +91,7 @@ static void Captioning_OnChange(void)
 consvar_t cv_closedcaptioning = {"closedcaptioning", "Off", CV_SAVE|CV_CALL, CV_OnOff, Captioning_OnChange, 0, NULL, NULL, 0, 0, NULL};
 
 // number of channels available
-#if defined (_WIN32_WCE) || defined(GP2X)
+#if defined (_WIN32_WCE)
 consvar_t cv_numChannels = {"snd_channels", "8", CV_SAVE|CV_CALL, CV_Unsigned, SetChannelsNum, 0, NULL, NULL, 0, 0, NULL};
 #else
 consvar_t cv_numChannels = {"snd_channels", "32", CV_SAVE|CV_CALL, CV_Unsigned, SetChannelsNum, 0, NULL, NULL, 0, 0, NULL};
@@ -1377,7 +1377,7 @@ static boolean S_DigMusic(const char *mname, boolean looping)
 
 void S_ChangeMusic(const char *mmusic, UINT16 mflags, boolean looping)
 {
-#if defined (_WIN32_WCE) || defined(GP2X)
+#if defined (_WIN32_WCE)
 	S_ClearSfx();
 #endif
 
diff --git a/src/screen.h b/src/screen.h
index d5322149391c50cfac849166e552323075e15eac..8067860ecfb73183a5bb2c72107fdb9518618495 100644
--- a/src/screen.h
+++ b/src/screen.h
@@ -46,9 +46,6 @@
 #if defined (_WIN32_WCE) || defined (_NDS)
 #define MAXVIDWIDTH 320
 #define MAXVIDHEIGHT 200
-#elif defined (GP2X)
-#define MAXVIDWIDTH 320 //720
-#define MAXVIDHEIGHT 240 //576
 #else
 #define MAXVIDWIDTH 1920 // don't set this too high because actually
 #define MAXVIDHEIGHT 1200 // lots of tables are allocated with the MAX size.
diff --git a/src/sdl12/MakeNIX.cfg b/src/sdl12/MakeNIX.cfg
index 1278aaf06ccb7b8307bb959ac705e4c54b381a8e..e188b0fcfd61ab6faf23bba1ae449a742c330391 100644
--- a/src/sdl12/MakeNIX.cfg
+++ b/src/sdl12/MakeNIX.cfg
@@ -52,37 +52,6 @@ ifdef FREEBSD
 	LIBS+=-lipx -lkvm
 endif
 
-#
-#here is GP2x (arm-gp2x-linux)
-#
-ifdef GP2X
-	PNG_CONFIG?=$(PREFIX)-libpng12-config
-ifdef STATIC #need a better setting name
-	CFLAGS+=-I$(OPEN2X)/include
-ifndef NOMIXER
-	LIBS+=-lvorbisidec
-ifdef MIKMOD
-	LIBS+=-lmikmod
-endif
-ifdef SMPEGLIB
-	LIBS+=-lsmpeg
-	LD=$(CXX)
-endif
-endif
-	NONET=1
-endif
-ifndef ARCHNAME
-"error"
-endif
-	NONX86=1
-	NOHW=1
-	NOHS=1
-	NOMD5=1
-	WFLAGS+=-O0
-	OPTS+=-DGP2X -ffast-math -mcpu=arm920t
-	EXENAME?=SRB2GP2X.gpe
-endif
-
 ifndef NOHW
 	OPTS+=-I/usr/X11R6/include
 	LDFLAGS+=-L/usr/X11R6/lib
diff --git a/src/sdl12/hwsym_sdl.c b/src/sdl12/hwsym_sdl.c
index 244d7230d219d1878b3b60a07746745bf08f7455..b7b5613e17806818fd1c57824d1c5e702d5f1840 100644
--- a/src/sdl12/hwsym_sdl.c
+++ b/src/sdl12/hwsym_sdl.c
@@ -37,10 +37,6 @@
 #pragma warning(default : 4214 4244)
 #endif
 
-#ifdef GP2X
-#define NOLOADSO
-#endif
-
 #if SDL_VERSION_ATLEAST(1,2,6) && !defined (NOLOADSO)
 #include "SDL_loadso.h" // 1.2.6+
 #elif !defined (NOLOADSO)
diff --git a/src/sdl12/i_cdmus.c b/src/sdl12/i_cdmus.c
index 3f7910b7d6440cce68dd26631accafb29c6e3015..805e6f498edd9f19b048e18466c562ee3a1bafb6 100644
--- a/src/sdl12/i_cdmus.c
+++ b/src/sdl12/i_cdmus.c
@@ -19,7 +19,7 @@
 
 #ifdef HAVE_SDL
 
-#if defined (_WIN32_WCE) || defined(GP2X)
+#if defined (_WIN32_WCE)
 #define NOSDLCD
 #endif
 
diff --git a/src/sdl12/i_main.c b/src/sdl12/i_main.c
index ec285cfd02f729f3c2e6b0813842caef0b2a7732..2a0ea785af039846c332d755d2553ef82b1ec906 100644
--- a/src/sdl12/i_main.c
+++ b/src/sdl12/i_main.c
@@ -121,7 +121,7 @@ int main(int argc, char **argv)
 	logdir = D_Home();
 
 #ifdef LOGMESSAGES
-#if defined(_WIN32_WCE) || defined(GP2X)
+#if defined(_WIN32_WCE)
 	logstream = fopen(va("%s.log",argv[0]), "a");
 #elif defined (DEFAULTDIR)
 	if (logdir)
diff --git a/src/sdl12/i_system.c b/src/sdl12/i_system.c
index 295fb2a0138e75562b7a4b914cfe9a4d24f8b619..a907c7f90784bb0eff7e92448cdb17453c704b4c 100644
--- a/src/sdl12/i_system.c
+++ b/src/sdl12/i_system.c
@@ -128,14 +128,7 @@ typedef BOOL (WINAPI *p_SetProcessAffinityMask) (HANDLE, DWORD_PTR);
 #endif
 
 // Locations for searching the srb2.srb
-#ifdef GP2X
-#define DEFAULTWADLOCATION1 "/mnt/sd"
-#define DEFAULTWADLOCATION2 "/mnt/sd/SRB2"
-#define DEFAULTWADLOCATION3 "/tmp/mnt/sd"
-#define DEFAULTWADLOCATION4 "/tmp/mnt/sd/SRB2"
-#define DEFAULTSEARCHPATH1 "/mnt/sd"
-#define DEFAULTSEARCHPATH2 "/tmp/mnt/sd"
-#elif defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON)
+#if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON)
 #define DEFAULTWADLOCATION1 "/usr/local/share/games/SRB2"
 #define DEFAULTWADLOCATION2 "/usr/local/games/SRB2"
 #define DEFAULTWADLOCATION3 "/usr/share/games/SRB2"
@@ -203,9 +196,6 @@ static void JoyReset(SDLJoyInfo_t *JoySet)
 {
 	if (JoySet->dev)
 	{
-#ifdef GP2X //GP2X's SDL does an illegal free on the 1st joystick...
-		if (SDL_JoystickIndex(JoySet->dev) != 0)
-#endif
 		SDL_JoystickClose(JoySet->dev);
 	}
 	JoySet->dev = NULL;
@@ -417,9 +407,7 @@ static void I_StartupConsole(void)
 	signal(SIGTTIN, SIG_IGN);
 	signal(SIGTTOU, SIG_IGN);
 
-#if !defined(GP2X) //read is bad on GP2X
 	consolevent = !M_CheckParm("-noconsole");
-#endif
 	framebuffer = M_CheckParm("-framebuffer");
 
 	if (framebuffer)
@@ -835,22 +823,12 @@ INT32 I_GetKey (void)
 //
 void I_JoyScale(void)
 {
-#ifdef GP2X
-	if (JoyInfo.dev && SDL_JoystickIndex(JoyInfo.dev) == 0)
-		Joystick.bGamepadStyle = true;
-	else
-#endif
 	Joystick.bGamepadStyle = cv_joyscale.value==0;
 	JoyInfo.scale = Joystick.bGamepadStyle?1:cv_joyscale.value;
 }
 
 void I_JoyScale2(void)
 {
-#ifdef GP2X
-	if (JoyInfo2.dev && SDL_JoystickIndex(JoyInfo2.dev) == 0)
-		Joystick.bGamepadStyle = true;
-	else
-#endif
 	Joystick2.bGamepadStyle = cv_joyscale2.value==0;
 	JoyInfo2.scale = Joystick2.bGamepadStyle?1:cv_joyscale2.value;
 }
@@ -2099,7 +2077,7 @@ void I_StartupTimer(void)
 		pfntimeGetTime = (p_timeGetTime)GetProcAddress(winmm, "timeGetTime");
 	}
 	I_AddExitFunc(I_ShutdownTimer);
-#elif 0 //#elif !defined(GP2X) // GP2X have broken pthreads?
+#elif 0
 	if (SDL_InitSubSystem(SDL_INIT_TIMER) < 0)
 		I_Error("SRB2: Needs SDL_Timer, Error: %s", SDL_GetError());
 #endif
@@ -2124,11 +2102,7 @@ INT32 I_StartupSystem(void)
 	 SDLcompiled.major, SDLcompiled.minor, SDLcompiled.patch);
 	I_OutputMsg("Linked with SDL version: %d.%d.%d\n",
 	 SDLlinked->major, SDLlinked->minor, SDLlinked->patch);
-#if 0 //#ifdef GP2X //start up everything
-	if (SDL_Init(SDL_INIT_NOPARACHUTE|SDL_INIT_EVERYTHING) < 0)
-#else
 	if (SDL_Init(SDL_INIT_NOPARACHUTE) < 0)
-#endif
 		I_Error("SRB2: SDL System Error: %s", SDL_GetError()); //Alam: Oh no....
 #ifndef NOMUMBLE
 	I_SetupMumble();
@@ -2179,10 +2153,6 @@ void I_Quit(void)
 	}
 death:
 	W_Shutdown();
-#ifdef GP2X
-	chdir("/usr/gp2x");
-	execl("/usr/gp2x/gp2xmenu", "/usr/gp2x/gp2xmenu", NULL);
-#endif
 	exit(0);
 }
 
@@ -2279,10 +2249,6 @@ void I_Error(const char *error, ...)
 			va_end(argptr);
 #endif
 			W_Shutdown();
-#ifdef GP2X
-			chdir("/usr/gp2x");
-			execl("/usr/gp2x/gp2xmenu", "/usr/gp2x/gp2xmenu", NULL);
-#endif
 			exit(-1); // recursive errors detected
 		}
 	}
@@ -2333,10 +2299,6 @@ void I_Error(const char *error, ...)
 	W_Shutdown();
 #if defined (PARANOIA) && defined (__CYGWIN__)
 		*(INT32 *)2 = 4; //Alam: Debug!
-#endif
-#ifdef GP2X
-	chdir("/usr/gp2x");
-	execl("/usr/gp2x/gp2xmenu", "/usr/gp2x/gp2xmenu", NULL);
 #endif
 	exit(-1);
 }
@@ -2456,10 +2418,7 @@ void I_GetDiskFreeSpace(INT64 *freespace)
 
 char *I_GetUserName(void)
 {
-#ifdef GP2X
-	static char username[MAXPLAYERNAME] = "GP2XUSER";
-	return username;
-#elif !defined (_WIN32_WCE)
+#if !defined (_WIN32_WCE)
 	static char username[MAXPLAYERNAME];
 	char *p;
 #ifdef _WIN32
diff --git a/src/sdl12/i_video.c b/src/sdl12/i_video.c
index 928d13ca41af46fa319ee0f679eaad08d3e648dc..fa7e31e8d11881f5c965f3d5c393aac7d4bf37c5 100644
--- a/src/sdl12/i_video.c
+++ b/src/sdl12/i_video.c
@@ -35,11 +35,6 @@
 #pragma warning(default : 4214 4244)
 #endif
 
-#if SDL_VERSION_ATLEAST(1,2,9) && defined (GP2X)
-#define HAVE_GP2XSDL
-#include "SDL_gp2x.h"
-#endif
-
 #if SDL_VERSION_ATLEAST(1,3,0)
 #define SDLK_EQUALS SDLK_KP_EQUALSAS400
 #define SDLK_LMETA SDLK_LGUI
@@ -54,7 +49,7 @@
 
 #ifdef HAVE_IMAGE
 #include "SDL_image.h"
-#elseif !(defined (_WIN32_WCE) || defined(GP2X))
+#elseif !defined (_WIN32_WCE)
 #define LOAD_XPM //I want XPM!
 #include "IMG_xpm.c" //Alam: I don't want to add SDL_Image.dll/so
 #define HAVE_IMAGE //I have SDL_Image, sortof
@@ -99,7 +94,7 @@
 #endif
 
 // maximum number of windowed modes (see windowedModes[][])
-#if defined (_WIN32_WCE) || defined(GP2X)
+#if defined (_WIN32_WCE)
 #define MAXWINMODES (1)
 #else
 #define MAXWINMODES (27)
@@ -118,11 +113,7 @@ rendermode_t rendermode=render_soft;
 boolean highcolor = false;
 
 // synchronize page flipping with screen refresh
-#if defined(GP2X) && !defined(HAVE_GP2XSDL)
-consvar_t cv_vidwait = {"vid_wait", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
-#else
 consvar_t cv_vidwait = {"vid_wait", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
-#endif
 static consvar_t cv_stretch = {"stretch", "Off", CV_SAVE|CV_NOSHOWHELP, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
 
 UINT8 graphics_started = 0; // Is used in console.c and screen.c
@@ -158,7 +149,7 @@ static const Uint32      surfaceFlagsW = SDL_HWPALETTE/*|SDL_RESIZABLE*/;
 static const Uint32      surfaceFlagsF = SDL_HWPALETTE|SDL_FULLSCREEN;
 static       SDL_bool    mousegrabok = SDL_TRUE;
 #define HalfWarpMouse(x,y) SDL_WarpMouse((Uint16)(x/2),(Uint16)(y/2))
-#if defined (_WIN32_WCE) || defined(GP2X)
+#if defined (_WIN32_WCE)
 static       SDL_bool    videoblitok = SDL_TRUE;
 #else
 static       SDL_bool    videoblitok = SDL_FALSE;
@@ -168,7 +159,7 @@ static       SDL_bool    exposevideo = SDL_FALSE;
 // windowed video modes from which to choose from.
 static INT32 windowedModes[MAXWINMODES][2] =
 {
-#if !(defined (_WIN32_WCE) || defined (GP2X))
+#if !defined (_WIN32_WCE)
 	{1920,1200}, // 1.60,6.00
 	{1680,1050}, // 1.60,5.25
 	{1600,1200}, // 1.33,5.00
@@ -206,12 +197,6 @@ static void SDLSetMode(INT32 width, INT32 height, INT32 bpp, Uint32 flags)
 	if (bpp < 16)
 		bpp = 16; // 256 mode poo
 #endif
-#ifdef GP2X
-	bpp = 16;
-#ifdef HAVE_GP2XSDL
-	height = 240;
-#endif
-#endif
 #ifdef FILTERS
 	bpp = Setupf2x(width, height, bpp);
 #endif
@@ -231,9 +216,6 @@ static void SDLSetMode(INT32 width, INT32 height, INT32 bpp, Uint32 flags)
 	SDL_DC_EmulateMouse(SDL_FALSE);
 	SDL_DC_EmulateKeyboard(SDL_TRUE);
 #endif
-#ifdef HAVE_GP2XSDL
-	SDL_ShowCursor(SDL_DISABLE); //For GP2X Open2x
-#endif
 #ifdef FILTERS
 	if (vidSurface && preSurface && f2xSurface)
 	{
@@ -604,7 +586,7 @@ static void VID_Command_Info_f (void)
 
 static void VID_Command_ModeList_f(void)
 {
-#if !defined (_WIN32_WCE) && !defined(GP2X)
+#if !defined (_WIN32_WCE)
 	INT32 i;
 #ifdef HWRENDER
 	if (rendermode == render_opengl)
@@ -752,134 +734,7 @@ static inline VOID ResetAero(VOID)
 
 static inline void SDLJoyRemap(event_t *event)
 {
-#if defined(GP2X)
-#define GP2X_BUTTON_UP              (0)
-#define GP2X_BUTTON_DOWN            (4)
-#define GP2X_BUTTON_LEFT            (2)
-#define GP2X_BUTTON_RIGHT           (6)
-#define GP2X_BUTTON_UPLEFT          (1)
-#define GP2X_BUTTON_UPRIGHT         (7)
-#define GP2X_BUTTON_DOWNLEFT        (3)
-#define GP2X_BUTTON_DOWNRIGHT       (5)
-#define GP2X_BUTTON_CLICK           (18)
-#define GP2X_BUTTON_A               (12)
-#define GP2X_BUTTON_B               (13)
-#define GP2X_BUTTON_X               (14)
-#define GP2X_BUTTON_Y               (15)
-#define GP2X_BUTTON_L               (10)
-#define GP2X_BUTTON_R               (11)
-#define GP2X_BUTTON_START           (8)
-#define GP2X_BUTTON_SELECT          (9)
-#define GP2X_BUTTON_VOLUP           (16)
-#define GP2X_BUTTON_VOLDOWN         (17)
-	if ((event->type == ev_keydown || event->type == ev_keyup) && (KEY_JOY1 <= event->data1 && event->data1 <= KEY_JOY1+JOYBUTTONS))
-	{
-		INT32 button = event->data1-KEY_JOY1;
-		if (button <= 7)
-		{
-			static UINT8 DPAD = 0;
-			if (event->type == ev_keyup)
-			{
-				event->type = ev_console;
-				DPAD &= ~(1<<button);
-			}
-			else
-			{
-				event->type = ev_joystick;
-				DPAD |= 1<<button;
-			}
-			event->data2 = event->data3 = INT32_MAX;
-			if ((DPAD & (1<<GP2X_BUTTON_UP)) && ((DPAD & (1<<GP2X_BUTTON_UPLEFT)) || (DPAD & (1<<GP2X_BUTTON_UPRIGHT))))
-				button = GP2X_BUTTON_UP;
-			if ((DPAD & (1<<GP2X_BUTTON_LEFT)) && ((DPAD & (1<<GP2X_BUTTON_UPLEFT)) || (DPAD & (1<<GP2X_BUTTON_DOWNLEFT))))
-				button = GP2X_BUTTON_LEFT;
-			if ((DPAD & (1<<GP2X_BUTTON_DOWN)) && ((DPAD & (1<<GP2X_BUTTON_DOWNLEFT)) || (DPAD & (1<<GP2X_BUTTON_DOWNRIGHT))))
-				button = GP2X_BUTTON_DOWN;
-			if ((DPAD & (1<<GP2X_BUTTON_RIGHT)) && ((DPAD & (1<<GP2X_BUTTON_UPRIGHT)) || (DPAD & (1<<GP2X_BUTTON_DOWNRIGHT))))
-				button = GP2X_BUTTON_RIGHT;
-			if (DPAD == 0)
-			{
-				event->type = ev_joystick;
-				event->data2 = event->data3 = 0;
-			}
-			else switch (button)
-			{
-				case GP2X_BUTTON_UP:
-					event->data3 = -1;
-					break;
-				case GP2X_BUTTON_DOWN:
-					event->data3 = 1;
-					break;
-				case GP2X_BUTTON_LEFT:
-					event->data2 = -1;
-					break;
-				case GP2X_BUTTON_RIGHT:
-					event->data2 = 1;
-					break;
-				case GP2X_BUTTON_UPLEFT:
-					event->data2 = -1;
-					event->data3 = -1;
-					break;
-				case GP2X_BUTTON_UPRIGHT:
-					event->data2 = 1;
-					event->data3 = -1;
-					break;
-				case GP2X_BUTTON_DOWNLEFT:
-					event->data2 = -1;
-					event->data3 = 1;
-					break;
-				case GP2X_BUTTON_DOWNRIGHT:
-					event->data2 = 1;
-					event->data3 = 1;
-				default:
-					break;
-			}
-			event->data1 = 0;
-			return;
-		}
-		else switch (button)
-		{
-			case GP2X_BUTTON_CLICK:
-				event->data1 = KEY_ENTER;
-				break;
-			case GP2X_BUTTON_A:
-				event->data1 = KEY_JOY1+0;
-				break;
-			case GP2X_BUTTON_B:
-				event->data1 = KEY_JOY1+2;
-				break;
-			case GP2X_BUTTON_X:
-				event->data1 = KEY_JOY1+3;
-				break;
-			case GP2X_BUTTON_Y:
-				event->data1 = KEY_JOY1+1;
-				break;
-			case GP2X_BUTTON_L:
-				event->data1 = KEY_JOY1+4;
-				break;
-			case GP2X_BUTTON_R:
-				event->data1 = KEY_JOY1+5;
-				break;
-			case GP2X_BUTTON_START:
-				event->data1 = KEY_ESCAPE;
-				break;
-			case GP2X_BUTTON_SELECT:
-				event->data1 = KEY_JOY1+8;
-				break;
-			case GP2X_BUTTON_VOLUP:
-				event->data1 = KEY_JOY1+6;
-				break;
-			case GP2X_BUTTON_VOLDOWN:
-				event->data1 = KEY_JOY1+7;
-				break;
-			default:
-				break;
-		}
-		//I_OutputMsg("Button %i: event key %i and type: %i\n", button, event->data1, event->type);
-	}
-#else
 	(void)event;
-#endif
 }
 
 static INT32 SDLJoyAxis(const Sint16 axis, evtype_t which)
@@ -1223,10 +1078,6 @@ static inline boolean I_SkipFrame(void)
 
 	skip = !skip;
 
-#if 0 //defined (GP2X)
-	return skip;
-#endif
-
 	switch (gamestate)
 	{
 		case GS_LEVEL:
diff --git a/src/sdl12/sdl_sound.c b/src/sdl12/sdl_sound.c
index 8020a99dc6e62396c6080a6a761d0335a7fa4b8a..232c73c448a4174c1ad90aab4cf44f3b263819aa 100644
--- a/src/sdl12/sdl_sound.c
+++ b/src/sdl12/sdl_sound.c
@@ -85,7 +85,7 @@
 //  mixing buffer, and the samplerate of the raw data.
 
 // Needed for calling the actual sound output.
-#if defined (_WIN32_WCE) || defined(GP2X)
+#if defined (_WIN32_WCE)
 #define NUM_CHANNELS            MIX_CHANNELS
 #else
 #define NUM_CHANNELS            MIX_CHANNELS*4
@@ -95,8 +95,6 @@
 
 #if defined (_WIN32_WCE)
 static Uint16 samplecount = 512; //Alam: .5KB samplecount at 11025hz is 46.439909297052154195011337868481ms of buffer
-#elif defined(GP2X)
-static Uint16 samplecount = 128;
 #else
 static Uint16 samplecount = 1024; //Alam: 1KB samplecount at 22050hz is 46.439909297052154195011337868481ms of buffer
 #endif
@@ -151,15 +149,10 @@ static SDL_bool musicStarted = SDL_FALSE;
 #ifdef HAVE_MIXER
 static SDL_mutex *Msc_Mutex = NULL;
 /* FIXME: Make this file instance-specific */
-#ifdef GP2X
-#define MIDI_PATH     "/mnt/sd/srb2"
-#define MIDI_PATH2    "/tmp/mnt/sd/srb2"
-#else
 #define MIDI_PATH     srb2home
 #if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON)
 #define MIDI_PATH2    "/tmp"
 #endif
-#endif
 #define MIDI_TMPFILE  "srb2music"
 #define MIDI_TMPFILE2 "srb2wav"
 static INT32 musicvol = 62;
@@ -174,7 +167,7 @@ static SDL_bool canlooping = SDL_TRUE;
 
 #if SDL_MIXER_VERSION_ATLEAST(1,2,7)
 #define USE_RWOPS // ok, USE_RWOPS is in here
-#if defined (_WIN32_WCE) //|| defined(_WIN32) || defined(GP2X)
+#if defined (_WIN32_WCE) //|| defined(_WIN32)
 #undef USE_RWOPS
 #endif
 #endif
@@ -1505,13 +1498,11 @@ void I_InitMusic(void)
 #endif
 	I_OutputMsg("Linked with SDL_mixer version: %d.%d.%d\n",
 	            MIXlinked->major, MIXlinked->minor, MIXlinked->patch);
-#if !defined(GP2X)
 	if (audio.freq < 44100 && !M_CheckParm ("-freq")) //I want atleast 44Khz
 	{
 		audio.samples = (Uint16)(audio.samples*(INT32)(44100/audio.freq));
 		audio.freq = 44100; //Alam: to keep it around the same XX ms
 	}
-#endif
 
 	if (sound_started
 #ifdef HW3SOUND