Browse Source

delete dingux, gph, psp & wii ports. None are working & maintained.

Wei Mingzhi 6 years ago
parent
commit
f0b9ee63dc
17 changed files with 0 additions and 1034 deletions
  1. 0 41
      dingux/Makefile
  2. 0 1
      dingux/README.txt
  3. 0 22
      dingux/pal_config.h
  4. 0 52
      dingux/pal_utils.c
  5. 0 52
      gph/Makefile
  6. 0 1
      gph/README.txt
  7. 0 25
      gph/pal_config.h
  8. 0 109
      gph/pal_utils.c
  9. 0 30
      psp/Makefile.psp
  10. 0 1
      psp/README.txt
  11. 0 395
      psp/input_PSP.c
  12. 0 125
      psp/main_PSP.c
  13. 0 24
      psp/pal_config.h
  14. 0 43
      wii/Makefile
  15. 0 1
      wii/README.txt
  16. 0 25
      wii/pal_config.h
  17. 0 87
      wii/pal_utils.c

+ 0 - 41
dingux/Makefile

@@ -1,41 +0,0 @@
-TARGET = sdlpal.dge
-
-INTER=.dingux
-
-HOST = mipsel-linux-uclibc-
-
-DEPFLAGS = -MT $@ -MMD -MP -MF $*$(INTER).Td
-
-SOURCES = . ./adplug
-CFILES = $(foreach dir, $(SOURCES), $(wildcard $(dir)/*.c))
-CPPFILES = $(foreach dir, $(SOURCES), $(wildcard $(dir)/*.cpp))
-OFILES = $(CFILES:.c=$(INTER).o) $(CPPFILES:.cpp=$(INTER).o)
-DEPFILES = $(OFILES:.o=.d) 
-
-CFLAGS = -g -Wall -O2 `sdl-config --cflags` -DDINGOO -DPAL_CLASSIC -DPAL_HAS_PLATFORM_SPECIFIC_UTILS  -I. -I../ -I../liboggvorbis/include -I../liboggvorbis/src $(DEPFLAGS) 
-CXXFLAGS = $(CFLAGS)
-LDFLAGS = `sdl-config --libs`
-
-POSTCOMPILE = @mv -f $*$(INTER).Td $*$(INTER).d && touch $@
-
-$(TARGET): $(OFILES)
-	@echo [LD] $@
-	@$(HOST)g++ $(OFILES) -o $@ $(LDFLAGS)
-
-%$(INTER).o: %.c %$(INTER).d
-	@echo [CC] $<
-	@$(HOST)gcc $(CFLAGS) -c $< -o $@
-	$(POSTCOMPILE)
-
-%$(INTER).o: %.cpp %$(INTER).d
-	@echo [CC] $<
-	@$(HOST)g++ $(CXXFLAGS) -c $< -o $@
-	$(POSTCOMPILE)
-
-clean:
-	rm -f $(TARGET) $(OFILES) $(DEPFILES)
-
-%.d: ;
-.PRECIOUS: %.d
-
--include $(DEPFILES)

+ 0 - 1
dingux/README.txt

@@ -1 +0,0 @@
-This port should be updated for SDL2 and newly changes in source code.

+ 0 - 22
dingux/pal_config.h

@@ -1,22 +0,0 @@
-#ifndef PAL_CONFIG_H
-# define PAL_CONFIG_H
-
-#define PAL_PREFIX            "./"
-#define PAL_SAVE_PREFIX       "./"
-
-#  define PAL_DEFAULT_WINDOW_WIDTH   320
-#  define PAL_DEFAULT_WINDOW_HEIGHT  240
-
-# if SDL_VERSION_ATLEAST(2,0,0)
-#  define PAL_VIDEO_INIT_FLAGS  (SDL_WINDOW_SHOWN)
-# else
-#  define PAL_VIDEO_INIT_FLAGS  (SDL_SWSURFACE | SDL_FULLSCREEN)
-# endif
-
-#define PAL_SDL_INIT_FLAGS	(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK)
-
-# define PAL_PLATFORM         "DINGOO & Dingux"
-# define PAL_CREDIT           "Rikku2000"
-# define PAL_PORTYEAR         "2011"
-
-#endif

+ 0 - 52
dingux/pal_utils.c

@@ -1,52 +0,0 @@
-
-#include "main.h"
-
-static int input_event_filter(const SDL_Event *lpEvent, PALINPUTSTATE *state)
-{
-	switch (lpEvent->type)
-	{
-	case SDLK_SPACE:
-		state->dwKeyPress = kKeyMenu;
-		return 1;
-
-	case SDLK_LCTRL:
-		state->dwKeyPress = kKeySearch;
-		return 1;
-	}
-	return 0;
-}
-
-BOOL
-UTIL_GetScreenSize(
-	DWORD *pdwScreenWidth,
-	DWORD *pdwScreenHeight
-)
-{
-	return FALSE;
-}
-
-BOOL
-UTIL_IsAbsolutePath(
-	LPCSTR  lpszFileName
-)
-{
-	return FALSE;
-}
-
-INT
-UTIL_Platform_Init(
-	int argc,
-	char* argv[]
-)
-{
-	PAL_RegisterInputFilter(NULL, input_event_filter, NULL);
-	gConfig.fLaunchSetting = FALSE;
-	return 0;
-}
-
-VOID
-UTIL_Platform_Quit(
-	VOID
-)
-{
-}

+ 0 - 52
gph/Makefile

@@ -1,52 +0,0 @@
-BUILD_GP2XWIZ = NO
-BUILD_CAANOO = YES
-
-TARGET = sdlpal.gpe
-
-INTER=.gph
-
-ifeq ($(BUILD_GP2XWIZ), YES)
-HOST = arm-open2x-linux-
-DEVICE = -DGP2XWIZ
-else
-ifeq ($(BUILD_CAANOO), YES)
-HOST = arm-gph-linux-gnueabi-
-DEVICE = -DCAANOO
-endif
-endif
-
-DEPFLAGS = -MT $@ -MMD -MP -MF $*$(INTER).Td
-
-SOURCES = . .. ../adplug
-CFILES = $(foreach dir, $(SOURCES), $(wildcard $(dir)/*.c))
-CPPFILES = $(foreach dir, $(SOURCES), $(wildcard $(dir)/*.cpp))
-OFILES = $(CFILES:.c=$(INTER).o) $(CPPFILES:.cpp=$(INTER).o)
-DEPFILES = $(OFILES:.o=.d) 
-
-CFLAGS = -g -Wall -O2 `sdl-config --cflags` -DGPH $(DEVICE) -DPAL_HAS_PLATFORM_SPECIFIC_UTILS -I. -I../ -I../liboggvorbis/include -I../liboggvorbis/src $(DEPFLAGS)
-CXXFLAGS = $(CFLAGS)
-LDFLAGS = `sdl-config --libs`
-
-POSTCOMPILE = @mv -f $*$(INTER).Td $*$(INTER).d && touch $@
-
-$(TARGET): $(OFILES)
-	@echo [LD] $@
-	@$(HOST)g++ $(OFILES) -o $@ $(LDFLAGS)
-
-%$(INTER).o: %.c %$(INTER).d
-	@echo [CC] $<
-	@$(HOST)gcc $(CFLAGS) -c $< -o $@
-	$(POSTCOMPILE)
-
-%$(INTER).o: %.cpp %$(INTER).d
-	@echo [CC] $<
-	@$(HOST)g++ $(CXXFLAGS) -c $< -o $@
-	$(POSTCOMPILE)
-
-clean:
-	rm -f $(TARGET) $(OFILES) $(DEPFILES)
-
-%.d: ;
-.PRECIOUS: %.d
-
--include $(DEPFILES)

+ 0 - 1
gph/README.txt

@@ -1 +0,0 @@
-This port should be updated for SDL2 and newly changes in source code.

+ 0 - 25
gph/pal_config.h

@@ -1,25 +0,0 @@
-#ifndef PAL_CONFIG_H
-# define PAL_CONFIG_H
-
-#define PAL_PREFIX            "./"
-#define PAL_SAVE_PREFIX       "./"
-
-#  define PAL_DEFAULT_WINDOW_WIDTH   320
-#  define PAL_DEFAULT_WINDOW_HEIGHT  240
-
-# if SDL_VERSION_ATLEAST(2,0,0)
-#  define PAL_VIDEO_INIT_FLAGS  (SDL_WINDOW_SHOWN)
-# else
-#  define PAL_VIDEO_INIT_FLAGS  (SDL_SWSURFACE | SDL_FULLSCREEN)
-# endif
-
-#define PAL_SDL_INIT_FLAGS	(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_CDROM | SDL_INIT_NOPARACHUTE | SDL_INIT_JOYSTICK)
-
-# define PAL_PLATFORM         "GPH Caanoo & Wiz"
-# define PAL_CREDIT           "Rikku2000"
-# define PAL_PORTYEAR         "2011"
-
-# define MIN_DEADZONE -16384
-# define MAX_DEADZONE 16384
-
-#endif

+ 0 - 109
gph/pal_utils.c

@@ -1,109 +0,0 @@
-
-#include "main.h"
-
-static int input_event_filter(const SDL_Event *lpEvent, PALINPUTSTATE *state)
-{
-	switch (lpEvent->type)
-	{
-	case SDL_JOYAXISMOTION:
-		switch (lpEvent->jaxis.axis)
-		{
-		case 0:
-			//
-			// X axis
-			//
-			if (lpEvent->jaxis.value > MAX_DEADZONE) {
-				state->prevdir = (gpGlobals->fInBattle ? kDirUnknown : state->dir);
-				state->dir = kDirEast;
-				state->dwKeyPress = kKeyRight;
-			}
-			else if (lpEvent->jaxis.value < MIN_DEADZONE) {
-				state->prevdir = (gpGlobals->fInBattle ? kDirUnknown : state->dir);
-				state->dir = kDirWest;
-				state->dwKeyPress = kKeyLeft;
-			}
-			else {
-				state->dir = kDirUnknown;
-			}
-			return 1;
-		case 1:
-			//
-			// Y axis
-			//
-			if (lpEvent->jaxis.value > MAX_DEADZONE) {
-				state->prevdir = (gpGlobals->fInBattle ? kDirUnknown : state->dir);
-				state->dir = kDirSouth;
-				state->dwKeyPress = kKeyDown;
-			}
-			else if (lpEvent->jaxis.value < MIN_DEADZONE) {
-				state->prevdir = (gpGlobals->fInBattle ? kDirUnknown : state->dir);
-				state->dir = kDirNorth;
-				state->dwKeyPress = kKeyUp;
-			}
-			else {
-				state->dir = kDirUnknown;
-			}
-			return 1;
-		}
-		break;
-
-	case SDL_JOYBUTTONDOWN:
-		switch (lpEvent->jbutton.button)
-		{
-#if defined(GP2XWIZ)
-		case 14:
-#elif defined(CAANOO)
-		case 3:
-#endif
-			state->dwKeyPress = kKeyMenu;
-			return 1;
-
-#if defined(GP2XWIZ)
-		case 13:
-#elif defined(CAANOO)
-		case 2:
-#endif
-			state->dwKeyPress = kKeySearch;
-			return 1;
-		}
-		break;
-	}
-	return 0;
-}
-
-BOOL
-UTIL_GetScreenSize(
-	DWORD *pdwScreenWidth,
-	DWORD *pdwScreenHeight
-)
-{
-	return FALSE;
-}
-
-BOOL
-UTIL_IsAbsolutePath(
-	LPCSTR  lpszFileName
-)
-{
-	return FALSE;
-}
-
-INT
-UTIL_Platform_Init(
-	int argc,
-	char* argv[]
-)
-{
-	PAL_RegisterInputFilter(NULL, input_event_filter, NULL);
-	gConfig.fLaunchSetting = FALSE;
-	return 0;
-}
-
-VOID
-UTIL_Platform_Quit(
-	VOID
-)
-{
-	chdir("/usr/gp2x");
-	execl("./gp2xmenu", "./gp2xmenu", NULL);
-}

+ 0 - 30
psp/Makefile.psp

@@ -1,30 +0,0 @@
-TARGET = sdlpal
-
-OBJS = adplug/binfile.o adplug/emuopl.o adplug/fprovide.o adplug/rix.o \
-	adplug/binio.o adplug/fmopl.o adplug/player.o \
-	battle.o getopt.o main.o play.o script.o uigame.o ending.o \
-	global.o map.o res.o sound.o util.o fight.o input_PSP.o palcommon.o \
-	rixplay.o text.o video.o font.o itemmenu.o palette.o rngplay.o \
-	uibattle.o yj1.o game.o magicmenu.o scene.o ui.o \
-	libmad/bit.o libmad/decoder.o libmad/fixed.o libmad/frame.o \
-	libmad/huffman.o libmad/layer12.o libmad/layer3.o libmad/music_mad.o \
-	libmad/stream.o libmad/synth.o libmad/timer.o
-
-
-PSPSDK = $(shell psp-config --pspsdk-path)
-
-INCDIR = 
-CFLAGS = -O3 -G0 -Wall -g `$(PSPSDK)/../bin/sdl-config --cflags` -DPSP=1 -I.
-CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti `$(PSPSDK)/../bin/sdl-config --cflags`
-ASFLAGS = $(CFLAGS)
-
-LIBDIR =
-LIBS = `$(PSPSDK)/../bin/sdl-config --libs` -lstdc++
-
-EXTRA_TARGETS = EBOOT.PBP
-PSP_EBOOT_TITLE = sdlpal
-
-BUILD_PRX = 1
-PSP_FW_VERSION = 371
-
-include $(PSPSDK)/lib/build.mak

+ 0 - 1
psp/README.txt

@@ -1 +0,0 @@
-This port should be updated for SDL2 and newly changes in source code.

+ 0 - 395
psp/input_PSP.c

@@ -1,395 +0,0 @@
-/* -*- mode: c; tab-width: 4; c-basic-offset: 3; c-file-style: "linux" -*- */
-//
-// Copyright (c) 2009, Pal_Bazzi.
-//
-// All rights reserved.
-//
-// This file is part of SDLPAL.
-//
-// SDLPAL is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program.  If not, see <http://www.gnu.org/licenses/>.
-//
-
-#include "main.h"
-
-#ifdef PSP
-
-#include <math.h>
-#include <pspkernel.h>
-#include <pspctrl.h>
-#include <SDL_thread.h>
-
-PALINPUTSTATE            g_InputState;
-
-BOOL                     g_fUseJoystick = TRUE;
-
-static SceCtrlData pad;
-static SDL_sem *pad_sem = 0;
-static SDL_Thread *bthread = 0;
-static int running = 0;
-static unsigned int old_button=0;
-static unsigned char old_x = 0, old_y = 0;
-
-//
-// Collect pad data about once per frame
-//
-int PSP_JoystickUpdate(void *data)
-{
-	while (running)
-	{
-		SDL_SemWait(pad_sem);
-		sceCtrlPeekBufferPositive(&pad, 1); 
-		SDL_SemPost(pad_sem);
-		//
-		// Delay 1/60th of a second 
-		//
-		sceKernelDelayThread(1000000 / 60);  
-	}
-	return 0;
-}
-
-void PAL_calc_Axes(
-   unsigned char x,
-   unsigned char y
-)
-{
-   if(x<y && x+y<51)
-   {
-      g_InputState.dwKeyPress = kKeyLeft;
-      g_InputState.prevdir = g_InputState.dir;
-			g_InputState.dir = kDirWest;
-			return;
-   }
-   if(x<y && x+y>51)
-   {
-      g_InputState.dwKeyPress = kKeyDown;
-      g_InputState.prevdir = g_InputState.dir;
-			g_InputState.dir = kDirSouth;
-			return;
-   }
-   if(x>y && x+y<51)
-   {
-      g_InputState.dwKeyPress = kKeyUp;
-      g_InputState.prevdir = g_InputState.dir;
-			g_InputState.dir = kDirNorth;
-			return;
-   }
-   if(x>y && x+y>51)
-   {
-      g_InputState.dwKeyPress = kKeyRight;
-      g_InputState.prevdir = g_InputState.dir;
-			g_InputState.dir = kDirEast;
-			return;
-	 }
-	 g_InputState.prevdir = (gpGlobals->fInBattle ? kDirUnknown : g_InputState.dir);
-	 g_InputState.dir = kDirUnknown;
-}
-
-VOID
-PAL_JoystickEventFilter(
-   VOID
-)
-/*++
-  Purpose:
-
-    Handle joystick events.
-
-  Parameters:
-
-    None.
-
-  Return value:
-
-    None.
-
---*/
-{
-   unsigned int button;
-   unsigned char x, y;
- 
-   SDL_SemWait(pad_sem);
-   button = pad.Buttons;
-   x = pad.Lx;
-   y = pad.Ly;
-   SDL_SemPost(pad_sem);
-
-   //
-   //Axes
-   //
-   x /= 5;
-   y /= 5;
-   BOOL onCenter=(x>16 && x<32) && (y>16 && y<32);
-   if(!onCenter)
-   {
-		 if(old_x != x || old_y != y) 
-     {
-		    PAL_calc_Axes(x,y);
-		    old_y = y;
-		    old_x = x;
-		 }
-	 }
-	 else if (!button)
-	 {
-	   g_InputState.prevdir = (gpGlobals->fInBattle ? kDirUnknown : g_InputState.dir);
-	   g_InputState.dir = kDirUnknown;
-	 }
-
-   //
-   //Buttons
-   //
-   int changed = (button != old_button);
-   old_button = button;
-   if(changed)
-   {
-	   if (button & PSP_CTRL_UP)
-	   {
-			 g_InputState.prevdir = (gpGlobals->fInBattle ? kDirUnknown : g_InputState.dir);
-			 g_InputState.dir = kDirNorth;
-			 g_InputState.dwKeyPress = kKeyUp;
-			 return;
-	   } 
-		 if (button & PSP_CTRL_DOWN)
-		 {
-		 	 g_InputState.prevdir = (gpGlobals->fInBattle ? kDirUnknown : g_InputState.dir);
-			 g_InputState.dir = kDirSouth;
-			 g_InputState.dwKeyPress = kKeyDown;
-			 return;
-		 } 
-		 if (button & PSP_CTRL_LEFT)
-		 {
-			 g_InputState.prevdir = (gpGlobals->fInBattle ? kDirUnknown : g_InputState.dir);
-			 g_InputState.dir = kDirWest;
-			 g_InputState.dwKeyPress = kKeyLeft;
-			 return;
-		 } 
-		 if (button & PSP_CTRL_RIGHT)
-		 {
-			 g_InputState.prevdir = (gpGlobals->fInBattle ? kDirUnknown : g_InputState.dir);
-			 g_InputState.dir = kDirEast;
-			 g_InputState.dwKeyPress = kKeyRight;
-			 return;
-		 }   
-		 if (button & PSP_CTRL_SQUARE)
-		 {
-		   g_InputState.dwKeyPress = kKeyForce;
-			 return;
-		 }
-		 if (button & PSP_CTRL_TRIANGLE)
-		 {
-			g_InputState.dwKeyPress = kKeyThrowItem;
-			return;
-		 } 
-		 if (button & PSP_CTRL_CIRCLE)
-		 {
-			 g_InputState.dwKeyPress = kKeySearch;
-			 return;
-		 } 
-		 if (button & PSP_CTRL_CROSS)
-		 {
-			 g_InputState.dwKeyPress = kKeyMenu;
-			 return;
-		 } 
-		 if (button & PSP_CTRL_START)
-		 {
-			 g_InputState.dwKeyPress = kKeySearch;
-			 return;
-		 }
-		 if (button & PSP_CTRL_SELECT)
-		 {
-			 g_InputState.dwKeyPress = kKeyMenu;
-			 return;
-		 }
-		 if (button & PSP_CTRL_LTRIGGER)
-		 {
-			 g_InputState.dwKeyPress = kKeyUseItem;
-			 return;
-		 }
-		 if (button & PSP_CTRL_RTRIGGER)
-		 {
-			 g_InputState.dwKeyPress = kKeyRepeat;
-			 return;
-		 }
-	   g_InputState.prevdir = (gpGlobals->fInBattle ? kDirUnknown : g_InputState.dir);
-	   g_InputState.dir = kDirUnknown;
-   }
-}
-
-
-#if SDL_MAJOR_VERSION == 1 && SDL_MINOR_VERSION <= 2
-static int SDLCALL
-PAL_EventFilter(
-   const SDL_Event       *lpEvent
-)
-#else
-static int SDLCALL
-PAL_EventFilter(
-   void                  *userdata,
-   const SDL_Event       *lpEvent
-)
-#endif
-/*++
-  Purpose:
-
-    SDL event filter function. A filter to process all events.
-
-  Parameters:
-
-    [IN]  lpEvent - pointer to the event.
-
-  Return value:
-
-    1 = the event will be added to the internal queue.
-    0 = the event will be dropped from the queue.
-
---*/
-{
-   switch (lpEvent->type)
-   {
-   case SDL_QUIT:
-      //
-      // clicked on the close button of the window. Quit immediately.
-      //
-      PAL_Shutdown();
-      exit(0);
-   }
-
-   //
-   // All events are handled here; don't put anything to the internal queue
-   //
-   return 0;
-}
-
-VOID
-PAL_ClearKeyState(
-   VOID
-)
-/*++
-  Purpose:
-
-    Clear the record of pressed keys.
-
-  Parameters:
-
-    None.
-
-  Return value:
-
-    None.
-
---*/
-{
-   g_InputState.dwKeyPress = 0;
-}
-
-VOID
-PAL_InitInput(
-   VOID
-)
-/*++
-  Purpose:
-
-    Initialize the input subsystem.
-
-  Parameters:
-
-    None.
-
-  Return value:
-
-    None.
-
---*/
-{ 
-   memset(&g_InputState, 0, sizeof(g_InputState));
-   g_InputState.dir = kDirUnknown;
-   g_InputState.prevdir = kDirUnknown;
-#if SDL_MAJOR_VERSION == 1 && SDL_MINOR_VERSION <= 2
-   SDL_SetEventFilter(PAL_EventFilter);
-#else
-   SDL_SetEventFilter(PAL_EventFilter, NULL);
-#endif
-
-   //
-   // Setup input
-   //
-   sceCtrlSetSamplingCycle(0);
-   sceCtrlSetSamplingMode(PSP_CTRL_MODE_ANALOG);
-   pad.Buttons = 0;
-
-	 //
-	 // Start thread to read data 
-	 //
-	 if((pad_sem =  SDL_CreateSemaphore(1)) == NULL)
-	 {
-		 TerminateOnError("Can't create input semaphore\n");
-		 return;
-	 }
-	 running = 1;
-	 if((bthread = SDL_CreateThread(PSP_JoystickUpdate, NULL)) == NULL)
-	 {
-		 TerminateOnError("Can't create input thread\n");
-		 return;
-	 }
-}
-
-VOID
-PAL_ShutdownInput(
-   VOID
-)
-/*++
-  Purpose:
-
-    Shutdown the input subsystem.
-
-  Parameters:
-
-    None.
-
-  Return value:
-
-    None.
-
---*/
-{
-	//
-	// Cleanup Threads and Semaphore. 
-	//
-	running = 0;
-	SDL_WaitThread(bthread, NULL);
-	SDL_DestroySemaphore(pad_sem);
-}
-
-VOID
-PAL_ProcessEvent(
-   VOID
-)
-/*++
-  Purpose:
-
-    Process all events.
-
-  Parameters:
-
-    None.
-
-  Return value:
-
-    None.
-
---*/
-{
-   while (PAL_PollEvent(NULL));
-   PAL_JoystickEventFilter();
-}
-
-#endif

+ 0 - 125
psp/main_PSP.c

@@ -1,125 +0,0 @@
-/* -*- mode: c; tab-width: 4; c-basic-offset: 3; c-file-style: "linux" -*- */
-//
-// Copyright (c) 2009, Pal_Bazzi.
-//
-// All rights reserved.
-//
-// This file is part of SDLPAL.
-//
-// SDLPAL is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program.  If not, see <http://www.gnu.org/licenses/>.
-//
-
-#include <pspkernel.h>
-#include <pspdebug.h>
-#include <pspsdk.h>
-#include <psppower.h>
-#include <pspthreadman.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#define PSP_HEAP_MEMSIZE 12288
-
-PSP_MODULE_INFO("SDLPAL", 0, 1, 1);
-PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER);
-PSP_HEAP_SIZE_KB(PSP_HEAP_MEMSIZE);
-
-void
-SOUND_Reload(
-	void
-)
-{
-	fclose(gSndPlayer.mkf);
-	SOUND_LoadMKF();
-}
-
-//
-//Exit callback
-//
-int PSPExitCallback(int arg1, int arg2, void *common)
-{
-	exit(0);
-	return 0;
-}
-
-//
-//Reopen MKF files when resume from suspend
-//
-int PSPSuspendCallback(int arg1, int pwrflags, void *common)
-{
-  if (pwrflags & PSP_POWER_CB_RESUME_COMPLETE)
-  {
-    UTIL_CloseFile(gpGlobals->f.fpFBP);
-    UTIL_CloseFile(gpGlobals->f.fpMGO);
-    UTIL_CloseFile(gpGlobals->f.fpBALL);
-    UTIL_CloseFile(gpGlobals->f.fpDATA);
-    UTIL_CloseFile(gpGlobals->f.fpF);
-    UTIL_CloseFile(gpGlobals->f.fpFIRE);
-    UTIL_CloseFile(gpGlobals->f.fpRGM);
-    UTIL_CloseFile(gpGlobals->f.fpSSS);
-    gpGlobals->f.fpFBP = UTIL_OpenRequiredFile("fbp.mkf");
-    gpGlobals->f.fpDATA = UTIL_OpenRequiredFile("data.mkf");
-    gpGlobals->f.fpFIRE = UTIL_OpenRequiredFile("fire.mkf");
-    gpGlobals->f.fpSSS = UTIL_OpenRequiredFile("sss.mkf");
-    gpGlobals->lpObjectDesc = PAL_LoadObjectDesc(PAL_CombinePath(0, PAL_PREFIX, "desc.dat"));
-    SOUND_Reload();
-  }
-  int cbid;
-  cbid = sceKernelCreateCallback("suspend Callback", PSPSuspendCallback, NULL);
-	scePowerRegisterCallback(0, cbid);
-  return 0;
-}
-
-//
-//setup callbacks thread
-//
-int PSPRegisterCallbackThread(SceSize args, void *argp)
-{
-	int cbid;
-	cbid = sceKernelCreateCallback("Exit Callback", PSPExitCallback, NULL);
-	sceKernelRegisterExitCallback(cbid);
-	cbid = sceKernelCreateCallback("suspend Callback", PSPSuspendCallback, NULL);
-	scePowerRegisterCallback(0, cbid);
-	sceKernelSleepThreadCB();
-	return 0;
-}
-
-//
-//setup exit callback
-//
-int PSPSetupCallbacks(void)
-{
-	int thid = 0;
-	thid = sceKernelCreateThread("update_thread", PSPRegisterCallbackThread, 0x11, 0xFA0, 0, 0);
-	if(thid >= 0)
-		sceKernelStartThread(thid, 0, 0);
-	return thid;
-}
-
-//
-//Init on PSP
-//
-void sdlpal_psp_init(void)
-{
-   // Init Debug Screen
-   pspDebugScreenInit();
-
-   // PSP set callbacks
-   PSPSetupCallbacks();
-
-   // Register sceKernelExitGame() to be called when we exit 
-   atexit(sceKernelExitGame);
-
-   // set PSP CPU clock
-   scePowerSetClockFrequency(333 , 333 , 166);
-}

+ 0 - 24
psp/pal_config.h

@@ -1,24 +0,0 @@
-#ifndef PAL_CONFIG_H
-# define PAL_CONFIG_H
-
-# define PAL_HAS_JOYSTICKS     0
-# define PAL_PREFIX            "ms0:/"
-# define PAL_SAVE_PREFIX       "ms0:/PSP/SAVEDATA/SDLPAL/"
-
-# define PAL_DEFAULT_WINDOW_WIDTH   320
-# define PAL_DEFAULT_WINDOW_HEIGHT  240
-
-# if SDL_VERSION_ATLEAST(2,0,0)
-#  define PAL_VIDEO_INIT_FLAGS  (SDL_WINDOW_SHOWN)
-# else
-#  define PAL_VIDEO_INIT_FLAGS  (SDL_SWSURFACE | SDL_FULLSCREEN)
-# endif
-
-# define PAL_SDL_INIT_FLAGS	(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_CDROM | SDL_INIT_NOPARACHUTE | SDL_INIT_JOYSTICK)
-# define PAL_SCALE_SCREEN   FALSE
-
-# define PAL_PLATFORM         "Sony PSP"
-# define PAL_CREDIT           "(Unknown)"
-# define PAL_PORTYEAR         "2011"
-
-#endif

+ 0 - 43
wii/Makefile

@@ -1,43 +0,0 @@
-TARGET = boot
-
-INTER=.wii
-
-HOST = powerpc-eabi-
-
-DEPFLAGS = -MT $@ -MMD -MP -MF $*$(INTER).Td
-
-SOURCES = . .. ../adplug
-CFILES = $(foreach dir, $(SOURCES), $(wildcard $(dir)/*.c)) 
-CPPFILES = $(foreach dir, $(SOURCES), $(wildcard $(dir)/*.cpp))
-OFILES = $(CFILES:.c=$(INTER).o) $(CPPFILES:.cpp=$(INTER).o)
-DEPFILES = $(OFILES:.o=.d) 
-
-CFLAGS = -g -Wall -O2 `sdl-config --cflags` -DGEKKO -DPAL_HAS_PLATFORM_SPECIFIC_UTILS -I. -I../ -I../liboggvorbis/include -I../liboggvorbis/src $(DEPFLAGS) 
-CXXFLAGS = $(CFLAGS)
-LDFLAGS = `sdl-config --libs` -DGEKKO -mrvl
-
-POSTCOMPILE = @mv -f $*$(INTER).Td $*$(INTER).d && touch $@
-
-$(TARGET): $(OFILES)
-	@echo [LD] $@
-	@$(HOST)g++ $(OFILES) -o $@.elf $(LDFLAGS)
-	@elf2dol $(TARGET).elf $(TARGET).dol
-
-%$(INTER).o: %.c %$(INTER).d
-	@echo [CC] $<
-	@$(HOST)gcc $(CFLAGS) -c $< -o $@
-	$(POSTCOMPILE)
-
-%$(INTER).o: %.cpp %$(INTER).d
-	@echo [CC] $<
-	@$(HOST)g++ $(CXXFLAGS) -c $< -o $@
-	$(POSTCOMPILE)
-
-clean:
-	rm -f $(TARGET).elf $(TARGET).dol $(OFILES) $(DEPFILES)
-
-%.d: ;
-.PRECIOUS: %.d
-
--include $(DEPFILES)
-

+ 0 - 1
wii/README.txt

@@ -1 +0,0 @@
-This port should be updated for SDL2 and newly changes in source code.

+ 0 - 25
wii/pal_config.h

@@ -1,25 +0,0 @@
-#ifndef PAL_CONFIG_H
-# define PAL_CONFIG_H
-
-# define PAL_HAS_JOYSTICKS     1
-# define PAL_HAS_MOUSE         0
-# define PAL_PREFIX            "SD:/apps/sdlpal/"
-# define PAL_SAVE_PREFIX       "SD:/apps/sdlpal/"
-
-# define PAL_DEFAULT_WINDOW_WIDTH   640
-# define PAL_DEFAULT_WINDOW_HEIGHT  480
-
-# if SDL_VERSION_ATLEAST(2,0,0)
-#  define PAL_VIDEO_INIT_FLAGS  (SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE)
-# else
-#  define PAL_VIDEO_INIT_FLAGS  (SDL_SWSURFACE | (gConfig.fFullScreen ? SDL_FULLSCREEN : 0))
-# endif
-
-# define PAL_SDL_INIT_FLAGS	(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_CDROM | SDL_INIT_NOPARACHUTE | SDL_INIT_JOYSTICK)
-# define PAL_SCALE_SCREEN   FALSE
-
-# define PAL_PLATFORM         "Nintendo WII"
-# define PAL_CREDIT           "Rikku2000"
-# define PAL_PORTYEAR         "2012"
-
-#endif

+ 0 - 87
wii/pal_utils.c

@@ -1,87 +0,0 @@
-
-#include "main.h"
-#include <fat.h>
-
-static int input_event_filter(const SDL_Event *lpEvent, PALINPUTSTATE *state)
-{
-	switch (lpEvent->type)
-	{
-	case SDL_JOYHATMOTION:
-		switch (lpEvent->jhat.value)
-		{
-		case SDL_HAT_LEFT:
-			state->prevdir = (gpGlobals->fInBattle ? kDirUnknown : state->dir);
-			state->dir = kDirWest;
-			state->dwKeyPress = kKeyLeft;
-			break;
-
-		case SDL_HAT_RIGHT:
-			state->prevdir = (gpGlobals->fInBattle ? kDirUnknown : state->dir);
-			state->dir = kDirEast;
-			state->dwKeyPress = kKeyRight;
-			break;
-
-		case SDL_HAT_UP:
-			state->prevdir = (gpGlobals->fInBattle ? kDirUnknown : state->dir);
-			state->dir = kDirNorth;
-			state->dwKeyPress = kKeyUp;
-			break;
-
-		case SDL_HAT_DOWN:
-			state->prevdir = (gpGlobals->fInBattle ? kDirUnknown : state->dir);
-			state->dir = kDirSouth;
-			state->dwKeyPress = kKeyDown;
-			break;
-		}
-		return 1;
-
-	case SDL_JOYBUTTONDOWN:
-		switch (lpEvent->jbutton.button)
-		{
-		case 2:
-			state->dwKeyPress |= kKeyMenu;
-			return 1;
-
-		case 3:
-			state->dwKeyPress |= kKeySearch;
-			return 1;
-		}
-	}
-	return 0;
-}
-
-BOOL
-UTIL_GetScreenSize(
-	DWORD *pdwScreenWidth,
-	DWORD *pdwScreenHeight
-)
-{
-	return FALSE;
-}
-
-BOOL
-UTIL_IsAbsolutePath(
-	LPCSTR  lpszFileName
-)
-{
-	return FALSE;
-}
-
-INT
-UTIL_Platform_Init(
-	int argc,
-	char* argv[]
-)
-{
-	fatInitDefault();
-	PAL_RegisterInputFilter(NULL, input_event_filter, NULL);
-	gConfig.fLaunchSetting = FALSE;
-	return 0;
-}
-
-VOID
-UTIL_Platform_Quit(
-	VOID
-)
-{
-}