Unverified Commit 244cd1e3 authored by Libretro-Admin's avatar Libretro-Admin Committed by GitHub
Browse files

Merge pull request #28 from fjtrujy/ps2-support

Ps2 support
parents a7c014c8 5c193112
Pipeline #7285 passed with stages
in 9 minutes and 21 seconds
......@@ -31,6 +31,10 @@ include:
file: '/android-jni.yml'
################################## CONSOLES ################################
# PlayStation 2
- project: 'libretro-infrastructure/ci-templates'
file: '/ps2-static.yml'
# PlayStation Portable
- project: 'libretro-infrastructure/ci-templates'
file: '/psp-static.yml'
......@@ -124,6 +128,12 @@ libretro-build-wii:
- .libretro-wii-static-retroarch-master
- .core-defs
# PlayStation 2
libretro-build-ps2:
extends:
- .libretro-ps2-static-retroarch-master
- .core-defs
# PlayStation Portable
libretro-build-psp:
extends:
......
......@@ -182,6 +182,19 @@ else ifeq ($(platform), psl1ght)
STATIC_LINKING = 1
HAVE_COMPAT = 1
# PS2
else ifeq ($(platform), ps2)
TARGET := $(TARGET_NAME)_libretro_$(platform).a
CC = ee-gcc$(EXE_EXT)
CC_AS = ee-gcc$(EXE_EXT)
CXX = ee-g++$(EXE_EXT)
AR = ee-ar$(EXE_EXT)
PLATFORM_DEFINES := -DPS2 -DBGR
CFLAGS += -G0
CXXFLAGS += -G0
STATIC_LINKING = 1
HAVE_COMPAT = 1
# PSP
else ifeq ($(platform), psp1)
TARGET := $(TARGET_NAME)_libretro_$(platform).a
......
......@@ -286,9 +286,20 @@ static DWORD Palette[ 256 ], Colours[ 256 ];
#define Plot( x, c ) do { *(uint16_t*)( dest + RasterX + ( x ) ) = Colours[ ( c ) ]; } while ( 0 )
#define DoPal( r, g, b ) ( ( ( ( b > 255 ? 255 : ( b < 0 ? 0 : b ) ) & 0xff ) << 16 ) \
| ( ( ( g > 255 ? 255 : ( g < 0 ? 0 : g ) ) & 0xff ) << 8 ) \
| ( ( r > 255 ? 255 : ( r < 0 ? 0 : r ) ) & 0xff ) )
#if defined(BGR)
#define RED_SHIFT 16
#define GREEN_SHIFT 8
#define BLUE_SHIFT 0
#else
#define RED_SHIFT 0
#define GREEN_SHIFT 8
#define BLUE_SHIFT 16
#endif
#define DoPal( r, g, b ) ( ( ( ( b > 255 ? 255 : ( b < 0 ? 0 : b ) ) & 0xff ) << BLUE_SHIFT ) \
| ( ( ( g > 255 ? 255 : ( g < 0 ? 0 : g ) ) & 0xff ) << GREEN_SHIFT ) \
| ( ( ( r > 255 ? 255 : ( r < 0 ? 0 : r ) ) & 0xff ) << RED_SHIFT ) )
extern "C" void add_blank( int tstates, BYTE colour )
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment