mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
preparation for retrofw and legacy opendingux support
This commit is contained in:
parent
b1b5f9c094
commit
b053cb2044
5 changed files with 29 additions and 11 deletions
1
Makefile
1
Makefile
|
@ -90,6 +90,7 @@ $(TARGET).opk: $(TARGET)
|
||||||
cp $< .opk_data/PicoDrive
|
cp $< .opk_data/PicoDrive
|
||||||
$(STRIP) .opk_data/PicoDrive
|
$(STRIP) .opk_data/PicoDrive
|
||||||
mksquashfs .opk_data $@ -all-root -noappend -no-exports -no-xattrs
|
mksquashfs .opk_data $@ -all-root -noappend -no-exports -no-xattrs
|
||||||
|
cd .opk_data && zip -9 -r $(TARGET).zip *
|
||||||
|
|
||||||
all: opk
|
all: opk
|
||||||
|
|
||||||
|
|
9
configure
vendored
9
configure
vendored
|
@ -38,7 +38,8 @@ 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 wiz caanoo opendingux gcw0 rg350 rpi1 rpi2 psp"
|
# TODO this is annoyingly messy. should have platform and device
|
||||||
|
platform_list="generic pandora gp2x wiz caanoo opendingux retrofw gcw0 rg350 rpi1 rpi2 psp"
|
||||||
platform="generic"
|
platform="generic"
|
||||||
sound_driver_list="oss alsa sdl"
|
sound_driver_list="oss alsa sdl"
|
||||||
sound_drivers=""
|
sound_drivers=""
|
||||||
|
@ -91,9 +92,9 @@ set_platform()
|
||||||
;;
|
;;
|
||||||
generic)
|
generic)
|
||||||
;;
|
;;
|
||||||
opendingux | gcw0 | rg350)
|
opendingux | retrofw | gcw0 | rg350)
|
||||||
sound_drivers="sdl"
|
sound_drivers="sdl"
|
||||||
# both are really an opendingux
|
# all are more or less based on opendingux. save device type as C define.
|
||||||
CFLAGS="$CFLAGS -D__`echo $platform | tr '[a-z]' '[A-Z]'`__"
|
CFLAGS="$CFLAGS -D__`echo $platform | tr '[a-z]' '[A-Z]'`__"
|
||||||
platform="opendingux"
|
platform="opendingux"
|
||||||
;;
|
;;
|
||||||
|
@ -110,7 +111,7 @@ set_platform()
|
||||||
# always use static linking, since caanoo doesn't have OABI libs. Moreover,
|
# always use static linking, since caanoo doesn't have OABI libs. Moreover,
|
||||||
# dynamic linking slows Wiz 1-10%, and libm on F100 isn't compatible
|
# dynamic linking slows Wiz 1-10%, and libm on F100 isn't compatible
|
||||||
LDFLAGS="$LDFLAGS -static"
|
LDFLAGS="$LDFLAGS -static"
|
||||||
# unified binary for all of them
|
# unified binary for all of them. picodrive detects device type for itself.
|
||||||
CFLAGS="$CFLAGS -D__GP2X__"
|
CFLAGS="$CFLAGS -D__GP2X__"
|
||||||
platform="gp2x"
|
platform="gp2x"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -164,7 +164,7 @@ void plat_video_menu_enter(int is_rom_loaded)
|
||||||
{
|
{
|
||||||
if (SDL_MUSTLOCK(plat_sdl_screen))
|
if (SDL_MUSTLOCK(plat_sdl_screen))
|
||||||
SDL_UnlockSurface(plat_sdl_screen);
|
SDL_UnlockSurface(plat_sdl_screen);
|
||||||
plat_sdl_change_video_mode(g_menuscreen_w, g_menuscreen_h, 0);
|
plat_sdl_change_video_mode(g_menuscreen_w, g_menuscreen_h, 1);
|
||||||
g_screen_ptr = shadow_fb;
|
g_screen_ptr = shadow_fb;
|
||||||
plat_video_set_buffer(g_screen_ptr);
|
plat_video_set_buffer(g_screen_ptr);
|
||||||
}
|
}
|
||||||
|
@ -212,22 +212,22 @@ void plat_video_menu_leave(void)
|
||||||
void plat_video_loop_prepare(void)
|
void plat_video_loop_prepare(void)
|
||||||
{
|
{
|
||||||
if (plat_sdl_overlay != NULL || plat_sdl_gl_active) {
|
if (plat_sdl_overlay != NULL || plat_sdl_gl_active) {
|
||||||
g_screen_ptr = shadow_fb;
|
|
||||||
g_screen_width = 320;
|
g_screen_width = 320;
|
||||||
g_screen_height = 240;
|
g_screen_height = 240;
|
||||||
g_screen_ppitch = g_screen_width;
|
g_screen_ppitch = g_screen_width;
|
||||||
|
plat_sdl_change_video_mode(g_screen_width, g_screen_height, 0);
|
||||||
|
g_screen_ptr = shadow_fb;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (SDL_MUSTLOCK(plat_sdl_screen))
|
|
||||||
SDL_LockSurface(plat_sdl_screen);
|
|
||||||
g_screen_ptr = plat_sdl_screen->pixels;
|
|
||||||
g_screen_width = g_menuscreen_w;
|
g_screen_width = g_menuscreen_w;
|
||||||
g_screen_height = g_menuscreen_h;
|
g_screen_height = g_menuscreen_h;
|
||||||
g_screen_ppitch = g_menuscreen_pp;
|
g_screen_ppitch = g_menuscreen_pp;
|
||||||
|
plat_sdl_change_video_mode(g_screen_width, g_screen_height, 0);
|
||||||
|
if (SDL_MUSTLOCK(plat_sdl_screen))
|
||||||
|
SDL_LockSurface(plat_sdl_screen);
|
||||||
|
g_screen_ptr = plat_sdl_screen->pixels;
|
||||||
}
|
}
|
||||||
plat_video_set_buffer(g_screen_ptr);
|
plat_video_set_buffer(g_screen_ptr);
|
||||||
|
|
||||||
plat_sdl_change_video_mode(g_screen_width, g_screen_height, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void plat_early_init(void)
|
void plat_early_init(void)
|
||||||
|
|
4
platform/opendingux/data/PicoDrive.dge
Normal file
4
platform/opendingux/data/PicoDrive.dge
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#! /bin/sh
|
||||||
|
echo 0 > /proc/sys/kernel/printk
|
||||||
|
./PicoDrive "$@"
|
||||||
|
sync
|
12
platform/opendingux/data/default.retrofw.desktop
Normal file
12
platform/opendingux/data/default.retrofw.desktop
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=Picodrive
|
||||||
|
Comment=A megadrive/genesis emulator
|
||||||
|
Exec=PicoDrive %f
|
||||||
|
Icon=megadrive
|
||||||
|
Categories=games;
|
||||||
|
X-OD-Manual=
|
||||||
|
X-OD-Selector=
|
||||||
|
X-OD-Filter=.md,.smd,.bin,.sms,.cue,.32x,.zip,.7z
|
||||||
|
Terminal=true
|
||||||
|
Type=Application
|
||||||
|
StartupNotify=true
|
Loading…
Add table
Add a link
Reference in a new issue