(PSP) Build fixes and rename sdk_defines.h

This commit is contained in:
twinaphex 2015-01-12 06:51:57 +01:00
parent 1fe99148b5
commit 98f35db95c
9 changed files with 12 additions and 104 deletions

View File

@ -14,7 +14,7 @@ INCDIR = $(PSPPATH)/include libretro-sdk/include
CFLAGS = $(OPTIMIZE_LV) -G0 -std=gnu99 -ffast-math
ASFLAGS = $(CFLAGS)
RARCH_DEFINES = -DPSP -DIS_SALAMANDER -DRARCH_CONSOLE -DRARCH_INTERNAL
RARCH_DEFINES = -DPSP -DIS_SALAMANDER -DRARCH_CONSOLE
LIBDIR =
LDFLAGS =

View File

@ -27,7 +27,7 @@
#include <cafe/ai.h>
#endif
#include "../../gfx/gx/sdk_defines.h"
#include "../../gfx/gx/gx_sdk_defines.h"
#define CHUNK_FRAMES 64
#define CHUNK_SIZE (CHUNK_FRAMES * sizeof(uint32_t))

View File

@ -19,7 +19,7 @@
#include "../../driver.h"
#include "../../general.h"
#include "../../libretro_private.h"
#include "../../gfx/gx/sdk_defines.h"
#include "../../gfx/gx/gx_sdk_defines.h"
#include <file/file_path.h>

View File

@ -25,7 +25,7 @@
#include <stddef.h>
#include <string.h>
#include "../../gfx/psp/sdk_defines.h"
#include "../../gfx/psp/psp_sdk_defines.h"
#include <file/file_path.h>
#include "../../general.h"
@ -85,11 +85,14 @@ static void frontend_psp_get_environment_settings(int *argc, char *argv[],
fill_pathname_join(g_defaults.config_path, g_defaults.port_dir,
"retroarch.cfg", sizeof(g_defaults.config_path));
#ifndef IS_SALAMANDER
if (argv[1] && (argv[1][0] != '\0'))
{
static char path[PATH_MAX_LENGTH];
struct rarch_main_wrap *args = NULL;
*path = '\0';
struct rarch_main_wrap *args = (struct rarch_main_wrap*)params_data;
args = (struct rarch_main_wrap*)params_data;
if (args)
{
@ -111,6 +114,7 @@ static void frontend_psp_get_environment_settings(int *argc, char *argv[],
RARCH_LOG("Auto-start game %s.\n", argv[1]);
}
}
#endif
}
static void frontend_psp_deinit(void *data)

View File

@ -34,7 +34,7 @@
#include "ppc_asm.h"
#include "gx_gfx_inl.h"
#include "sdk_defines.h"
#include "gx_sdk_defines.h"
#define SYSMEM1_SIZE 0x01800000

View File

@ -21,7 +21,7 @@
#include <pspgum.h>
#include <psprtc.h>
#include "sdk_defines.h"
#include "psp_sdk_defines.h"
#include "../../general.h"
#include "../../driver.h"
#include "../gfx_common.h"

View File

@ -1,96 +0,0 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* Copyright (C) 2011-2015 - Daniel De Matteis
*
* RetroArch 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 Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch 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 RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _PSP_SDK_DEFINES_H
#define _PSP_SDK_DEFINES_H
/*============================================================
ERROR PROTOTYPES
============================================================ */
#if defined(PSP)
#define SCE_OK 0
#endif
/*============================================================
DISPLAY PROTOTYPES
============================================================ */
#if defined(SN_TARGET_PSP2)
#define PSP_DISPLAY_PIXEL_FORMAT_8888 (SCE_DISPLAY_PIXELFORMAT_A8B8G8R8)
#define DisplaySetFrameBuf(topaddr, bufferwidth, pixelformat, sync) sceDisplaySetFrameBuf(topaddr, sync)
#define PSP_FB_WIDTH 960
#define PSP_FB_HEIGHT 544
#define PSP_PITCH_PIXELS 1024
#elif defined(PSP)
#define DisplaySetFrameBuf(topaddr, bufferwidth, pixelformat, sync) sceDisplaySetFrameBuf(topaddr, bufferwidth, pixelformat, sync)
#define SCE_DISPLAY_UPDATETIMING_NEXTVSYNC 1
#define PSP_FB_WIDTH 512
#define PSP_FB_HEIGHT 512
#define PSP_PITCH_PIXELS 512
#endif
/*============================================================
INPUT PROTOTYPES
============================================================ */
#if defined(SN_TARGET_PSP2)
#define STATE_BUTTON(state) ((state).buttons)
#define STATE_ANALOGLX(state) ((state).lx)
#define STATE_ANALOGLY(state) ((state).ly)
#define STATE_ANALOGRX(state) ((state).rx)
#define STATE_ANALOGRY(state) ((state).ry)
#define DEFAULT_SAMPLING_MODE (SCE_CTRL_MODE_DIGITALANALOG)
#define PSP_CTRL_LEFT SCE_CTRL_LEFT
#define PSP_CTRL_DOWN SCE_CTRL_DOWN
#define PSP_CTRL_RIGHT SCE_CTRL_RIGHT
#define PSP_CTRL_UP SCE_CTRL_UP
#define PSP_CTRL_START SCE_CTRL_START
#define PSP_CTRL_SELECT SCE_CTRL_SELECT
#define PSP_CTRL_TRIANGLE SCE_CTRL_TRIANGLE
#define PSP_CTRL_SQUARE SCE_CTRL_SQUARE
#define PSP_CTRL_CROSS SCE_CTRL_CROSS
#define PSP_CTRL_CIRCLE SCE_CTRL_CIRCLE
#define PSP_CTRL_L SCE_CTRL_L
#define PSP_CTRL_R SCE_CTRL_R
#define CtrlPeekBufferPositive(port, pad_data, bufs) sceCtrlPeekBufferPositive(port, pad_data, bufs)
#elif defined(PSP)
#define PSP_CTRL_L PSP_CTRL_LTRIGGER
#define PSP_CTRL_R PSP_CTRL_RTRIGGER
#define STATE_BUTTON(state) ((state).Buttons)
#define STATE_ANALOGLX(state) ((state).Lx)
#define STATE_ANALOGLY(state) ((state).Ly)
#define STATE_ANALOGRX(state) ((state).Rx)
#define STATE_ANALOGRY(state) ((state).Ry)
#define DEFAULT_SAMPLING_MODE (PSP_CTRL_MODE_ANALOG)
#define CtrlPeekBufferPositive(port, pad_data, bufs) sceCtrlPeekBufferPositive(pad_data, bufs)
#endif
#endif

View File

@ -25,7 +25,7 @@
#include <pspctrl.h>
#endif
#include "../../gfx/psp/sdk_defines.h"
#include "../../gfx/psp/psp_sdk_defines.h"
#include "../../driver.h"
#include "../../libretro.h"