From: sndream Date: Sun, 1 Jan 2023 15:58:58 +0000 (+0800) Subject: rg99 support X-Git-Tag: v2.00~258 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ec3b5ac0e3f5d47bd967db7a2743949d278850c;p=picodrive.git rg99 support --- diff --git a/configure b/configure index f0bad743..3fcb457f 100755 --- a/configure +++ b/configure @@ -39,7 +39,7 @@ check_define() # "" means "autodetect". # TODO this is annoyingly messy. should have platform and device -platform_list="generic pandora gp2x wiz caanoo dingux retrofw gcw0 rg350 opendingux miyoo rpi1 rpi2 psp" +platform_list="generic pandora gp2x wiz caanoo dingux retrofw gcw0 rg350 opendingux miyoo rpi1 rpi2 psp rg99" platform="generic" sound_driver_list="oss alsa sdl" sound_drivers="" @@ -109,6 +109,14 @@ set_platform() MFLAGS="-march=mips32r2" platform="opendingux" ;; + rg99) + # RG99 using opendingux, with Ingenic MIPS JZ4725B + sound_drivers="sdl" + # mostly based on opendingux for gcw0, save device type as C define. + CFLAGS="$CFLAGS -D__`echo $platform | tr '[a-z]' '[A-Z]'`__" + MFLAGS="-march=mips32" + platform="opendingux" + ;; miyoo) # Miyoo BittBoy, PocketGO 1, PowKiddy V90/Q90 with Allwinner F1C100s sound_drivers="sdl" diff --git a/platform/common/plat_sdl.c b/platform/common/plat_sdl.c index 79664c3d..24224ce4 100644 --- a/platform/common/plat_sdl.c +++ b/platform/common/plat_sdl.c @@ -336,7 +336,7 @@ void plat_init(void) ret = plat_sdl_init(); if (ret != 0) exit(1); -#if defined(__RG350__) || defined(__GCW0__) || defined(__OPENDINGUX__) +#if defined(__RG350__) || defined(__GCW0__) || defined(__OPENDINGUX__) || defined(__RG99__) // opendingux on JZ47x0 may falsely report a HW overlay, fix to window plat_target.vout_method = 0; #endif @@ -372,6 +372,11 @@ void plat_init(void) in_sdl_init(&in_sdl_platform_data, plat_sdl_event_handler); in_probe(); +#if defined(__RG99__) + // do not use the default resolution + plat_video_set_size(320, 240); +#endif + bgr_to_uyvy_init(); } diff --git a/platform/opendingux/data/default.rg99.desktop b/platform/opendingux/data/default.rg99.desktop new file mode 100644 index 00000000..17ff8cb4 --- /dev/null +++ b/platform/opendingux/data/default.rg99.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Type=Application +Name=Picodrive +Comment=A megadrive/genesis emulator +Exec=PicoDrive %f +Icon=megadrive +Terminal=false +Categories=emulators; +MimeType=.md;.smd;.gen;.bin;.sms;.gg;.sg;.cue;.chd;.cso;.iso;.32x;.pco;.zip diff --git a/platform/opendingux/inputmap.c b/platform/opendingux/inputmap.c index b8851715..15f1b200 100644 --- a/platform/opendingux/inputmap.c +++ b/platform/opendingux/inputmap.c @@ -78,7 +78,7 @@ const char * const _in_sdl_key_names[SDLK_LAST] = { [SDLK_RETURN] = "START", [SDLK_ESCAPE] = "SELECT", -#if defined(__RG350__) || defined(__OPENDINGUX__) +#if defined(__RG350__) || defined(__OPENDINGUX__) || defined(__RG99__) [SDLK_HOME] = "POWER", [SDLK_TAB] = "L1",