Skip to content

Commit

Permalink
gamshell build
Browse files Browse the repository at this point in the history
  • Loading branch information
pleft committed Jan 25, 2019
1 parent 6ee3a0f commit ec3cdd4
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 4 deletions.
14 changes: 13 additions & 1 deletion Makefile
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,19 @@ endif
ifeq "$(PLATFORM)" "libretro"
OBJS += platform/libretro/libretro.o
endif

ifeq "$(PLATFORM)" "gameshell"
CFLAGS += -DGAMESHELL
CFLAGS += -DHAVE_GLES
LDFLAGS += -lEGL -lGL
OBJS += platform/gameshell/inputmap.o
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 "$(USE_FRONTEND)" "1"

# common
Expand Down
Binary file added PicoDrive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions PicoDrive.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./PicoDrive
9 changes: 6 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ check_define()
# setting options to "yes" or "no" will make that choice default,
# "" means "autodetect".

platform_list="generic pandora gp2x opendingux rpi1 rpi2"
platform_list="generic pandora gp2x opendingux rpi1 rpi2 gameshell"
platform="generic"
sound_driver_list="oss alsa sdl"
sound_drivers=""
Expand Down Expand Up @@ -81,6 +81,9 @@ set_platform()
opendingux)
sound_drivers="sdl"
;;
gameshell)
# sound_drivers="sdl"
;;
pandora)
sound_drivers="oss alsa"
optimize_cortexa8="yes"
Expand Down Expand Up @@ -246,7 +249,7 @@ arm*)
esac

case "$platform" in
rpi1 | rpi2 | generic | opendingux)
rpi1 | rpi2 | generic | opendingux | gameshell)
need_sdl="yes"
;;
esac
Expand Down Expand Up @@ -406,6 +409,6 @@ if [ "$platform" = "g1p2x" ]; then
fi

# use pandora's skin (for now)
test -e skin || ln -s platform/pandora/skin skin
test -e skin || ln -s platform/gameshell/data/skin skin

# vim:shiftwidth=2:expandtab
Empty file modified platform/common/menu_pico.c
100644 → 100755
Empty file.
Binary file added platform/gameshell/data/megadrive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 55 additions & 0 deletions platform/gameshell/inputmap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#include <stdlib.h>
#include <SDL_keysym.h>

#include "../libpicofe/input.h"
#include "../libpicofe/in_sdl.h"
#include "../common/input_pico.h"

const struct in_default_bind in_sdl_defbinds[] = {
{ SDLK_UP, IN_BINDTYPE_PLAYER12, GBTN_UP },
{ SDLK_DOWN, IN_BINDTYPE_PLAYER12, GBTN_DOWN },
{ SDLK_LEFT, IN_BINDTYPE_PLAYER12, GBTN_LEFT },
{ SDLK_RIGHT, IN_BINDTYPE_PLAYER12, GBTN_RIGHT },
{ SDLK_j, IN_BINDTYPE_PLAYER12, GBTN_A },
{ SDLK_k, IN_BINDTYPE_PLAYER12, GBTN_B },
{ SDLK_u, IN_BINDTYPE_PLAYER12, GBTN_C },
{ SDLK_RETURN, IN_BINDTYPE_PLAYER12, GBTN_START },
{ SDLK_ESCAPE, IN_BINDTYPE_EMU, PEVB_MENU },
{ SDLK_KP_MINUS, IN_BINDTYPE_EMU, PEVB_PICO_PPREV },
{ SDLK_KP_PLUS, IN_BINDTYPE_EMU, PEVB_PICO_PNEXT },
{ SDLK_BACKSPACE, IN_BINDTYPE_EMU, PEVB_STATE_SAVE },
{ 0, 0, 0 },
{ 0, 0, 0 },
{ 0, 0, 0 }
};

const struct menu_keymap in_sdl_key_map[] =
{
{ SDLK_UP, PBTN_UP },
{ SDLK_DOWN, PBTN_DOWN },
{ SDLK_LEFT, PBTN_LEFT },
{ SDLK_RIGHT, PBTN_RIGHT },
{ SDLK_j, PBTN_MOK },
{ SDLK_k, PBTN_MBACK },
{ SDLK_u, PBTN_MA2 },
{ SDLK_i, PBTN_MA3 },
{ SDLK_KP_MINUS, PBTN_L },
{ SDLK_KP_PLUS, PBTN_R },
};

const char * const in_sdl_key_names[SDLK_LAST] = {
[SDLK_UP] = "UP",
[SDLK_DOWN] = "DOWN",
[SDLK_LEFT] = "LEFT",
[SDLK_RIGHT] = "RIGHT",
[SDLK_j] = "A",
[SDLK_k] = "B",
[SDLK_u] = "X",
[SDLK_i] = "Y",
[SDLK_RETURN] = "START",
[SDLK_SPACE] = "SELECT",
[SDLK_ESCAPE] = "MENU",
[SDLK_KP_MINUS] = "-",
[SDLK_KP_PLUS] = "+",
[SDLK_BACKSPACE] = "Shift-MENU"
};

0 comments on commit ec3cdd4

Please sign in to comment.