Unverified Commit 6516a148 authored by Libretro-Admin's avatar Libretro-Admin Committed by GitHub
Browse files

Merge pull request #17 from fjtrujy/ps2Support

Ps2 support
parents 7ad60734 2cf06609
name: CI
on:
push:
pull_request:
repository_dispatch:
types: [run_build]
jobs:
build-ps2:
runs-on: ubuntu-latest
container: ps2dev/ps2dev:latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
apk add build-base git bash
- name: Compile project
run: |
make platform=ps2 clean all
- name: Get short SHA
id: slug
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
- name: Upload artifacts
if: ${{ success() }}
uses: actions/upload-artifact@v2
with:
name: race_libretro_ps2-${{ steps.slug.outputs.sha8 }}
path: race_libretro_ps2.a
......@@ -143,6 +143,16 @@ else ifeq ($(platform), sncps3)
STATIC_LINKING := 1
LIBS :=
# PS2
else ifeq ($(platform),ps2)
TARGET := $(TARGET_NAME)_libretro_$(platform).a
CC = ee-gcc$(EXE_EXT)
CXX = ee-g++$(EXE_EXT)
AR = ee-ar$(EXE_EXT)
FLAGS += -DPS2 -G0 -DABGR1555 -DHAVE_NO_LANGEXTRA
STATIC_LINKING := 1
LIBS :=
# PSP
else ifeq ($(platform),psp1)
TARGET := $(TARGET_NAME)_libretro_$(platform).a
......
......@@ -14,6 +14,16 @@
#include "graphics.h"
#include "memory.h"
#if defined(ABGR1555)
#define RMASK 0x001f
#define GMASK 0x03e0
#define BMASK 0x7c00
#else
#define RMASK 0xf800
#define GMASK 0x07e0
#define BMASK 0x001f
#endif
extern ngp_screen* screen;
extern int gfx_hacks;
......@@ -443,13 +453,13 @@ void palette_init16(DWORD dwRBitMask, DWORD dwGBitMask, DWORD dwBBitMask)
*/
void graphicsSetDarkFilterLevel(unsigned filterLevel)
{
unsigned prev_dark_filter_level = dark_filter_level;
unsigned prev_dark_filter_level = dark_filter_level;
dark_filter_level = filterLevel;
dark_filter_level = (dark_filter_level > 100) ? 100 : dark_filter_level;
dark_filter_level = filterLevel;
dark_filter_level = (dark_filter_level > 100) ? 100 : dark_filter_level;
if (dark_filter_level != prev_dark_filter_level)
palette_init16(0xf800,0x7e0,0x1f);
if (dark_filter_level != prev_dark_filter_level)
palette_init16(RMASK, GMASK, BMASK);
}
void palette_init8(DWORD dwRBitMask, DWORD dwGBitMask, DWORD dwBBitMask)
......@@ -1571,7 +1581,7 @@ BOOL graphics_init(void)
{
#ifdef __LIBRETRO__
palette_init = palette_init16;
palette_init(0xf800,0x7e0,0x1f);
palette_init(RMASK, GMASK, BMASK);
drawBuffer = (unsigned short*)screen->pixels;
#else
dbg_print("in graphics_init\n");
......
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