mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
Merge pull request #37 from Chips-fr/master
Add Rpi1 and Rpi2 platform support with GLES upscaling
This commit is contained in:
commit
20347237e7
3 changed files with 38 additions and 3 deletions
14
Makefile
14
Makefile
|
@ -2,7 +2,7 @@ TARGET ?= PicoDrive
|
||||||
CFLAGS += -Wall -ggdb -falign-functions=2
|
CFLAGS += -Wall -ggdb -falign-functions=2
|
||||||
CFLAGS += -I.
|
CFLAGS += -I.
|
||||||
ifndef DEBUG
|
ifndef DEBUG
|
||||||
CFLAGS += -O2 -DNDEBUG -ffunction-sections
|
CFLAGS += -O3 -DNDEBUG -ffunction-sections
|
||||||
ifeq ($(findstring clang,$(CC)),)
|
ifeq ($(findstring clang,$(CC)),)
|
||||||
LDFLAGS += -Wl,--gc-sections
|
LDFLAGS += -Wl,--gc-sections
|
||||||
endif
|
endif
|
||||||
|
@ -73,6 +73,18 @@ OBJS += platform/opendingux/inputmap.o
|
||||||
# OpenDingux is a generic platform, really.
|
# OpenDingux is a generic platform, really.
|
||||||
PLATFORM := generic
|
PLATFORM := generic
|
||||||
endif
|
endif
|
||||||
|
ifeq ("$(PLATFORM)",$(filter "$(PLATFORM)","rpi1" "rpi2"))
|
||||||
|
CFLAGS += -DHAVE_GLES -DRASPBERRY
|
||||||
|
CFLAGS += -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads/ -I/opt/vc/include/interface/vmcs_host/linux/
|
||||||
|
LDFLAGS += -ldl -lbcm_host -L/opt/vc/lib -lEGL -lGLESv2
|
||||||
|
OBJS += platform/linux/emu.o platform/linux/blit.o # FIXME
|
||||||
|
OBJS += platform/common/plat_sdl.o
|
||||||
|
OBJS += platform/libpicofe/plat_sdl.o platform/libpicofe/in_sdl.o
|
||||||
|
OBJS += platform/libpicofe/plat_dummy.o
|
||||||
|
OBJS += platform/libpicofe/gl.o
|
||||||
|
OBJS += platform/libpicofe/gl_platform.o
|
||||||
|
USE_FRONTEND = 1
|
||||||
|
endif
|
||||||
ifeq "$(PLATFORM)" "generic"
|
ifeq "$(PLATFORM)" "generic"
|
||||||
OBJS += platform/linux/emu.o platform/linux/blit.o # FIXME
|
OBJS += platform/linux/emu.o platform/linux/blit.o # FIXME
|
||||||
OBJS += platform/common/plat_sdl.o
|
OBJS += platform/common/plat_sdl.o
|
||||||
|
|
6
README
6
README
|
@ -13,3 +13,9 @@ then taken over and expanded by notaz.
|
||||||
PicoDrive was the first emulator ever to properly emulate Virtua Racing and
|
PicoDrive was the first emulator ever to properly emulate Virtua Racing and
|
||||||
it's SVP chip.
|
it's SVP chip.
|
||||||
|
|
||||||
|
How to compile on Raspbian Wheezy:
|
||||||
|
|
||||||
|
export CC=gcc-4.8
|
||||||
|
export CXX=g++-4.8
|
||||||
|
./configure --platform=rpi2
|
||||||
|
make
|
21
configure
vendored
21
configure
vendored
|
@ -31,7 +31,7 @@ check_define()
|
||||||
# setting options to "yes" or "no" will make that choice default,
|
# setting options to "yes" or "no" will make that choice default,
|
||||||
# "" means "autodetect".
|
# "" means "autodetect".
|
||||||
|
|
||||||
platform_list="generic pandora gp2x opendingux"
|
platform_list="generic pandora gp2x opendingux rpi1 rpi2"
|
||||||
platform="generic"
|
platform="generic"
|
||||||
sound_driver_list="oss alsa sdl"
|
sound_driver_list="oss alsa sdl"
|
||||||
sound_drivers=""
|
sound_drivers=""
|
||||||
|
@ -44,6 +44,8 @@ need_sdl="no"
|
||||||
need_xlib="no"
|
need_xlib="no"
|
||||||
# these are for known platforms
|
# these are for known platforms
|
||||||
optimize_cortexa8="no"
|
optimize_cortexa8="no"
|
||||||
|
optimize_cortexa7="no"
|
||||||
|
optimize_arm1176jzf="no"
|
||||||
optimize_arm926ej="no"
|
optimize_arm926ej="no"
|
||||||
optimize_arm920="no"
|
optimize_arm920="no"
|
||||||
|
|
||||||
|
@ -67,6 +69,13 @@ set_platform()
|
||||||
{
|
{
|
||||||
platform=$1
|
platform=$1
|
||||||
case "$platform" in
|
case "$platform" in
|
||||||
|
rpi1)
|
||||||
|
optimize_arm1176jzf="yes"
|
||||||
|
;;
|
||||||
|
rpi2)
|
||||||
|
optimize_cortexa7="yes"
|
||||||
|
have_arm_neon="yes"
|
||||||
|
;;
|
||||||
generic)
|
generic)
|
||||||
;;
|
;;
|
||||||
opendingux)
|
opendingux)
|
||||||
|
@ -159,6 +168,14 @@ arm*)
|
||||||
CFLAGS="$CFLAGS -mcpu=cortex-a8 -mtune=cortex-a8"
|
CFLAGS="$CFLAGS -mcpu=cortex-a8 -mtune=cortex-a8"
|
||||||
ASFLAGS="$ASFLAGS -mcpu=cortex-a8"
|
ASFLAGS="$ASFLAGS -mcpu=cortex-a8"
|
||||||
fi
|
fi
|
||||||
|
if [ "$optimize_cortexa7" = "yes" ]; then
|
||||||
|
CFLAGS="$CFLAGS -mcpu=cortex-a7"
|
||||||
|
ASFLAGS="$ASFLAGS -mcpu=cortex-a7"
|
||||||
|
fi
|
||||||
|
if [ "$optimize_arm1176jzf" = "yes" ]; then
|
||||||
|
CFLAGS="$CFLAGS -mcpu=arm1176jzf-s -mfloat-abi=hard"
|
||||||
|
ASFLAGS="$ASFLAGS -mcpu=arm1176jzf-s -mfloat-abi=hard"
|
||||||
|
fi
|
||||||
if [ "$optimize_arm926ej" = "yes" ]; then
|
if [ "$optimize_arm926ej" = "yes" ]; then
|
||||||
CFLAGS="$CFLAGS -mcpu=arm926ej-s -mtune=arm926ej-s"
|
CFLAGS="$CFLAGS -mcpu=arm926ej-s -mtune=arm926ej-s"
|
||||||
ASFLAGS="$ASFLAGS -mcpu=arm926ej-s -mfloat-abi=softfp"
|
ASFLAGS="$ASFLAGS -mcpu=arm926ej-s -mfloat-abi=softfp"
|
||||||
|
@ -229,7 +246,7 @@ arm*)
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "$platform" in
|
case "$platform" in
|
||||||
generic | opendingux)
|
rpi1 | rpi2 | generic | opendingux)
|
||||||
need_sdl="yes"
|
need_sdl="yes"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue