From b2226de89dd442ae7cd62a16ad7ce6a49dc3ccca Mon Sep 17 00:00:00 2001 From: Themaister Date: Thu, 7 Feb 2013 07:22:33 +0100 Subject: [PATCH 01/74] Add some basic SINC profiles. --- audio/hermite.c | 2 ++ audio/sinc.c | 17 ++++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/audio/hermite.c b/audio/hermite.c index 9c1565221d..e919dd6d8b 100644 --- a/audio/hermite.c +++ b/audio/hermite.c @@ -53,7 +53,9 @@ static inline float hermite_kernel(float mu1, float a, float b, float c, float d rarch_resampler_t *resampler_new(void) { +#ifndef RESAMPLER_TEST RARCH_LOG("Hermite resampler [C]\n"); +#endif return (rarch_resampler_t*)calloc(1, sizeof(rarch_resampler_t)); } diff --git a/audio/sinc.c b/audio/sinc.c index 07e78d70b9..c78b25ff7a 100644 --- a/audio/sinc.c +++ b/audio/sinc.c @@ -33,21 +33,32 @@ #include #endif +#ifdef SINC_LOWER_QUALITY +#define PHASE_BITS 12 +#define SIDELOBES 4 +#define ENABLE_AVX 0 +#elif defined(SINC_HIGHER_QUALITY) +#define PHASE_BITS 16 +#define SIDELOBES 32 +#define ENABLE_AVX 1 +#else +#define PHASE_BITS 16 +#define SIDELOBES 8 +#define ENABLE_AVX 0 +#endif + // For the little amount of taps we're using, // SSE1 is faster than AVX for some reason. // AVX code is kept here though as by increasing number // of sinc taps, the AVX code is clearly faster than SSE1. -#define ENABLE_AVX 0 #if defined(__AVX__) && ENABLE_AVX #include #endif -#define PHASE_BITS 16 #define SUBPHASE_BITS 10 #define PHASES (1 << (PHASE_BITS + SUBPHASE_BITS)) -#define SIDELOBES 8 #define TAPS (SIDELOBES * 2) #define CUTOFF 0.98 From 64c0e39596e63ec2464564864369896ef8823e1a Mon Sep 17 00:00:00 2001 From: Themaister Date: Thu, 7 Feb 2013 07:32:10 +0100 Subject: [PATCH 02/74] Add NEON check for sinc taps. --- audio/sinc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/audio/sinc.c b/audio/sinc.c index c78b25ff7a..38ac38e067 100644 --- a/audio/sinc.c +++ b/audio/sinc.c @@ -223,6 +223,11 @@ static void process_sinc(rarch_resampler_t *resamp, float *out_buffer) _mm_store_ss(out_buffer + 1, _mm_movehl_ps(sum, sum)); } #elif defined(HAVE_NEON) + +#if TAPS != 16 +#error "NEON sinc is for now only implemented with 16 taps. Cannot continue." +#endif + // Need to make this function pointer as Android doesn't have built-in targets // for NEON and plain ARMv7a. static void (*process_sinc_func)(rarch_resampler_t *resamp, float *out_buffer); From b560e58fb0ea6c575b07939b1cc9bc44be0690b8 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 8 Feb 2013 01:14:56 +0100 Subject: [PATCH 03/74] (Android) Add help system in Java frontend --- android/phoenix/AndroidManifest.xml | 1 + .../faq_games_are_slow_with_rewind_why.xml | 13 +++ .../layout/faq_how_do_i_run_cave_story.xml | 13 +++ .../res/layout/faq_how_do_i_run_prboom.xml | 13 +++ .../layout/faq_neo_geo_game_doesnt_work.xml | 13 +++ .../layout/faq_pce_cd_game_doesnt_work.xml | 13 +++ ...q_ps1_core_looks_bad_on_my_tegra_2_why.xml | 14 ++++ .../res/layout/faq_ps1_game_doesnt_work.xml | 13 +++ .../layout/faq_sega_cd_game_doesnt_work.xml | 13 +++ .../phoenix/res/layout/faq_sound_choppy.xml | 13 +++ .../res/layout/faq_system_requirements.xml | 28 +++++++ .../layout/faq_what_is_a_libretro_core.xml | 13 +++ android/phoenix/res/layout/faq_whats_new.xml | 79 +++++++++++++++++++ .../res/layout/faq_where_are_the_games.xml | 13 +++ .../faq_why_are_the_shaders_so_slow.xml | 13 +++ .../faq_why_does_prboom_have_no_music.xml | 57 +++++++++++++ ...aq_why_doesnt_it_autodetect_my_gamepad.xml | 21 +++++ ...oesnt_the_ps1_core_show_up_in_the_list.xml | 14 ++++ .../res/layout/faq_why_is_gba_so_slow.xml | 13 +++ android/phoenix/res/menu/context_menu.xml | 1 + android/phoenix/res/values/strings.xml | 3 +- android/phoenix/res/xml/help.xml | 72 +++++++++++++++++ .../org/retroarch/browser/HelpActivity.java | 17 ++++ .../src/org/retroarch/browser/RetroArch.java | 4 + 24 files changed, 466 insertions(+), 1 deletion(-) create mode 100644 android/phoenix/res/layout/faq_games_are_slow_with_rewind_why.xml create mode 100644 android/phoenix/res/layout/faq_how_do_i_run_cave_story.xml create mode 100644 android/phoenix/res/layout/faq_how_do_i_run_prboom.xml create mode 100644 android/phoenix/res/layout/faq_neo_geo_game_doesnt_work.xml create mode 100644 android/phoenix/res/layout/faq_pce_cd_game_doesnt_work.xml create mode 100644 android/phoenix/res/layout/faq_ps1_core_looks_bad_on_my_tegra_2_why.xml create mode 100644 android/phoenix/res/layout/faq_ps1_game_doesnt_work.xml create mode 100644 android/phoenix/res/layout/faq_sega_cd_game_doesnt_work.xml create mode 100644 android/phoenix/res/layout/faq_sound_choppy.xml create mode 100644 android/phoenix/res/layout/faq_system_requirements.xml create mode 100644 android/phoenix/res/layout/faq_what_is_a_libretro_core.xml create mode 100644 android/phoenix/res/layout/faq_whats_new.xml create mode 100644 android/phoenix/res/layout/faq_where_are_the_games.xml create mode 100644 android/phoenix/res/layout/faq_why_are_the_shaders_so_slow.xml create mode 100644 android/phoenix/res/layout/faq_why_does_prboom_have_no_music.xml create mode 100644 android/phoenix/res/layout/faq_why_doesnt_it_autodetect_my_gamepad.xml create mode 100644 android/phoenix/res/layout/faq_why_doesnt_the_ps1_core_show_up_in_the_list.xml create mode 100644 android/phoenix/res/layout/faq_why_is_gba_so_slow.xml create mode 100644 android/phoenix/res/xml/help.xml create mode 100644 android/phoenix/src/org/retroarch/browser/HelpActivity.java diff --git a/android/phoenix/AndroidManifest.xml b/android/phoenix/AndroidManifest.xml index e37366c38a..5ca784799d 100644 --- a/android/phoenix/AndroidManifest.xml +++ b/android/phoenix/AndroidManifest.xml @@ -22,6 +22,7 @@ + diff --git a/android/phoenix/res/layout/faq_games_are_slow_with_rewind_why.xml b/android/phoenix/res/layout/faq_games_are_slow_with_rewind_why.xml new file mode 100644 index 0000000000..74ed7b330c --- /dev/null +++ b/android/phoenix/res/layout/faq_games_are_slow_with_rewind_why.xml @@ -0,0 +1,13 @@ + + + + + diff --git a/android/phoenix/res/layout/faq_how_do_i_run_cave_story.xml b/android/phoenix/res/layout/faq_how_do_i_run_cave_story.xml new file mode 100644 index 0000000000..3110a12846 --- /dev/null +++ b/android/phoenix/res/layout/faq_how_do_i_run_cave_story.xml @@ -0,0 +1,13 @@ + + + + + diff --git a/android/phoenix/res/layout/faq_how_do_i_run_prboom.xml b/android/phoenix/res/layout/faq_how_do_i_run_prboom.xml new file mode 100644 index 0000000000..a6d08b9efa --- /dev/null +++ b/android/phoenix/res/layout/faq_how_do_i_run_prboom.xml @@ -0,0 +1,13 @@ + + + + + diff --git a/android/phoenix/res/layout/faq_neo_geo_game_doesnt_work.xml b/android/phoenix/res/layout/faq_neo_geo_game_doesnt_work.xml new file mode 100644 index 0000000000..b94cc64df1 --- /dev/null +++ b/android/phoenix/res/layout/faq_neo_geo_game_doesnt_work.xml @@ -0,0 +1,13 @@ + + + + + diff --git a/android/phoenix/res/layout/faq_pce_cd_game_doesnt_work.xml b/android/phoenix/res/layout/faq_pce_cd_game_doesnt_work.xml new file mode 100644 index 0000000000..2e8a11ae93 --- /dev/null +++ b/android/phoenix/res/layout/faq_pce_cd_game_doesnt_work.xml @@ -0,0 +1,13 @@ + + + + + diff --git a/android/phoenix/res/layout/faq_ps1_core_looks_bad_on_my_tegra_2_why.xml b/android/phoenix/res/layout/faq_ps1_core_looks_bad_on_my_tegra_2_why.xml new file mode 100644 index 0000000000..1286c4f0eb --- /dev/null +++ b/android/phoenix/res/layout/faq_ps1_core_looks_bad_on_my_tegra_2_why.xml @@ -0,0 +1,14 @@ + + + + + diff --git a/android/phoenix/res/layout/faq_ps1_game_doesnt_work.xml b/android/phoenix/res/layout/faq_ps1_game_doesnt_work.xml new file mode 100644 index 0000000000..510dfcc0bf --- /dev/null +++ b/android/phoenix/res/layout/faq_ps1_game_doesnt_work.xml @@ -0,0 +1,13 @@ + + + + + diff --git a/android/phoenix/res/layout/faq_sega_cd_game_doesnt_work.xml b/android/phoenix/res/layout/faq_sega_cd_game_doesnt_work.xml new file mode 100644 index 0000000000..2eea4ee4a6 --- /dev/null +++ b/android/phoenix/res/layout/faq_sega_cd_game_doesnt_work.xml @@ -0,0 +1,13 @@ + + + + + diff --git a/android/phoenix/res/layout/faq_sound_choppy.xml b/android/phoenix/res/layout/faq_sound_choppy.xml new file mode 100644 index 0000000000..6172646d03 --- /dev/null +++ b/android/phoenix/res/layout/faq_sound_choppy.xml @@ -0,0 +1,13 @@ + + + + + diff --git a/android/phoenix/res/layout/faq_system_requirements.xml b/android/phoenix/res/layout/faq_system_requirements.xml new file mode 100644 index 0000000000..f393bc6d84 --- /dev/null +++ b/android/phoenix/res/layout/faq_system_requirements.xml @@ -0,0 +1,28 @@ + + + + + diff --git a/android/phoenix/res/layout/faq_what_is_a_libretro_core.xml b/android/phoenix/res/layout/faq_what_is_a_libretro_core.xml new file mode 100644 index 0000000000..07a218e6b7 --- /dev/null +++ b/android/phoenix/res/layout/faq_what_is_a_libretro_core.xml @@ -0,0 +1,13 @@ + + + + + diff --git a/android/phoenix/res/layout/faq_whats_new.xml b/android/phoenix/res/layout/faq_whats_new.xml new file mode 100644 index 0000000000..18181410a9 --- /dev/null +++ b/android/phoenix/res/layout/faq_whats_new.xml @@ -0,0 +1,79 @@ + + + + + diff --git a/android/phoenix/res/layout/faq_where_are_the_games.xml b/android/phoenix/res/layout/faq_where_are_the_games.xml new file mode 100644 index 0000000000..f888e8146d --- /dev/null +++ b/android/phoenix/res/layout/faq_where_are_the_games.xml @@ -0,0 +1,13 @@ + + + + + diff --git a/android/phoenix/res/layout/faq_why_are_the_shaders_so_slow.xml b/android/phoenix/res/layout/faq_why_are_the_shaders_so_slow.xml new file mode 100644 index 0000000000..5107968b8a --- /dev/null +++ b/android/phoenix/res/layout/faq_why_are_the_shaders_so_slow.xml @@ -0,0 +1,13 @@ + + + + + diff --git a/android/phoenix/res/layout/faq_why_does_prboom_have_no_music.xml b/android/phoenix/res/layout/faq_why_does_prboom_have_no_music.xml new file mode 100644 index 0000000000..cf831eca72 --- /dev/null +++ b/android/phoenix/res/layout/faq_why_does_prboom_have_no_music.xml @@ -0,0 +1,57 @@ + + + + + diff --git a/android/phoenix/res/layout/faq_why_doesnt_it_autodetect_my_gamepad.xml b/android/phoenix/res/layout/faq_why_doesnt_it_autodetect_my_gamepad.xml new file mode 100644 index 0000000000..e107766193 --- /dev/null +++ b/android/phoenix/res/layout/faq_why_doesnt_it_autodetect_my_gamepad.xml @@ -0,0 +1,21 @@ + + + + + diff --git a/android/phoenix/res/layout/faq_why_doesnt_the_ps1_core_show_up_in_the_list.xml b/android/phoenix/res/layout/faq_why_doesnt_the_ps1_core_show_up_in_the_list.xml new file mode 100644 index 0000000000..e24ef2f961 --- /dev/null +++ b/android/phoenix/res/layout/faq_why_doesnt_the_ps1_core_show_up_in_the_list.xml @@ -0,0 +1,14 @@ + + + + + diff --git a/android/phoenix/res/layout/faq_why_is_gba_so_slow.xml b/android/phoenix/res/layout/faq_why_is_gba_so_slow.xml new file mode 100644 index 0000000000..c391668690 --- /dev/null +++ b/android/phoenix/res/layout/faq_why_is_gba_so_slow.xml @@ -0,0 +1,13 @@ + + + + + diff --git a/android/phoenix/res/menu/context_menu.xml b/android/phoenix/res/menu/context_menu.xml index f4add82b67..8a0a6a6176 100644 --- a/android/phoenix/res/menu/context_menu.xml +++ b/android/phoenix/res/menu/context_menu.xml @@ -1,6 +1,7 @@ + diff --git a/android/phoenix/res/values/strings.xml b/android/phoenix/res/values/strings.xml index 7e2dbf1846..bb44ca812e 100644 --- a/android/phoenix/res/values/strings.xml +++ b/android/phoenix/res/values/strings.xml @@ -4,7 +4,7 @@ Input Method File type icon Video Settings - RetroArch Settings + Settings Audio Settings Input Settings General Settings @@ -14,6 +14,7 @@ Overlay How-to Guide Select the button to use Unbind + Help Report IME Report Refresh Rate Detect diff --git a/android/phoenix/res/xml/help.xml b/android/phoenix/res/xml/help.xml new file mode 100644 index 0000000000..f7638e5652 --- /dev/null +++ b/android/phoenix/res/xml/help.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/android/phoenix/src/org/retroarch/browser/HelpActivity.java b/android/phoenix/src/org/retroarch/browser/HelpActivity.java new file mode 100644 index 0000000000..ea1e113b79 --- /dev/null +++ b/android/phoenix/src/org/retroarch/browser/HelpActivity.java @@ -0,0 +1,17 @@ +package org.retroarch.browser; + +import org.retroarch.R; + +import android.os.Bundle; +import android.preference.PreferenceActivity; +import android.preference.PreferenceManager; + +public class HelpActivity extends PreferenceActivity { + @SuppressWarnings("deprecation") + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + addPreferencesFromResource(R.xml.help); + PreferenceManager.setDefaultValues(this, R.xml.help, false); + } +} \ No newline at end of file diff --git a/android/phoenix/src/org/retroarch/browser/RetroArch.java b/android/phoenix/src/org/retroarch/browser/RetroArch.java index 5ec6e2f490..2587ad2171 100644 --- a/android/phoenix/src/org/retroarch/browser/RetroArch.java +++ b/android/phoenix/src/org/retroarch/browser/RetroArch.java @@ -489,6 +489,10 @@ public class RetroArch extends Activity implements Intent rset = new Intent(this, SettingsActivity.class); startActivity(rset); return true; + case R.id.help: + Intent help = new Intent(this, HelpActivity.class); + startActivity(help); + return true; case R.id.report_ime: String current_ime = Settings.Secure.getString(getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD); From 5120a0d7d920a9928b00de15674185f7fff38456 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 8 Feb 2013 01:51:02 +0100 Subject: [PATCH 04/74] (Android) Add some more entries to Help --- ..._neo_geo_game_in_fba_shows_video_ram_err_why.xml | 13 +++++++++++++ .../layout/faq_why_does_prboom_have_no_music.xml | 2 +- android/phoenix/res/xml/help.xml | 4 ++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 android/phoenix/res/layout/faq_neo_geo_game_in_fba_shows_video_ram_err_why.xml diff --git a/android/phoenix/res/layout/faq_neo_geo_game_in_fba_shows_video_ram_err_why.xml b/android/phoenix/res/layout/faq_neo_geo_game_in_fba_shows_video_ram_err_why.xml new file mode 100644 index 0000000000..0bafbd49e8 --- /dev/null +++ b/android/phoenix/res/layout/faq_neo_geo_game_in_fba_shows_video_ram_err_why.xml @@ -0,0 +1,13 @@ + + + + + diff --git a/android/phoenix/res/layout/faq_why_does_prboom_have_no_music.xml b/android/phoenix/res/layout/faq_why_does_prboom_have_no_music.xml index cf831eca72..54331db3a8 100644 --- a/android/phoenix/res/layout/faq_why_does_prboom_have_no_music.xml +++ b/android/phoenix/res/layout/faq_why_does_prboom_have_no_music.xml @@ -9,7 +9,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="40px" - android:text="NOTE: Prboom only supports MP3 soundtracks right now. To have the game use MP3 files, the files must be correctly named and should be placed in the same directry as the WAD file.\n\nHere is a listing of the files that are looked for by Prboom when trying to playback music in-game.\n\n== FOR DOOM 1/ULTIMATE DOOM ==\n\ne1m1.mp3\n\ne1m2.mp3\n\ne1m3.mp\n\ne1m4.mp3\n\ne1m5.mp3\n\ne1m6.zip\n\ne1m7.mp3\n\ne1m8.mp3\n\ne1m9.mp3\n\n + android:text="NOTE: Prboom only supports MP3 soundtracks right now. To have the game use MP3 files, the files must be correctly named and should be placed in the same directry as the WAD file.\n\nHere is a listing of the files that are looked for by Prboom when trying to playback music in-game.\n\n== FOR DOOM 1/ULTIMATE DOOM ==\n\ne1m1.mp3\n\ne1m2.mp3\n\ne1m3.mp3\n\ne1m4.mp3\n\ne1m5.mp3\n\ne1m6.mp3\n\ne1m7.mp3\n\ne1m8.mp3\n\ne1m9.mp3\n\n e2m1.mp3\n\n e2m2.mp3\n\n e2m3.mp3\n\n diff --git a/android/phoenix/res/xml/help.xml b/android/phoenix/res/xml/help.xml index f7638e5652..6f790e6850 100644 --- a/android/phoenix/res/xml/help.xml +++ b/android/phoenix/res/xml/help.xml @@ -49,6 +49,10 @@ + + + + From 51d2d3bba4419ab23bb1826264e69676dff37185 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 8 Feb 2013 01:56:30 +0100 Subject: [PATCH 05/74] (Android) Help text - Some adjustments --- android/phoenix/res/layout/faq_how_do_i_run_cave_story.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/phoenix/res/layout/faq_how_do_i_run_cave_story.xml b/android/phoenix/res/layout/faq_how_do_i_run_cave_story.xml index 3110a12846..ac0dd06c63 100644 --- a/android/phoenix/res/layout/faq_how_do_i_run_cave_story.xml +++ b/android/phoenix/res/layout/faq_how_do_i_run_cave_story.xml @@ -9,5 +9,5 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="40px" - android:text="NOTE: Cave Story/Doukutsu Monogatari was released as freeware back in 2004. For that reason we are allowed to host the data files.\n\nGo to this repository: https://github.com/libretro/nxengine-libretro\n\nDownload the entire 'datafiles' directory there and copy it to your device. Select 'NXEngine (Cave Story)' from the 'Select a Libretro Core' screen and select 'doukutsu.exe' (this file should be in the root of the datafiles directory that you just copied over). On first boot-up it will extract needed files from the EXE file to disk - this will be a one-time procedure and will take slightly longer than all subsequent boots. After this is done you can play." /> + android:text="NOTE: The original version of Cave Story/Doukutsu Monogatari was released as freeware back in 2004.\n\nGo to this repository: https://github.com/libretro/nxengine-libretro\n\nDownload the entire 'datafiles' directory there and copy it to your device. Select 'NXEngine (Cave Story)' from the 'Select a Libretro Core' screen and select 'doukutsu.exe' (this file should be in the root of the datafiles directory that you just copied over). On first boot-up it will extract needed files from the EXE file to disk - this will be a one-time procedure and will take slightly longer than all subsequent boots. After this is done you can play." /> From 4ed6248c8977504e48e8551b5aee54e9c34bb606 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 8 Feb 2013 02:57:21 +0100 Subject: [PATCH 06/74] (Android) Add to autodetection list - add Zeemote Steelseries, Add Saitek Rumblepad, add Super Smart Joy --- android/native/jni/input_autodetect.c | 55 ++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 5 deletions(-) diff --git a/android/native/jni/input_autodetect.c b/android/native/jni/input_autodetect.c index f26728ae36..52d8a79ce9 100644 --- a/android/native/jni/input_autodetect.c +++ b/android/native/jni/input_autodetect.c @@ -218,17 +218,60 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned keycode_lut[AKEYCODE_BUTTON_R1] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); } } - else if (strstr(name_buf, "HuiJia USB GamePad")) + else if (strstr(name_buf, "Zeemote")) + { + if (strstr(name_buf, "Steelseries free")) + { + keycode_lut[AKEYCODE_BUTTON_A] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + keycode_lut[AKEYCODE_BUTTON_B] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + + keycode_lut[AKEYCODE_BUTTON_Y] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + keycode_lut[AKEYCODE_BUTTON_X] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + + keycode_lut[AKEYCODE_BUTTON_MODE] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + keycode_lut[AKEYCODE_BUTTON_START] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + + keycode_lut[AKEYCODE_BUTTON_L1] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + keycode_lut[AKEYCODE_BUTTON_R1] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + } + } + else if (strstr(name_buf, "HuiJia USB GamePad") || + strstr(name_buf, "Smartjoy Family Super Smartjoy 2")) { keycode_lut[AKEYCODE_BUTTON_3] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); keycode_lut[AKEYCODE_BUTTON_4] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - keycode_lut[AKEYCODE_BUTTON_9] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - keycode_lut[AKEYCODE_BUTTON_10] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + + if (strstr(name_buf, "Smartjoy Family Super Smartjoy 2")) + { + keycode_lut[AKEYCODE_BUTTON_5] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + keycode_lut[AKEYCODE_BUTTON_6] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + } + else if (strstr(name_buf, "HuiJia USB GamePad")) + { + keycode_lut[AKEYCODE_BUTTON_9] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + keycode_lut[AKEYCODE_BUTTON_10] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + } keycode_lut[AKEYCODE_BUTTON_2] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); keycode_lut[AKEYCODE_BUTTON_1] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); keycode_lut[AKEYCODE_BUTTON_7] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); keycode_lut[AKEYCODE_BUTTON_8] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); } + else if (strstr(name_buf, "Jess Tech Dual Analog Rumble Pad")) + { + /* Saitek Rumble P480 */ + keycode_lut[AKEYCODE_BUTTON_3] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + keycode_lut[AKEYCODE_BUTTON_1] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + keycode_lut[AKEYCODE_BUTTON_9] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + keycode_lut[AKEYCODE_BUTTON_10] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + keycode_lut[AKEYCODE_BUTTON_4] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + keycode_lut[AKEYCODE_BUTTON_2] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + keycode_lut[AKEYCODE_BUTTON_5] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + keycode_lut[AKEYCODE_BUTTON_7] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + keycode_lut[AKEYCODE_BUTTON_6] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); + keycode_lut[AKEYCODE_BUTTON_8] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); + keycode_lut[AKEYCODE_BUTTON_11] |= ((RETRO_DEVICE_ID_JOYPAD_L3+1) << shift); + keycode_lut[AKEYCODE_BUTTON_12] |= ((RETRO_DEVICE_ID_JOYPAD_R3+1) << shift); + } else if (strstr(name_buf, "Microsoft")) { if (strstr(name_buf, "Dual Strike")) @@ -243,7 +286,8 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned keycode_lut[AKEYCODE_BUTTON_8] |= ((RETRO_DEVICE_ID_JOYPAD_R) << shift); keycode_lut[AKEYCODE_BUTTON_9] |= ((RETRO_DEVICE_ID_JOYPAD_L2) << shift); } - else if (strstr(name_buf, "SideWinder") || strstr(name_buf, "X-Box")) + else if (strstr(name_buf, "SideWinder") || strstr(name_buf, "X-Box") || + strstr("Xbox 360 Wireless Receiver")) { if (strstr(name_buf, "SideWinder")) { @@ -254,7 +298,8 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned keycode_lut[AKEYCODE_BUTTON_Z] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); keycode_lut[AKEYCODE_BUTTON_C] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); } - else if (strstr(name_buf, "X-Box 360") || strstr(name_buf, "X-Box")) + else if (strstr(name_buf, "X-Box 360") || strstr(name_buf, "X-Box") + || strstr("Xbox 360 Wireless Receiver")) { /* TODO: left and right triggers for Xbox 1*/ keycode_lut[AKEYCODE_BUTTON_SELECT] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); From 5b57e99b890a94f5cf04723e576eb91a257474a6 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 8 Feb 2013 02:59:28 +0100 Subject: [PATCH 07/74] (Android) Build fix --- android/native/jni/input_autodetect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/native/jni/input_autodetect.c b/android/native/jni/input_autodetect.c index 52d8a79ce9..3e3b1715eb 100644 --- a/android/native/jni/input_autodetect.c +++ b/android/native/jni/input_autodetect.c @@ -287,7 +287,7 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned keycode_lut[AKEYCODE_BUTTON_9] |= ((RETRO_DEVICE_ID_JOYPAD_L2) << shift); } else if (strstr(name_buf, "SideWinder") || strstr(name_buf, "X-Box") || - strstr("Xbox 360 Wireless Receiver")) + strstr(name_buf, "Xbox 360 Wireless Receiver")) { if (strstr(name_buf, "SideWinder")) { @@ -299,7 +299,7 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned keycode_lut[AKEYCODE_BUTTON_C] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); } else if (strstr(name_buf, "X-Box 360") || strstr(name_buf, "X-Box") - || strstr("Xbox 360 Wireless Receiver")) + || strstr(name_buf, "Xbox 360 Wireless Receiver")) { /* TODO: left and right triggers for Xbox 1*/ keycode_lut[AKEYCODE_BUTTON_SELECT] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); From d33d2e9f0c4b448ecbf1f63d4889c9e2f56288e1 Mon Sep 17 00:00:00 2001 From: Themaister Date: Fri, 8 Feb 2013 11:49:51 +0100 Subject: [PATCH 08/74] Make resamplers more modular. --- Makefile | 4 ++-- Makefile.win | 5 +++-- audio/hermite.c | 20 ++++++++++++++------ audio/resampler.h | 32 ++++++++++++++++++++++++++++---- audio/sinc.c | 35 +++++++++++++++++++++++------------ console/griffin/griffin.c | 6 +++--- driver.c | 12 ++++++++---- general.h | 5 ++++- record/ffemu.c | 14 +++++++++----- retroarch.c | 3 ++- retroarch.cfg | 4 ++++ settings.c | 1 + 12 files changed, 101 insertions(+), 40 deletions(-) diff --git a/Makefile b/Makefile index c8926d613d..0eaffc23d2 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,8 @@ OBJ = retroarch.o \ gfx/image.o \ gfx/fonts/fonts.o \ gfx/fonts/bitmapfont.o \ + audio/hermite.o \ + audio/resampler.o \ performance.o JOYCONFIG_OBJ = tools/retroarch-joyconfig.o \ @@ -298,8 +300,6 @@ ifeq ($(HAVE_SINC), 1) ifeq ($(HAVE_NEON),1) OBJ += audio/sinc_neon.o endif -else - OBJ += audio/hermite.o endif OBJ += audio/utils.o ifeq ($(HAVE_NEON),1) diff --git a/Makefile.win b/Makefile.win index 7a5838c5b6..ff02d01eea 100644 --- a/Makefile.win +++ b/Makefile.win @@ -30,6 +30,8 @@ OBJ = retroarch.o \ gfx/fonts/fonts.o \ gfx/fonts/bitmapfont.o \ gfx/image.o \ + audio/hermite.o \ + audio/resampler.o \ performance.o JOBJ := conf/config_file.o \ @@ -208,8 +210,7 @@ endif ifeq ($(HAVE_SINC), 1) OBJ += audio/sinc.o -else - OBJ += audio/hermite.o + DEFINES += -DHAVE_SINC endif ifneq ($(V), 1) diff --git a/audio/hermite.c b/audio/hermite.c index e919dd6d8b..1dc80e3a6f 100644 --- a/audio/hermite.c +++ b/audio/hermite.c @@ -27,11 +27,11 @@ #define CHANNELS 2 -struct rarch_resampler +typedef struct rarch_hermite_resampler { float chan_data[CHANNELS][4]; double r_frac; -}; +} rarch_hermite_resampler_t; static inline float hermite_kernel(float mu1, float a, float b, float c, float d) { @@ -51,16 +51,17 @@ static inline float hermite_kernel(float mu1, float a, float b, float c, float d return (a0 * b) + (a1 * m0) + (a2 * m1) + (a3 * c); } -rarch_resampler_t *resampler_new(void) +void *resampler_hermite_new(void) { #ifndef RESAMPLER_TEST RARCH_LOG("Hermite resampler [C]\n"); #endif - return (rarch_resampler_t*)calloc(1, sizeof(rarch_resampler_t)); + return calloc(1, sizeof(rarch_hermite_resampler_t)); } -void resampler_process(rarch_resampler_t *re, struct resampler_data *data) +static void resampler_hermite_process(void *re_, struct resampler_data *data) { + rarch_hermite_resampler_t *re = (rarch_hermite_resampler_t*)re_; double r_step = 1.0 / data->ratio; size_t processed_out = 0; @@ -101,8 +102,15 @@ void resampler_process(rarch_resampler_t *re, struct resampler_data *data) data->output_frames = processed_out; } -void resampler_free(rarch_resampler_t *re) +static void resampler_hermite_free(void *re) { free(re); } +const rarch_resampler_t hermite_resampler = { + resampler_hermite_new, + resampler_hermite_process, + resampler_hermite_free, + "hermite", +}; + diff --git a/audio/resampler.h b/audio/resampler.h index 498e66a245..a865f2ab5a 100644 --- a/audio/resampler.h +++ b/audio/resampler.h @@ -24,13 +24,13 @@ #include #include #include +#include "../boolean.h" // M_PI is left out of ISO C99 :( #ifndef M_PI #define M_PI 3.14159265358979323846264338327 #endif -typedef struct rarch_resampler rarch_resampler_t; typedef float sample_t; struct resampler_data @@ -44,9 +44,33 @@ struct resampler_data double ratio; }; -rarch_resampler_t *resampler_new(void); -void resampler_process(rarch_resampler_t *re, struct resampler_data *data); -void resampler_free(rarch_resampler_t *re); +typedef struct rarch_resampler +{ + void *(*init)(void); + void (*process)(void *re, struct resampler_data *data); + void (*free)(void *re); + const char *ident; +} rarch_resampler_t; + +extern const rarch_resampler_t hermite_resampler; +extern const rarch_resampler_t sinc_resampler; + +// Reallocs resampler. Will free previous handle before allocating a new one. +// If ident is NULL, first resampler will be used. +bool rarch_resampler_realloc(void **re, const rarch_resampler_t **backend, const char *ident); + +// Convenience macros. +// freep makes sure to set handles to NULL to avoid double-free in rarch_resampler_realloc. +#define rarch_resampler_freep(backend, handle) do { \ + if (*(backend) && *(handle)) \ + (*backend)->free(*handle); \ + *backend = NULL; \ + *handle = NULL; \ +} while(0) + +#define rarch_resampler_process(backend, handle, data) do { \ + (backend)->process(handle, data); \ +} while(0) #endif diff --git a/audio/sinc.c b/audio/sinc.c index 38ac38e067..145a69ddc3 100644 --- a/audio/sinc.c +++ b/audio/sinc.c @@ -62,7 +62,7 @@ #define TAPS (SIDELOBES * 2) #define CUTOFF 0.98 -struct rarch_resampler +typedef struct rarch_sinc_resampler { sample_t phase_table[1 << PHASE_BITS][TAPS]; sample_t buffer_l[2 * TAPS]; @@ -70,7 +70,7 @@ struct rarch_resampler unsigned ptr; uint32_t time; -}; +} rarch_sinc_resampler_t; static inline double sinc(double val) { @@ -85,7 +85,7 @@ static inline double lanzcos(double index) return sinc(index); } -static void init_sinc_table(rarch_resampler_t *resamp) +static void init_sinc_table(rarch_sinc_resampler_t *resamp) { // Sinc phases: [..., p + 3, p + 2, p + 1, p + 0, p - 1, p - 2, p - 3, p - 4, ...] for (int i = 0; i < (1 << PHASE_BITS); i++) @@ -121,7 +121,7 @@ static void aligned_free__(void *ptr) free(p[-1]); } -static inline void process_sinc_C(rarch_resampler_t *resamp, float *out_buffer) +static inline void process_sinc_C(rarch_sinc_resampler_t *resamp, float *out_buffer) { float sum_l = 0.0f; float sum_r = 0.0f; @@ -144,7 +144,7 @@ static inline void process_sinc_C(rarch_resampler_t *resamp, float *out_buffer) #if defined(__AVX__) && ENABLE_AVX #define process_sinc_func process_sinc -static void process_sinc(rarch_resampler_t *resamp, float *out_buffer) +static void process_sinc(rarch_sinc_resampler_t *resamp, float *out_buffer) { __m256 sum_l = _mm256_setzero_ps(); __m256 sum_r = _mm256_setzero_ps(); @@ -180,7 +180,7 @@ static void process_sinc(rarch_resampler_t *resamp, float *out_buffer) } #elif defined(__SSE__) #define process_sinc_func process_sinc -static void process_sinc(rarch_resampler_t *resamp, float *out_buffer) +static void process_sinc(rarch_sinc_resampler_t *resamp, float *out_buffer) { __m128 sum_l = _mm_setzero_ps(); __m128 sum_r = _mm_setzero_ps(); @@ -230,10 +230,10 @@ static void process_sinc(rarch_resampler_t *resamp, float *out_buffer) // Need to make this function pointer as Android doesn't have built-in targets // for NEON and plain ARMv7a. -static void (*process_sinc_func)(rarch_resampler_t *resamp, float *out_buffer); +static void (*process_sinc_func)(rarch_sinc_resampler_t *resamp, float *out_buffer); void process_sinc_neon_asm(float *out, const float *left, const float *right, const float *coeff); -static void process_sinc_neon(rarch_resampler_t *resamp, float *out_buffer) +static void process_sinc_neon(rarch_sinc_resampler_t *resamp, float *out_buffer) { const float *buffer_l = resamp->buffer_l + resamp->ptr; const float *buffer_r = resamp->buffer_r + resamp->ptr; @@ -247,8 +247,10 @@ static void process_sinc_neon(rarch_resampler_t *resamp, float *out_buffer) #define process_sinc_func process_sinc_C #endif -void resampler_process(rarch_resampler_t *re, struct resampler_data *data) +static void resampler_sinc_process(void *re_, struct resampler_data *data) { + rarch_sinc_resampler_t *re = (rarch_sinc_resampler_t*)re_; + // If data->ratio is < 1, we are downsampling. // The sinc table is not set up for this, as it always assumes upsampling. // Downsampling will work, but with some added noise due to aliasing might be present. @@ -283,14 +285,14 @@ void resampler_process(rarch_resampler_t *re, struct resampler_data *data) data->output_frames = out_frames; } -void resampler_free(rarch_resampler_t *re) +static void resampler_sinc_free(void *re) { aligned_free__(re); } -rarch_resampler_t *resampler_new(void) +static void *resampler_sinc_new(void) { - rarch_resampler_t *re = (rarch_resampler_t*)aligned_alloc__(1024, sizeof(*re)); + rarch_sinc_resampler_t *re = (rarch_sinc_resampler_t*)aligned_alloc__(128, sizeof(*re)); if (!re) return NULL; @@ -311,6 +313,15 @@ rarch_resampler_t *resampler_new(void) RARCH_LOG("Sinc resampler [C]\n"); #endif + RARCH_LOG("SINC params (%u phase bits, %u taps).\n", PHASE_BITS, TAPS); + return re; } +const rarch_resampler_t sinc_resampler = { + resampler_sinc_new, + resampler_sinc_process, + resampler_sinc_free, + "sinc", +}; + diff --git a/console/griffin/griffin.c b/console/griffin/griffin.c index e5997a1e52..6fc2a6efbf 100644 --- a/console/griffin/griffin.c +++ b/console/griffin/griffin.c @@ -275,13 +275,13 @@ FIFO BUFFER #include "../../fifo_buffer.c" /*============================================================ -AUDIO HERMITE +AUDIO RESAMPLER ============================================================ */ +#include "../../audio/resampler.c" #ifdef HAVE_SINC #include "../../audio/sinc.c" -#else -#include "../../audio/hermite.c" #endif +#include "../../audio/hermite.c" /*============================================================ RSOUND diff --git a/driver.c b/driver.c index 17369e1968..0cfb87f968 100644 --- a/driver.c +++ b/driver.c @@ -22,6 +22,7 @@ #include #include "compat/posix_string.h" #include "audio/utils.h" +#include "audio/resampler.h" #ifdef HAVE_X11 #include "gfx/context/x11_common.h" @@ -405,9 +406,13 @@ void init_audio(void) g_extern.audio_data.chunk_size = g_extern.audio_data.nonblock_chunk_size; } - g_extern.audio_data.source = resampler_new(); - if (!g_extern.audio_data.source) + const char *resampler = *g_settings.audio.resampler ? g_settings.audio.resampler : NULL; + if (!rarch_resampler_realloc(&g_extern.audio_data.resampler_data, &g_extern.audio_data.resampler, + resampler)) + { + RARCH_ERR("Failed to initialize resampler \"%s\".\n", resampler ? resampler : "(default)"); g_extern.audio_active = false; + } rarch_assert(g_extern.audio_data.data = (float*)malloc(max_bufsamples * sizeof(float))); @@ -536,8 +541,7 @@ void uninit_audio(void) if (driver.audio_data && driver.audio) driver.audio->free(driver.audio_data); - if (g_extern.audio_data.source) - resampler_free(g_extern.audio_data.source); + rarch_resampler_freep(&g_extern.audio_data.resampler, &g_extern.audio_data.resampler_data); free(g_extern.audio_data.data); g_extern.audio_data.data = NULL; diff --git a/general.h b/general.h index 6b5272dc9c..cbc2314360 100644 --- a/general.h +++ b/general.h @@ -217,6 +217,8 @@ struct settings bool rate_control; float rate_control_delta; float volume; // dB scale + + char resampler[32]; } audio; struct @@ -373,7 +375,8 @@ struct global struct { - rarch_resampler_t *source; + void *resampler_data; + const rarch_resampler_t *resampler; float *data; diff --git a/record/ffemu.c b/record/ffemu.c index 4c4f574c43..4728c7ac44 100644 --- a/record/ffemu.c +++ b/record/ffemu.c @@ -99,7 +99,9 @@ struct ff_audio_info // Most lossy audio codecs only support certain sampling rates. // Could use libswresample, but it doesn't support floating point ratios. :( // Use either S16 or (planar) float for simplicity. - rarch_resampler_t *resampler; + const rarch_resampler_t *resampler; + void *resampler_data; + bool use_float; bool is_planar; unsigned sample_size; @@ -277,7 +279,9 @@ static bool ffemu_init_audio(ffemu_t *handle) audio->codec->sample_rate = params->sample_rate; audio->codec->time_base = av_d2q(1.0 / params->sample_rate, 1000000); - audio->resampler = resampler_new(); + rarch_resampler_realloc(&audio->resampler_data, + &audio->resampler, + *g_settings.audio.resampler ? g_settings.audio.resampler : NULL); } else { @@ -683,8 +687,8 @@ void ffemu_free(ffemu_t *handle) if (handle->config.audio_opts) av_dict_free(&handle->config.audio_opts); - if (handle->audio.resampler) - resampler_free(handle->audio.resampler); + rarch_resampler_freep(&handle->audio.resampler, + &handle->audio.resampler_data); av_free(handle->audio.float_conv); av_free(handle->audio.resample_out); @@ -1023,7 +1027,7 @@ static void ffemu_audio_resample(ffemu_t *handle, struct ffemu_audio_data *data) info.input_frames = data->frames; info.ratio = handle->audio.ratio; - resampler_process(handle->audio.resampler, &info); + rarch_resampler_process(handle->audio.resampler, handle->audio.resampler_data, &info); data->data = handle->audio.resample_out; data->frames = info.output_frames; diff --git a/retroarch.c b/retroarch.c index 3c1dd6486c..34fc0aa6c8 100644 --- a/retroarch.c +++ b/retroarch.c @@ -402,7 +402,8 @@ static bool audio_flush(const int16_t *data, size_t samples) RARCH_PERFORMANCE_INIT(resampler_proc); RARCH_PERFORMANCE_START(resampler_proc); - resampler_process(g_extern.audio_data.source, &src_data); + rarch_resampler_process(g_extern.audio_data.resampler, + g_extern.audio_data.resampler_data, &src_data); RARCH_PERFORMANCE_STOP(resampler_proc); output_data = g_extern.audio_data.outsamples; diff --git a/retroarch.cfg b/retroarch.cfg index 46d01d83be..2237d20e35 100644 --- a/retroarch.cfg +++ b/retroarch.cfg @@ -159,6 +159,10 @@ # Audio output samplerate. # audio_out_rate = 48000 +# Which resampler to use. "sinc" and "hermite" are currently implemented. +# Default will use "sinc" if compiled in. +# audio_resampler = + # When altering audio_in_rate on-the-fly, define by how much each time. # audio_rate_step = 0.25 diff --git a/settings.c b/settings.c index b57f2b84ed..b620eebcfb 100644 --- a/settings.c +++ b/settings.c @@ -641,6 +641,7 @@ bool config_load_file(const char *path) CONFIG_GET_BOOL(audio.rate_control, "audio_rate_control"); CONFIG_GET_FLOAT(audio.rate_control_delta, "audio_rate_control_delta"); CONFIG_GET_FLOAT(audio.volume, "audio_volume"); + CONFIG_GET_STRING(audio.resampler, "audio_resampler"); CONFIG_GET_STRING(video.driver, "video_driver"); CONFIG_GET_STRING(audio.driver, "audio_driver"); From 202e204fd7e2bf2fd94bd55d1b65d7f15dc62427 Mon Sep 17 00:00:00 2001 From: Themaister Date: Fri, 8 Feb 2013 11:50:45 +0100 Subject: [PATCH 09/74] Add resampler.c. --- audio/resampler.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 audio/resampler.c diff --git a/audio/resampler.c b/audio/resampler.c new file mode 100644 index 0000000000..8ee2f3e36a --- /dev/null +++ b/audio/resampler.c @@ -0,0 +1,66 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2010-2013 - Hans-Kristian Arntzen + * + * RetroArch is free software: you can redistribute it and/or modify it under the terms + * of the GNU General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with RetroArch. + * If not, see . + */ + +#include "resampler.h" +#include + +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + +#include "../general.h" + +static const rarch_resampler_t *backends[] = { +#ifdef HAVE_SINC + &sinc_resampler, +#endif + &hermite_resampler, +}; + +bool rarch_resampler_realloc(void **re, const rarch_resampler_t **backend, const char *ident) +{ + if (*re && *backend) + (*backend)->free(*re); + + *re = NULL; + *backend = NULL; + + if (ident) + { + for (unsigned i = 0; i < ARRAY_SIZE(backends); i++) + { + if (strcmp(backends[i]->ident, ident) == 0) + { + *backend = backends[i]; + break; + } + } + } + else + *backend = backends[0]; + + if (!*backend) + return false; + + *re = (*backend)->init(); + if (!*re) + { + *backend = NULL; + return false; + } + + return true; +} + From 3efd600dec56dadb0dfc2251a8bdc3822daab538 Mon Sep 17 00:00:00 2001 From: Themaister Date: Fri, 8 Feb 2013 12:05:22 +0100 Subject: [PATCH 10/74] Fix CXX_BUILD. --- performance.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/performance.h b/performance.h index 01831faaed..4515dc1c65 100644 --- a/performance.h +++ b/performance.h @@ -21,6 +21,10 @@ #include "config.h" #endif +#ifdef __cplusplus +extern "C" { +#endif + #include "boolean.h" #include typedef unsigned long long rarch_perf_tick_t; @@ -94,5 +98,9 @@ void rarch_get_cpu_features(struct rarch_cpu_features *cpu); #endif +#ifdef __cplusplus +} +#endif + #endif From 2f7b3bf781401d4089c13d8e1347567a08cb4f86 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 8 Feb 2013 13:55:58 +0100 Subject: [PATCH 11/74] (RARCH_CONSOLE) audio_resampler will be saved to config file too --- settings.c | 1 + 1 file changed, 1 insertion(+) diff --git a/settings.c b/settings.c index b620eebcfb..07aac004e9 100644 --- a/settings.c +++ b/settings.c @@ -1176,6 +1176,7 @@ bool config_save_file(const char *path) config_set_bool(conf, "audio_rate_control", g_settings.audio.rate_control); config_set_float(conf, "audio_rate_control_delta", g_settings.audio.rate_control_delta); config_set_string(conf, "system_directory", g_settings.system_directory); + config_set_string(conf, "audio_resampler", g_settings.audio.resampler); if (g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_OVERSCAN_ENABLE)) config_set_bool(conf, "overscan_enable", true); From 9c24273afd078367cc337fb82e53bf471064797e Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 8 Feb 2013 14:00:34 +0100 Subject: [PATCH 12/74] (Wii/Xbox 1) Compile in sinc resampler (lower-quality) for Xbox 1 and Wii --- Makefile.wii | 2 +- msvc/RetroArch-Xbox1/RetroArch-Xbox1.vcproj | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile.wii b/Makefile.wii index 3be9f6ee33..892b098115 100644 --- a/Makefile.wii +++ b/Makefile.wii @@ -69,7 +69,7 @@ CFLAGS += -Iconsole/logger endif -CFLAGS += -std=gnu99 -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_RGUI -DHAVE_THREAD -DRARCH_CONSOLE -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RARCH_EXEC -DHAVE_RMENU -DGEKKO -DHAVE_ZLIB -DWANT_RZLIB -DHAVE_RARCH_MAIN_WRAP -DHAVE_GRIFFIN=1 -DHAVE_SCREENSHOTS -DPACKAGE_VERSION=\"0.9.8.2\" -Dmain=rarch_main -Wno-char-subscripts +CFLAGS += -std=gnu99 -DHAVE_SINC -DSINC_LOWER_QUALITY -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_RGUI -DHAVE_THREAD -DRARCH_CONSOLE -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RARCH_EXEC -DHAVE_RMENU -DGEKKO -DHAVE_ZLIB -DWANT_RZLIB -DHAVE_RARCH_MAIN_WRAP -DHAVE_GRIFFIN=1 -DHAVE_SCREENSHOTS -DPACKAGE_VERSION=\"0.9.8.2\" -Dmain=rarch_main -Wno-char-subscripts ifeq ($(DEBUG), 1) CFLAGS += -O0 -g -DDEBUG diff --git a/msvc/RetroArch-Xbox1/RetroArch-Xbox1.vcproj b/msvc/RetroArch-Xbox1/RetroArch-Xbox1.vcproj index 248ea6c536..ef4b8938d6 100644 --- a/msvc/RetroArch-Xbox1/RetroArch-Xbox1.vcproj +++ b/msvc/RetroArch-Xbox1/RetroArch-Xbox1.vcproj @@ -22,7 +22,7 @@ Optimization="3" OptimizeForProcessor="2" AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71"" - PreprocessorDefinitions="_DEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.8\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;HAVE_SCREENSHOTS;WANT_RZLIB" + PreprocessorDefinitions="_DEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.8\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY" MinimalRebuild="TRUE" BasicRuntimeChecks="0" RuntimeLibrary="1" @@ -72,7 +72,7 @@ OmitFramePointers="TRUE" OptimizeForProcessor="2" AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71"" - PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.8\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;HAVE_SCREENSHOTS;WANT_RZLIB" + PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.8\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY" StringPooling="TRUE" RuntimeLibrary="0" BufferSecurityCheck="TRUE" @@ -127,7 +127,7 @@ OmitFramePointers="TRUE" OptimizeForProcessor="2" AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71"" - PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.8\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;FASTCAP;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;HAVE_SCREENSHOTS;WANT_RZLIB" + PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.8\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;FASTCAP;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY" StringPooling="TRUE" RuntimeLibrary="0" BufferSecurityCheck="TRUE" @@ -188,7 +188,7 @@ EnableFiberSafeOptimizations="TRUE" OptimizeForProcessor="2" AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71"" - PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.8\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;inline=_inline;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;HAVE_SCREENSHOTS;WANT_RZLIB" + PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.8\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;inline=_inline;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY" StringPooling="TRUE" RuntimeLibrary="0" BufferSecurityCheck="TRUE" @@ -241,7 +241,7 @@ OmitFramePointers="TRUE" OptimizeForProcessor="2" AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71"" - PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.8\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;LTCG;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;HAVE_SCREENSHOTS;WANT_RZLIB" + PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.8\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;LTCG;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY" StringPooling="TRUE" RuntimeLibrary="0" BufferSecurityCheck="TRUE" From 511d5995e84bd2df2f767638034df5c31a6c25ed Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 8 Feb 2013 14:02:51 +0100 Subject: [PATCH 13/74] (PS3/360) Compile in 16-tap sinc for PS3 and 360 --- Makefile.ps3 | 2 +- msvc/RetroArch-360/RetroArch-360.vcxproj | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile.ps3 b/Makefile.ps3 index 021d386036..770c8750a8 100644 --- a/Makefile.ps3 +++ b/Makefile.ps3 @@ -109,7 +109,7 @@ PPU_LDLIBS = $(FONT_LIBS) $(GL_LIBS) $(WHOLE_START) -lretro_ps3 $(WHOLE_END) -l PPU_RANLIB = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ranlib.exe -DEFINES += -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_RMENU -DHAVE_RMENU_GUI -DHAVE_THREAD -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_VID_CONTEXT -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_FILEBROWSER -DHAVE_FBO -DHAVE_RARCH_MAIN_WRAP -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RSOUND -DHAVE_ZLIB -DWANT_RZLIB -D__CELLOS_LV2__ -DHAVE_NETPLAY=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_OSKUTIL -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Dmain=rarch_main -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) +DEFINES += -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_RMENU -DHAVE_RMENU_GUI -DHAVE_THREAD -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_VID_CONTEXT -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_FILEBROWSER -DHAVE_FBO -DHAVE_RARCH_MAIN_WRAP -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RSOUND -DHAVE_ZLIB -DWANT_RZLIB -DHAVE_SINC -D__CELLOS_LV2__ -DHAVE_NETPLAY=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_OSKUTIL -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Dmain=rarch_main -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) ifeq ($(DEBUG), 1) PPU_OPTIMIZE_LV := -O0 -g diff --git a/msvc/RetroArch-360/RetroArch-360.vcxproj b/msvc/RetroArch-360/RetroArch-360.vcxproj index ee4b90be7b..76e2849286 100644 --- a/msvc/RetroArch-360/RetroArch-360.vcxproj +++ b/msvc/RetroArch-360/RetroArch-360.vcxproj @@ -113,7 +113,7 @@ true false MultiThreadedDebug - _DEBUG;_XBOX;HAVE_XINPUT2;PACKAGE_VERSION="0.9.8";%(PreprocessorDefinitions);HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;main=rarch_main;RARCH_CONSOLE;HAVE_RMENU;HAVE_FILEBROWSER;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_XAUDIO + _DEBUG;_XBOX;HAVE_XINPUT2;PACKAGE_VERSION="0.9.8";%(PreprocessorDefinitions);HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;main=rarch_main;RARCH_CONSOLE;HAVE_RMENU;HAVE_FILEBROWSER;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;HAVE_XAUDIO Callcap @@ -151,7 +151,7 @@ AnalyzeOnly false MultiThreadedDebug - _DEBUG;_XBOX;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8";HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;main=rarch_main;HAVE_FILEBROWSER;RARCH_CONSOLE;HAVE_RMENU;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB + _DEBUG;_XBOX;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8";HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;main=rarch_main;HAVE_FILEBROWSER;RARCH_CONSOLE;HAVE_RMENU;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC Callcap @@ -190,7 +190,7 @@ Size false MultiThreaded - NDEBUG;_XBOX;PROFILE;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8";HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE;HAVE_RMENU;main=rarch_main;HAVE_FILEBROWSER;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_XAUDIO + NDEBUG;_XBOX;PROFILE;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8";HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE;HAVE_RMENU;main=rarch_main;HAVE_FILEBROWSER;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;HAVE_XAUDIO Callcap @@ -234,7 +234,7 @@ Size false MultiThreaded - NDEBUG;_XBOX;PROFILE;FASTCAP;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8";HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;main=rarch_main;HAVE_FILEBROWSER;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_RMENU;HAVE_XAUDIO + NDEBUG;_XBOX;PROFILE;FASTCAP;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8";HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;main=rarch_main;HAVE_FILEBROWSER;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;HAVE_RMENU;HAVE_XAUDIO true @@ -275,7 +275,7 @@ false false MultiThreaded - NDEBUG;_XBOX;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS;HAVE_DEFAULT_RETROPAD_INPUT;main=rarch_main;RARCH_CONSOLE=1;HAVE_FILEBROWSER;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_RMENU;HAVE_XAUDIO + NDEBUG;_XBOX;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS;HAVE_DEFAULT_RETROPAD_INPUT;main=rarch_main;RARCH_CONSOLE=1;HAVE_FILEBROWSER;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;HAVE_RMENU;HAVE_XAUDIO true @@ -316,7 +316,7 @@ false false MultiThreaded - NDEBUG;_XBOX;LTCG;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS;HAVE_DEFAULT_RETROPAD_INPUT;RARCH_CONSOLE;HAVE_RMENU;main=rarch_main;HAVE_FILEBROWSER;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_XAUDIO + NDEBUG;_XBOX;LTCG;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS;HAVE_DEFAULT_RETROPAD_INPUT;RARCH_CONSOLE;HAVE_RMENU;main=rarch_main;HAVE_FILEBROWSER;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;HAVE_XAUDIO true From a38293caad15160aeae913d9c8ac212760b9d79a Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 8 Feb 2013 14:13:05 +0100 Subject: [PATCH 14/74] (PS3/360) Use 8-tap resampler instead of 16-tap for PS3/360 after rethinking it --- Makefile.ps3 | 2 +- msvc/RetroArch-360/RetroArch-360.vcxproj | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile.ps3 b/Makefile.ps3 index 770c8750a8..96559b6807 100644 --- a/Makefile.ps3 +++ b/Makefile.ps3 @@ -109,7 +109,7 @@ PPU_LDLIBS = $(FONT_LIBS) $(GL_LIBS) $(WHOLE_START) -lretro_ps3 $(WHOLE_END) -l PPU_RANLIB = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ranlib.exe -DEFINES += -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_RMENU -DHAVE_RMENU_GUI -DHAVE_THREAD -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_VID_CONTEXT -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_FILEBROWSER -DHAVE_FBO -DHAVE_RARCH_MAIN_WRAP -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RSOUND -DHAVE_ZLIB -DWANT_RZLIB -DHAVE_SINC -D__CELLOS_LV2__ -DHAVE_NETPLAY=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_OSKUTIL -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Dmain=rarch_main -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) +DEFINES += -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_RMENU -DHAVE_RMENU_GUI -DHAVE_THREAD -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_VID_CONTEXT -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_FILEBROWSER -DHAVE_FBO -DHAVE_RARCH_MAIN_WRAP -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RSOUND -DHAVE_ZLIB -DWANT_RZLIB -DHAVE_SINC -DSINC_LOWER_QUALITY -D__CELLOS_LV2__ -DHAVE_NETPLAY=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_OSKUTIL -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Dmain=rarch_main -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) ifeq ($(DEBUG), 1) PPU_OPTIMIZE_LV := -O0 -g diff --git a/msvc/RetroArch-360/RetroArch-360.vcxproj b/msvc/RetroArch-360/RetroArch-360.vcxproj index 76e2849286..b1f24e9510 100644 --- a/msvc/RetroArch-360/RetroArch-360.vcxproj +++ b/msvc/RetroArch-360/RetroArch-360.vcxproj @@ -113,7 +113,7 @@ true false MultiThreadedDebug - _DEBUG;_XBOX;HAVE_XINPUT2;PACKAGE_VERSION="0.9.8";%(PreprocessorDefinitions);HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;main=rarch_main;RARCH_CONSOLE;HAVE_RMENU;HAVE_FILEBROWSER;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;HAVE_XAUDIO + _DEBUG;_XBOX;HAVE_XINPUT2;PACKAGE_VERSION="0.9.8";%(PreprocessorDefinitions);HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;main=rarch_main;RARCH_CONSOLE;HAVE_RMENU;HAVE_FILEBROWSER;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_XAUDIO Callcap @@ -151,7 +151,7 @@ AnalyzeOnly false MultiThreadedDebug - _DEBUG;_XBOX;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8";HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;main=rarch_main;HAVE_FILEBROWSER;RARCH_CONSOLE;HAVE_RMENU;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC + _DEBUG;_XBOX;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8";HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;main=rarch_main;HAVE_FILEBROWSER;RARCH_CONSOLE;HAVE_RMENU;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY Callcap @@ -190,7 +190,7 @@ Size false MultiThreaded - NDEBUG;_XBOX;PROFILE;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8";HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE;HAVE_RMENU;main=rarch_main;HAVE_FILEBROWSER;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;HAVE_XAUDIO + NDEBUG;_XBOX;PROFILE;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8";HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE;HAVE_RMENU;main=rarch_main;HAVE_FILEBROWSER;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_XAUDIO Callcap @@ -234,7 +234,7 @@ Size false MultiThreaded - NDEBUG;_XBOX;PROFILE;FASTCAP;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8";HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;main=rarch_main;HAVE_FILEBROWSER;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;HAVE_RMENU;HAVE_XAUDIO + NDEBUG;_XBOX;PROFILE;FASTCAP;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8";HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;main=rarch_main;HAVE_FILEBROWSER;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_RMENU;HAVE_XAUDIO true @@ -275,7 +275,7 @@ false false MultiThreaded - NDEBUG;_XBOX;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS;HAVE_DEFAULT_RETROPAD_INPUT;main=rarch_main;RARCH_CONSOLE=1;HAVE_FILEBROWSER;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;HAVE_RMENU;HAVE_XAUDIO + NDEBUG;_XBOX;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS;HAVE_DEFAULT_RETROPAD_INPUT;main=rarch_main;RARCH_CONSOLE=1;HAVE_FILEBROWSER;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_RMENU;HAVE_XAUDIO true @@ -316,7 +316,7 @@ false false MultiThreaded - NDEBUG;_XBOX;LTCG;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS;HAVE_DEFAULT_RETROPAD_INPUT;RARCH_CONSOLE;HAVE_RMENU;main=rarch_main;HAVE_FILEBROWSER;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;HAVE_XAUDIO + NDEBUG;_XBOX;LTCG;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS;HAVE_DEFAULT_RETROPAD_INPUT;RARCH_CONSOLE;HAVE_RMENU;main=rarch_main;HAVE_FILEBROWSER;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_XAUDIO true From e19555d394ff3cefcafdd24350498d54a9bd1341 Mon Sep 17 00:00:00 2001 From: Themaister Date: Fri, 8 Feb 2013 14:27:51 +0100 Subject: [PATCH 15/74] Make number of sinc taps variable in NEON. --- audio/sinc.c | 10 ++++------ audio/sinc_neon.S | 42 ++++++++++++++++++++++-------------------- audio/utils_neon.S | 2 +- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/audio/sinc.c b/audio/sinc.c index 145a69ddc3..fb912a3371 100644 --- a/audio/sinc.c +++ b/audio/sinc.c @@ -224,15 +224,13 @@ static void process_sinc(rarch_sinc_resampler_t *resamp, float *out_buffer) } #elif defined(HAVE_NEON) -#if TAPS != 16 -#error "NEON sinc is for now only implemented with 16 taps. Cannot continue." -#endif - // Need to make this function pointer as Android doesn't have built-in targets // for NEON and plain ARMv7a. static void (*process_sinc_func)(rarch_sinc_resampler_t *resamp, float *out_buffer); -void process_sinc_neon_asm(float *out, const float *left, const float *right, const float *coeff); +// Assumes that taps >= 8, and that taps is a multiple of 8. +void process_sinc_neon_asm(float *out, const float *left, const float *right, const float *coeff, unsigned taps); + static void process_sinc_neon(rarch_sinc_resampler_t *resamp, float *out_buffer) { const float *buffer_l = resamp->buffer_l + resamp->ptr; @@ -241,7 +239,7 @@ static void process_sinc_neon(rarch_sinc_resampler_t *resamp, float *out_buffer) unsigned phase = resamp->time >> SUBPHASE_BITS; const float *phase_table = resamp->phase_table[phase]; - process_sinc_neon_asm(out_buffer, buffer_l, buffer_r, phase_table); + process_sinc_neon_asm(out_buffer, buffer_l, buffer_r, phase_table, TAPS); } #else // Plain ol' C99 #define process_sinc_func process_sinc_C diff --git a/audio/sinc_neon.S b/audio/sinc_neon.S index 0db4a4e3d0..d32ebf7a7b 100644 --- a/audio/sinc_neon.S +++ b/audio/sinc_neon.S @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2010-2012 - Hans-Kristian Arntzen + * Copyright (C) 2010-2013 - Hans-Kristian Arntzen * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- @@ -16,37 +16,39 @@ .arm .align 4 .global process_sinc_neon_asm -# void process_sinc_neon(float *out, const float *left, const float *right, const float *coeff) -# Hardcoded to 16 taps. +# void process_sinc_neon(float *out, const float *left, const float *right, const float *coeff, unsigned taps) +# Assumes taps is >= 8, and a multiple of 8. process_sinc_neon_asm: + + push {r4, lr} + vmov.f32 q0, #0.0 + vmov.f32 q8, #0.0 + + # Taps argument (r4) goes on stack in armeabi. + ldr r4, [sp, #8] + +1: # Left - vld1.f32 {q0-q1}, [r1]! - vld1.f32 {q2-q3}, [r1]! + vld1.f32 {q2-q3}, [r1]! # Right - vld1.f32 {q8-q9}, [r2]! vld1.f32 {q10-q11}, [r2]! # Coeff vld1.f32 {q12-q13}, [r3, :128]! - vld1.f32 {q14-q15}, [r3, :128]! - # Left - vmul.f32 q0, q0, q12 - vmul.f32 q1, q1, q13 - vmla.f32 q0, q2, q14 - vmla.f32 q1, q3, q15 + # Left / Right + vmla.f32 q0, q2, q12 + vmla.f32 q8, q10, q12 + vmla.f32 q0, q3, q13 + vmla.f32 q8, q11, q13 - # Right - vmul.f32 q8, q8, q12 - vmul.f32 q9, q9, q13 - vmla.f32 q8, q10, q14 - vmla.f32 q9, q11, q15 + subs r4, r4, #8 + bne 1b # Add everything together - vadd.f32 q0, q0, q1 - vadd.f32 q8, q8, q9 vadd.f32 d0, d0, d1 vadd.f32 d16, d16, d17 vpadd.f32 d0, d0, d16 vst1.f32 d0, [r0] - bx lr + pop {r4, pc} + diff --git a/audio/utils_neon.S b/audio/utils_neon.S index 4c45cd5235..4c7ef7c6f2 100644 --- a/audio/utils_neon.S +++ b/audio/utils_neon.S @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2010-2012 - Hans-Kristian Arntzen + * Copyright (C) 2010-2013 - Hans-Kristian Arntzen * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- From c5a96adae2fbc6d964e41c7bd85b6c09f538d20b Mon Sep 17 00:00:00 2001 From: Themaister Date: Fri, 8 Feb 2013 14:28:02 +0100 Subject: [PATCH 16/74] Fix warning in Java. --- android/phoenix/src/org/retroarch/browser/RetroArch.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/phoenix/src/org/retroarch/browser/RetroArch.java b/android/phoenix/src/org/retroarch/browser/RetroArch.java index 2587ad2171..3cbb0731c4 100644 --- a/android/phoenix/src/org/retroarch/browser/RetroArch.java +++ b/android/phoenix/src/org/retroarch/browser/RetroArch.java @@ -499,7 +499,7 @@ public class RetroArch extends Activity implements new AlertDialog.Builder(this).setMessage(current_ime).setNeutralButton("Close", null).show(); return true; case R.id.report_refreshrate: - String current_rate = "Screen Refresh Rate: " + new Double(report_refreshrate).toString(); + String current_rate = "Screen Refresh Rate: " + Double.valueOf(report_refreshrate).toString(); new AlertDialog.Builder(this).setMessage(current_rate).setNeutralButton("Close", null).show(); return true; From 53e766762eb2996c1486d0795ad5defff410142d Mon Sep 17 00:00:00 2001 From: Themaister Date: Fri, 8 Feb 2013 14:31:07 +0100 Subject: [PATCH 17/74] Use lower quality sinc on Android. --- android/native/jni/Android.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/native/jni/Android.mk b/android/native/jni/Android.mk index ea5d613c7f..8c2e066e3a 100644 --- a/android/native/jni/Android.mk +++ b/android/native/jni/Android.mk @@ -27,7 +27,7 @@ ifeq ($(HAVE_SINC),1) ifeq ($(HAVE_NEON),1) LOCAL_SRC_FILES += ../../../audio/sinc_neon.S.neon endif -LOCAL_CFLAGS += -DHAVE_SINC +LOCAL_CFLAGS += -DHAVE_SINC -DSINC_LOWER_QUALITY endif LOCAL_CFLAGS += -DANDROID_ARM_V7 From 094d07694463d2196d849cb575d0449438fee282 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 8 Feb 2013 14:39:32 +0100 Subject: [PATCH 18/74] (PS3/Xbox 1/Rmenu) Add resampler type option --- frontend/menu/rmenu.c | 49 +++++++++++++++++++++++++++++++++++++++++++ frontend/menu/rmenu.h | 1 + 2 files changed, 50 insertions(+) diff --git a/frontend/menu/rmenu.c b/frontend/menu/rmenu.c index be91002d69..aaa4b213ae 100644 --- a/frontend/menu/rmenu.c +++ b/frontend/menu/rmenu.c @@ -290,6 +290,21 @@ static void populate_setting_item(void *data, unsigned input) snprintf(current_item->setting_text, sizeof(current_item->setting_text), ""); snprintf(current_item->comment, sizeof(current_item->comment), "INFO - Set all [General Audio Settings] back to their 'DEFAULT' values."); break; + case SETTING_RESAMPLER_TYPE: + snprintf(current_item->text, sizeof(current_item->text), "Sound resampler"); +#ifdef HAVE_SINC + if (strstr(g_settings.audio.resampler, "sinc")) + { + snprintf(current_item->setting_text, sizeof(current_item->setting_text), "Sinc"); + snprintf(current_item->comment, sizeof(current_item->comment), "INFO - [Sinc resampler] - slower but moreaccurate sound."); + } + else +#endif + { + snprintf(current_item->setting_text, sizeof(current_item->setting_text), "Hermite"); + snprintf(current_item->comment, sizeof(current_item->comment), "INFO - [Hermite resampler] - faster but less accurate with high sampling rates (such as 44KHz/48KHz)."); + } + break; case SETTING_EMU_CURRENT_SAVE_STATE_SLOT: snprintf(current_item->text, sizeof(current_item->text), "Current save state slot"); snprintf(current_item->setting_text, sizeof(current_item->setting_text), "%d", g_extern.state_slot); @@ -1425,6 +1440,40 @@ static int set_setting_action(void *data, unsigned switchvalue, uint64_t input) return -1; } break; + case SETTING_RESAMPLER_TYPE: + if((input & (1ULL << RMENU_DEVICE_NAV_LEFT)) || (input & (1ULL << RMENU_DEVICE_NAV_RIGHT)) || (input & (1ULL << RMENU_DEVICE_NAV_B))) + { +#ifdef HAVE_SINC + if( strstr(g_settings.audio.resampler, "hermite")) + snprintf(g_settings.audio.resampler, sizeof(g_settings.audio.resampler), "sinc"); + else +#endif + snprintf(g_settings.audio.resampler, sizeof(g_settings.audio.resampler), "hermite"); + + if (g_extern.main_is_init) + { + if (rarch_resampler_realloc(&g_extern.audio_data.resampler_data, &g_extern.audio_data.resampler, + g_settings.audio.resampler)) + { + /* TODO */ + } + } + + } + if(input & (1ULL << RMENU_DEVICE_NAV_START)) + { + snprintf(g_settings.audio.resampler, sizeof(g_settings.audio.resampler), "hermite"); + + if (g_extern.main_is_init) + { + if (rarch_resampler_realloc(&g_extern.audio_data.resampler_data, &g_extern.audio_data.resampler, + g_settings.audio.resampler)) + { + /* TODO */ + } + } + } + break; case SETTING_EMU_AUDIO_MUTE: if((input & (1ULL << RMENU_DEVICE_NAV_LEFT)) || (input & (1ULL << RMENU_DEVICE_NAV_RIGHT)) || (input & (1ULL << RMENU_DEVICE_NAV_B))) rmenu_settings_set(S_AUDIO_MUTE); diff --git a/frontend/menu/rmenu.h b/frontend/menu/rmenu.h index ab51cc6dc5..7fa62d64fa 100644 --- a/frontend/menu/rmenu.h +++ b/frontend/menu/rmenu.h @@ -134,6 +134,7 @@ enum #ifdef HAVE_RSOUND SETTING_RSOUND_SERVER_IP_ADDRESS, #endif + SETTING_RESAMPLER_TYPE, SETTING_ENABLE_CUSTOM_BGM, SETTING_DEFAULT_AUDIO_ALL, SETTING_EMU_CURRENT_SAVE_STATE_SLOT, From 19f487b765a50c6488670050cd67546477cbb819 Mon Sep 17 00:00:00 2001 From: Themaister Date: Fri, 8 Feb 2013 14:50:14 +0100 Subject: [PATCH 19/74] Set default resampler explicitly. --- config.def.h | 7 +++++++ settings.c | 1 + 2 files changed, 8 insertions(+) diff --git a/config.def.h b/config.def.h index c3e7aa26d4..7a0cf21cac 100644 --- a/config.def.h +++ b/config.def.h @@ -314,6 +314,13 @@ static const int out_latency = 64; // Will sync audio. (recommended) static const bool audio_sync = true; +// Default resampler +#ifdef HAVE_SINC +static const char *audio_resampler = "sinc"; +#else +static const char *audio_resampler = "hermite"; +#endif + // Experimental rate control #if defined(GEKKO) || !defined(RARCH_CONSOLE) static const bool rate_control = true; diff --git a/settings.c b/settings.c index 07aac004e9..5aa522d3d2 100644 --- a/settings.c +++ b/settings.c @@ -201,6 +201,7 @@ void config_set_defaults(void) g_settings.audio.rate_control = rate_control; g_settings.audio.rate_control_delta = rate_control_delta; g_settings.audio.volume = audio_volume; + strlcpy(g_settings.audio.resampler, audio_resampler, sizeof(g_settings.audio.resampler)); g_settings.rewind_enable = rewind_enable; g_settings.rewind_buffer_size = rewind_buffer_size; From db876d59ac0fcda463286d936632922527e6fdae Mon Sep 17 00:00:00 2001 From: Themaister Date: Fri, 8 Feb 2013 15:37:40 +0100 Subject: [PATCH 20/74] Fix resampler tests. --- audio/test/Makefile | 14 ++++++++++---- audio/test/main.c | 9 +++++---- audio/test/snr.c | 10 ++++++---- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/audio/test/Makefile b/audio/test/Makefile index c8e9b5f9f7..55ea3498ea 100644 --- a/audio/test/Makefile +++ b/audio/test/Makefile @@ -5,18 +5,24 @@ LDFLAGS += -lm all: $(TESTS) -test-hermite: ../hermite.o ../utils.o main.o +test-hermite: ../hermite.o ../utils.o main.o resampler-hermite.o $(CC) -o $@ $^ $(LDFLAGS) -test-sinc: ../sinc.o ../utils.o main.o +test-sinc: ../sinc.o ../utils.o main.o ../hermite.o resampler-sinc.o $(CC) -o $@ $^ $(LDFLAGS) -test-snr-sinc: ../sinc.o ../utils.o snr.o +test-snr-sinc: ../sinc.o ../utils.o snr.o ../hermite.o resampler-sinc.o $(CC) -o $@ $^ $(LDFLAGS) -test-snr-hermite: ../hermite.o ../utils.o snr.o +test-snr-hermite: ../hermite.o ../utils.o snr.o resampler-hermite.o $(CC) -o $@ $^ $(LDFLAGS) +resampler-sinc.o: ../resampler.c + $(CC) -c -o $@ $< $(CFLAGS) -DHAVE_SINC + +resampler-hermite.o: ../resampler.c + $(CC) -c -o $@ $< $(CFLAGS) + %.o: %.c $(CC) -c -o $@ $< $(CFLAGS) diff --git a/audio/test/main.c b/audio/test/main.c index 04d2145d04..b51cdb4e04 100644 --- a/audio/test/main.c +++ b/audio/test/main.c @@ -45,8 +45,9 @@ int main(int argc, char *argv[]) return 1; } - rarch_resampler_t *resamp = resampler_new(); - if (!resamp) + const rarch_resampler_t *resampler = NULL; + void *re = NULL; + if (!rarch_resampler_realloc(&re, &resampler, NULL)) { fprintf(stderr, "Failed to allocate resampler ...\n"); return 1; @@ -66,7 +67,7 @@ int main(int argc, char *argv[]) .ratio = ratio, }; - resampler_process(resamp, &data); + rarch_resampler_process(resampler, re, &data); size_t output_samples = data.output_frames * 2; @@ -76,6 +77,6 @@ int main(int argc, char *argv[]) break; } - resampler_free(resamp); + rarch_resampler_freep(&resampler, &re); } diff --git a/audio/test/snr.c b/audio/test/snr.c index 0f65cb542c..ab55461528 100644 --- a/audio/test/snr.c +++ b/audio/test/snr.c @@ -270,8 +270,10 @@ int main(int argc, char *argv[]) assert(input); assert(output); - rarch_resampler_t *re = resampler_new(); - assert(re); + void *re = NULL; + const rarch_resampler_t *resampler = NULL; + if (!rarch_resampler_realloc(&re, &resampler, NULL)) + return 1; test_fft(); @@ -289,7 +291,7 @@ int main(int argc, char *argv[]) .ratio = ratio, }; - resampler_process(re, &data); + rarch_resampler_process(resampler, re, &data); unsigned out_samples = data.output_frames * 2; assert(out_samples >= fft_samples * 2); @@ -307,7 +309,7 @@ int main(int argc, char *argv[]) res.alias_freq[2] / (float)in_rate, res.alias_power[2]); } - resampler_free(re); + rarch_resampler_freep(&resampler, &re); free(input); free(output); free(butterfly_buf); From 4fdbd7deec04f312c7b9913f0116d8204b9f653d Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 8 Feb 2013 16:43:55 +0100 Subject: [PATCH 21/74] (RMenu) Some cleanups to RMenu resampler code --- frontend/menu/rmenu.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/frontend/menu/rmenu.c b/frontend/menu/rmenu.c index aaa4b213ae..284901c108 100644 --- a/frontend/menu/rmenu.c +++ b/frontend/menu/rmenu.c @@ -296,13 +296,13 @@ static void populate_setting_item(void *data, unsigned input) if (strstr(g_settings.audio.resampler, "sinc")) { snprintf(current_item->setting_text, sizeof(current_item->setting_text), "Sinc"); - snprintf(current_item->comment, sizeof(current_item->comment), "INFO - [Sinc resampler] - slower but moreaccurate sound."); + snprintf(current_item->comment, sizeof(current_item->comment), "INFO - [Sinc resampler] - slightly slower but better sound quality at high frequencies."); } else #endif { snprintf(current_item->setting_text, sizeof(current_item->setting_text), "Hermite"); - snprintf(current_item->comment, sizeof(current_item->comment), "INFO - [Hermite resampler] - faster but less accurate with high sampling rates (such as 44KHz/48KHz)."); + snprintf(current_item->comment, sizeof(current_item->comment), "INFO - [Hermite resampler] - faster but less accurate at high frequencies."); } break; case SETTING_EMU_CURRENT_SAVE_STATE_SLOT: @@ -1452,24 +1452,30 @@ static int set_setting_action(void *data, unsigned switchvalue, uint64_t input) if (g_extern.main_is_init) { - if (rarch_resampler_realloc(&g_extern.audio_data.resampler_data, &g_extern.audio_data.resampler, + if (!rarch_resampler_realloc(&g_extern.audio_data.resampler_data, &g_extern.audio_data.resampler, g_settings.audio.resampler)) { - /* TODO */ + RARCH_ERR("Failed to initialize resampler \"%s\".\n", g_settings.audio.resampler); + g_extern.audio_active = false; } } } if(input & (1ULL << RMENU_DEVICE_NAV_START)) { +#ifdef HAVE_SINC + snprintf(g_settings.audio.resampler, sizeof(g_settings.audio.resampler), "sinc"); +#else snprintf(g_settings.audio.resampler, sizeof(g_settings.audio.resampler), "hermite"); +#endif if (g_extern.main_is_init) { - if (rarch_resampler_realloc(&g_extern.audio_data.resampler_data, &g_extern.audio_data.resampler, + if (!rarch_resampler_realloc(&g_extern.audio_data.resampler_data, &g_extern.audio_data.resampler, g_settings.audio.resampler)) { - /* TODO */ + RARCH_ERR("Failed to initialize resampler \"%s\".\n", g_settings.audio.resampler); + g_extern.audio_active = false; } } } From 3db9f488b01175bf470a8fb6ffaa85df18b6a7d1 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 8 Feb 2013 18:36:47 +0100 Subject: [PATCH 22/74] (GX) Add resampler options to RGUI --- frontend/menu/rgui.c | 43 +++++++++++++++++++++++++++++++++++++++++++ frontend/menu/rgui.h | 1 + 2 files changed, 44 insertions(+) diff --git a/frontend/menu/rgui.c b/frontend/menu/rgui.c index 6a7aa43d0a..322c627de9 100644 --- a/frontend/menu/rgui.c +++ b/frontend/menu/rgui.c @@ -463,6 +463,14 @@ static void render_text(rgui_handle_t *rgui) case RGUI_SETTINGS_AUDIO_CONTROL_RATE: snprintf(type_str, sizeof(type_str), "%.3f", g_settings.audio.rate_control_delta); break; + case RGUI_SETTINGS_RESAMPLER_TYPE: +#ifdef HAVE_SINC + if (strstr(g_settings.audio.resampler, "sinc")) + snprintf(type_str, sizeof(type_str), "Sinc"); + else +#endif + snprintf(type_str, sizeof(type_str), "Hermite"); + break; case RGUI_SETTINGS_SRAM_DIR: snprintf(type_str, sizeof(type_str), (g_extern.lifecycle_mode_state & (1ULL << MODE_LOAD_GAME_SRAM_DIR_ENABLE)) ? "ON" : "OFF"); break; @@ -750,6 +758,40 @@ static int rgui_settings_toggle_setting(rgui_file_type_t setting, rgui_action_t else if (action == RGUI_ACTION_RIGHT) rmenu_settings_set(S_AUDIO_CONTROL_RATE_INCREMENT); break; + case RGUI_SETTINGS_RESAMPLER_TYPE: + { + bool changed = false; + if (action == RGUI_ACTION_START) + { +#ifdef HAVE_SINC + snprintf(g_settings.audio.resampler, sizeof(g_settings.audio.resampler), "sinc"); +#else + snprintf(g_settings.audio.resampler, sizeof(g_settings.audio.resampler), "hermite"); +#endif + changed = true; + } + else if (action == RGUI_ACTION_LEFT || action == RGUI_ACTION_RIGHT) + { +#ifdef HAVE_SINC + if( strstr(g_settings.audio.resampler, "hermite")) + snprintf(g_settings.audio.resampler, sizeof(g_settings.audio.resampler), "sinc"); + else +#endif + snprintf(g_settings.audio.resampler, sizeof(g_settings.audio.resampler), "hermite"); + changed = true; + } + + if (g_extern.main_is_init && changed) + { + if (!rarch_resampler_realloc(&g_extern.audio_data.resampler_data, &g_extern.audio_data.resampler, + g_settings.audio.resampler)) + { + RARCH_ERR("Failed to initialize resampler \"%s\".\n", g_settings.audio.resampler); + g_extern.audio_active = false; + } + } + } + break; case RGUI_SETTINGS_SRAM_DIR: if (action == RGUI_ACTION_START || action == RGUI_ACTION_LEFT) g_extern.lifecycle_mode_state &= ~(1ULL << MODE_LOAD_GAME_SRAM_DIR_ENABLE); @@ -879,6 +921,7 @@ static void rgui_settings_populate_entries(rgui_handle_t *rgui) RGUI_MENU_ITEM("Rotation", RGUI_SETTINGS_VIDEO_ROTATION); RGUI_MENU_ITEM("Mute Audio", RGUI_SETTINGS_AUDIO_MUTE); RGUI_MENU_ITEM("Audio Control Rate", RGUI_SETTINGS_AUDIO_CONTROL_RATE); + RGUI_MENU_ITEM("Audio Resampler", RGUI_SETTINGS_RESAMPLER_TYPE); RGUI_MENU_ITEM("SRAM Saves in \"sram\" Dir", RGUI_SETTINGS_SRAM_DIR); RGUI_MENU_ITEM("State Saves in \"state\" Dir", RGUI_SETTINGS_STATE_DIR); RGUI_MENU_ITEM("Core", RGUI_SETTINGS_CORE); diff --git a/frontend/menu/rgui.h b/frontend/menu/rgui.h index 4fa0216b91..e6be443ad6 100644 --- a/frontend/menu/rgui.h +++ b/frontend/menu/rgui.h @@ -54,6 +54,7 @@ typedef enum RGUI_SETTINGS_VIDEO_ROTATION, RGUI_SETTINGS_AUDIO_MUTE, RGUI_SETTINGS_AUDIO_CONTROL_RATE, + RGUI_SETTINGS_RESAMPLER_TYPE, RGUI_SETTINGS_ZIP_EXTRACT, RGUI_SETTINGS_SRAM_DIR, RGUI_SETTINGS_STATE_DIR, From 6cfc469f01c3342431f39bb90fbd151a322ff392 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 8 Feb 2013 19:03:37 +0100 Subject: [PATCH 23/74] (RMenu XUI) Add 360 code for resampler option --- frontend/menu/rmenu_xui.cpp | 55 +++++++++++++++++++++++++++++++++ frontend/menu/rmenu_xui.h | 1 + media/360/hd/rarch_settings.xui | 1 + media/360/sd/rarch_settings.xui | 1 + 4 files changed, 58 insertions(+) diff --git a/frontend/menu/rmenu_xui.cpp b/frontend/menu/rmenu_xui.cpp index a0d3dda60a..b15f1a85e4 100644 --- a/frontend/menu/rmenu_xui.cpp +++ b/frontend/menu/rmenu_xui.cpp @@ -396,6 +396,7 @@ HRESULT CRetroArchSettings::OnInit(XUIMessageInit * pInitData, BOOL& bHandled) m_settingslist.SetText(SETTING_EMU_SHOW_INFO_MSG, (g_extern.lifecycle_mode_state & (1ULL << MODE_INFO_DRAW)) ? L"Info messages: ON" : L"Info messages: OFF"); m_settingslist.SetText(SETTING_EMU_SHOW_DEBUG_INFO_MSG, (g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW)) ? L"Debug Info messages: ON" : L"Debug Info messages: OFF"); m_settingslist.SetText(SETTING_GAMMA_CORRECTION_ENABLED, g_extern.console.screen.gamma_correction ? L"Gamma correction: ON" : L"Gamma correction: OFF"); + m_settingslist.SetText(SETTING_AUDIO_RESAMPLER_TYPE, strstr(g_settings.audio.resampler, "sinc") ? L"Audio Resampler: Sinc" : L"Audio Resampler: Hermite"); m_settingslist.SetText(SETTING_HW_TEXTURE_FILTER, g_settings.video.smooth ? L"Hardware filtering shader #1: Linear interpolation" : L"Hardware filtering shader #1: Point filtering"); m_settingslist.SetText(SETTING_HW_TEXTURE_FILTER_2, g_settings.video.second_pass_smooth ? L"Hardware filtering shader #2: Linear interpolation" : L"Hardware filtering shader #2: Point filtering"); m_settingslist.SetText(SETTING_SCALE_ENABLED, g_settings.video.render_to_texture ? L"Custom Scaling/Dual Shaders: ON" : L"Custom Scaling/Dual Shaders: OFF"); @@ -467,6 +468,24 @@ HRESULT CRetroArchSettings::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled g_extern.lifecycle_mode_state |= (1ULL << MODE_FPS_DRAW); m_settingslist.SetText(SETTING_EMU_SHOW_DEBUG_INFO_MSG, (g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW)) ? L"Debug Info messages: ON" : L"Debug Info messages: OFF"); break; + case SETTING_AUDIO_RESAMPLER_TYPE: +#ifdef HAVE_SINC + if( strstr(g_settings.audio.resampler, "hermite")) + snprintf(g_settings.audio.resampler, sizeof(g_settings.audio.resampler), "sinc"); + else +#endif + snprintf(g_settings.audio.resampler, sizeof(g_settings.audio.resampler), "hermite"); + + if (g_extern.main_is_init) + { + if (!rarch_resampler_realloc(&g_extern.audio_data.resampler_data, &g_extern.audio_data.resampler, + g_settings.audio.resampler)) + { + RARCH_ERR("Failed to initialize resampler \"%s\".\n", g_settings.audio.resampler); + g_extern.audio_active = false; + } + } + break; case SETTING_GAMMA_CORRECTION_ENABLED: g_extern.console.screen.gamma_correction = g_extern.console.screen.gamma_correction ? 0 : 1; driver.video->restart(); @@ -577,6 +596,24 @@ HRESULT CRetroArchSettings::OnControlNavigate(XUIMessageControlNavigate *pContro g_extern.lifecycle_mode_state |= (1ULL << MODE_FPS_DRAW); m_settingslist.SetText(SETTING_EMU_SHOW_DEBUG_INFO_MSG, (g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW)) ? L"Debug Info messages: ON" : L"Debug Info messages: OFF"); break; + case SETTING_AUDIO_RESAMPLER_TYPE: +#ifdef HAVE_SINC + if( strstr(g_settings.audio.resampler, "hermite")) + snprintf(g_settings.audio.resampler, sizeof(g_settings.audio.resampler), "sinc"); + else +#endif + snprintf(g_settings.audio.resampler, sizeof(g_settings.audio.resampler), "hermite"); + + if (g_extern.main_is_init) + { + if (!rarch_resampler_realloc(&g_extern.audio_data.resampler_data, &g_extern.audio_data.resampler, + g_settings.audio.resampler)) + { + RARCH_ERR("Failed to initialize resampler \"%s\".\n", g_settings.audio.resampler); + g_extern.audio_active = false; + } + } + break; case SETTING_GAMMA_CORRECTION_ENABLED: g_extern.console.screen.gamma_correction = g_extern.console.screen.gamma_correction ? 0 : 1; driver.video->restart(); @@ -631,6 +668,24 @@ HRESULT CRetroArchSettings::OnControlNavigate(XUIMessageControlNavigate *pContro g_extern.lifecycle_mode_state |= (1ULL << MODE_FPS_DRAW); m_settingslist.SetText(SETTING_EMU_SHOW_DEBUG_INFO_MSG, (g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW)) ? L"Debug Info messages: ON" : L"Debug Info messages: OFF"); break; + case SETTING_AUDIO_RESAMPLER_TYPE: +#ifdef HAVE_SINC + if( strstr(g_settings.audio.resampler, "hermite")) + snprintf(g_settings.audio.resampler, sizeof(g_settings.audio.resampler), "sinc"); + else +#endif + snprintf(g_settings.audio.resampler, sizeof(g_settings.audio.resampler), "hermite"); + + if (g_extern.main_is_init) + { + if (!rarch_resampler_realloc(&g_extern.audio_data.resampler_data, &g_extern.audio_data.resampler, + g_settings.audio.resampler)) + { + RARCH_ERR("Failed to initialize resampler \"%s\".\n", g_settings.audio.resampler); + g_extern.audio_active = false; + } + } + break; case SETTING_GAMMA_CORRECTION_ENABLED: g_extern.console.screen.gamma_correction = g_extern.console.screen.gamma_correction ? 0 : 1; driver.video->restart(); diff --git a/frontend/menu/rmenu_xui.h b/frontend/menu/rmenu_xui.h index d5215646fa..edcdbf1516 100644 --- a/frontend/menu/rmenu_xui.h +++ b/frontend/menu/rmenu_xui.h @@ -26,6 +26,7 @@ enum SETTING_EMU_REWIND_GRANULARITY, SETTING_EMU_SHOW_INFO_MSG, SETTING_EMU_SHOW_DEBUG_INFO_MSG, + SETTING_AUDIO_RESAMPLER_TYPE, SETTING_GAMMA_CORRECTION_ENABLED, SETTING_SHADER, SETTING_SHADER_2, diff --git a/media/360/hd/rarch_settings.xui b/media/360/hd/rarch_settings.xui index 22ef8bee6e..b2468419c0 100644 --- a/media/360/hd/rarch_settings.xui +++ b/media/360/hd/rarch_settings.xui @@ -34,6 +34,7 @@ Rewind granularity: Info messages: Debug info messages: +Audio Resampler: Gamma Correction: Shader #1: Shader #2: diff --git a/media/360/sd/rarch_settings.xui b/media/360/sd/rarch_settings.xui index 32dff11fcf..a43371eec9 100644 --- a/media/360/sd/rarch_settings.xui +++ b/media/360/sd/rarch_settings.xui @@ -34,6 +34,7 @@ Rewind granularity: Info messages: Debug info messages: +Audio Resampler: Gamma Correction: Shader #1: Shader #2: From 2ed42b848dfc6b191815ef5426c620f70bea1e2a Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 9 Feb 2013 08:30:25 +0100 Subject: [PATCH 24/74] (GX) Set GX to 4:3 aspect ratio by default when there is no libretro.cfg --- settings.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/settings.c b/settings.c index 5aa522d3d2..ac89ca2365 100644 --- a/settings.c +++ b/settings.c @@ -276,6 +276,8 @@ void config_set_defaults(void) #if defined(__CELLOS_LV2) || defined(_XBOX360) g_settings.video.aspect_ratio_idx = ASPECT_RATIO_16_9; +#elif defined(GEKKO) || defined(_XBOX1) + g_settings.video.aspect_ratio_idx = ASPECT_RATIO_4_3; #else g_settings.video.aspect_ratio_idx = 0; #endif From 604d27f4dbe7ebe303f25957d5b46ec6a92adc2f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 9 Feb 2013 09:24:35 +0100 Subject: [PATCH 25/74] (360) Updates 'Resampler' button now --- frontend/menu/rmenu_xui.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/menu/rmenu_xui.cpp b/frontend/menu/rmenu_xui.cpp index b15f1a85e4..15ad810c5a 100644 --- a/frontend/menu/rmenu_xui.cpp +++ b/frontend/menu/rmenu_xui.cpp @@ -475,6 +475,7 @@ HRESULT CRetroArchSettings::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled else #endif snprintf(g_settings.audio.resampler, sizeof(g_settings.audio.resampler), "hermite"); + m_settingslist.SetText(SETTING_AUDIO_RESAMPLER_TYPE, strstr(g_settings.audio.resampler, "sinc") ? L"Audio Resampler: Sinc" : L"Audio Resampler: Hermite"); if (g_extern.main_is_init) { @@ -603,6 +604,7 @@ HRESULT CRetroArchSettings::OnControlNavigate(XUIMessageControlNavigate *pContro else #endif snprintf(g_settings.audio.resampler, sizeof(g_settings.audio.resampler), "hermite"); + m_settingslist.SetText(SETTING_AUDIO_RESAMPLER_TYPE, strstr(g_settings.audio.resampler, "sinc") ? L"Audio Resampler: Sinc" : L"Audio Resampler: Hermite"); if (g_extern.main_is_init) { @@ -675,6 +677,7 @@ HRESULT CRetroArchSettings::OnControlNavigate(XUIMessageControlNavigate *pContro else #endif snprintf(g_settings.audio.resampler, sizeof(g_settings.audio.resampler), "hermite"); + m_settingslist.SetText(SETTING_AUDIO_RESAMPLER_TYPE, strstr(g_settings.audio.resampler, "sinc") ? L"Audio Resampler: Sinc" : L"Audio Resampler: Hermite"); if (g_extern.main_is_init) { From 4e1387ce255b22fb57b15526a84ce6d7cfac6f33 Mon Sep 17 00:00:00 2001 From: Themaister Date: Sat, 9 Feb 2013 10:36:39 +0100 Subject: [PATCH 26/74] Fix Win32 MSVC 2010 build. --- dynamic.h | 8 +++ general.h | 8 +++ gfx/rpng/rpng.h | 8 +++ hash.h | 1 + msvc/msvc-2010/RetroArch-msvc2010.vcxproj | 59 ++++++++----------- .../RetroArch-msvc2010.vcxproj.filters | 51 ++++++++++------ retroarch.c | 1 + 7 files changed, 85 insertions(+), 51 deletions(-) diff --git a/dynamic.h b/dynamic.h index 8f46521230..b306a2a532 100644 --- a/dynamic.h +++ b/dynamic.h @@ -29,6 +29,10 @@ #undef NEED_DYNAMIC #endif +#ifdef __cplusplus +extern "C" { +#endif + void init_libretro_sym(void); void uninit_libretro_sym(void); @@ -78,5 +82,9 @@ extern unsigned (*pretro_get_region)(void); extern void *(*pretro_get_memory_data)(unsigned); extern size_t (*pretro_get_memory_size)(unsigned); +#ifdef __cplusplus +} +#endif + #endif diff --git a/general.h b/general.h index cbc2314360..a5c2321206 100644 --- a/general.h +++ b/general.h @@ -95,6 +95,10 @@ #include "audio/resampler.h" +#ifdef __cplusplus +extern "C" { +#endif + #define MAX_PLAYERS 8 enum dpad_emu_enums @@ -652,6 +656,10 @@ extern struct settings g_settings; extern struct global g_extern; ///////// +#ifdef __cplusplus +} +#endif + #include "retroarch_logger.h" #ifndef max diff --git a/gfx/rpng/rpng.h b/gfx/rpng/rpng.h index 32de0581dc..d2adb73b34 100644 --- a/gfx/rpng/rpng.h +++ b/gfx/rpng/rpng.h @@ -23,6 +23,10 @@ #include "../../config.h" #endif +#ifdef __cplusplus +extern "C" { +#endif + bool rpng_load_image_argb(const char *path, uint32_t **data, unsigned *width, unsigned *height); #ifdef HAVE_ZLIB_DEFLATE @@ -32,5 +36,9 @@ bool rpng_save_image_bgr24(const char *path, const uint8_t *data, unsigned width, unsigned height, unsigned pitch); #endif +#ifdef __cplusplus +} +#endif + #endif diff --git a/hash.h b/hash.h index 8d5266564e..3fd6abb023 100644 --- a/hash.h +++ b/hash.h @@ -19,6 +19,7 @@ #include #include +#include "msvc/msvc_compat.h" #ifdef HAVE_CONFIG_H #include "config.h" #endif diff --git a/msvc/msvc-2010/RetroArch-msvc2010.vcxproj b/msvc/msvc-2010/RetroArch-msvc2010.vcxproj index 588feb40eb..af30192db0 100644 --- a/msvc/msvc-2010/RetroArch-msvc2010.vcxproj +++ b/msvc/msvc-2010/RetroArch-msvc2010.vcxproj @@ -64,23 +64,23 @@ true - $(DXSDK_DIR)Include;$(IncludePath) - $(DXSDK_DIR)Lib\x86;$(LibraryPath) + $(DXSDK_DIR)Include;$(CG_INC_PATH);$(IncludePath) + $(DXSDK_DIR)Lib\x86;$(CG_LIB_PATH);$(LibraryPath) true - $(DXSDK_DIR)Include;$(IncludePath) - $(DXSDK_DIR)Lib\x64;$(LibraryPath) + $(DXSDK_DIR)Include;$(CG_INC_PATH);$(IncludePath) + $(DXSDK_DIR)Lib\x64;$(CG_LIB64_PATH);$(LibraryPath) false - $(DXSDK_DIR)Include;$(IncludePath) - $(DXSDK_DIR)Lib\x86;$(LibraryPath) + $(DXSDK_DIR)Include;$(CG_INC_PATH);$(IncludePath) + $(DXSDK_DIR)Lib\x86;$(CG_LIB_PATH);$(LibraryPath) false - $(DXSDK_DIR)Include;$(IncludePath) - $(DXSDK_DIR)Lib\x64;$(LibraryPath) + $(DXSDK_DIR)Include;$(CG_INC_PATH);$(IncludePath) + $(DXSDK_DIR)Lib\x64;$(CG_LIB64_PATH);$(LibraryPath) @@ -88,10 +88,11 @@ Level3 Disabled - WIN32;HAVE_WIN32_D3D9;HAVE_CG;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_DINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS;CPU_X86 + WIN32;HAVE_WIN32_D3D9;HAVE_CG;HAVE_GLSL;HAVE_ZLIB;WANT_RZLIB;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_DINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;HAVE_SINC;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS;CPU_X86 $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\;$(CG_INC_PATH);%(AdditionalIncludeDirectories) MultiThreadedDebug CompileAsCpp + Fast Console @@ -106,10 +107,11 @@ Level3 Disabled - WIN32;HAVE_WIN32_D3D9;HAVE_CG;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_DINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS + WIN32;HAVE_WIN32_D3D9;HAVE_CG;HAVE_GLSL;HAVE_ZLIB;WANT_RZLIB;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_DINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;HAVE_SINC;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\;$(CG_INC_PATH);%(AdditionalIncludeDirectories) MultiThreadedDebug CompileAsCpp + Fast Console @@ -126,10 +128,11 @@ MaxSpeed true true - WIN32;HAVE_WIN32_D3D9;HAVE_CG;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_DINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS;CPU_X86 + WIN32;HAVE_WIN32_D3D9;HAVE_CG;HAVE_GLSL;HAVE_ZLIB;WANT_RZLIB;HAVE_SINC;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_DINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS;CPU_X86 $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\;$(CG_INC_PATH);%(AdditionalIncludeDirectories) MultiThreaded CompileAsCpp + Fast Console @@ -148,10 +151,11 @@ MaxSpeed true true - WIN32;HAVE_WIN32_D3D9;HAVE_CG;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_DINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS + WIN32;HAVE_WIN32_D3D9;HAVE_CG;HAVE_GLSL;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_DINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;HAVE_SINC;HAVE_ZLIB;WANT_RZLIB;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\;$(CG_INC_PATH);%(AdditionalIncludeDirectories) MultiThreaded CompileAsCpp + Fast Console @@ -165,30 +169,29 @@ - - - - $(IntDir)\nullaudio.obj - $(IntDir)\nullaudio.obj - $(IntDir)\nullaudio.obj - $(IntDir)\nullaudio.obj - + + - - + + + + + + + @@ -209,8 +212,6 @@ - - @@ -223,8 +224,6 @@ - - @@ -241,12 +240,6 @@ - - $(IntDir)\nullinput.obj - $(IntDir)\nullinput.obj - $(IntDir)\nullinput.obj - $(IntDir)\nullinput.obj - @@ -275,4 +268,4 @@ - + \ No newline at end of file diff --git a/msvc/msvc-2010/RetroArch-msvc2010.vcxproj.filters b/msvc/msvc-2010/RetroArch-msvc2010.vcxproj.filters index a0ba3f1026..e35b2ee99b 100644 --- a/msvc/msvc-2010/RetroArch-msvc2010.vcxproj.filters +++ b/msvc/msvc-2010/RetroArch-msvc2010.vcxproj.filters @@ -43,6 +43,12 @@ {ae4f70af-fc87-4c8d-84a5-b2c4cd57e722} + + {a1975595-d469-4d96-81bf-d6a4f0be32f5} + + + {a1302353-aa00-4f85-a62f-3c40160a5fa3} + @@ -102,12 +108,6 @@ Source Files\audio - - Source Files\audio - - - Source Files\audio - Source Files\audio @@ -117,9 +117,6 @@ Source Files\gfx\context - - Source Files\gfx - Source Files\gfx @@ -132,9 +129,6 @@ Source Files\gfx - - Source Files\gfx - Source Files\gfx @@ -144,9 +138,6 @@ Source Files\input - - Source Files\input - Source Files\conf @@ -171,9 +162,6 @@ Source Files\gfx\math - - Source Files\audio - Source Files\gfx\d3d9 @@ -198,6 +186,33 @@ Source Files\gfx\fonts + + Source Files\audio + + + Source Files\compat + + + Source Files\audio + + + Source Files\audio + + + Source Files + + + Source Files\gfx + + + Source Files\deps + + + Source Files + + + Source Files\gfx\rpng + diff --git a/retroarch.c b/retroarch.c index 34fc0aa6c8..01e52328d5 100644 --- a/retroarch.c +++ b/retroarch.c @@ -33,6 +33,7 @@ #include "screenshot.h" #include "cheats.h" #include "compat/getopt_rarch.h" +#include "compat/posix_string.h" #if defined(_WIN32) && !defined(_XBOX) #define WIN32_LEAN_AND_MEAN From 6a6ad5d606b796f11fc40bafc8d99036bcae268f Mon Sep 17 00:00:00 2001 From: Themaister Date: Sat, 9 Feb 2013 11:01:11 +0100 Subject: [PATCH 27/74] Add SSE build to MSVC 2010. --- gfx/scaler/scaler_int.c | 3 +++ msvc/msvc-2010/RetroArch-msvc2010.vcxproj | 12 ++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/gfx/scaler/scaler_int.c b/gfx/scaler/scaler_int.c index ee807ed01e..334229eda2 100644 --- a/gfx/scaler/scaler_int.c +++ b/gfx/scaler/scaler_int.c @@ -21,6 +21,9 @@ #if defined(__SSE2__) #include +#ifdef _WIN32 +#include +#endif #endif static inline uint64_t build_argb64(uint16_t a, uint16_t r, uint16_t g, uint16_t b) diff --git a/msvc/msvc-2010/RetroArch-msvc2010.vcxproj b/msvc/msvc-2010/RetroArch-msvc2010.vcxproj index af30192db0..ece58c8913 100644 --- a/msvc/msvc-2010/RetroArch-msvc2010.vcxproj +++ b/msvc/msvc-2010/RetroArch-msvc2010.vcxproj @@ -88,11 +88,12 @@ Level3 Disabled - WIN32;HAVE_WIN32_D3D9;HAVE_CG;HAVE_GLSL;HAVE_ZLIB;WANT_RZLIB;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_DINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;HAVE_SINC;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS;CPU_X86 + WIN32;HAVE_WIN32_D3D9;HAVE_CG;HAVE_GLSL;HAVE_ZLIB;WANT_RZLIB;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_DINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;HAVE_SINC;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__ $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\;$(CG_INC_PATH);%(AdditionalIncludeDirectories) MultiThreadedDebug CompileAsCpp Fast + StreamingSIMDExtensions Console @@ -107,11 +108,12 @@ Level3 Disabled - WIN32;HAVE_WIN32_D3D9;HAVE_CG;HAVE_GLSL;HAVE_ZLIB;WANT_RZLIB;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_DINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;HAVE_SINC;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS + WIN32;HAVE_WIN32_D3D9;HAVE_CG;HAVE_GLSL;HAVE_ZLIB;WANT_RZLIB;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_DINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;HAVE_SINC;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__ $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\;$(CG_INC_PATH);%(AdditionalIncludeDirectories) MultiThreadedDebug CompileAsCpp Fast + StreamingSIMDExtensions2 Console @@ -128,11 +130,12 @@ MaxSpeed true true - WIN32;HAVE_WIN32_D3D9;HAVE_CG;HAVE_GLSL;HAVE_ZLIB;WANT_RZLIB;HAVE_SINC;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_DINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS;CPU_X86 + WIN32;HAVE_WIN32_D3D9;HAVE_CG;HAVE_GLSL;HAVE_ZLIB;WANT_RZLIB;HAVE_SINC;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_DINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__ $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\;$(CG_INC_PATH);%(AdditionalIncludeDirectories) MultiThreaded CompileAsCpp Fast + StreamingSIMDExtensions Console @@ -151,11 +154,12 @@ MaxSpeed true true - WIN32;HAVE_WIN32_D3D9;HAVE_CG;HAVE_GLSL;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_DINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;HAVE_SINC;HAVE_ZLIB;WANT_RZLIB;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS + WIN32;HAVE_WIN32_D3D9;HAVE_CG;HAVE_GLSL;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_DINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;HAVE_SINC;HAVE_ZLIB;WANT_RZLIB;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__ $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\;$(CG_INC_PATH);%(AdditionalIncludeDirectories) MultiThreaded CompileAsCpp Fast + StreamingSIMDExtensions2 Console From fa582bf15e47d68e8dfce9e669260bf2945b441c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 9 Feb 2013 11:44:32 +0100 Subject: [PATCH 28/74] (Android) Add ICade profile option --- android/native/jni/input_autodetect.c | 66 +++++++++++-------- android/native/jni/input_autodetect.h | 4 ++ android/phoenix/res/values/array.xml | 10 ++- android/phoenix/res/xml/prefs.xml | 24 +++++++ .../src/org/retroarch/browser/RetroArch.java | 4 ++ general.h | 2 + settings.c | 15 ++++- 7 files changed, 95 insertions(+), 30 deletions(-) diff --git a/android/native/jni/input_autodetect.c b/android/native/jni/input_autodetect.c index 3e3b1715eb..3ac1adf133 100644 --- a/android/native/jni/input_autodetect.c +++ b/android/native/jni/input_autodetect.c @@ -601,36 +601,46 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned } else if (strstr(name_buf, "Broadcom Bluetooth HID")) { - /* TODO: unsure about Select button here */ - /* TODO: hookup right stick - * RStick Up: 37 - * RStick Down: 39 - * RStick Left:38 - * RStick Right: 40 */ + if ((g_settings.input.icade_count +1) < 4) + { + g_settings.input.icade_count++; - /* Red Samurai */ - keycode_lut[AKEYCODE_W] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); - keycode_lut[AKEYCODE_S] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); - keycode_lut[AKEYCODE_A] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); - keycode_lut[AKEYCODE_D]|= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); - keycode_lut[AKEYCODE_DPAD_UP] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); - keycode_lut[AKEYCODE_DPAD_DOWN] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); - keycode_lut[AKEYCODE_DPAD_LEFT] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); - keycode_lut[AKEYCODE_DPAD_RIGHT]|= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); - keycode_lut[AKEYCODE_BACK] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); - keycode_lut[AKEYCODE_ENTER] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); - keycode_lut[AKEYCODE_9] |= ((RETRO_DEVICE_ID_JOYPAD_L3+1) << shift); - keycode_lut[AKEYCODE_0] |= ((RETRO_DEVICE_ID_JOYPAD_R3+1) << shift); - keycode_lut[AKEYCODE_5] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); - keycode_lut[AKEYCODE_6] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); - keycode_lut[AKEYCODE_7] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); - keycode_lut[AKEYCODE_8] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); + switch(g_settings.input.icade_profile[g_settings.input.icade_count]) + { + case ICADE_PROFILE_RED_SAMURAI: + /* TODO: unsure about Select button here */ + /* TODO: hookup right stick + * RStick Up: 37 + * RStick Down: 39 + * RStick Left:38 + * RStick Right: 40 */ - /* unsure if the person meant the SNES-mapping here or whether it's the pad */ - keycode_lut[AKEYCODE_1] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); - keycode_lut[AKEYCODE_2] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); - keycode_lut[AKEYCODE_3] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); - keycode_lut[AKEYCODE_4] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + /* Red Samurai */ + keycode_lut[AKEYCODE_W] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + keycode_lut[AKEYCODE_S] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + keycode_lut[AKEYCODE_A] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + keycode_lut[AKEYCODE_D]|= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); + keycode_lut[AKEYCODE_DPAD_UP] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + keycode_lut[AKEYCODE_DPAD_DOWN] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + keycode_lut[AKEYCODE_DPAD_LEFT] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + keycode_lut[AKEYCODE_DPAD_RIGHT]|= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); + keycode_lut[AKEYCODE_BACK] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + keycode_lut[AKEYCODE_ENTER] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + keycode_lut[AKEYCODE_9] |= ((RETRO_DEVICE_ID_JOYPAD_L3+1) << shift); + keycode_lut[AKEYCODE_0] |= ((RETRO_DEVICE_ID_JOYPAD_R3+1) << shift); + keycode_lut[AKEYCODE_5] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + keycode_lut[AKEYCODE_6] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); + keycode_lut[AKEYCODE_7] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + keycode_lut[AKEYCODE_8] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); + + /* unsure if the person meant the SNES-mapping here or whether it's the pad */ + keycode_lut[AKEYCODE_1] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + keycode_lut[AKEYCODE_2] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + keycode_lut[AKEYCODE_3] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + keycode_lut[AKEYCODE_4] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + break; + } + } } else if (strstr(name_buf, "USB Gamepad") || strstr(name_buf, "DragonRise")) { diff --git a/android/native/jni/input_autodetect.h b/android/native/jni/input_autodetect.h index 5c76415251..b13fc54cc8 100644 --- a/android/native/jni/input_autodetect.h +++ b/android/native/jni/input_autodetect.h @@ -21,6 +21,10 @@ #define AKEY_EVENT_NO_ACTION 255 +enum { + ICADE_PROFILE_RED_SAMURAI = 0, +} icade_profile_enums; + enum { AKEYCODE_META_FUNCTION_ON = 8, AKEYCODE_ESCAPE = 111, diff --git a/android/phoenix/res/values/array.xml b/android/phoenix/res/values/array.xml index 2a62fa352c..62e8ba9e71 100644 --- a/android/phoenix/res/values/array.xml +++ b/android/phoenix/res/values/array.xml @@ -19,6 +19,14 @@ 1.60000 1.14286 + + + Red Samurai + + + + 0 + 1.0x @@ -249,4 +257,4 @@ MUSIC CALCULATOR - \ No newline at end of file + diff --git a/android/phoenix/res/xml/prefs.xml b/android/phoenix/res/xml/prefs.xml index d2daac6eba..c3880164b3 100644 --- a/android/phoenix/res/xml/prefs.xml +++ b/android/phoenix/res/xml/prefs.xml @@ -168,6 +168,30 @@ android:summary="This will attempt to preconfigure various gamepads and/or IME apps that you connect." android:title="Enable" android:disableDependentsState="true" /> + + + + Date: Sat, 9 Feb 2013 15:03:43 +0100 Subject: [PATCH 29/74] (Android) Add Genius MaxFire G-08XU to autodetection list --- android/native/jni/input_autodetect.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/android/native/jni/input_autodetect.c b/android/native/jni/input_autodetect.c index 3ac1adf133..37c072314a 100644 --- a/android/native/jni/input_autodetect.c +++ b/android/native/jni/input_autodetect.c @@ -451,6 +451,18 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned keycode_lut[AKEYCODE_BUTTON_THUMBL] |= ((RETRO_DEVICE_ID_JOYPAD_L3+1) << shift); keycode_lut[AKEYCODE_BUTTON_THUMBR] |= ((RETRO_DEVICE_ID_JOYPAD_R3+1) << shift); } + else if (strstr(name_buf, "2-Axis , 8 -Button")) + { + /* Genius MaxFire G-08XU */ + keycode_lut[AKEYCODE_BUTTON_B] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + keycode_lut[AKEYCODE_BUTTON_A] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + keycode_lut[AKEYCODE_BUTTON_X] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + keycode_lut[AKEYCODE_BUTTON_C] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + keycode_lut[AKEYCODE_BUTTON_Y] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + keycode_lut[AKEYCODE_BUTTON_Z] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + keycode_lut[AKEYCODE_BUTTON_L1] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + keycode_lut[AKEYCODE_BUTTON_R1] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + } else if (strstr(name_buf, "USB,2-axis 8-button gamepad") || strstr(name_buf, "BUFFALO BGC-FC801")) { From d3cceb2bd812b0a4fc0b23ed112d1fd49446882f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 9 Feb 2013 16:09:01 +0100 Subject: [PATCH 30/74] (GX) Revert 'Pass GX_NEAR_MIP_NEAR to GX_initTexObjLOD just to be safe' - would force nearest filter --- gx/gx_video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gx/gx_video.c b/gx/gx_video.c index 79470d5749..eebd2bd5c9 100644 --- a/gx/gx_video.c +++ b/gx/gx_video.c @@ -316,9 +316,9 @@ static void init_texture(unsigned width, unsigned height) unsigned g_filter = g_settings.video.smooth ? GX_LINEAR : GX_NEAR; GX_InitTexObj(&g_tex.obj, g_tex.data, width, height, (gx->rgb32) ? GX_TF_RGBA8 : (g_extern.lifecycle_mode_state & (1ULL << MODE_MENU_DRAW)) ? GX_TF_RGB5A3 : GX_TF_RGB565, GX_CLAMP, GX_CLAMP, GX_FALSE); - GX_InitTexObjLOD(&g_tex.obj, g_filter, GX_NEAR_MIP_NEAR, 0, 0, 0, GX_TRUE, GX_FALSE, GX_ANISO_1); + GX_InitTexObjLOD(&g_tex.obj, g_filter, g_filter, 0, 0, 0, GX_TRUE, GX_FALSE, GX_ANISO_1); GX_InitTexObj(&menu_tex.obj, menu_tex.data, RGUI_WIDTH, RGUI_HEIGHT, GX_TF_RGB5A3, GX_CLAMP, GX_CLAMP, GX_FALSE); - GX_InitTexObjLOD(&menu_tex.obj, g_filter, GX_NEAR_MIP_NEAR, 0, 0, 0, GX_TRUE, GX_FALSE, GX_ANISO_1); + GX_InitTexObjLOD(&menu_tex.obj, g_filter, g_filter, 0, 0, 0, GX_TRUE, GX_FALSE, GX_ANISO_1); GX_InvalidateTexAll(); } From 0ded65d17739e63202652b90bd2cd3577e708458 Mon Sep 17 00:00:00 2001 From: ToadKing Date: Sat, 9 Feb 2013 12:49:43 -0500 Subject: [PATCH 31/74] (GX) max_xfb_height not necessary --- gx/gx_video.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/gx/gx_video.c b/gx/gx_video.c index eebd2bd5c9..a1b9246cc1 100644 --- a/gx/gx_video.c +++ b/gx/gx_video.c @@ -116,29 +116,25 @@ void gx_set_video_mode(unsigned fbWidth, unsigned lines) bool progressive = VIDEO_HaveComponentCable(); unsigned tvmode = VIDEO_GetCurrentTvMode(); #endif - unsigned max_width, max_height, max_xfb_height; + unsigned max_width, max_height; switch (tvmode) { case VI_PAL: max_width = VI_MAX_WIDTH_PAL; max_height = VI_MAX_HEIGHT_PAL; - max_xfb_height = 574; break; case VI_MPAL: max_width = VI_MAX_WIDTH_MPAL; max_height = VI_MAX_HEIGHT_MPAL; - max_xfb_height = 574; break; case VI_EURGB60: max_width = VI_MAX_WIDTH_NTSC; max_height = VI_MAX_HEIGHT_NTSC; - max_xfb_height = 480; break; default: tvmode = VI_NTSC; max_width = VI_MAX_WIDTH_EURGB60; max_height = VI_MAX_HEIGHT_EURGB60; - max_xfb_height = 480; break; } @@ -170,10 +166,10 @@ void gx_set_video_mode(unsigned fbWidth, unsigned lines) gx_mode.fbWidth = fbWidth; gx_mode.efbHeight = min(lines, 480); - if (modetype == VI_NON_INTERLACE && lines > max_xfb_height / 2) - gx_mode.xfbHeight = max_xfb_height / 2; - else if (modetype != VI_NON_INTERLACE && lines > max_xfb_height) - gx_mode.xfbHeight = max_xfb_height; + if (modetype == VI_NON_INTERLACE && lines > max_height / 2) + gx_mode.xfbHeight = max_height / 2; + else if (modetype != VI_NON_INTERLACE && lines > max_height) + gx_mode.xfbHeight = max_height; else gx_mode.xfbHeight = lines; From 77f8b9a0c9fcef931f52627413e32dd97c54fa0a Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 9 Feb 2013 19:06:03 +0100 Subject: [PATCH 32/74] Bump up versions to 0.9.8.3 --- Makefile.ngc | 7 ++----- Makefile.ps3 | 2 +- Makefile.psl1ght | 6 +----- Makefile.psp1 | 2 +- Makefile.wii | 7 ++----- Makefile.xenon | 9 ++------- android/native/jni/Android.mk | 2 +- msvc/RetroArch-360/RetroArch-360.vcxproj | 12 ++++++------ msvc/RetroArch-Xbox1/RetroArch-Xbox1.vcproj | 10 +++++----- 9 files changed, 21 insertions(+), 36 deletions(-) diff --git a/Makefile.ngc b/Makefile.ngc index 79530bdf89..54936e616b 100644 --- a/Makefile.ngc +++ b/Makefile.ngc @@ -1,7 +1,4 @@ -### -## -# Makefile for RetroArch GameCube. -## +RARCH_VERSION = "0.9.8.3" DEBUG = 0 HAVE_LOGGER = 1 @@ -56,7 +53,7 @@ CFLAGS += -DHAVE_FILE_LOGGER CFLAGS += -Iconsole/logger endif -CFLAGS += -std=gnu99 -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_RMENU -DHAVE_RGUI -DHAVE_THREAD -DRARCH_CONSOLE -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RARCH_EXEC -DGEKKO -DHAVE_ZLIB -DWANT_RZLIB -DHAVE_RARCH_MAIN_WRAP -DHAVE_GRIFFIN=1 -DHAVE_SCREENSHOTS -DPACKAGE_VERSION=\"0.9.8.2\" -Dmain=rarch_main -Wno-char-subscripts +CFLAGS += -std=gnu99 -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_RMENU -DHAVE_RGUI -DHAVE_THREAD -DRARCH_CONSOLE -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RARCH_EXEC -DGEKKO -DHAVE_ZLIB -DWANT_RZLIB -DHAVE_RARCH_MAIN_WRAP -DHAVE_GRIFFIN=1 -DHAVE_SCREENSHOTS -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Dmain=rarch_main -Wno-char-subscripts ifeq ($(DEBUG), 1) CFLAGS += -O0 -g diff --git a/Makefile.ps3 b/Makefile.ps3 index 96559b6807..9abf5bd488 100644 --- a/Makefile.ps3 +++ b/Makefile.ps3 @@ -1,4 +1,4 @@ -RARCH_VERSION = "0.9.8.1" +RARCH_VERSION = "0.9.8.3" #which compiler to build with - GCC or SNC #set to GCC for debug builds for use with debugger diff --git a/Makefile.psl1ght b/Makefile.psl1ght index 5c37332b76..6f8845e8b5 100644 --- a/Makefile.psl1ght +++ b/Makefile.psl1ght @@ -1,8 +1,4 @@ -### -## -# Makefile for RetroArch PSL1GHT. -## -RARCH_VERSION = "0.9.8" +RARCH_VERSION = "0.9.8.3" DEBUG = 0 HAVE_LOGGER = 0 diff --git a/Makefile.psp1 b/Makefile.psp1 index 92b1ee21e4..73b4dcb133 100644 --- a/Makefile.psp1 +++ b/Makefile.psp1 @@ -1,4 +1,4 @@ -RARCH_VERSION = "0.9.8" +RARCH_VERSION = "0.9.8.3" HAVE_FILE_LOGGER = 1 diff --git a/Makefile.wii b/Makefile.wii index 892b098115..3e03db212d 100644 --- a/Makefile.wii +++ b/Makefile.wii @@ -1,7 +1,4 @@ -### -## -# Makefile for RetroArch Wii. -## +RARCH_VERSION = "0.9.8.3" DEBUG = 0 HAVE_LOGGER = 0 @@ -69,7 +66,7 @@ CFLAGS += -Iconsole/logger endif -CFLAGS += -std=gnu99 -DHAVE_SINC -DSINC_LOWER_QUALITY -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_RGUI -DHAVE_THREAD -DRARCH_CONSOLE -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RARCH_EXEC -DHAVE_RMENU -DGEKKO -DHAVE_ZLIB -DWANT_RZLIB -DHAVE_RARCH_MAIN_WRAP -DHAVE_GRIFFIN=1 -DHAVE_SCREENSHOTS -DPACKAGE_VERSION=\"0.9.8.2\" -Dmain=rarch_main -Wno-char-subscripts +CFLAGS += -std=gnu99 -DHAVE_SINC -DSINC_LOWER_QUALITY -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_RGUI -DHAVE_THREAD -DRARCH_CONSOLE -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RARCH_EXEC -DHAVE_RMENU -DGEKKO -DHAVE_ZLIB -DWANT_RZLIB -DHAVE_RARCH_MAIN_WRAP -DHAVE_GRIFFIN=1 -DHAVE_SCREENSHOTS -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Dmain=rarch_main -Wno-char-subscripts ifeq ($(DEBUG), 1) CFLAGS += -O0 -g -DDEBUG diff --git a/Makefile.xenon b/Makefile.xenon index 8c20c2273b..a23fb407df 100644 --- a/Makefile.xenon +++ b/Makefile.xenon @@ -1,9 +1,4 @@ -### -## -# Makefile for RetroArch libxenon. -## -### -## +RARCH_VERSION = "0.9.8.3" DEBUG = 0 @@ -21,7 +16,7 @@ INCDIRS = -I. -I$(DEVKITXENON)/usr/include OBJ = console/griffin/griffin.o LIBS = -lretro_xenon360 -lxenon -lm -lc -DEFINES = -std=gnu99 -DPACKAGE_VERSION=\"0.9.8\" -DRARCH_CONSOLE -DHAVE_THREAD -DHAVE_GETOPT_LONG=1 -DHAVE_GRIFFIN -Dmain=rarch_main +DEFINES = -std=gnu99 -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -DRARCH_CONSOLE -DHAVE_THREAD -DHAVE_GETOPT_LONG=1 -DHAVE_GRIFFIN -Dmain=rarch_main DEFINES += -maltivec -mhard-float -m32 -mpowerpc64 -mcpu=cell -mtune=cell -fno-pic -g -Wall -DXENON $(INCDIRS) -Wno-char-subscripts DEFINES += -u read -u _start -u exc_base diff --git a/android/native/jni/Android.mk b/android/native/jni/Android.mk index 8c2e066e3a..25b1a45b9e 100644 --- a/android/native/jni/Android.mk +++ b/android/native/jni/Android.mk @@ -1,4 +1,4 @@ -RARCH_VERSION = "0.9.8" +RARCH_VERSION = "0.9.8.3" LOCAL_PATH := $(call my-dir) PERF_TEST := 0 HAVE_NEON := 1 diff --git a/msvc/RetroArch-360/RetroArch-360.vcxproj b/msvc/RetroArch-360/RetroArch-360.vcxproj index b1f24e9510..d5c2f6b889 100644 --- a/msvc/RetroArch-360/RetroArch-360.vcxproj +++ b/msvc/RetroArch-360/RetroArch-360.vcxproj @@ -113,7 +113,7 @@ true false MultiThreadedDebug - _DEBUG;_XBOX;HAVE_XINPUT2;PACKAGE_VERSION="0.9.8";%(PreprocessorDefinitions);HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;main=rarch_main;RARCH_CONSOLE;HAVE_RMENU;HAVE_FILEBROWSER;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_XAUDIO + _DEBUG;_XBOX;HAVE_XINPUT2;PACKAGE_VERSION="0.9.8.3";%(PreprocessorDefinitions);HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;main=rarch_main;RARCH_CONSOLE;HAVE_RMENU;HAVE_FILEBROWSER;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_XAUDIO Callcap @@ -151,7 +151,7 @@ AnalyzeOnly false MultiThreadedDebug - _DEBUG;_XBOX;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8";HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;main=rarch_main;HAVE_FILEBROWSER;RARCH_CONSOLE;HAVE_RMENU;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY + _DEBUG;_XBOX;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8.3";HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;main=rarch_main;HAVE_FILEBROWSER;RARCH_CONSOLE;HAVE_RMENU;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY Callcap @@ -190,7 +190,7 @@ Size false MultiThreaded - NDEBUG;_XBOX;PROFILE;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8";HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE;HAVE_RMENU;main=rarch_main;HAVE_FILEBROWSER;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_XAUDIO + NDEBUG;_XBOX;PROFILE;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8.3";HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE;HAVE_RMENU;main=rarch_main;HAVE_FILEBROWSER;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_XAUDIO Callcap @@ -234,7 +234,7 @@ Size false MultiThreaded - NDEBUG;_XBOX;PROFILE;FASTCAP;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8";HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;main=rarch_main;HAVE_FILEBROWSER;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_RMENU;HAVE_XAUDIO + NDEBUG;_XBOX;PROFILE;FASTCAP;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8.3";HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;main=rarch_main;HAVE_FILEBROWSER;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_RMENU;HAVE_XAUDIO true @@ -275,7 +275,7 @@ false false MultiThreaded - NDEBUG;_XBOX;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS;HAVE_DEFAULT_RETROPAD_INPUT;main=rarch_main;RARCH_CONSOLE=1;HAVE_FILEBROWSER;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_RMENU;HAVE_XAUDIO + NDEBUG;_XBOX;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8.3";_CRT_SECURE_NO_WARNINGS;HAVE_DEFAULT_RETROPAD_INPUT;main=rarch_main;RARCH_CONSOLE=1;HAVE_FILEBROWSER;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_RMENU;HAVE_XAUDIO true @@ -316,7 +316,7 @@ false false MultiThreaded - NDEBUG;_XBOX;LTCG;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS;HAVE_DEFAULT_RETROPAD_INPUT;RARCH_CONSOLE;HAVE_RMENU;main=rarch_main;HAVE_FILEBROWSER;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_XAUDIO + NDEBUG;_XBOX;LTCG;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8.3";_CRT_SECURE_NO_WARNINGS;HAVE_DEFAULT_RETROPAD_INPUT;RARCH_CONSOLE;HAVE_RMENU;main=rarch_main;HAVE_FILEBROWSER;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_XAUDIO true diff --git a/msvc/RetroArch-Xbox1/RetroArch-Xbox1.vcproj b/msvc/RetroArch-Xbox1/RetroArch-Xbox1.vcproj index ef4b8938d6..c25481a4a2 100644 --- a/msvc/RetroArch-Xbox1/RetroArch-Xbox1.vcproj +++ b/msvc/RetroArch-Xbox1/RetroArch-Xbox1.vcproj @@ -22,7 +22,7 @@ Optimization="3" OptimizeForProcessor="2" AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71"" - PreprocessorDefinitions="_DEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.8\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY" + PreprocessorDefinitions="_DEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.8.3\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY" MinimalRebuild="TRUE" BasicRuntimeChecks="0" RuntimeLibrary="1" @@ -72,7 +72,7 @@ OmitFramePointers="TRUE" OptimizeForProcessor="2" AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71"" - PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.8\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY" + PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.8.3\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY" StringPooling="TRUE" RuntimeLibrary="0" BufferSecurityCheck="TRUE" @@ -127,7 +127,7 @@ OmitFramePointers="TRUE" OptimizeForProcessor="2" AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71"" - PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.8\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;FASTCAP;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY" + PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.8.3\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;FASTCAP;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY" StringPooling="TRUE" RuntimeLibrary="0" BufferSecurityCheck="TRUE" @@ -188,7 +188,7 @@ EnableFiberSafeOptimizations="TRUE" OptimizeForProcessor="2" AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71"" - PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.8\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;inline=_inline;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY" + PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.8.3\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;inline=_inline;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY" StringPooling="TRUE" RuntimeLibrary="0" BufferSecurityCheck="TRUE" @@ -241,7 +241,7 @@ OmitFramePointers="TRUE" OptimizeForProcessor="2" AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71"" - PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.8\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;LTCG;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY" + PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.8.3\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;LTCG;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY" StringPooling="TRUE" RuntimeLibrary="0" BufferSecurityCheck="TRUE" From 3cc95a3fdb1fa8958667b07958e1feb7164d0951 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 9 Feb 2013 21:32:11 +0100 Subject: [PATCH 33/74] (PS3) Bump up PKG version --- dist-scripts/ps3-cores-cex-355.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dist-scripts/ps3-cores-cex-355.sh b/dist-scripts/ps3-cores-cex-355.sh index cdd4b8de44..a05c72bf9a 100755 --- a/dist-scripts/ps3-cores-cex-355.sh +++ b/dist-scripts/ps3-cores-cex-355.sh @@ -1,4 +1,5 @@ #!/bin/sh +RARCH_VERSION=0.9.8.3 make -C ../ -f Makefile.ps3.salamander clean || exit 1 make -C ../ -f Makefile.ps3.rgl clean || exit 1 @@ -29,4 +30,4 @@ make -C ../ -f Makefile.shaders deploy-ps3 make_self_wc ../retroarch-salamander_ps3.elf ../ps3/pkg/USRDIR/EBOOT.BIN rm -rf ../retroarch-salamander_ps3.elf -python2 ../ps3/ps3py/pkg.py --contentid UP0001-SSNE10000_00-0000000000000001 ../ps3/pkg/ retroarch-ps3-cfw-0.9.8.1.pkg +python2 ../ps3/ps3py/pkg.py --contentid UP0001-SSNE10000_00-0000000000000001 ../ps3/pkg/ retroarch-ps3-cfw-$RARCH_VERSION.pkg From 0c460c524d6fe7cc2d9bab7a75c7518e08572c94 Mon Sep 17 00:00:00 2001 From: Themaister Date: Sat, 9 Feb 2013 23:26:24 +0100 Subject: [PATCH 34/74] Disregard first measurement for statistics. --- driver.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/driver.c b/driver.c index 0cfb87f968..4cb0159d84 100644 --- a/driver.c +++ b/driver.c @@ -449,23 +449,23 @@ void init_audio(void) static void compute_audio_buffer_statistics(void) { unsigned samples = min(g_extern.measure_data.buffer_free_samples_count, AUDIO_BUFFER_FREE_SAMPLES_COUNT); - if (samples < 2) + if (samples < 3) return; uint64_t accum = 0; - for (unsigned i = 0; i < samples; i++) + for (unsigned i = 1; i < samples; i++) accum += g_extern.measure_data.buffer_free_samples[i]; - int avg = accum / samples; + int avg = accum / (samples - 1); uint64_t accum_var = 0; - for (unsigned i = 0; i < samples; i++) + for (unsigned i = 1; i < samples; i++) { int diff = avg - g_extern.measure_data.buffer_free_samples[i]; accum_var += diff * diff; } - unsigned stddev = (unsigned)sqrt((double)accum_var / (samples - 1)); + unsigned stddev = (unsigned)sqrt((double)accum_var / (samples - 2)); float avg_filled = 1.0f - (float)avg / g_extern.audio_data.driver_buffer_size; float deviation = (float)stddev / g_extern.audio_data.driver_buffer_size; @@ -475,7 +475,7 @@ static void compute_audio_buffer_statistics(void) unsigned low_water_count = 0; unsigned high_water_count = 0; - for (unsigned i = 0; i < samples; i++) + for (unsigned i = 1; i < samples; i++) { if (g_extern.measure_data.buffer_free_samples[i] >= low_water_size) low_water_count++; @@ -486,8 +486,8 @@ static void compute_audio_buffer_statistics(void) RARCH_LOG("Average audio buffer saturation: %.2f %%, standard deviation (percentage points): %.2f %%.\n", avg_filled * 100.0, deviation * 100.0); RARCH_LOG("Amount of time spent close to underrun: %.2f %%. Close to blocking: %.2f %%.\n", - (100.0 * low_water_count) / samples, - (100.0 * high_water_count) / samples); + (100.0 * low_water_count) / (samples - 1), + (100.0 * high_water_count) / (samples - 1)); } static void compute_monitor_fps_statistics(void) @@ -495,23 +495,25 @@ static void compute_monitor_fps_statistics(void) unsigned samples = min(g_extern.measure_data.frame_time_samples_count, MEASURE_FRAME_TIME_SAMPLES_COUNT); - if (samples < 2) + if (samples < 3) return; // Measure statistics on frame time (microsecs), *not* FPS. rarch_time_t accum = 0; - for (unsigned i = 0; i < samples; i++) + for (unsigned i = 1; i < samples; i++) accum += g_extern.measure_data.frame_time_samples[i]; - rarch_time_t avg = accum / samples; + rarch_time_t avg = accum / (samples - 1); rarch_time_t accum_var = 0; - for (unsigned i = 0; i < samples; i++) + + // Drop first measurement. It is likely to be bad. + for (unsigned i = 1; i < samples; i++) { rarch_time_t diff = avg - g_extern.measure_data.frame_time_samples[i]; accum_var += diff * diff; } - double stddev = sqrt((double)accum_var / (samples - 1)); + double stddev = sqrt((double)accum_var / (samples - 2)); double avg_fps = 1000000.0 / avg; double max_stddev_fps = 1000000.0 / (avg - stddev); double stddev_fps = max_stddev_fps - avg_fps; From cb1c3b5943f296afbe0ad05f63ad869ec4110ff3 Mon Sep 17 00:00:00 2001 From: Themaister Date: Sun, 10 Feb 2013 00:02:18 +0100 Subject: [PATCH 35/74] Add very specific debug logging for FPS measurements. --- driver.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/driver.c b/driver.c index 4cb0159d84..e14177cd72 100644 --- a/driver.c +++ b/driver.c @@ -503,6 +503,12 @@ static void compute_monitor_fps_statistics(void) for (unsigned i = 1; i < samples; i++) accum += g_extern.measure_data.frame_time_samples[i]; +#if 0 + for (unsigned i = 1; i < samples; i++) + RARCH_LOG("Interval #%u: %d usec / frame.\n", + i, (int)g_extern.measure_data.frame_time_samples[i]); +#endif + rarch_time_t avg = accum / (samples - 1); rarch_time_t accum_var = 0; From 3b5eedeab55c3dd5ba3f44ca387ed259d197a553 Mon Sep 17 00:00:00 2001 From: Themaister Date: Sun, 10 Feb 2013 01:42:56 +0100 Subject: [PATCH 36/74] Measure frame times at frame granularity. --- driver.c | 21 +++++++++------------ general.h | 2 +- gfx/gfx_common.c | 25 +++++++++++++++---------- 3 files changed, 25 insertions(+), 23 deletions(-) diff --git a/driver.c b/driver.c index e14177cd72..6555494bcb 100644 --- a/driver.c +++ b/driver.c @@ -492,11 +492,13 @@ static void compute_audio_buffer_statistics(void) static void compute_monitor_fps_statistics(void) { - unsigned samples = min(g_extern.measure_data.frame_time_samples_count, - MEASURE_FRAME_TIME_SAMPLES_COUNT); - - if (samples < 3) + if (g_extern.measure_data.frame_time_samples_count < 2 * MEASURE_FRAME_TIME_SAMPLES_COUNT) + { + RARCH_LOG("Does not have enough samples for monitor refresh rate estimation.\n"); return; + } + + unsigned samples = MEASURE_FRAME_TIME_SAMPLES_COUNT; // Measure statistics on frame time (microsecs), *not* FPS. rarch_time_t accum = 0; @@ -515,20 +517,15 @@ static void compute_monitor_fps_statistics(void) // Drop first measurement. It is likely to be bad. for (unsigned i = 1; i < samples; i++) { - rarch_time_t diff = avg - g_extern.measure_data.frame_time_samples[i]; + rarch_time_t diff = g_extern.measure_data.frame_time_samples[i] - avg; accum_var += diff * diff; } double stddev = sqrt((double)accum_var / (samples - 2)); double avg_fps = 1000000.0 / avg; - double max_stddev_fps = 1000000.0 / (avg - stddev); - double stddev_fps = max_stddev_fps - avg_fps; - double sigma_deviation = (g_settings.video.refresh_rate - avg_fps) / stddev_fps; - RARCH_LOG("Average monitor Hz: %.6f Hz. Standard deviation: %.6f Hz (%.3f %% deviation, based on %u last samples).\n", - avg_fps, stddev_fps, 100.0 * stddev_fps / avg_fps, samples); - RARCH_LOG("Configured monitor FPS %.6f Hz deviates %.3f sigma from average.\n", - g_settings.video.refresh_rate, sigma_deviation); + RARCH_LOG("Average monitor Hz: %.6f Hz. (%.3f %% frame time deviation, based on %u last samples).\n", + avg_fps, 100.0 * stddev / avg, samples - 1); } void uninit_audio(void) diff --git a/general.h b/general.h index 8ce1bb5c74..e6bfa575fe 100644 --- a/general.h +++ b/general.h @@ -422,7 +422,7 @@ struct global unsigned buffer_free_samples[AUDIO_BUFFER_FREE_SAMPLES_COUNT]; uint64_t buffer_free_samples_count; -#define MEASURE_FRAME_TIME_SAMPLES_COUNT 256 +#define MEASURE_FRAME_TIME_SAMPLES_COUNT (2 * 1024) rarch_time_t frame_time_samples[MEASURE_FRAME_TIME_SAMPLES_COUNT]; uint64_t frame_time_samples_count; } measure_data; diff --git a/gfx/gfx_common.c b/gfx/gfx_common.c index aace2f90a1..ee637c4ae0 100644 --- a/gfx/gfx_common.c +++ b/gfx/gfx_common.c @@ -23,27 +23,32 @@ static float time_to_fps(rarch_time_t last_time, rarch_time_t new_time, int fram return (1000000.0f * frames) / (new_time - last_time); } +#define FPS_UPDATE_INTERVAL 256 bool gfx_get_fps(char *buf, size_t size, bool always_write) { static rarch_time_t time; + static rarch_time_t fps_time; static float last_fps; bool ret = false; - if (g_extern.frame_count == 0) + rarch_time_t new_time = rarch_get_time_usec(); + if (g_extern.frame_count) { - time = rarch_get_time_usec(); + unsigned write_index = g_extern.measure_data.frame_time_samples_count++ & + (MEASURE_FRAME_TIME_SAMPLES_COUNT - 1); + g_extern.measure_data.frame_time_samples[write_index] = new_time - fps_time; + fps_time = new_time; + } + else + { + time = fps_time = new_time; snprintf(buf, size, "%s", g_extern.title_buf); ret = true; } - else if ((g_extern.frame_count % 180) == 0) + + if ((g_extern.frame_count % FPS_UPDATE_INTERVAL) == 0) { - rarch_time_t new_time = rarch_get_time_usec(); - last_fps = time_to_fps(time, new_time, 180); - - unsigned write_index = g_extern.measure_data.frame_time_samples_count++ & - (MEASURE_FRAME_TIME_SAMPLES_COUNT - 1); - g_extern.measure_data.frame_time_samples[write_index] = (new_time - time) / 180; - + last_fps = time_to_fps(time, new_time, FPS_UPDATE_INTERVAL); time = new_time; #ifdef RARCH_CONSOLE From d8a4bb6d12c006837fb74ef524fcb421c47c42fb Mon Sep 17 00:00:00 2001 From: Themaister Date: Sun, 10 Feb 2013 14:20:42 +0100 Subject: [PATCH 37/74] Fix initial FPS display. --- gfx/gfx_common.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/gfx/gfx_common.c b/gfx/gfx_common.c index ee637c4ae0..abe0a0734c 100644 --- a/gfx/gfx_common.c +++ b/gfx/gfx_common.c @@ -38,6 +38,27 @@ bool gfx_get_fps(char *buf, size_t size, bool always_write) (MEASURE_FRAME_TIME_SAMPLES_COUNT - 1); g_extern.measure_data.frame_time_samples[write_index] = new_time - fps_time; fps_time = new_time; + + if ((g_extern.frame_count % FPS_UPDATE_INTERVAL) == 0) + { + last_fps = time_to_fps(time, new_time, FPS_UPDATE_INTERVAL); + time = new_time; + +#ifdef RARCH_CONSOLE + snprintf(buf, size, "FPS: %6.1f || Frames: %d", last_fps, g_extern.frame_count); +#else + snprintf(buf, size, "%s || FPS: %6.1f || Frames: %d", g_extern.title_buf, last_fps, g_extern.frame_count); +#endif + ret = true; + } + else if (always_write) + { +#ifdef RARCH_CONSOLE + snprintf(buf, size, "FPS: %6.1f || Frames: %d", last_fps, g_extern.frame_count); +#else + snprintf(buf, size, "%s || FPS: %6.1f || Frames: %d", g_extern.title_buf, last_fps, g_extern.frame_count); +#endif + } } else { @@ -46,27 +67,6 @@ bool gfx_get_fps(char *buf, size_t size, bool always_write) ret = true; } - if ((g_extern.frame_count % FPS_UPDATE_INTERVAL) == 0) - { - last_fps = time_to_fps(time, new_time, FPS_UPDATE_INTERVAL); - time = new_time; - -#ifdef RARCH_CONSOLE - snprintf(buf, size, "FPS: %6.1f || Frames: %d", last_fps, g_extern.frame_count); -#else - snprintf(buf, size, "%s || FPS: %6.1f || Frames: %d", g_extern.title_buf, last_fps, g_extern.frame_count); -#endif - ret = true; - } - else if (always_write) - { -#ifdef RARCH_CONSOLE - snprintf(buf, size, "FPS: %6.1f || Frames: %d", last_fps, g_extern.frame_count); -#else - snprintf(buf, size, "%s || FPS: %6.1f || Frames: %d", g_extern.title_buf, last_fps, g_extern.frame_count); -#endif - } - return ret; } From ddc51c3ebaab9a73b80f0e2cbd00a74a1d4b2971 Mon Sep 17 00:00:00 2001 From: Themaister Date: Sun, 10 Feb 2013 14:25:02 +0100 Subject: [PATCH 38/74] Ensure that FPS buffer is not left uninitialized. --- gfx/gfx_common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gfx/gfx_common.c b/gfx/gfx_common.c index abe0a0734c..c70bf7af70 100644 --- a/gfx/gfx_common.c +++ b/gfx/gfx_common.c @@ -30,6 +30,7 @@ bool gfx_get_fps(char *buf, size_t size, bool always_write) static rarch_time_t fps_time; static float last_fps; bool ret = false; + *buf = '\0'; rarch_time_t new_time = rarch_get_time_usec(); if (g_extern.frame_count) From 563283644607baf214c6315bddb34b12ae715a8c Mon Sep 17 00:00:00 2001 From: Themaister Date: Sun, 10 Feb 2013 14:34:03 +0100 Subject: [PATCH 39/74] Report how many frames is needed to measure FPS. --- driver.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/driver.c b/driver.c index 6555494bcb..48eb414e13 100644 --- a/driver.c +++ b/driver.c @@ -494,7 +494,8 @@ static void compute_monitor_fps_statistics(void) { if (g_extern.measure_data.frame_time_samples_count < 2 * MEASURE_FRAME_TIME_SAMPLES_COUNT) { - RARCH_LOG("Does not have enough samples for monitor refresh rate estimation.\n"); + RARCH_LOG("Does not have enough samples for monitor refresh rate estimation. Requires to run for at least %u frames.\n", + 2 * MEASURE_FRAME_TIME_SAMPLES_COUNT); return; } @@ -502,30 +503,30 @@ static void compute_monitor_fps_statistics(void) // Measure statistics on frame time (microsecs), *not* FPS. rarch_time_t accum = 0; - for (unsigned i = 1; i < samples; i++) + for (unsigned i = 0; i < samples; i++) accum += g_extern.measure_data.frame_time_samples[i]; #if 0 - for (unsigned i = 1; i < samples; i++) + for (unsigned i = 0; i < samples; i++) RARCH_LOG("Interval #%u: %d usec / frame.\n", i, (int)g_extern.measure_data.frame_time_samples[i]); #endif - rarch_time_t avg = accum / (samples - 1); + rarch_time_t avg = accum / samples; rarch_time_t accum_var = 0; // Drop first measurement. It is likely to be bad. - for (unsigned i = 1; i < samples; i++) + for (unsigned i = 0; i < samples; i++) { rarch_time_t diff = g_extern.measure_data.frame_time_samples[i] - avg; accum_var += diff * diff; } - double stddev = sqrt((double)accum_var / (samples - 2)); + double stddev = sqrt((double)accum_var / (samples - 1)); double avg_fps = 1000000.0 / avg; RARCH_LOG("Average monitor Hz: %.6f Hz. (%.3f %% frame time deviation, based on %u last samples).\n", - avg_fps, 100.0 * stddev / avg, samples - 1); + avg_fps, 100.0 * stddev / avg, samples); } void uninit_audio(void) From 3deb1e51a7610f75654b6fba8fdc0cd0e79f74b5 Mon Sep 17 00:00:00 2001 From: Themaister Date: Sun, 10 Feb 2013 17:30:04 +0100 Subject: [PATCH 40/74] Allow overlays to be extracted if shaders fail. --- .../src/org/retroarch/browser/RetroArch.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/android/phoenix/src/org/retroarch/browser/RetroArch.java b/android/phoenix/src/org/retroarch/browser/RetroArch.java index b83db5bd86..773c8314e9 100644 --- a/android/phoenix/src/org/retroarch/browser/RetroArch.java +++ b/android/phoenix/src/org/retroarch/browser/RetroArch.java @@ -176,10 +176,19 @@ public class RetroArch extends Activity implements } //extractAssets(assets, cacheDir, "", 0); - Log.i("ASSETS", "Extracting shader assets now..."); - extractAssets(assets, cacheDir, "Shaders", 1); - Log.i("ASSETS", "Extracting overlay assets now..."); - extractAssets(assets, cacheDir, "Overlays", 1); + Log.i("ASSETS", "Extracting shader assets now ..."); + try { + extractAssets(assets, cacheDir, "Shaders", 1); + } catch (IOException e) { + Log.i("ASSETS", "Failed to extract shaders ..."); + } + + Log.i("ASSETS", "Extracting overlay assets now ..."); + try { + extractAssets(assets, cacheDir, "Overlays", 1); + } catch (IOException e) { + Log.i("ASSETS", "Failed to extract overlays ..."); + } DataOutputStream outputCacheVersion = new DataOutputStream(new FileOutputStream(cacheVersion, false)); outputCacheVersion.writeInt(version); From cb41874e15e5f2f45af15ce0977abc95dbc1f885 Mon Sep 17 00:00:00 2001 From: Themaister Date: Sun, 10 Feb 2013 17:52:44 +0100 Subject: [PATCH 41/74] Add basic refresh rate check to Android. --- android/phoenix/AndroidManifest.xml | 1 + android/phoenix/res/xml/prefs.xml | 7 ++ .../browser/DisplayRefreshRateTest.java | 114 ++++++++++++++++++ .../src/org/retroarch/browser/RetroArch.java | 1 - 4 files changed, 122 insertions(+), 1 deletion(-) create mode 100644 android/phoenix/src/org/retroarch/browser/DisplayRefreshRateTest.java diff --git a/android/phoenix/AndroidManifest.xml b/android/phoenix/AndroidManifest.xml index 5ca784799d..5d22ea8c3a 100644 --- a/android/phoenix/AndroidManifest.xml +++ b/android/phoenix/AndroidManifest.xml @@ -21,6 +21,7 @@ + diff --git a/android/phoenix/res/xml/prefs.xml b/android/phoenix/res/xml/prefs.xml index c3880164b3..cb76cf6930 100644 --- a/android/phoenix/res/xml/prefs.xml +++ b/android/phoenix/res/xml/prefs.xml @@ -75,6 +75,13 @@ android:summary="Force a specific refresh rate to be detected. Only use if auto-detection of refresh rate reports wrong refresh rate." android:title="Forced refresh rate (Hz)" android:numeric="decimal" /> + + + = WARMUP_SECONDS) { + mStartTime = t; + mNumFrames = 0; + mState = STATE_TEST; + } + break; + + case STATE_TEST: + mNumFrames++; + double elapsed = t - mStartTime; + if (elapsed >= TEST_SECONDS) { + double fps = (double)mNumFrames / elapsed; + Log.i(TAG, "Measured FPS to: " + fps); + setFPSSetting(fps); + mState = STATE_DONE; + } + break; + + case STATE_DONE: + activity.runOnUiThread(new Runnable() { + public void run() { + finish(); + } + }); + mState = STATE_DEAD; + break; + + case STATE_DEAD: + break; + } + + float luma = (float)Math.sin((double)mNumFrames * 0.10); + luma *= 0.2f; + luma += 0.5f; + GLES20.glClearColor(luma, luma, luma, 1.0f); + GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT); + } + + @Override + public void onSurfaceChanged(GL10 gl, int width, int height) { + // TODO Auto-generated method stub + } + + @Override + public void onSurfaceCreated(GL10 gl, EGLConfig config) { + // TODO Auto-generated method stub + } + } + + private GLSurfaceView surfaceView; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + surfaceView = new GLSurfaceView(this); + surfaceView.setEGLConfigChooser(false); + surfaceView.setEGLContextClientVersion(2); + surfaceView.setRenderer(new Renderer(this)); + setTitle("Refresh rate calibration"); + setContentView(surfaceView); + } +} diff --git a/android/phoenix/src/org/retroarch/browser/RetroArch.java b/android/phoenix/src/org/retroarch/browser/RetroArch.java index 773c8314e9..175b3f7653 100644 --- a/android/phoenix/src/org/retroarch/browser/RetroArch.java +++ b/android/phoenix/src/org/retroarch/browser/RetroArch.java @@ -201,7 +201,6 @@ public class RetroArch extends Activity implements @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - try { config = new ConfigFile(new File(getDefaultConfigPath())); From a5f174c9abef6b8ebaebc3b95c8f174595fa7ef5 Mon Sep 17 00:00:00 2001 From: ToadKing Date: Sun, 10 Feb 2013 12:05:45 -0500 Subject: [PATCH 42/74] (Android) keep screen on for refresh rate test --- .../src/org/retroarch/browser/DisplayRefreshRateTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/android/phoenix/src/org/retroarch/browser/DisplayRefreshRateTest.java b/android/phoenix/src/org/retroarch/browser/DisplayRefreshRateTest.java index 07cd8295a6..0fdcc3ccba 100644 --- a/android/phoenix/src/org/retroarch/browser/DisplayRefreshRateTest.java +++ b/android/phoenix/src/org/retroarch/browser/DisplayRefreshRateTest.java @@ -10,6 +10,7 @@ import android.opengl.GLSurfaceView; import android.os.Bundle; import android.preference.PreferenceManager; import android.util.Log; +import android.view.WindowManager; public class DisplayRefreshRateTest extends Activity { @@ -108,6 +109,7 @@ public class DisplayRefreshRateTest extends Activity { surfaceView.setEGLConfigChooser(false); surfaceView.setEGLContextClientVersion(2); surfaceView.setRenderer(new Renderer(this)); + getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); setTitle("Refresh rate calibration"); setContentView(surfaceView); } From 4b5ba80dbde7c7696b80fc4e605ad25ec3794841 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 10 Feb 2013 19:15:55 +0100 Subject: [PATCH 43/74] (Android/Phoenix) Remove FPS cap --- android/phoenix/src/org/retroarch/browser/RetroArch.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/android/phoenix/src/org/retroarch/browser/RetroArch.java b/android/phoenix/src/org/retroarch/browser/RetroArch.java index 175b3f7653..1fef57e05b 100644 --- a/android/phoenix/src/org/retroarch/browser/RetroArch.java +++ b/android/phoenix/src/org/retroarch/browser/RetroArch.java @@ -342,9 +342,6 @@ public class RetroArch extends Activity implements Log.i(TAG, "Refresh rate of screen lower than 59.95Hz, adjusting to screen."); config.setDouble("video_refresh_rate", getRefreshRate()); - } else { - Log.i(TAG, "Refresh rate set to 59.95Hz (default)."); - config.setDouble("video_refresh_rate", 59.95); } String aspect = prefs.getString("video_aspect_ratio", "auto"); From f144b1a37c3d79b5d5fca828c2099bc7d60e8107 Mon Sep 17 00:00:00 2001 From: ToadKing Date: Sun, 10 Feb 2013 13:20:48 -0500 Subject: [PATCH 44/74] (Android/Phoenix) remove FPS cap correction --- android/phoenix/src/org/retroarch/browser/RetroArch.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/android/phoenix/src/org/retroarch/browser/RetroArch.java b/android/phoenix/src/org/retroarch/browser/RetroArch.java index 1fef57e05b..95e4755ee4 100644 --- a/android/phoenix/src/org/retroarch/browser/RetroArch.java +++ b/android/phoenix/src/org/retroarch/browser/RetroArch.java @@ -337,11 +337,11 @@ public class RetroArch extends Activity implements config.setInt("input_autodetect_icade_profile_pad3", prefs.getInt("input_autodetect_icade_profile_pad3", 0)); config.setInt("input_autodetect_icade_profile_pad4", prefs.getInt("input_autodetect_icade_profile_pad4", 0)); - if (prefs.getBoolean("video_sync_refreshrate_to_screen", true) - && (getRefreshRate() < 59.95)) { - Log.i(TAG, - "Refresh rate of screen lower than 59.95Hz, adjusting to screen."); + if (prefs.getBoolean("video_sync_refreshrate_to_screen", true)) { config.setDouble("video_refresh_rate", getRefreshRate()); + } else { + Log.i(TAG, "Refresh rate set to 59.95Hz (default)."); + config.setDouble("video_refresh_rate", 59.95); } String aspect = prefs.getString("video_aspect_ratio", "auto"); From a30b5641a72549fbb352d139dca143ad519427cb Mon Sep 17 00:00:00 2001 From: ToadKing Date: Sun, 10 Feb 2013 13:40:44 -0500 Subject: [PATCH 45/74] (Android/Phoenix) display calculated refresh rate --- .../org/retroarch/browser/DisplayRefreshRateTest.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/android/phoenix/src/org/retroarch/browser/DisplayRefreshRateTest.java b/android/phoenix/src/org/retroarch/browser/DisplayRefreshRateTest.java index 0fdcc3ccba..c412bc1ad2 100644 --- a/android/phoenix/src/org/retroarch/browser/DisplayRefreshRateTest.java +++ b/android/phoenix/src/org/retroarch/browser/DisplayRefreshRateTest.java @@ -11,6 +11,7 @@ import android.os.Bundle; import android.preference.PreferenceManager; import android.util.Log; import android.view.WindowManager; +import android.widget.Toast; public class DisplayRefreshRateTest extends Activity { @@ -113,4 +114,12 @@ public class DisplayRefreshRateTest extends Activity { setTitle("Refresh rate calibration"); setContentView(surfaceView); } + + @Override + protected void onDestroy() { + SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext()); + String fps = prefs.getString("video_refresh_rate", "ERROR"); + Toast.makeText(this, "Refresh Rate: " + fps, Toast.LENGTH_LONG).show(); + super.onDestroy(); + } } From a745557f207655c4a50369b7da2c681d17610067 Mon Sep 17 00:00:00 2001 From: ToadKing Date: Sun, 10 Feb 2013 13:56:58 -0500 Subject: [PATCH 46/74] (Android/Phoenix) disable settings based on dependencies --- android/phoenix/res/xml/prefs.xml | 35 +++++++++++++++++++------------ 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/android/phoenix/res/xml/prefs.xml b/android/phoenix/res/xml/prefs.xml index cb76cf6930..680bef7518 100644 --- a/android/phoenix/res/xml/prefs.xml +++ b/android/phoenix/res/xml/prefs.xml @@ -18,7 +18,8 @@ android:key="savefile_directory_enable" android:defaultValue="false"/> + android:summary="Sets directory where to save and load game save files." + android:dependency="savefile_directory_enable"> @@ -30,7 +31,8 @@ android:key="savestate_directory_enable" android:defaultValue="false"/> + android:summary="Sets directory where to save and load game save states." + android:dependency="savestate_directory_enable"> @@ -74,10 +76,12 @@ android:key="video_refresh_rate" android:summary="Force a specific refresh rate to be detected. Only use if auto-detection of refresh rate reports wrong refresh rate." android:title="Forced refresh rate (Hz)" - android:numeric="decimal" /> + android:numeric="decimal" + android:dependency="video_sync_refreshrate_to_screen" /> + android:summary="Attempts to find the true refresh rate of monitor. Updates value in 'Force refresh rate (Hz)' option. To help ensure accuracy, make sure no intense background services are running, and avoid triggering screensaver." + android:title="Calibrate refresh rate" + android:dependency="video_sync_refreshrate_to_screen" > @@ -102,14 +106,15 @@ android:summary="Applies Bilinear filtering, smooths out edges (settings still apply even if no shader is selected)." android:title="Bilinear filter" /> + android:summary="Sets GLES2 style XML shader." + android:title="XML shader" + android:dependency="video_shader_enable" > @@ -124,12 +129,13 @@ + android:title="XML shader (2nd pass)" + android:dependency="video_second_pass_shader_enable" > @@ -164,7 +170,8 @@ android:defaultValue="true" android:key="audio_rate_control" android:summary="Enable dynamic rate control (recommended)." - android:title="Dynamic Rate Control" /> + android:title="Dynamic Rate Control" + android:dependency="audio_enable" /> @@ -216,7 +223,8 @@ + android:title="Input overlay" + android:dependency="input_overlay_enable" > @@ -224,7 +232,8 @@ + android:key="input_overlay_opacity" + android:dependency="input_overlay_enable" /> Date: Sun, 10 Feb 2013 14:42:22 -0500 Subject: [PATCH 47/74] (Android/Phoenix) show a dialog to run the refresh rate calculator on first run --- .../src/org/retroarch/browser/RetroArch.java | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/android/phoenix/src/org/retroarch/browser/RetroArch.java b/android/phoenix/src/org/retroarch/browser/RetroArch.java index 95e4755ee4..96ea204a2b 100644 --- a/android/phoenix/src/org/retroarch/browser/RetroArch.java +++ b/android/phoenix/src/org/retroarch/browser/RetroArch.java @@ -277,11 +277,37 @@ public class RetroArch extends Activity implements this.setVolumeControlStream(AudioManager.STREAM_MUSIC); - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) - { + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) { this.registerForContextMenu(findViewById(android.R.id.content)); } } + + @Override + protected void onStart() { + super.onStart(); + + SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext()); + + if (!prefs.getBoolean("first_time_refreshrate_calculate", false)) { + prefs.edit().putBoolean("first_time_refreshrate_calculate", true).commit(); + AlertDialog.Builder alert = new AlertDialog.Builder(this) + .setTitle("Calculate Refresh Rate") + .setMessage("It is highly recommended you run the refresh rate calibration test before you use RetroArch. Do you want to run it now?\n\nIf you choose No, you can run it at any time in the video preferences.") + .setPositiveButton("Yes", new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + Intent i = new Intent(getBaseContext(), DisplayRefreshRateTest.class); + startActivity(i); + } + }) + .setNegativeButton("No", new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + } + }); + alert.show(); + } + } @Override public void onItemClick(AdapterView aListView, View aView, From 56e4e882ed929f4a312911b8166ddc4d155e4964 Mon Sep 17 00:00:00 2001 From: Themaister Date: Sun, 10 Feb 2013 21:19:20 +0100 Subject: [PATCH 48/74] Drop sync_refreshrate_to_screen option. Not very relevant anymore with calibration setting. --- android/phoenix/res/xml/prefs.xml | 17 ++++++----------- .../src/org/retroarch/browser/RetroArch.java | 16 +++++++++------- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/android/phoenix/res/xml/prefs.xml b/android/phoenix/res/xml/prefs.xml index 680bef7518..a358afb750 100644 --- a/android/phoenix/res/xml/prefs.xml +++ b/android/phoenix/res/xml/prefs.xml @@ -67,21 +67,16 @@ android:key="video_vsync" android:summary="When set to enabled, prevents screen tearing." android:title="VSync" /> - + + + android:numeric="decimal" /> + android:title="Calibrate refresh rate"> @@ -98,7 +93,7 @@ android:key="video_aspect_ratio" android:summary="Aspect ratio to enforce." android:title="Aspect ratio" /> - + 61.0 || rate < 58.0) + rate = 59.95; + return rate; } private final double getRefreshRate() { @@ -363,12 +370,7 @@ public class RetroArch extends Activity implements config.setInt("input_autodetect_icade_profile_pad3", prefs.getInt("input_autodetect_icade_profile_pad3", 0)); config.setInt("input_autodetect_icade_profile_pad4", prefs.getInt("input_autodetect_icade_profile_pad4", 0)); - if (prefs.getBoolean("video_sync_refreshrate_to_screen", true)) { - config.setDouble("video_refresh_rate", getRefreshRate()); - } else { - Log.i(TAG, "Refresh rate set to 59.95Hz (default)."); - config.setDouble("video_refresh_rate", 59.95); - } + config.setDouble("video_refresh_rate", getRefreshRate()); String aspect = prefs.getString("video_aspect_ratio", "auto"); if (aspect.equals("full")) { From 1643b301466058c71d68decf08738ae481570f8a Mon Sep 17 00:00:00 2001 From: Themaister Date: Sun, 10 Feb 2013 21:38:20 +0100 Subject: [PATCH 49/74] Update Cg shader settings when loading .cgp. Needed in RMenu as .cgp are treated more like presets. --- gfx/shader_cg.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/gfx/shader_cg.c b/gfx/shader_cg.c index 1a482eae9a..907a77addd 100644 --- a/gfx/shader_cg.c +++ b/gfx/shader_cg.c @@ -797,6 +797,22 @@ static bool load_shader(const char *cgp_path, unsigned i, config_file_t *conf) if (!load_program(i + 1, path_buf, true)) return false; +#ifdef HAVE_RMENU + // In RMenu, need to display shaders in menu. + switch (i) + { + case 0: + strlcpy(g_settings.video.cg_shader_path, + path_buf, sizeof(g_settings.video.cg_shader_path)); + break; + + case 1: + strlcpy(g_settings.video.second_pass_shader, + path_buf, sizeof(g_settings.video.second_pass_shader)); + break; + } +#endif + return true; } @@ -930,6 +946,16 @@ static bool load_shader_params(unsigned i, config_file_t *conf) } } +#ifdef HAVE_RMENU + // In RMenu, need to set FBO scaling factors for first pass. + if (i == 0 && scale->type_x == RARCH_SCALE_INPUT && scale->type_y && RARCH_SCALE_INPUT + && scale->scale_x == scale->scale_y) + { + g_settings.video.fbo.scale_x = scale->scale_x; + g_settings.video.fbo.scale_y = scale->scale_y; + } +#endif + end: free(scale_type); free(scale_type_x); @@ -989,6 +1015,20 @@ static bool load_preset(const char *path) print_buf(filter_name_buf, "filter_linear%u", i); if (config_get_bool(conf, filter_name_buf, &smooth)) fbo_smooth[i + 1] = smooth ? FILTER_LINEAR : FILTER_NEAREST; + +#ifdef HAVE_RMENU + // In RMenu, need to set smoothing for first and second passes. + switch (i) + { + case 0: + g_settings.video.smooth = fbo_smooth[1]; + break; + + case 1: + g_settings.video.second_pass_smooth = fbo_smooth[2]; + break; + } +#endif } for (int i = 0; i < shaders; i++) From 1734586c240f887bc31db51fa4db410c0db3fcc4 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 10 Feb 2013 22:45:25 +0100 Subject: [PATCH 50/74] (PS3) Fixes setting CGP preset file --- frontend/menu/rmenu.c | 14 +++++++++++--- gfx/shader_cg.c | 4 ++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/frontend/menu/rmenu.c b/frontend/menu/rmenu.c index 284901c108..67a9de4114 100644 --- a/frontend/menu/rmenu.c +++ b/frontend/menu/rmenu.c @@ -1325,9 +1325,12 @@ static int set_setting_action(void *data, unsigned switchvalue, uint64_t input) #ifdef HAVE_OSKUTIL if((input & (1ULL << RMENU_DEVICE_NAV_LEFT)) || (input & (1ULL << RMENU_DEVICE_NAV_RIGHT)) || (input & (1ULL << RMENU_DEVICE_NAV_B))) { - rmenu_state.osk_param = SHADER_PRESET_FILE; - rmenu_state.osk_init = osk_callback_enter_filename_init; - rmenu_state.osk_callback = osk_callback_enter_filename; + if(g_extern.main_is_init) + { + rmenu_state.osk_param = SHADER_PRESET_FILE; + rmenu_state.osk_init = osk_callback_enter_filename_init; + rmenu_state.osk_callback = osk_callback_enter_filename; + } } #endif break; @@ -1335,6 +1338,11 @@ static int set_setting_action(void *data, unsigned switchvalue, uint64_t input) break; #endif case SETTING_DEFAULT_VIDEO_ALL: + if(input & (1ULL << RMENU_DEVICE_NAV_START)) + { + set_setting_action(NULL, SETTING_SHADER, 1ULL << RMENU_DEVICE_NAV_START); + set_setting_action(NULL, SETTING_SHADER_2, 1ULL << RMENU_DEVICE_NAV_START); + } break; case SETTING_SOUND_MODE: if(input & (1ULL << RMENU_DEVICE_NAV_LEFT)) diff --git a/gfx/shader_cg.c b/gfx/shader_cg.c index 907a77addd..3357e99339 100644 --- a/gfx/shader_cg.c +++ b/gfx/shader_cg.c @@ -1363,16 +1363,20 @@ bool gl_cg_save_cgp(const char *path, const struct gl_cg_cgp_info *info) fprintf(file, "scale0 = %.1f\n", info->fbo_scale); } +#ifndef __CELLOS_LV2__ if (info->lut_texture_path && info->lut_texture_id) { fprintf(file, "textures = %s\n", info->lut_texture_id); fprintf(file, "%s = \"%s\"\n", info->lut_texture_id, info->lut_texture_path); + /* something is breaking in here right now - don't know what it is, but don't bother with it for now */ + fprintf(file, "%s_absolute = %s\n", info->lut_texture_id, info->lut_texture_absolute ? "true" : "false"); } +#endif fclose(file); return true; From 8b4390dd065626b0b6a65594b8d21a6d95f763c7 Mon Sep 17 00:00:00 2001 From: ToadKing Date: Sun, 10 Feb 2013 17:18:59 -0500 Subject: [PATCH 51/74] (GX) Clamp max XFB height on PAL to 574 Official docs say 574 is the max, but libogc says its 576. --- gx/gx_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gx/gx_video.c b/gx/gx_video.c index a1b9246cc1..25cb678a86 100644 --- a/gx/gx_video.c +++ b/gx/gx_video.c @@ -121,7 +121,7 @@ void gx_set_video_mode(unsigned fbWidth, unsigned lines) { case VI_PAL: max_width = VI_MAX_WIDTH_PAL; - max_height = VI_MAX_HEIGHT_PAL; + max_height = /* VI_MAX_HEIGHT_PAL */ 574; break; case VI_MPAL: max_width = VI_MAX_WIDTH_MPAL; From 7713754d2672228178f77e01b80687bff66c5897 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 10 Feb 2013 23:33:00 +0100 Subject: [PATCH 52/74] (PS3) Setting FBO mode ON (from initial OFF state) no longer requires a restart --- gfx/gl.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gfx/gl.c b/gfx/gl.c index d4ec5e5eab..0ebd219329 100644 --- a/gfx/gl.c +++ b/gfx/gl.c @@ -566,16 +566,22 @@ void gl_init_fbo(void *data, unsigned width, unsigned height) gl_t *gl = (gl_t*)data; // No need to use FBOs. +#ifndef RARCH_CONSOLE + /* we always want FBO to be at least initialized on startup for consoles */ if (!g_settings.video.render_to_texture && gl_shader_num_func(gl) == 0) return; +#endif struct gl_fbo_scale scale, scale_last; gl_shader_scale(gl, 1, &scale); gl_shader_scale(gl, gl_shader_num_func(gl), &scale_last); // No need to use FBOs. +#ifndef RARCH_CONSOLE + /* we always want FBO to be at least initialized on startup for consoles */ if (gl_shader_num_func(gl) == 1 && !scale.valid && !g_settings.video.render_to_texture) return; +#endif if (!load_fbo_proc(gl)) { @@ -1920,6 +1926,9 @@ static void gl_start(void) #ifdef RARCH_CONSOLE // Comes too early for console - moved to gl_start gl->font_ctx = gl_font_init_first(gl, g_settings.video.font_path, g_settings.video.font_size); + + if (!g_settings.video.render_to_texture) + gl_deinit_fbo(gl); #endif context_get_available_resolutions_func(); From 5fad427e15c1edb7735b11125bf8500d27c6d5e8 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 11 Feb 2013 00:11:42 +0100 Subject: [PATCH 53/74] (PS3) Improvement on prevous commit --- gfx/shader_cg.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gfx/shader_cg.c b/gfx/shader_cg.c index 3357e99339..ba8c25505e 100644 --- a/gfx/shader_cg.c +++ b/gfx/shader_cg.c @@ -484,7 +484,11 @@ static bool load_plain(const char *path) if (!load_program(1, path, true)) return false; - if (*g_settings.video.second_pass_shader && g_settings.video.render_to_texture) + if (*g_settings.video.second_pass_shader +#ifndef RARCH_CONSOLE + && g_settings.video.render_to_texture +#endif + ) { if (!load_program(2, g_settings.video.second_pass_shader, true)) return false; From 18d30fb441ca16c75a1cf15b63e18e436e94eb21 Mon Sep 17 00:00:00 2001 From: ToadKing Date: Sun, 10 Feb 2013 18:52:37 -0500 Subject: [PATCH 54/74] (Android) fix up motion events incorrectly removing every active motion event --- android/native/jni/input_android.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/android/native/jni/input_android.c b/android/native/jni/input_android.c index 7ce5a667ea..7775c660a5 100644 --- a/android/native/jni/input_android.c +++ b/android/native/jni/input_android.c @@ -172,10 +172,16 @@ static void android_input_poll(void *data) action == AMOTION_EVENT_ACTION_CANCEL || action == AMOTION_EVENT_ACTION_POINTER_UP) || (source == AINPUT_SOURCE_MOUSE && action != AMOTION_EVENT_ACTION_DOWN); - int max = min(AMotionEvent_getPointerCount(event), MAX_TOUCH); - for (motion_pointer = 0; motion_pointer < max; motion_pointer++) + if (keyup) { - if (!keyup) + memmove(pointer + motion_pointer, pointer + motion_pointer + 1, (MAX_TOUCH - motion_pointer - 1) * sizeof(struct input_pointer)); + if (pointer_count > 0) + pointer_count--; + } + else + { + int pointer_max = min(AMotionEvent_getPointerCount(event), MAX_TOUCH); + for (motion_pointer = 0; motion_pointer < pointer_max; motion_pointer++) { x = AMotionEvent_getX(event, motion_pointer); y = AMotionEvent_getY(event, motion_pointer); @@ -186,12 +192,6 @@ static void android_input_poll(void *data) pointer_count = max(pointer_count, motion_pointer + 1); } - else - { - memmove(pointer + motion_pointer, pointer + motion_pointer + 1, (MAX_TOUCH - motion_pointer - 1) * sizeof(struct input_pointer)); - if (pointer_count > 0) - pointer_count--; - } } } From b03f1bc95053eb11bbc347cbc9e21b8513b47e9c Mon Sep 17 00:00:00 2001 From: ToadKing Date: Sun, 10 Feb 2013 18:59:24 -0500 Subject: [PATCH 55/74] (Android) fix potential segfault --- android/native/jni/input_android.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/native/jni/input_android.c b/android/native/jni/input_android.c index 7775c660a5..7c64fdb914 100644 --- a/android/native/jni/input_android.c +++ b/android/native/jni/input_android.c @@ -172,7 +172,7 @@ static void android_input_poll(void *data) action == AMOTION_EVENT_ACTION_CANCEL || action == AMOTION_EVENT_ACTION_POINTER_UP) || (source == AINPUT_SOURCE_MOUSE && action != AMOTION_EVENT_ACTION_DOWN); - if (keyup) + if (keyup && motion_pointer < MAX_TOUCH) { memmove(pointer + motion_pointer, pointer + motion_pointer + 1, (MAX_TOUCH - motion_pointer - 1) * sizeof(struct input_pointer)); if (pointer_count > 0) From 8936f058c420e3a465871f90b040ff0ba3253f17 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 11 Feb 2013 01:39:06 +0100 Subject: [PATCH 56/74] (Android) Add iCade profile iPega --- android/native/jni/input_autodetect.c | 11 +++++++++++ android/native/jni/input_autodetect.h | 1 + android/phoenix/res/values/array.xml | 2 ++ 3 files changed, 14 insertions(+) diff --git a/android/native/jni/input_autodetect.c b/android/native/jni/input_autodetect.c index 37c072314a..f717e1d567 100644 --- a/android/native/jni/input_autodetect.c +++ b/android/native/jni/input_autodetect.c @@ -651,6 +651,17 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned keycode_lut[AKEYCODE_3] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); keycode_lut[AKEYCODE_4] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); break; + case ICADE_PROFILE_IPEGA_PG9017: + /* Todo: diagonals - patchy? */ + keycode_lut[AKEYCODE_BUTTON_1] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + keycode_lut[AKEYCODE_BUTTON_2] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + keycode_lut[AKEYCODE_BUTTON_3] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + keycode_lut[AKEYCODE_BUTTON_4] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + keycode_lut[AKEYCODE_BUTTON_5] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + keycode_lut[AKEYCODE_BUTTON_6] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + keycode_lut[AKEYCODE_BUTTON_9] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + keycode_lut[AKEYCODE_BUTTON_10] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + break; } } } diff --git a/android/native/jni/input_autodetect.h b/android/native/jni/input_autodetect.h index b13fc54cc8..ce96d6393d 100644 --- a/android/native/jni/input_autodetect.h +++ b/android/native/jni/input_autodetect.h @@ -23,6 +23,7 @@ enum { ICADE_PROFILE_RED_SAMURAI = 0, + ICADE_PROFILE_IPEGA_PG9017, } icade_profile_enums; enum { diff --git a/android/phoenix/res/values/array.xml b/android/phoenix/res/values/array.xml index 62e8ba9e71..fa494636ba 100644 --- a/android/phoenix/res/values/array.xml +++ b/android/phoenix/res/values/array.xml @@ -22,10 +22,12 @@ Red Samurai + iPega PG-9017 0 + 1 From 04003780acae74447acc042c475e42b58591d685 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 11 Feb 2013 02:12:21 +0100 Subject: [PATCH 57/74] (Android) Added PC2JAMMA-USB to autodetection - pad 2 still unfinished though --- android/native/jni/input_autodetect.c | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/android/native/jni/input_autodetect.c b/android/native/jni/input_autodetect.c index f717e1d567..8af5c568d5 100644 --- a/android/native/jni/input_autodetect.c +++ b/android/native/jni/input_autodetect.c @@ -178,6 +178,34 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned keycode_lut[AKEYCODE_BUTTON_START] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); } } + else if (strstr(name_buf, "TTT THT Arcade console 2P USB Play")) + { + /* same as Rumblepad 2 - merge? */ + keycode_lut[AKEYCODE_BUTTON_1] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + keycode_lut[AKEYCODE_BUTTON_2] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + keycode_lut[AKEYCODE_BUTTON_3] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + keycode_lut[AKEYCODE_BUTTON_4] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + keycode_lut[AKEYCODE_BUTTON_5] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + keycode_lut[AKEYCODE_BUTTON_6] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + keycode_lut[AKEYCODE_BUTTON_7] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); + keycode_lut[AKEYCODE_BUTTON_8] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); + keycode_lut[AKEYCODE_BUTTON_9] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + keycode_lut[AKEYCODE_BUTTON_10] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + + /* unsure about pad 2 still */ + shift = 8 + ((port + 1) * 8); + + keycode_lut[AKEYCODE_BUTTON_11] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + keycode_lut[AKEYCODE_BUTTON_12] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + keycode_lut[AKEYCODE_BUTTON_13] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + keycode_lut[AKEYCODE_BUTTON_14] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + keycode_lut[AKEYCODE_BUTTON_15] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + keycode_lut[AKEYCODE_BUTTON_16] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + keycode_lut[AKEYCODE_BUTTON_A] |= ((RETRO_DEVICE_ID_JOYPAD_L2+1) << shift); + keycode_lut[AKEYCODE_BUTTON_B] |= ((RETRO_DEVICE_ID_JOYPAD_R2+1) << shift); + keycode_lut[AKEYCODE_BUTTON_C] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + keycode_lut[AKEYCODE_BUTTON_X] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + } else if (strstr(name_buf, "Madcatz")) { if (strstr(name_buf, "PC USB Wired Stick")) From 905408dd00feb9a6f32ea3a17729461357b882cc Mon Sep 17 00:00:00 2001 From: ToadKing Date: Sun, 10 Feb 2013 20:42:49 -0500 Subject: [PATCH 58/74] (Android) fix sound FAQ --- android/phoenix/res/layout/faq_sound_choppy.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/phoenix/res/layout/faq_sound_choppy.xml b/android/phoenix/res/layout/faq_sound_choppy.xml index 6172646d03..90df6e2bc0 100644 --- a/android/phoenix/res/layout/faq_sound_choppy.xml +++ b/android/phoenix/res/layout/faq_sound_choppy.xml @@ -9,5 +9,5 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="40px" -android:text="There can be two reasons for this:\n\na) Either your device is not powerful enough to run the core you've selected at fullspeed.\n\nb) The refresh rate of the screen that your device reports is wrong. More on b) below.\n\n== REFRESH RATES AND RETROARCH ==\n\nUnlike other emulators, RetroArch does not use frameskipping. To get smooth gameplay and sound that are remotely close to the original hardware, RetroArch Android uses static synchronization. If you notice any skipping music or 'jerkiness' - rest assured it's not our code - it's likely that your device reports a wrong refreshrate to the OS (Android in this case). For instance, certain devices like the Note 2 have refresh rates below 60Hz.\n\nTo get any decent audio and video out of any application, you will have to synchronize the game's refresh rate with that of your screen - if the refresh rate cannot be properly synchronized, you will get bad audio pops and video glitchiness.\n\nThe problem is that a good many Android devices 'report' the wrong refresh rate to Android. The Samsung Galaxy S3 is known for doing this - it reports a 60Hz refresh rate when it isn't (the Note 2 for instance has a 58Hz screen but at least reports it correctly). So, because it 'reports' a wrong refresh rate, the option 'Synchronize refresh rate to screen' will not yield good results.\n\nIf you experience any audio pops on cores that should be running fullspeed on your device, you should go with manual synchronization. To do this, turn off 'Synchronize refresh rate to screen' and set 'Forced refresh rate (Hz)' - start at 59.94/59.95. If it still audio pops/crackles, lower the value until you hit a sweet spot.\n\nUnfortunately, there is no easier way to do this right now - if the vendor reports the refresh rate correctly, then 'Sync refreshrate to screen' will work like a charm - if not, you have to mess around with 'Forced refresh Rate'.\n\n Regardless, with a bit of experimentation you can get this right easily - I am running games on a single-core Cortex A8 device (1.2GHz - Allwinner A10) and I get no sound pops or any video glitchiness at all in most cores. So this is entirely a refresh rate issue that you can overcome easily on most devices by doing what I state above." /> + android:text="There can be two reasons for this:\n\na) Either your device is not powerful enough to run the core you've selected at fullspeed.\n\nb) The refresh rate of the screen that your device reports is wrong. More on b) below.\n\n== REFRESH RATES AND RETROARCH ==\n\nUnlike other emulators, RetroArch does not use frameskipping. To get smooth gameplay and sound that are remotely close to the original hardware, RetroArch Android uses static synchronization. If you notice any skipping music or 'jerkiness' - rest assured it's not our code - it's likely that your device reports a wrong refreshrate to the OS (Android in this case). For instance, certain devices like the Note 2 have refresh rates below 60Hz.\n\nTo get any decent audio and video out of any application, you will have to synchronize the game's refresh rate with that of your screen - if the refresh rate cannot be properly synchronized, you will get bad audio pops and video glitchiness.\n\nThe problem is that a good many Android devices 'report' the wrong refresh rate to Android. The Samsung Galaxy S3 is known for doing this - it reports a 60Hz refresh rate when it isn't (the Note 2 for instance has a 58Hz screen but at least reports it correctly). So, because it 'reports' a wrong refresh rate, RetroArch will not yield good results.\n\nIf you experience any audio pops on cores that should be running fullspeed on your device, you should go with manual synchronization. To do this, either calcuate your screens refresh rate with the 'Calibrate refresh rate' setting or use the 'Forced refresh rate (Hz)' option and set it manually - start at 59.95 and if it still audio pops/crackles, lower the value until you hit a sweet spot.\n\nWith a bit of experimentation you can get this right easily - I am running games on a single-core Cortex A8 device (1.2GHz - Allwinner A10) and I get no sound pops or any video glitchiness at all in most cores. So this is entirely a refresh rate issue that you can overcome easily on most devices by doing what I state above." /> From aab4fa0e1604b9ddbdc78c00780d6b27cc8150fe Mon Sep 17 00:00:00 2001 From: Themaister Date: Mon, 11 Feb 2013 08:53:47 +0100 Subject: [PATCH 59/74] Move rotation and aspect ratios to General. --- android/phoenix/res/xml/prefs.xml | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/android/phoenix/res/xml/prefs.xml b/android/phoenix/res/xml/prefs.xml index a358afb750..c6923139b4 100644 --- a/android/phoenix/res/xml/prefs.xml +++ b/android/phoenix/res/xml/prefs.xml @@ -67,20 +67,6 @@ android:key="video_vsync" android:summary="When set to enabled, prevents screen tearing." android:title="VSync" /> - - - - - - - + + + + + + + + Date: Mon, 11 Feb 2013 08:57:40 +0100 Subject: [PATCH 60/74] memset struct before gl_cg_save_cgp. --- frontend/menu/rmenu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/menu/rmenu.c b/frontend/menu/rmenu.c index 67a9de4114..91b23db716 100644 --- a/frontend/menu/rmenu.c +++ b/frontend/menu/rmenu.c @@ -937,6 +937,7 @@ static bool osk_callback_enter_filename(void *data) RARCH_LOG("[osk_callback_enter_filename]: filepath is: %s.\n", filepath); struct gl_cg_cgp_info current_settings; + memset(¤t_settings, 0, sizeof(current_settings)); current_settings.shader[0] = g_settings.video.cg_shader_path; current_settings.shader[1] = g_settings.video.second_pass_shader; current_settings.filter_linear[0] = g_settings.video.smooth; From 367f43ea625ecb8f8bb451b67fe0d7c9bf27945d Mon Sep 17 00:00:00 2001 From: Sam Stenvall Date: Mon, 11 Feb 2013 13:09:26 +0200 Subject: [PATCH 61/74] Fixed invalid regexp for Colin McRae games --- tools/retrolaunch/launch.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/retrolaunch/launch.conf b/tools/retrolaunch/launch.conf index 64e0d44243..dbc9c2f490 100644 --- a/tools/retrolaunch/launch.conf +++ b/tools/retrolaunch/launch.conf @@ -68,7 +68,7 @@ "ps1.Chippoke Ralph no Daibouken (Adventure of Little Ralph)" mednafen-psx dualanalog ; "ps1.Chocobo Racing" mednafen-psx dualanalog ; "ps1.Chrono Cross*" pcsxr dualanalog ; -"ps1.Colin Mc[rR]rae*" mednafen-psx dualanalog ; +"ps1.Colin Mc[rR]ae*" mednafen-psx dualanalog ; "ps1.Colony Wars*" mednafen-psx dualanalog ; "ps1.Cosmowarrior Rei" mednafen-psx dualanalog ; "ps1.Cowboy Bebop" mednafen-psx dualanalog ; From f4454b004fc1e84e3c10e7cd3f7dfd45964a2b79 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 11 Feb 2013 12:33:28 +0100 Subject: [PATCH 62/74] (Android) Bump up to version r11 (PS3) Get rid of ifndef --- android/phoenix/AndroidManifest.xml | 2 +- gfx/shader_cg.c | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/android/phoenix/AndroidManifest.xml b/android/phoenix/AndroidManifest.xml index 5d22ea8c3a..a96f7399dc 100644 --- a/android/phoenix/AndroidManifest.xml +++ b/android/phoenix/AndroidManifest.xml @@ -1,6 +1,6 @@ diff --git a/gfx/shader_cg.c b/gfx/shader_cg.c index ba8c25505e..424912e76e 100644 --- a/gfx/shader_cg.c +++ b/gfx/shader_cg.c @@ -1367,20 +1367,16 @@ bool gl_cg_save_cgp(const char *path, const struct gl_cg_cgp_info *info) fprintf(file, "scale0 = %.1f\n", info->fbo_scale); } -#ifndef __CELLOS_LV2__ if (info->lut_texture_path && info->lut_texture_id) { fprintf(file, "textures = %s\n", info->lut_texture_id); fprintf(file, "%s = \"%s\"\n", info->lut_texture_id, info->lut_texture_path); - /* something is breaking in here right now - don't know what it is, but don't bother with it for now */ - fprintf(file, "%s_absolute = %s\n", info->lut_texture_id, info->lut_texture_absolute ? "true" : "false"); } -#endif fclose(file); return true; From d3665c6e4e039fdb49a973dc99bc1f2a073e56f7 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 11 Feb 2013 14:59:00 +0100 Subject: [PATCH 63/74] (Android) Add startup message to refresh rate calibration --- .../src/org/retroarch/browser/DisplayRefreshRateTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/android/phoenix/src/org/retroarch/browser/DisplayRefreshRateTest.java b/android/phoenix/src/org/retroarch/browser/DisplayRefreshRateTest.java index c412bc1ad2..3de1d148d6 100644 --- a/android/phoenix/src/org/retroarch/browser/DisplayRefreshRateTest.java +++ b/android/phoenix/src/org/retroarch/browser/DisplayRefreshRateTest.java @@ -33,6 +33,7 @@ public class DisplayRefreshRateTest extends Activity { public Renderer(Activity activity) { this.activity = activity; + Toast.makeText(this.activity, "Touch the screen with your fingers for more accurate measurements.", Toast.LENGTH_LONG).show(); } private void setFPSSetting(double fps) { From 6e3cea60f75bc3ce59a696a2c96daeb8e730b5ae Mon Sep 17 00:00:00 2001 From: Themaister Date: Mon, 11 Feb 2013 16:12:48 +0100 Subject: [PATCH 64/74] Call Toast directly from activity. Toast behaves strangely when not called inside the activity directly. --- .../src/org/retroarch/browser/DisplayRefreshRateTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/phoenix/src/org/retroarch/browser/DisplayRefreshRateTest.java b/android/phoenix/src/org/retroarch/browser/DisplayRefreshRateTest.java index 3de1d148d6..e0f6b6410d 100644 --- a/android/phoenix/src/org/retroarch/browser/DisplayRefreshRateTest.java +++ b/android/phoenix/src/org/retroarch/browser/DisplayRefreshRateTest.java @@ -33,7 +33,6 @@ public class DisplayRefreshRateTest extends Activity { public Renderer(Activity activity) { this.activity = activity; - Toast.makeText(this.activity, "Touch the screen with your fingers for more accurate measurements.", Toast.LENGTH_LONG).show(); } private void setFPSSetting(double fps) { @@ -107,6 +106,7 @@ public class DisplayRefreshRateTest extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + Toast.makeText(this, "Touch the screen with your fingers for more accurate measurements.", Toast.LENGTH_LONG).show(); surfaceView = new GLSurfaceView(this); surfaceView.setEGLConfigChooser(false); surfaceView.setEGLContextClientVersion(2); From da7bc1938db64e475c4767ff88db8a4814194c3f Mon Sep 17 00:00:00 2001 From: Themaister Date: Mon, 11 Feb 2013 16:39:50 +0100 Subject: [PATCH 65/74] Add option for setting OS-reported FPS value. --- android/phoenix/AndroidManifest.xml | 1 + android/phoenix/res/xml/prefs.xml | 7 +++++ .../browser/DisplayRefreshRateTest.java | 2 +- .../retroarch/browser/RefreshRateSetOS.java | 29 +++++++++++++++++++ 4 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 android/phoenix/src/org/retroarch/browser/RefreshRateSetOS.java diff --git a/android/phoenix/AndroidManifest.xml b/android/phoenix/AndroidManifest.xml index a96f7399dc..515bf3ef27 100644 --- a/android/phoenix/AndroidManifest.xml +++ b/android/phoenix/AndroidManifest.xml @@ -22,6 +22,7 @@ + diff --git a/android/phoenix/res/xml/prefs.xml b/android/phoenix/res/xml/prefs.xml index c6923139b4..605c4cbccf 100644 --- a/android/phoenix/res/xml/prefs.xml +++ b/android/phoenix/res/xml/prefs.xml @@ -94,6 +94,13 @@ android:targetClass="org.retroarch.browser.DisplayRefreshRateTest" android:targetPackage="org.retroarch" /> + + + Date: Mon, 11 Feb 2013 12:40:18 -0500 Subject: [PATCH 66/74] (Android/Phoenix) update sound helpfile --- android/phoenix/res/layout/faq_sound_choppy.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/phoenix/res/layout/faq_sound_choppy.xml b/android/phoenix/res/layout/faq_sound_choppy.xml index 90df6e2bc0..37d26e9b4c 100644 --- a/android/phoenix/res/layout/faq_sound_choppy.xml +++ b/android/phoenix/res/layout/faq_sound_choppy.xml @@ -9,5 +9,5 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="40px" - android:text="There can be two reasons for this:\n\na) Either your device is not powerful enough to run the core you've selected at fullspeed.\n\nb) The refresh rate of the screen that your device reports is wrong. More on b) below.\n\n== REFRESH RATES AND RETROARCH ==\n\nUnlike other emulators, RetroArch does not use frameskipping. To get smooth gameplay and sound that are remotely close to the original hardware, RetroArch Android uses static synchronization. If you notice any skipping music or 'jerkiness' - rest assured it's not our code - it's likely that your device reports a wrong refreshrate to the OS (Android in this case). For instance, certain devices like the Note 2 have refresh rates below 60Hz.\n\nTo get any decent audio and video out of any application, you will have to synchronize the game's refresh rate with that of your screen - if the refresh rate cannot be properly synchronized, you will get bad audio pops and video glitchiness.\n\nThe problem is that a good many Android devices 'report' the wrong refresh rate to Android. The Samsung Galaxy S3 is known for doing this - it reports a 60Hz refresh rate when it isn't (the Note 2 for instance has a 58Hz screen but at least reports it correctly). So, because it 'reports' a wrong refresh rate, RetroArch will not yield good results.\n\nIf you experience any audio pops on cores that should be running fullspeed on your device, you should go with manual synchronization. To do this, either calcuate your screens refresh rate with the 'Calibrate refresh rate' setting or use the 'Forced refresh rate (Hz)' option and set it manually - start at 59.95 and if it still audio pops/crackles, lower the value until you hit a sweet spot.\n\nWith a bit of experimentation you can get this right easily - I am running games on a single-core Cortex A8 device (1.2GHz - Allwinner A10) and I get no sound pops or any video glitchiness at all in most cores. So this is entirely a refresh rate issue that you can overcome easily on most devices by doing what I state above." /> + android:text="There can be two reasons for this:\n\na) Either your device is not powerful enough to run the core you've selected at fullspeed.\n\nb) The refresh rate of the screen that your device reports is wrong. More on b) below.\n\n== REFRESH RATES AND RETROARCH ==\n\nUnlike other emulators, RetroArch does not use frameskipping. To get smooth gameplay and sound that are remotely close to the original hardware, RetroArch Android uses static synchronization. If you notice any skipping music or 'jerkiness' - rest assured it's not our code - it's likely that your device reports a wrong refreshrate to the OS (Android in this case). For instance, certain devices like the Note 2 have refresh rates below 60Hz.\n\nTo get any decent audio and video out of any application, you will have to synchronize the game's refresh rate with that of your screen - if the refresh rate cannot be properly synchronized, you will get bad audio pops and video glitchiness.\n\nThe problem is that a good many Android devices 'report' the wrong refresh rate to Android. The Samsung Galaxy S3 is known for doing this - it reports a 60Hz refresh rate when it isn't (the Note 2 for instance has a 58Hz screen but at least reports it correctly). So, because it 'reports' a wrong refresh rate, RetroArch will not yield good results.\n\nIf you experience any audio pops on cores that should be running fullspeed on your device, you should go with manual synchronization. To do this, you can start by calcuating your screens refresh rate with the 'Calibrate refresh rate' setting. This option can give a good guess, but for best results you should edit the value it returns in the 'Forced refresh rate (Hz)' option and set it manually - start at the value it returns and if it still audio pops/crackles, raise or lower the value (0.01 intervals is a good place to start) until you hit a sweet spot.\n\nIf you think your device reports the correct value, you can use that instead by selecting the 'Set OS-reported refresh rate' option instead.\n\nWith a bit of experimentation you can get this right easily - I am running games on a single-core Cortex A8 device (1.2GHz - Allwinner A10) and I get no sound pops or any video glitchiness at all in most cores. So this is entirely a refresh rate issue that you can overcome easily on most devices by doing what I state above." /> From fe1d9a5a2a245f2e845d16fec9fab7d52d40a92e Mon Sep 17 00:00:00 2001 From: Themaister Date: Mon, 11 Feb 2013 20:14:12 +0100 Subject: [PATCH 67/74] Add rate control interfaces to AL. --- audio/openal.c | 112 +++++++++++++++++++++++++------------------------ 1 file changed, 57 insertions(+), 55 deletions(-) diff --git a/audio/openal.c b/audio/openal.c index df496222e5..ad192b39c7 100644 --- a/audio/openal.c +++ b/audio/openal.c @@ -14,6 +14,7 @@ */ #include "../driver.h" +#include "../general.h" #ifdef __APPLE__ #include @@ -30,29 +31,47 @@ #include #endif -#define BUFSIZE 128 +#define BUFSIZE 1024 typedef struct al { ALuint source; ALuint *buffers; ALuint *res_buf; - int res_ptr; + size_t res_ptr; ALenum format; - int num_buffers; + size_t num_buffers; int rate; - int queue; uint8_t tmpbuf[BUFSIZE]; - int tmpbuf_ptr; + size_t tmpbuf_ptr; ALCdevice *handle; ALCcontext *ctx; bool nonblock; - } al_t; +static void al_free(void *data) +{ + al_t *al = (al_t*)data; + if (!al) + return; + + alSourceStop(al->source); + alDeleteSources(1, &al->source); + + if (al->buffers) + alDeleteBuffers(al->num_buffers, al->buffers); + + free(al->buffers); + free(al->res_buf); + alcMakeContextCurrent(NULL); + alcDestroyContext(al->ctx); + alcCloseDevice(al->handle); + free(al); +} + static void *al_init(const char *device, unsigned rate, unsigned latency) { (void)device; @@ -72,7 +91,13 @@ static void *al_init(const char *device, unsigned rate, unsigned latency) al->rate = rate; - al->num_buffers = (latency * rate * 2 * 2) / (1000 * BUFSIZE); + // We already use one buffer for tmpbuf. + al->num_buffers = (latency * rate * 2 * sizeof(int16_t)) / (1000 * BUFSIZE) - 1; + if (al->num_buffers < 2) + al->num_buffers = 2; + + RARCH_LOG("[OpenAL]: Using %u buffers of %u bytes.\n", (unsigned)al->num_buffers, BUFSIZE); + al->buffers = (ALuint*)calloc(al->num_buffers, sizeof(ALuint)); al->res_buf = (ALuint*)calloc(al->num_buffers, sizeof(ALuint)); if (al->buffers == NULL || al->res_buf == NULL) @@ -87,19 +112,7 @@ static void *al_init(const char *device, unsigned rate, unsigned latency) return al; error: - if (al) - { - alcMakeContextCurrent(NULL); - if (al->ctx) - alcDestroyContext(al->ctx); - if (al->handle) - alcCloseDevice(al->handle); - if (al->buffers) - free(al->buffers); - if (al->res_buf) - free(al->res_buf); - free(al); - } + al_free(al); return NULL; } @@ -121,14 +134,8 @@ static bool al_unqueue_buffers(al_t *al) static bool al_get_buffer(al_t *al, ALuint *buffer) { - if (al->res_ptr == 0) + if (!al->res_ptr) { -#ifndef _WIN32 - struct timespec tv = {0}; - tv.tv_sec = 0; - tv.tv_nsec = 1000000; -#endif - for (;;) { if (al_unqueue_buffers(al)) @@ -137,11 +144,8 @@ static bool al_get_buffer(al_t *al, ALuint *buffer) if (al->nonblock) return false; -#ifdef _WIN32 - Sleep(1); -#else - nanosleep(&tv, NULL); -#endif + // Must sleep as there is no proper blocking method. :( + rarch_sleep(1); } } @@ -151,28 +155,31 @@ static bool al_get_buffer(al_t *al, ALuint *buffer) static size_t al_fill_internal_buf(al_t *al, const void *buf, size_t size) { - size_t read_size = (BUFSIZE - al->tmpbuf_ptr > (ssize_t)size) ? size : (BUFSIZE - al->tmpbuf_ptr); + size_t read_size = min(BUFSIZE - al->tmpbuf_ptr, size); memcpy(al->tmpbuf + al->tmpbuf_ptr, buf, read_size); al->tmpbuf_ptr += read_size; return read_size; } -static ssize_t al_write(void *data, const void *buf, size_t size) +static ssize_t al_write(void *data, const void *buf_, size_t size) { al_t *al = (al_t*)data; + const uint8_t *buf = (const uint8_t*)buf_; size_t written = 0; - while (written < size) + while (size) { - size_t rc = al_fill_internal_buf(al, (const char*)buf + written, size - written); + size_t rc = al_fill_internal_buf(al, buf, size); written += rc; + buf += rc; + size -= rc; if (al->tmpbuf_ptr != BUFSIZE) break; ALuint buffer; if (!al_get_buffer(al, &buffer)) - return 0; + break; alBufferData(buffer, AL_FORMAT_STEREO16, al->tmpbuf, BUFSIZE, al->rate); al->tmpbuf_ptr = 0; @@ -189,7 +196,7 @@ static ssize_t al_write(void *data, const void *buf, size_t size) return -1; } - return size; + return written; } static bool al_stop(void *data) @@ -210,24 +217,17 @@ static bool al_start(void *data) return true; } -static void al_free(void *data) +static size_t al_write_avail(void *data) { al_t *al = (al_t*)data; - if (al) - { - alSourceStop(al->source); - alDeleteSources(1, &al->source); - if (al->buffers) - { - alDeleteBuffers(al->num_buffers, al->buffers); - free(al->buffers); - free(al->res_buf); - } - } - alcMakeContextCurrent(NULL); - alcDestroyContext(al->ctx); - alcCloseDevice(al->handle); - free(al); + al_unqueue_buffers(al); + return al->res_ptr * BUFSIZE + (BUFSIZE - al->tmpbuf_ptr); +} + +static size_t al_buffer_size(void *data) +{ + al_t *al = (al_t*)data; + return (al->num_buffers + 1) * BUFSIZE; // Also got tmpbuf. } const audio_driver_t audio_openal = { @@ -238,6 +238,8 @@ const audio_driver_t audio_openal = { al_set_nonblock_state, al_free, NULL, - "openal" + "openal", + al_write_avail, + al_buffer_size, }; From 8c4410158ddba2ddf3997d989a3ec3d5dd990bb4 Mon Sep 17 00:00:00 2001 From: Themaister Date: Mon, 11 Feb 2013 20:38:16 +0100 Subject: [PATCH 68/74] Fix potential segfault in AL. --- audio/openal.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/audio/openal.c b/audio/openal.c index ad192b39c7..0f17781f7b 100644 --- a/audio/openal.c +++ b/audio/openal.c @@ -67,8 +67,11 @@ static void al_free(void *data) free(al->buffers); free(al->res_buf); alcMakeContextCurrent(NULL); - alcDestroyContext(al->ctx); - alcCloseDevice(al->handle); + + if (al->ctx) + alcDestroyContext(al->ctx); + if (al->handle) + alcCloseDevice(al->handle); free(al); } From 9960217184231bf4fb83a19f8c20bee9118e7dcd Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 11 Feb 2013 21:11:10 +0100 Subject: [PATCH 69/74] (Android) Add 'List of autodetected devices' --- android/phoenix/res/layout/faq_supported_pads.xml | 13 +++++++++++++ android/phoenix/res/xml/prefs.xml | 4 ++++ 2 files changed, 17 insertions(+) create mode 100644 android/phoenix/res/layout/faq_supported_pads.xml diff --git a/android/phoenix/res/layout/faq_supported_pads.xml b/android/phoenix/res/layout/faq_supported_pads.xml new file mode 100644 index 0000000000..47ac614d48 --- /dev/null +++ b/android/phoenix/res/layout/faq_supported_pads.xml @@ -0,0 +1,13 @@ + + + + + diff --git a/android/phoenix/res/xml/prefs.xml b/android/phoenix/res/xml/prefs.xml index 605c4cbccf..8908a94155 100644 --- a/android/phoenix/res/xml/prefs.xml +++ b/android/phoenix/res/xml/prefs.xml @@ -185,6 +185,10 @@ android:summary="This will attempt to preconfigure various gamepads and/or IME apps that you connect." android:title="Enable" android:disableDependentsState="true" /> + + + + Date: Mon, 11 Feb 2013 21:14:11 +0100 Subject: [PATCH 70/74] (Android) Expand 'supported_pads' list --- android/phoenix/res/layout/faq_supported_pads.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/phoenix/res/layout/faq_supported_pads.xml b/android/phoenix/res/layout/faq_supported_pads.xml index 47ac614d48..74a774387e 100644 --- a/android/phoenix/res/layout/faq_supported_pads.xml +++ b/android/phoenix/res/layout/faq_supported_pads.xml @@ -9,5 +9,5 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="40px" - android:text="The following pads have been added to the autodetection list:\n\n* Logitech/Logicool Rumblepad 2\n* Microsoft Sidewinder USB (ISSUE - diagonals not working).\n* Microsoft Xbox 360 Wired/Wireless (ISSUE - diagonals not working).\n* PS3 Sixaxis/DualShock 3 (using either USB or Dancingpixelstudios' IME app)\n* MOGA (using either 'root' gamepad mode or official IME app)\n* JXD S5110\n* Snakebyte idroid\n* Logitech Dual Action\n* Mayflash SUper Joy Bx 3 Pro\n*RetroUSB SNES RetroPort\n*RetroUSB NES RetroPad\n*Buffalo SNES Pad\n* Elecom PS1/PS2 to USB\n* Archos gamepad\n* Xbox 1 (Titanium X-Joy Converter) (ISSUE - diagonals not working).\n* Red Samurai (IME app Bluetooth or gamepad mode\n* Xperia Play\n* Trust Raptor\n* Logitech F710\n* DragonRise USB\n* Madcatz PS3 fighting stick (TODO - TEST)\n* iPega (iCade profile)\n* PC2JAMMA-USB (TODO - TEST)\n* Genius MaxFire G-08XU\n* Zeemote Steelseries\n* Saitek Rumblepad\n* Super Smart Joy\n* Groupwise PS2 to USB converter" /> + android:text="The following pads have been added to the autodetection list:\n\n* Logitech/Logicool Rumblepad 2\n* Microsoft Sidewinder USB (ISSUE - diagonals not working).\n* Microsoft Xbox 360 Wired/Wireless (ISSUE - diagonals not working).\n* PS3 Sixaxis/DualShock 3 (using either USB or Dancingpixelstudios' IME app)\n* MOGA (using either 'root' gamepad mode or official IME app)\n* JXD S5110\n* Snakebyte idroid\n* Logitech Dual Action\n* Mayflash SUper Joy Bx 3 Pro\n*RetroUSB SNES RetroPort\n*RetroUSB NES RetroPad\n*Buffalo SNES Pad\n* Elecom PS1/PS2 to USB\n* Archos gamepad\n* Xbox 1 (Titanium X-Joy Converter) (ISSUE - diagonals not working).\n* Red Samurai (IME app Bluetooth or gamepad mode\n* Xperia Play\n* Trust Raptor\n* Logitech F710\n* DragonRise USB\n* Madcatz PS3 fighting stick (TODO - TEST)\n* iPega (iCade profile)\n* PC2JAMMA-USB (TODO - TEST)\n* Genius MaxFire G-08XU\n* Zeemote Steelseries\n* Saitek Rumblepad\n* Super Smart Joy\n* Groupwise PS2 to USB converter\n* Toodles 2008 Chimp\n* Sega Saturn USB pad\n*Mayflash Wii Classic\n* Mayflash PS2 to USB\n* Nintendo Wii (using ccpcreations.WiiUse IME app)\n* Nyko Playpad Pro" /> From cbd81dfc8261b0750e3a0549e327f1ae81ae5550 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 11 Feb 2013 21:14:57 +0100 Subject: [PATCH 71/74] (Android) Typo fixes for pads supported --- android/phoenix/res/layout/faq_supported_pads.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/phoenix/res/layout/faq_supported_pads.xml b/android/phoenix/res/layout/faq_supported_pads.xml index 74a774387e..1bd9fe4461 100644 --- a/android/phoenix/res/layout/faq_supported_pads.xml +++ b/android/phoenix/res/layout/faq_supported_pads.xml @@ -9,5 +9,5 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="40px" - android:text="The following pads have been added to the autodetection list:\n\n* Logitech/Logicool Rumblepad 2\n* Microsoft Sidewinder USB (ISSUE - diagonals not working).\n* Microsoft Xbox 360 Wired/Wireless (ISSUE - diagonals not working).\n* PS3 Sixaxis/DualShock 3 (using either USB or Dancingpixelstudios' IME app)\n* MOGA (using either 'root' gamepad mode or official IME app)\n* JXD S5110\n* Snakebyte idroid\n* Logitech Dual Action\n* Mayflash SUper Joy Bx 3 Pro\n*RetroUSB SNES RetroPort\n*RetroUSB NES RetroPad\n*Buffalo SNES Pad\n* Elecom PS1/PS2 to USB\n* Archos gamepad\n* Xbox 1 (Titanium X-Joy Converter) (ISSUE - diagonals not working).\n* Red Samurai (IME app Bluetooth or gamepad mode\n* Xperia Play\n* Trust Raptor\n* Logitech F710\n* DragonRise USB\n* Madcatz PS3 fighting stick (TODO - TEST)\n* iPega (iCade profile)\n* PC2JAMMA-USB (TODO - TEST)\n* Genius MaxFire G-08XU\n* Zeemote Steelseries\n* Saitek Rumblepad\n* Super Smart Joy\n* Groupwise PS2 to USB converter\n* Toodles 2008 Chimp\n* Sega Saturn USB pad\n*Mayflash Wii Classic\n* Mayflash PS2 to USB\n* Nintendo Wii (using ccpcreations.WiiUse IME app)\n* Nyko Playpad Pro" /> + android:text="The following pads have been added to the autodetection list:\n\n* Logitech/Logicool Rumblepad 2\n* Microsoft Sidewinder USB (ISSUE - diagonals not working).\n* Microsoft Xbox 360 Wired/Wireless (ISSUE - diagonals not working).\n* PS3 Sixaxis/DualShock 3 (using either USB or Dancingpixelstudios' IME app)\n* MOGA (using either 'root' gamepad mode or official IME app)\n* JXD S5110\n* Snakebyte idroid\n* Logitech Dual Action\n* Mayflash Super Joy Box 3 Pro\n*RetroUSB SNES RetroPort\n*RetroUSB NES RetroPad\n*Buffalo SNES Pad\n* Elecom PS1/PS2 to USB\n* Archos gamepad\n* Xbox 1 (Titanium X-Joy Converter) (ISSUE - diagonals not working).\n* Red Samurai (IME app Bluetooth or gamepad mode\n* Xperia Play\n* Trust Raptor\n* Logitech F710\n* DragonRise USB\n* Madcatz PS3 fighting stick (TODO - TEST)\n* iPega (iCade profile)\n* PC2JAMMA-USB (TODO - TEST)\n* Genius MaxFire G-08XU\n* Zeemote Steelseries\n* Saitek Rumblepad\n* Super Smart Joy\n* Groupwise PS2 to USB converter\n* Toodles 2008 Chimp\n* Sega Saturn USB pad\n*Mayflash Wii Classic\n* Mayflash PS2 to USB\n* Nintendo Wii (using ccpcreations.WiiUse IME app)\n* Nyko Playpad Pro" /> From 5086800f69392520a955b2d8cf7634f2568dad26 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 11 Feb 2013 21:36:23 +0100 Subject: [PATCH 72/74] (Android) Updated changelog for r11 --- android/phoenix/res/layout/faq_whats_new.xml | 25 ++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/android/phoenix/res/layout/faq_whats_new.xml b/android/phoenix/res/layout/faq_whats_new.xml index 18181410a9..dc787c4feb 100644 --- a/android/phoenix/res/layout/faq_whats_new.xml +++ b/android/phoenix/res/layout/faq_whats_new.xml @@ -10,6 +10,31 @@ android:layout_height="wrap_content" android:layout_margin="40px" android:text=" + r11 (Feb 11, 2013)\n\n + * [FBA core] Various changes/fixes\n + - Hook up Armed Police Batrider controls\n + - Afterburner - make fire buttons work\n + - Hook up Bad Dudes controls\n + - Hook up Cyberbots controls\n + - Hook up 1942 controls\n + - Add missing Chase HQ controls\n + - Add missing WWF Wrestlefest controls\n + - EEPROM save should now work (tested with EEPROM-based system such as Capcom CPS2)\n + - Samples are now looked for - should be in 'samples' subdirectory\n + - Hiscore files should now be read from/written to.\n + * [SNES9x Next] Added big speed hack for Star Fox 1 - makes it fast enough for it to run at fullspeed on the Wii.\n + * New 'Calibrate Refresh Rate' option - use this to get an accurate estimation of your screen refresh rate. NOTE: Touch the screen at all times during calibration for more accurate measurements. You might have to slightly tweak the value later on for the best results.\n + * Added a 'Set OS-reported refresh rate' which should do the same as what 'Sync refreshrate to Screen' previously did. Note 2 users might get better results with this than they will with 'Calibrate refresh rate'.\n + * Added a built-in help system that should answer a lot of the frequently asked questions.\n + * Add iCade profiles - two added for now - iPega and Red Samurai\n + * [Android] Audio resampler now faster\n + * Input autodetection expanded -\n + - PC2JAMMA-USB (needs to be tested)\n + - Genius MaxFire G-08XU\n + - Zeemote Steelseries\n + - Saitek Rumblepad\n + - Super Smart Joy\n + \n r10 (Feb 5, 2013)\n\n * [NXEngine / Cave Story] Fixed bug where moving blocks would not move in Labyrinth levels\n * Add new psx and GBA overlays by user boxs.\n From c48212726ec9aaec1a8e339d3ed277eda488324b Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 11 Feb 2013 22:08:36 +0100 Subject: [PATCH 73/74] (Android) Bump up version to 0.9.8.3 --- android/phoenix/AndroidManifest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/phoenix/AndroidManifest.xml b/android/phoenix/AndroidManifest.xml index 515bf3ef27..3344cfb734 100644 --- a/android/phoenix/AndroidManifest.xml +++ b/android/phoenix/AndroidManifest.xml @@ -1,7 +1,7 @@ + android:versionName="0.9.8.3" > Date: Mon, 11 Feb 2013 22:35:58 +0100 Subject: [PATCH 74/74] (Distribution) Add READMEs for console ports and CHANGELOG --- dist-scripts/retroarch-360-README.txt | 201 ++++++++++++++++++++ dist-scripts/retroarch-CHANGELOG.txt | 124 +++++++++++++ dist-scripts/retroarch-ps3-README.txt | 237 ++++++++++++++++++++++++ dist-scripts/retroarch-wii-readme.txt | 237 ++++++++++++++++++++++++ dist-scripts/retroarch-xbox1-README.txt | 229 +++++++++++++++++++++++ wii/pkg/meta.xml | 2 +- 6 files changed, 1029 insertions(+), 1 deletion(-) create mode 100644 dist-scripts/retroarch-360-README.txt create mode 100644 dist-scripts/retroarch-CHANGELOG.txt create mode 100644 dist-scripts/retroarch-ps3-README.txt create mode 100644 dist-scripts/retroarch-wii-readme.txt create mode 100644 dist-scripts/retroarch-xbox1-README.txt diff --git a/dist-scripts/retroarch-360-README.txt b/dist-scripts/retroarch-360-README.txt new file mode 100644 index 0000000000..b49abcea34 --- /dev/null +++ b/dist-scripts/retroarch-360-README.txt @@ -0,0 +1,201 @@ +------------------------------------------------------------------------------ +RETROARCH 360 - 0.9.8.3 +------------------------------------------------------------------------------ +RetroConsole Level: 2 +Author: Themaister, Squarepusher/Twin Aphex +------------------------------------------------------------------------------ + +------------------------------------------------------------------------------ +HOW TO INSTALL THIS +------------------------------------------------------------------------------ +Copy the entire folder to your harddrive. + +ROMs go into the 'roms' directory, or some subdirectory in the RetroArch-360 +directory. + +------------------------------------------------------------------------------ +HOW TO USE THIS +------------------------------------------------------------------------------ +On first startup, RetroArch will select one of the dozen or so +emulator/game cores. The name of the core currently loaded will be +shown at the bottom side of the screen. + +You can now select a ROM that this core supports and load it in the Filebrowser. + +To select a different core - go to 'Change Libretro core' in the Main Menu. +Press A to go to a filebrowser where you can select a different core. Press A +to switch to the emulator/game core. + +------------------------------------------------------------------------------ +INGAME CONTROLS +------------------------------------------------------------------------------ +During ingame operation you can do some extra actions: + +Right Thumb Stick - Down - Fast-forwards the game +Right Thumb Stick - Up - Rewinds the game in real-time + ('Rewind' has to be enabled in the 'Settings' + screen - warning - comes at a slight + performance decrease but will be worth it + if you love this feature) +RStick Left + RT - Decrease save state slot +Rtick Right + RT - Increase save state slot +RStick Up + RT - Load selected save state slot +RStick Down + RT - Save selected save state slot +Right Thumb + Left Thumb - Go back to 'Menu'/'Quick Menu' + +------------------------------------------------------------------------------ +WHAT IS RETROARCH? +------------------------------------------------------------------------------ +RetroArch is a modular multi-system emulator system that is designed to +be fast, lightweight and portable. It has features few other emulator +frontends have, such as real-time rewinding and game-aware shading. + +------------------------------------------------------------------------------ +WHAT IS LIBRETRO? +------------------------------------------------------------------------------ +Libretro is the API that RetroArch uses. It makes it easy to port games +and emulators to a single core backend, such as RetroArch. + +For the user, this means - more ports to play with, more crossplatform +portability, less worrying about developers having to reinvent the wheel +writing boilerplate UI/port code - so that they can get busy with writing +the emulator/porting the emulator/game. + +------------------------------------------------------------------------------ +WHAT'S THE BIG DEAL? +------------------------------------------------------------------------------ +Right now it's unique in that it runs the same emulator cores on +multiple systems (such as Xbox 360, PS3, PC, Wii, etc). + +For each emulator 'core', RetroArch makes use of a library API that we +like to call 'libretro'. + +Think of libretro as an interface for emulator and game ports. You can +make a libretro port once and expect the same code to run on all the +platforms that RetroArch supports. It's designed with simplicity and +ease of use in mind so that the porter can worry about the port at hand +instead of having to wrestle with an obfuscatory API. + +The purpose of libretro is to help ease the work of the emulator/game +porter by giving him an API that allows him to target multiple platforms +at once without having to redo any code. He doesn't have to worry about +writing input/video/audio drivers - all of that is supplied to him by +RetroArch. All he/she has to do is to have the emulator port hook +into the libretro API and that's it - we take care of the rest. + +------------------------------------------------------------------------------ +XBOX 360 PORT +------------------------------------------------------------------------------ +The Xbox 360 port of RetroArch has the following features: + +- Real-time rewinding +- Switching between emulator cores seamlessly, and ability to install +new libretro cores + +Included with RetroArch 360 are a bunch of shaders - including the latest +version of the popular xBR shader. It is possible to use two shaders +simultaneously to get the best possible graphical look. + +------------------------------------------------------------------------------ +EMULATOR/GAME CORES BUNDLED WITH XBOX 360 PORT +------------------------------------------------------------------------------ +The following emulators/games have been ported to RetroArch and are included in +the Xbox 360 release of RetroArch. + +For more information about them, see the included +'retroarch-libretro-README.txt' file. + +- Final Burn Alpha (Arcade - various) [version 0.2.97.28] +- FCEUmm (Nintendo Entertainment System) [recent SVN version] +- NEStopia (Nintendo Entertainment System) [1.44] +- Gambatte (Game Boy | Super Game Boy | Game Boy Color) [version 0.5.0 WIP] +- Genesis Plus GX (Sega SG-1000 | Master System | Game Gear | Genesis/Mega Drive | + Sega CD) [version 1.7.3] +- SNES9x Next (Super Nintendo/Super Famicom) +- VBA Next (Game Boy Advance) +- Prboom (for playing Doom 1/Doom 2/Ultimate Doom/Final Doom) +- Mednafen PCE Fast (PC Engine/PC Engine CD/Turbografx 16) +- Mednafen Wonderswan (WonderSwan/WonderSwan Color/WonderSwan Crystal) +- Mednafen NGP (Neo Geo Pocket Color) + +All of the emulators listed above are the latest versions currently +available. Most of them have been specifically optimized so that +they will run better on 360 (some games would not reach fullspeed +without these optimizations). + +------------------------------------------------------------------------------ +WHAT EXTENSIONS ARE SUPPORTED BY EACH CORE +------------------------------------------------------------------------------ +- Prboom WAD|wad +- SNES9x Next smc|fig|sfc|gd3|gd7|dx2|bsx|swc|zip|SMC|FIG|SFC|BSX|GD3| + GD7|DX2|SWC +- Genesis Plus GX md|smd|bin|gen|zip|MD|SMD|bin|GEN|ZIP|sms|SMS|gg|GG|sg|SG| + cue|CUE +- VBA Next GBA|gba +- FCEUmm nes|NES|unif|UNIF +- NEStopia nes|NES|fds|FDS +- Gambatte gb|gbc|dmg|zip|GB|GBC|DMG|ZIP +- Final Burn Alpha zip|ZIP +- Mednafen PCE pce|PCE|cue|CUE +- Mednafen Wonderswan ws|WS|wsc|WSC +- Mednafen NGP ngp|NGP + +------------------------------------------------------------------------------ +ZIP SUPPORT +------------------------------------------------------------------------------ +Selecting a ZIP file will temporarily unzip that file to the harddrive. The +temporary file will be deleted as soon as the game gets unloaded and/or when +you quit RetroArch. + +NOTE: For the FBA core (and other cores that have 'block_extract' set to +true) - selecting a ZIP file from the Filebrowser will load that game +directly. + +------------------------------------------------------------------------------ +Troubleshooting +------------------------------------------------------------------------------ + +If you find that RetroArch no longer works for whatever reason, there is +a way to get it back to work - + +- Remove retroarch.cfg from the 'Retroarch-360' folder, then start up again. +The Libretro management service in RetroArch should automatically pick a +random libretro core and write this to the config file. + +------------------------------------------------------------------------------ +What can you expect in the future? +------------------------------------------------------------------------------ +- Do a Blackberry Playbook/Blackberry 10 RetroArch port +- Do an iOS port of RetroArch (will need hardware for this - gifts appreciated) +- Make the libxenon port release-worthy. +- Add console-friendly features (nicely formatted names for FBA, some better +way to do core switching, etc) +- Fix NxEngine issues on consoles +- Finish up MAME 0.72 port +- Finish up ScummVM port +- Port of VICE to libretro +- More emulators, more games that will run on RetroArch +- Lots of other crazy ideas that might or might not pan out + +------------------------------------------------------------------------------ +Credits +------------------------------------------------------------------------------ +- Mudlord for his Waterpaint/Noise shaders. +- Hyllian for the xBR shader. +- Opium2k for the nice manual shaders (bundled with PS3 release). +- Deank for assistance with RetroArch Salamander on CFW PS3s and + Multiman interoperability. +- FBA devs for adopting the libretro port. +- Ekeeke for help with the Genesis Plus GX port. +- ToadKing for having done a lot of work on RetroArch Wii. +- Freakdave for helping out with the Xbox 1 port. + +------------------------------------------------------------------------------ +Websites +------------------------------------------------------------------------------ +Twitter: http://twitter.com/libretro +Source: http://github.com/libretro +Homepage: http://www.libretro.org +IRC: #retroarch (freenode) + +------------------------------------------------------------------------------ diff --git a/dist-scripts/retroarch-CHANGELOG.txt b/dist-scripts/retroarch-CHANGELOG.txt new file mode 100644 index 0000000000..ce5aa01f3d --- /dev/null +++ b/dist-scripts/retroarch-CHANGELOG.txt @@ -0,0 +1,124 @@ +RETROARCH CONSOLE +------------------------------------------------------------------------------ +v0.9.8.3 +------------------------------------------------------------------------------ +* [FBA core] Various changes/fixes +- Hook up Armed Police Batrider controls +- Afterburner - make fire buttons work +- Hook up Bad Dudes controls +- Hook up Cyberbots controls +- Hook up 1942 controls +- Add missing Chase HQ controls +- Add missing WWF Wrestlefest controls +- EEPROM save should now work (tested with EEPROM-based system such as Capcom CPS2) +- Samples are now looked for - should be in 'samples' subdirectory +- Hiscore files should now be read from/written to. +* [SNES9x Next] Added big speed hack for Star Fox 1 - makes it fast enough for it to run at fullspeed on the Wii. +* [Genesis Plus GX] Set samplerate back to 44Khz. +* [Android] New 'Calibrate Refresh Rate' option - use this to get an accurate estimation of your screen refresh rate. NOTE: Touch the screen at all times during calibration for more accurate measurements. You might have to slightly tweak the value later on for the best results. +* [Android] Added a 'Set OS-reported refresh rate' which should do the same as what 'Sync refreshrate to Screen' previously did. Note 2 users might get better results with this than they will with 'Calibrate refresh rate'. +* [Android] Added a built-in help system that should answer a lot of the frequently asked questions. +* ]Android] Add iCade profiles - two added for now - iPega and Red Samurai +* [Android] Audio resampler now faster +* [Android] Input autodetection expanded - +* [CONSOLES] Audio resampler is now adjustable - can choose between Sinc resampler (new) and Hermite resampler (old). Sinc is now selected by default, is superior audio-quality wise and will fix a lot of sound issues. +* [PS3] Save Preset fixed +* [PS3] Starting with Dual Shader/Custom Scaling mode OFF and then turning it ON works now +* [Wii] Numerous Wii video mode fixes - including PAL modes that went beyond the internal framebuffer bounds +- PC2JAMMA-USB (needs to be tested) +- Genius MaxFire G-08XU +- Zeemote Steelseries +- Saitek Rumblepad +- Super Smart Joy + +------------------------------------------------------------------------------ +v0.9.8.1 +------------------------------------------------------------------------------ +- (Android) Lots of changes - too numerous to list +- [FBA] Fixed serious bug that would cause a lot of games to get stuck +in service mode or to display graphical corruption (CPS1). +- [NEStopia] Now outputs in mono sound mode. +- [FCEUmm] Uses RGB565 now - should no longer flicker on RMenu. +- [Mednafen PC Engine Fast] Fixed libretro issue where certain games +had totally wrong pitch +- [Mednafen Wonderswan] Core fixed, works again. +- [Genesis Plus GX] Set audio samplerate at 48KHz (from 44KHz). +- [PS3] Fixed serious bugs where it could get 'stuck' or the app could +'hang' while toggling between ingame and quickmenu/file browser. +- [PS3] Added 'Menu Skins' to 'Retro Settings' - will allow you to +select a different background for the menu. Captain CPS-X's menu skin +is also included. +- [Wii] Fixes serious analog stick issues with CC Pro/CC. +- [Wii] Added additional resolutions - 304x224, 576x224, 608x224 +- [Wii] More natural way to switch between cores +------------------------------------------------------------------------------ +v0.9.8 +------------------------------------------------------------------------------ +- (Android) Initial release of RetroArch Android. +- [LIBRETRO] Added Mednafen NGP and Mednafen VB. +- [LIBRETRO] Added NEStopia Undead (1.44). +- [LIBRETRO] Updated Mednafen PCE Fast and Mednafen Wonderswan to 0.9.28. +- [LIBRETRO] Added PCSX ReARMed for RetroArch Android. +- [FBA] Updated Final Burn Alpha to 0.9.27.28. +- [Gambatte] Updated Gambatte (now has built-in GBC BIOS color palettes). +- [SNES9x Next] Updated SNES9x Next (fixes numerous bugs). +- [FCEUmm] Updated FCEUmm to latest version. +- [Genesis Plus GX] Updated Genesis Plus GX to latest version. +- (360) Gamma correction can now be applied on-the-fly - no longer requires +reboots +- (360) Added new shaders - mudlord-oldtvshader-variant, crt-curved, and +others +- (360) Added 'SRAM dir Enable' option - allows you to save all your SRAM to +game:/sram instead of the ROM directory +- (360) Added 'SRAM dir Enable' option - allows you to save all your states to +game:/savestates +- (RARCH_CONSOLE) Various stability fixes +- (RARCH_CONSOLE) More sane unzipping mode - will temporarily extract file to +HDD and then instantly delete it when it's done with it (ie. when another ROM +gets loaded or when RetroArch shuts down) +- (RARCH_CONSOLE) All console ports now use 59.94Hz for synchronization on +the RetroArch side instead of 59.92Hz as before. All consoles use 59.94Hz +so this agrees better with them. +- (PS3) Added PAL60 temporal PAL mode +- (PS3) Fixed a lot of path issues - SRAM/savestate dir enable now work, +'Default ROM directory' should now work, etc. +- (PS3) Added rewind granularity options +- (PS3) Rewrote video driver from scratch (RGL v2). Faster blitting. +- (PS3) Onscreen keyboard should work again. +- (WII) Made a custom wiiuse input driver and built it in. Slimmed down +and should give better results. Also rejigged input in general. +- (WII) Added rewind option. NOTE: This feature is CPU intensive - a core +might need to at least run at double realtime FPS in order for this option +to be useful. +- (WII) Button combos can now be done ingame. You can do rewinding, fast +forwarding, selecting save state slots and 'save state load/save state save' +all ingame without first going to the menu. For more information, read the +README.txt for the Wii release. +------------------------------------------------------------------------------ +v0.9.7.1 +------------------------------------------------------------------------------ +- (FBAcores CPS1) Sound crackling/popping fixed +- (FBACores CPS2) Sound crackling/popping fixed +- (FBACores NeoGeo) Sound crackling/popping fixed +- (WII) Fixed left/right audio channels being in reverse issue +- (WII) Filebrowser now filters by core supported extensions +- (WII) Fixed filebrowser performance issues in v0.9.7 +------------------------------------------------------------------------------ +v0.9.7 +------------------------------------------------------------------------------ +- (XBOX 1/Wii) Made an Xbox 1/Wii port. +- (LIBRETRO) Added Mednafen PCE FAST, and Mednafen Wonderswan cores +- (360) Added Genesis Plus GX to official 360 release +- (Genesis Plus GX) Updated to v1.7.0 +- (PS3) Improved GUI +- (360) Improved UI +- (ALL) Improved stability / error trapping +- (ALL) ZIP extract modes expanded - it can extract the contents of a ZIP file to +the current directory, and/or extract to current dir and immediately load the +first ROM/game file. +- Too many things to mention + +------------------------------------------------------------------------------ +v0.9.6 +------------------------------------------------------------------------------ +- (PS3/360) Initial release of RetroArch PS3/360. diff --git a/dist-scripts/retroarch-ps3-README.txt b/dist-scripts/retroarch-ps3-README.txt new file mode 100644 index 0000000000..bef61e3d54 --- /dev/null +++ b/dist-scripts/retroarch-ps3-README.txt @@ -0,0 +1,237 @@ +------------------------------------------------------------------------------ +RETROARCH PS3 - 0.9.8.3 +------------------------------------------------------------------------------ +RetroConsole Level: 2 +Author: Themaister, Squarepusher/Twin Aphex +------------------------------------------------------------------------------ + +------------------------------------------------------------------------------ +HOW TO INSTALL THIS +------------------------------------------------------------------------------ + +------------------------------------------------------------------------------ +ON DEBUG (DEX) PS3 +------------------------------------------------------------------------------ +Put the PKG file 'retroarch-ps3-v0.9.8.3-dex.pkg' on your +USB stick, put it in your PS3. Go to the PS3 XMB - go to the +Game tab - Select 'Install Packages', and install the PKG file. + +------------------------------------------------------------------------------ +ON CFW P3 +------------------------------------------------------------------------------ +Put the PKG file 'retroarch-ps3-v0.9.8.3-cfw.pkg' on your +USB stick. Put it in your CFW PS3. Go to the PS3 XMB - go to the +Game tab - select 'Install Packages', and install the PKG file. + +NOTE: The official release no longer supports Geohot/Wutangzra +CFWs. If you must use them, you have to do pkg_finalize on the PKG +to install it. + +------------------------------------------------------------------------------ +HOW TO USE THIS +------------------------------------------------------------------------------ +On first startup, RetroArch will select one of the dozen or +so emulator/game cores. The name of the core currently loaded will +be shown at the top side of the screen. + +You can now select a ROM that this core supports and load it in +the Filebrowser. + +To select a different core in the menu - press Select to go to the +Settings screen. From here, go to the 'Retro tab', and select +'Default emulator core'. Press X to go to a filebrowser where you +can select a different core. Press X to confirm, then exit +RetroArch. Start up again to boot up to the new emulator core. + +To change to a different core ingame - press R3 to bring up +the 'Quick Menu'. Select 'Change libretro core'. Press X to +go to a filebrowser where you can select a different core. + +------------------------------------------------------------------------------ +INGAME CONTROLS +------------------------------------------------------------------------------ +During ingame operation you can do some extra actions: + +Right Thumb Stick - Down - Fast-forwards the game +Right Thumb Stick - Up - Rewinds the game in real-time + ('Rewind' has to be enabled in the + 'Settings' menu - warning - comes at a + performance decrease but will be worth it + if you love this feature) +RStick Left + R2 - Decrease save state slot +Rtick Right + R2 - Increase save state slot +RStick Up + R2 - Load selected save state slot +RStick Down + R2 - Save selected save state slot +L3 + R3 - Go back to 'Menu'/'Quick Menu' + +------------------------------------------------------------------------------ +WHAT IS RETROARCH? +------------------------------------------------------------------------------ +RetroArch is a modular multi-system emulator system that is +designed to be fast, lightweight and portable. It has features +few other emulator frontends have, such as real-time rewinding +and game-aware shading. + +------------------------------------------------------------------------------ +WHAT IS LIBRETRO? +------------------------------------------------------------------------------ +Libretro is the API that RetroArch uses. It makes it easy to +port games and emulators to a single core backend, such as +RetroArch. + +For the user, this means - more ports to play with, more +crossplatform portability, less worrying about developers having +to reinvent the wheel writing boilerplate UI/port code - so that +they can get busy with writing the emulator/porting the emulator/game. + +------------------------------------------------------------------------------ +WHAT'S THE BIG DEAL? +------------------------------------------------------------------------------ +Right now it's unique in that it runs the same emulator cores on +multiple systems (such as Xbox 360, PS3, PC, Wii, Xbox 1, etc). + +For each emulator 'core', RetroArch makes use of a library API that +we like to call 'libretro'. + +Think of libretro as an interface for emulator and game ports. You +can make a libretro port once and expect the same code to run on all +the platforms that RetroArch supports. It's designed with simplicity +and ease of use in mind so that the porter can worry about the port +at hand instead of having to wrestle with an obfuscatory API. + +The purpose of libretro is to help ease the work of the emulator/game +porter by giving him an API that allows him to target multiple +platforms at once without having to redo any code. He doesn't have +to worry about writing input/video/audio drivers - all of that is +supplied to him by RetroArch. All he has to do is to have the emulator +port hook into the libretro API and that's it - we take care of the rest. + +------------------------------------------------------------------------------ +PLAYSTATION3 PORT +------------------------------------------------------------------------------ +The PS3 port of RetroArch is one of the most developed console ports +of RetroArch. + +A couple of unique features RetroArch PS3 boasts that is not commonly +found anywhere else: + +- Game-aware shading in every emulator now (*) +- Real-time rewinding +- More shader features (motion blurring, etc) +- Switching between emulator cores seamlessly, and ability to install new + libretro cores + +Included with RetroArch PS3 are a bunch of shaders - including the +latest versions of the popular xBR shader. It is possible to use two +shaders simultaneously to get the best possible graphical look. + +* Check out Opium2k's manual shaders for Zelda 3 and others - you can +find DLC packs for RetroArch at this site: + +https://code.google.com/p/retro-arch/ + +------------------------------------------------------------------------------ +EMULATOR/GAME CORES BUNDLED WITH PS3 PORT +------------------------------------------------------------------------------ +The following emulators have been ported to RetroArch and are included +in the PS3 release of RetroArch. + +For more information about them, see the included +'retroarch-libretro-README.txt' file. + +- Final Burn Alpha (Arcade - various) [version 0.2.97.28] +- FCEUmm (Nintendo Entertainment System) [recent SVN version] +- NEStopia (Nintendo Entertainment System) [1.44] +- Gambatte (Game Boy | Super Game Boy | Game Boy Color) [version 0.5.0 WIP] +- Genesis Plus GX (Sega SG-1000 | Master System | Game Gear | Genesis/Mega Drive | + Sega CD) [version 1.7.3] +- SNES9x Next (Super Nintendo/Super Famicom) +- VBA Next (Game Boy Advance) +- Prboom (for playing Doom 1/Doom 2/Ultimate Doom/Final Doom) +- Mednafen PCE Fast (PC Engine/PC Engine CD/Turbografx 16) +- Mednafen Wonderswan (WonderSwan/WonderSwan Color/WonderSwan Crystal) +- Mednafen NGP (Neo Geo Pocket Color) +- Mednafen VB (Virtual Boy) + +All of the emulators listed above are the latest versions currently +available. Most of them have been specifically optimized so that they +will run better on PS3 (some games would not reach fullspeed without these optimizations). + +------------------------------------------------------------------------------ +WHAT EXTENSIONS ARE SUPPORTED BY EACH CORE +------------------------------------------------------------------------------ +- Prboom WAD|wad +- SNES9x Next smc|fig|sfc|gd3|gd7|dx2|bsx|swc|zip|SMC|FIG|SFC|BSX|GD3| + GD7|DX2|SWC +- Genesis Plus GX md|smd|bin|gen|zip|MD|SMD|bin|GEN|ZIP|sms|SMS|gg|GG|sg|SG| + cue|CUE +- VBA Next GBA|gba +- FCEUmm nes|NES|unif|UNIF +- NEStopia nes|NES|fds|FDS +- Gambatte gb|gbc|dmg|zip|GB|GBC|DMG|ZIP +- Final Burn Alpha zip|ZIP +- Mednafen PCE pce|PCE|cue|CUE +- Mednafen Wonderswan ws|WS|wsc|WSC +- Mednafen NGP ngp|NGP +- Mednafen VB vb|VB + +------------------------------------------------------------------------------ +ZIP SUPPORT +------------------------------------------------------------------------------ +Selecting a ZIP file will temporarily unzip that file to the harddrive. The +temporary file will be deleted as soon as the game gets unloaded and/or when +you quit RetroArch. + +NOTE: For the FBA core (and other cores that have 'block_extract' set to +true) - selecting a ZIP file from the Filebrowser will load that game +directly. + +------------------------------------------------------------------------------ +Troubleshooting +------------------------------------------------------------------------------ + +If you find that RetroArch no longer works for whatever reason, there is +a way to get it back to work - + +- Remove retroarch.cfg from the 'SSNE100000' folder, then start up again. +The Libretro management service in RetroArch should automatically pick a +random libretro core and write this to the config file. + +------------------------------------------------------------------------------ +What can you expect in the future? +------------------------------------------------------------------------------ +- Do a Blackberry Playbook/Blackberry 10 RetroArch port +- Do an iOS port of RetroArch (will need hardware for this - gifts appreciated) +- Make the libxenon port release-worthy. +- Add console-friendly features (nicely formatted names for FBA, some better +way to do core switching, etc) +- Fix NxEngine issues on consoles +- Finish up MAME 0.72 port +- Finish up ScummVM port +- Port of VICE to libretro +- More emulators, more games that will run on RetroArch +- Lots of other crazy ideas that might or might not pan out + +------------------------------------------------------------------------------ +Credits +------------------------------------------------------------------------------ +- Mudlord for his Waterpaint/Noise shaders. +- Hyllian for the xBR shader. +- Opium2k for the nice manual shaders (bundled with PS3 release). +- Deank for assistance with RetroArch Salamander on CFW PS3s and + Multiman interoperability. +- FBA devs for adopting the libretro port. +- Ekeeke for help with the Genesis Plus GX port. +- ToadKing for having done a lot of work on RetroArch Wii. +- Freakdave for helping out with the Xbox 1 port. + +------------------------------------------------------------------------------ +Websites +------------------------------------------------------------------------------ +Twitter: http://twitter.com/libretro +Source: http://github.com/libretro +Homepage: http://www.libretro.org +Opium2K DLC for RetroArch: https://code.google.com/p/retro-arch/ +IRC: #retroarch (freenode) + +------------------------------------------------------------------------------ diff --git a/dist-scripts/retroarch-wii-readme.txt b/dist-scripts/retroarch-wii-readme.txt new file mode 100644 index 0000000000..eb28304084 --- /dev/null +++ b/dist-scripts/retroarch-wii-readme.txt @@ -0,0 +1,237 @@ +------------------------------------------------------------------------------ +RETROARCH WII - 0.9.8.3 +------------------------------------------------------------------------------ +RetroConsole Level: 1 +Author: Themaister, Toad King, Squarepusher/Twin Aphex +------------------------------------------------------------------------------ + +------------------------------------------------------------------------------ +HOW TO INSTALL THIS +------------------------------------------------------------------------------ +Copy the entire directory (retroarch-wii) to your SD card in your 'apps' +directory. Start up the Homebrew Channel and start up RetroArch Wii from +there. + +On first startup, RetroArch will create a folder in the root of your storage +device called 'retroarch'. All RetroArch configuration files are stored here. + +------------------------------------------------------------------------------ +HOW TO USE THIS +------------------------------------------------------------------------------ +On first startup, RetroArch will select one of the dozen or so +emulator/game cores. The name of the core currently loaded will be +shown at the bottom side of the screen. + +You can now select a ROM that this core supports and load it in the Filebrowser. + +To select a different core - go to the Settings menu (see 'Ingame controls'). +Select the option 'Core' and hit the A button. A filebrowser will appear +where you can select a different core. Press A to switch to the +emulator/game core. + +After doing so, select 'Restart RetroArch' to load the newly selected core. + +------------------------------------------------------------------------------ +CONTROLS +------------------------------------------------------------------------------ +RetroArch Wii will create a new input config file for each core you load. +All input settings will be saved when RetroArch exits. + +NOTE: When starting up a new core for the first time, you might have to first +initialize the input settings. Go to the Settings menu (see 'Ingame controls') +and go to 'Controller #number config'. Re-set the 'Device' by going back and +forth between a previous device. The controls will be automatically applied. + +This only has to be done once per core. + +------------------------------------------------------------------------------ +INGAME CONTROLS +------------------------------------------------------------------------------ +During ingame operation you can do some extra actions: + +Wii Classic Minus - Go to Settings +Wii Classic Controller Home + ZL + ZR - Quit RetroArch +Wii Classic Controller Home - Go back to 'Menu' + +Wiimote Minus - Go to Settings +Wiimote Home - Go back to 'Menu' +Wiimote Home + B - Quit RetroArch + +Gamecube pad Z - Go to Settings +Gamecube pad L + R + LStick Up + Rstick Up - Go back to 'Menu' +Gamecube pad L + R + LStick Down + Rstick Down - Quit RetroArch + +Right Thumb Stick - Down - Fast-forwards the game +Right Thumb Stick - Up - Rewinds the game in real-time + ('Rewind' has to be enabled in the + 'Settings' menu - warning - comes at a + performance decrease but will be worth it + if you love this feature) +RStick Left + ZL - Decrease save state slot +Rtick Right + ZR - Increase save state slot +RStick Up + ZR - Load selected save state slot +RStick Down + ZR - Save selected save state slot + +(NOTE: For Gamecube pads - you would press Z trigger + any of the Rstick +Down movements shown above instead of ZR/ZL) + +------------------------------------------------------------------------------ +WHAT IS RETROARCH? +------------------------------------------------------------------------------ +RetroArch is a modular multi-system emulator system that is designed to +be fast, lightweight and portable. + +------------------------------------------------------------------------------ +WHAT IS LIBRETRO? +------------------------------------------------------------------------------ +Libretro is the API that RetroArch uses. It makes it easy to port games +and emulators to a single core backend, such as RetroArch. + +For the user, this means - more ports to play with, more crossplatform +portability, less worrying about developers having to reinvent the wheel +writing boilerplate UI/port code - so that they can get busy with writing +the emulator/porting the emulator/game. + +------------------------------------------------------------------------------ +WHAT'S THE BIG DEAL? +------------------------------------------------------------------------------ +Right now it's unique in that it runs the same emulator cores on +multiple systems (such as Xbox 360, Xbox 1, PS3, PC, Wii, Android, +etc). + +For each emulator 'core', RetroArch makes use of a library API that we +like to call 'libretro'. + +Think of libretro as an interface for emulator and game ports. You can +make a libretro port once and expect the same code to run on all the +platforms that RetroArch supports. It's designed with simplicity and +ease of use in mind so that the porter can worry about the port at hand +instead of having to wrestle with an obfuscatory API. + +The purpose of libretro is to help ease the work of the emulator/game +porter by giving him an API that allows him to target multiple platforms +at once without having to redo any code. He doesn't have to worry about +writing input/video/audio drivers - all of that is supplied to him by +RetroArch. All he has to do is to have the emulator port hook into the +libretro API and that's it - we take care of the rest. + +------------------------------------------------------------------------------ +WII PORT +------------------------------------------------------------------------------ +The Wii port of RetroArch has the following features: + +- Real-time rewinding +- Switching between emulator cores seamlessly, and ability to install +new libretro cores + +------------------------------------------------------------------------------ +EMULATOR/GAME CORES BUNDLED WITH WII PORT +------------------------------------------------------------------------------ +The following emulators/games have been ported to RetroArch and are included in +the Wii release of RetroArch. + +For more information about them, see the included +'retroarch-libretro-README.txt' file. + +- Final Burn Alpha [version 0.2.97.28] +- Final Burn Alpha Cores (CPS1 - CPS2 - NeoGeo) [version 0.2.97.28] (**) +- FCEUmm (Nintendo Entertainment System) [recent SVN version] +- NEStopia (Nintendo Entertainment System) [1.44] +- Gambatte (Game Boy | Super Game Boy | Game Boy Color) [version 0.5.0 WIP] +- Genesis Plus GX (Sega SG-1000 | Master System | Game Gear | Genesis/Mega Drive | + Sega CD) [version 1.7.3] +- SNES9x Next (Super Nintendo/Super Famicom) +- VBA Next (Game Boy Advance) (*) +- Prboom (for playing Doom 1/Doom 2/Ultimate Doom/Final Doom) +- Mednafen PCE Fast (PC Engine/PC Engine CD/Turbografx 16) +- Mednafen Wonderswan (WonderSwan/WonderSwan Color/WonderSwan Crystal) +- Mednafen NGP (Neo Geo Pocket Color) +- Mednafen VB (Virtual Boy) + +All of the emulators listed above are the latest versions currently +available. Most of them have been specifically optimized so that +they will run better on Wii (some games would not reach fullspeed +without these optimizations). + +* Some games don't run at fullspeed on Wii (VBA Next is a +RetroConsole Level 2 emulator port). +** The biggest Neo-Geo ROMs that can be loaded are around 23+MB in +size, such as Real Bout Fatal Fury 1 and King of Fighters '96. + +------------------------------------------------------------------------------ +WHAT EXTENSIONS ARE SUPPORTED BY EACH CORE +------------------------------------------------------------------------------ +- Prboom WAD|wad +- SNES9x Next smc|fig|sfc|gd3|gd7|dx2|bsx|swc|zip|SMC|FIG|SFC|BSX|GD3| + GD7|DX2|SWC +- Genesis Plus GX md|smd|bin|gen|zip|MD|SMD|bin|GEN|ZIP|sms|SMS|gg|GG|sg|SG| + cue|CUE +- VBA Next GBA|gba +- FCEUmm nes|NES|unif|UNIF +- NEStopia nes|NES|fds|FDS +- Gambatte gb|gbc|dmg|zip|GB|GBC|DMG|ZIP +- Final Burn Alpha zip|ZIP +- Mednafen PCE pce|PCE|cue|CUE +- Mednafen Wonderswan ws|WS|wsc|WSC +- Mednafen NGP ngp|NGP +- Mednafen VB vb|VB + +------------------------------------------------------------------------------ +ZIP SUPPORT (IN GENERAL) +------------------------------------------------------------------------------ +Selecting a ZIP file will temporarily unzip that file to the harddrive. The +temporary file will be deleted as soon as the game gets unloaded and/or when +you quit RetroArch. + +NOTE: For the FBA core (and other cores that have 'block_extract' set to +true) - selecting a ZIP file from the Filebrowser will load that game +directly. + +------------------------------------------------------------------------------ +Troubleshooting +------------------------------------------------------------------------------ + +If you find that RetroArch no longer works for whatever reason, there is +a way to get it back to work - + +- Remove retroarch.cfg from the 'retroarch' folder on your storage device, +then start up again. The Libretro management service in RetroArch should +automatically pick a random libretro core and write this to the config file. + +------------------------------------------------------------------------------ +What can you expect in the future? +------------------------------------------------------------------------------ +- Do a Blackberry Playbook/Blackberry 10 RetroArch port +- Do an iOS port of RetroArch (will need hardware for this - gifts appreciated) +- Make the libxenon port release-worthy. +- Add console-friendly features (nicely formatted names for FBA, some better +way to do core switching, etc) +- Fix NxEngine issues on consoles +- Finish up MAME 0.72 port +- Finish up ScummVM port +- Port of VICE to libretro +- More emulators, more games that will run on RetroArch +- Lots of other crazy ideas that might or might not pan out + +------------------------------------------------------------------------------ +Credits +------------------------------------------------------------------------------ +- Hyllian for the xBR shader family. +- Opium2k for the nice manual shaders (bundled with PS3 release). +- Deank for assistance with RetroArch Salamander on CFW PS3s and +- Mudlord for his Waterpaint/Noise shaders. + Multiman interoperability. +- FBA devs for adopting the libretro port. +- Ekeeke for help with the Genesis Plus GX port. +- ToadKing for having done a lot of work on RetroArch Wii. +- Freakdave for helping out with the Xbox 1 port. + +------------------------------------------------------------------------------ +Websites +------------------------------------------------------------------------------ +Twitter: http://twitter.com/libretro +Source: http://github.com/libretro +Homepage: http://www.libretro.org +IRC: #retroarch (freenode) + +------------------------------------------------------------------------------ diff --git a/dist-scripts/retroarch-xbox1-README.txt b/dist-scripts/retroarch-xbox1-README.txt new file mode 100644 index 0000000000..f60efa1329 --- /dev/null +++ b/dist-scripts/retroarch-xbox1-README.txt @@ -0,0 +1,229 @@ +------------------------------------------------------------------------------ +RETROARCH XBOX 1 - 0.9.8.3 +------------------------------------------------------------------------------ +RetroConsole Level: 1 +Author: Themaister, Squarepusher/Twin Aphex, Freakdave +------------------------------------------------------------------------------ + +------------------------------------------------------------------------------ +HOW TO INSTALL THIS +------------------------------------------------------------------------------ +Copy the entire folder ('RetroArch-XB1') to your harddrive. + +ROMs go into the 'roms' directory, or some subdirectory in the 'RetroArch-XB1' +directory. + +------------------------------------------------------------------------------ +HOW TO USE THIS +------------------------------------------------------------------------------ +On first startup, RetroArch will select one of the dozen or so +emulator/game cores. The name of the core currently loaded will be +shown at the bottom side of the screen. + +You can now select a ROM that this core supports and load it in the Filebrowser. + +There are two ways of selecting a different core: + +1) 'Change Libretro core' in the Main Menu + +Go to the Settings menu by pressing [Select], go forwards two pages by pressing +he [R Trigger] until you come across 'Default libretro core'. Press A to go to +a filebrowser where you can select a different core. Press [A button] to switch +to the emulator/game core. + +2) From the Ingame Menu + +While playing a game, press the [Right Thumb] button. Select 'Change libretro core' +with the [A button] and select a different core. + +------------------------------------------------------------------------------ +INGAME CONTROLS +------------------------------------------------------------------------------ +During ingame operation you can do some extra actions: + +Right Thumb Stick - Down - Fast-forwards the game +Right Thumb Stick - Up - Rewinds the game in real-time + ('Rewind' has to be enabled in the 'Settings' + screen - warning - comes at a slight + performance decrease but will be worth it + if you love this feature) +RStick Left + RT - Decrease save state slot +Rtick Right + RT - Increase save state slot +RStick Up + RT - Load selected save state slot +RStick Down + RT - Save selected save state slot +Right Thumb + Left Thumb - Go back to 'Menu'/'Quick Menu' + +------------------------------------------------------------------------------ +FILE BROWSER EXTRA CONTROLS +------------------------------------------------------------------------------ + +Left Trigger - Go to previous drive mapping +Right Trigger - Go to next drive mapping + +White - Scroll list up +Black - Scroll list down + +------------------------------------------------------------------------------ +WHAT IS RETROARCH? +------------------------------------------------------------------------------ +RetroArch is a modular multi-system emulator system that is designed to +be fast, lightweight and portable. It has features few other emulator +frontends have, such as real-time rewinding and game-aware shading. + +------------------------------------------------------------------------------ +WHAT IS LIBRETRO? +------------------------------------------------------------------------------ +Libretro is the API that RetroArch uses. It makes it easy to port games +and emulators to a single core backend, such as RetroArch. + +For the user, this means - more ports to play with, more crossplatform +portability, less worrying about developers having to reinvent the wheel +writing boilerplate UI/port code - so that they can get busy with writing +the emulator/porting the emulator/game. + +------------------------------------------------------------------------------ +WHAT'S THE BIG DEAL? +------------------------------------------------------------------------------ +Right now it's unique in that it runs the same emulator cores on +multiple systems (such as Xbox 360, Xbox 1, PS3, PC, Wii, etc). + +For each emulator 'core', RetroArch makes use of a library API that we +like to call 'libretro'. + +Think of libretro as an interface for emulator and game ports. You can +make a libretro port once and expect the same code to run on all the +platforms that RetroArch supports. It's designed with simplicity and +ease of use in mind so that the porter can worry about the port at hand +instead of having to wrestle with an obfuscatory API. + +The purpose of libretro is to help ease the work of the emulator/game +porter by giving him an API that allows him to target multiple platforms +at once without having to redo any code. He doesn't have to worry about +writing input/video/audio drivers - all of that is supplied to him by +RetroArch. All he has to do is to have the emulator port hook into the +libretro API and that's it - we take care of the rest. + +------------------------------------------------------------------------------ +XBOX 1 PORT +------------------------------------------------------------------------------ +The Xbox 1 port of RetroArch has the following features: + +- Real-time rewinding. +- Switching between emulator cores seamlessly, and ability to install +new libretro cores + +------------------------------------------------------------------------------ +EMULATOR/GAME CORES BUNDLED WITH XBOX 1 PORT +------------------------------------------------------------------------------ +The following emulators/games have been ported to RetroArch and are included in +the Xbox 1 release of RetroArch. + +For more information about them, see the included +'retroarch-libretro-README.txt' file. + +- Final Burn Alpha (Arcade - various) [version 0.2.97.28] +- Final Burn Alpha Cores (CPS1 - CPS2 - Neo - more) [version 0.2.97.28] (***) +- FCEUmm (Nintendo Entertainment System) [recent SVN version] +- NEStopia (Nintendo Entertainment System) [1.44] +- Gambatte (Game Boy | Super Game Boy | Game Boy Color) [version 0.5.0 WIP] +- Genesis Plus GX (Sega SG-1000 | Master System | Game Gear | Genesis/Mega Drive | + Sega CD) [version 1.7.3] +- SNES9x Next (Super Nintendo/Super Famicom) (v1.52.3) (**) +- VBA Next (Game Boy Advance) (*) +- Prboom (for playing Doom 1/Doom 2/Ultimate Doom/Final Doom) +- Mednafen PCE Fast (PC Engine/PC Engine CD/Turbografx 16) +- Mednafen Wonderswan (WonderSwan/WonderSwan Color/WonderSwan Crystal) +- Mednafen NGP (Neo Geo Pocket Color) + +All of the emulators listed above are the latest versions currently +available. Most of them have been specifically optimized so that +they will run better on Xbox 1 (some games would not reach fullspeed +without these optimizations). + +* - VBA Next doesn't run at fullspeed on Wii (VBA Next is a RetroConsole +Level 2 emulator port). It will be replaced by a port of gpSP in the near +future. +** - SuperFX games will not run at fullspeed - a special version of SNES9x +will be developed for Retro Console Level 1 systems. +*** The biggest Neo-Geo ROMs that can be loaded are around 23+MB in +size, such as Real Bout Fatal Fury 1 and King of Fighters '96. + +------------------------------------------------------------------------------ +WHAT EXTENSIONS ARE SUPPORTED BY EACH CORE +------------------------------------------------------------------------------ +- Prboom WAD|wad +- SNES9x Next smc|fig|sfc|gd3|gd7|dx2|bsx|swc|zip|SMC|FIG|SFC|BSX|GD3| + GD7|DX2|SWC +- Genesis Plus GX md|smd|bin|gen|zip|MD|SMD|bin|GEN|ZIP|sms|SMS|gg|GG|sg|SG| + cue|CUE +- VBA Next GBA|gba +- FCEUmm nes|NES|unif|UNIF +- NEStopia nes|NES|fds|FDS +- Gambatte gb|gbc|dmg|zip|GB|GBC|DMG|ZIP +- Final Burn Alpha zip|ZIP +- Mednafen PCE pce|PCE|cue|CUE +- Mednafen Wonderswan ws|WS|wsc|WSC +- Mednafen PCE pce|PCE|cue|CUE +- Mednafen Wonderswan ws|WS|wsc|WSC +- Mednafen NGP ngp|NGP + +------------------------------------------------------------------------------ +ZIP SUPPORT +------------------------------------------------------------------------------ +Selecting a ZIP file will temporarily unzip that file to the harddrive. The +temporary file will be deleted as soon as the game gets unloaded and/or when +you quit RetroArch. + +NOTE: For the FBA core (and other cores that have 'block_extract' set to +true) - selecting a ZIP file from the Filebrowser will load that game +directly. + +------------------------------------------------------------------------------ +Troubleshooting +------------------------------------------------------------------------------ + +If you find that RetroArch no longer works for whatever reason, there is +a way to get it back to work - + +- Remove retroarch.cfg from the 'Retroarch-XB1' folder, then start up again. +The Libretro management service in RetroArch should automatically pick a +random libretro core and write this to the config file. + +------------------------------------------------------------------------------ +What can you expect in the future? +------------------------------------------------------------------------------ +- Do a Blackberry Playbook/Blackberry 10 RetroArch port +- Do an iOS port of RetroArch (will need hardware for this - gifts appreciated) +- Make the libxenon port release-worthy. +- Add console-friendly features (nicely formatted names for FBA, some better +way to do core switching, etc) +- Fix NxEngine issues on consoles +- Finish up MAME 0.72 port +- Finish up ScummVM port +- Port of VICE to libretro +- More emulators, more games that will run on RetroArch +- Lots of other crazy ideas that might or might not pan out + +------------------------------------------------------------------------------ +Credits +------------------------------------------------------------------------------ +- Mudlord for his Waterpaint/Noise shaders. +- Hyllian for the xBR shader. +- Opium2k for the nice manual shaders (bundled with PS3 release). +- Deank for assistance with RetroArch Salamander on CFW PS3s and + Multiman interoperability. +- FBA devs for adopting the libretro port. +- Ekeeke for help with the Genesis Plus GX port. +- ToadKing for having done a lot of work on RetroArch Wii. +- Freakdave for helping out with the Xbox 1 port. + +------------------------------------------------------------------------------ +Websites +------------------------------------------------------------------------------ +Twitter: http://twitter.com/libretro +Source: http://github.com/libretro +Homepage: http://www.libretro.org +IRC: #retroarch (freenode) + +------------------------------------------------------------------------------ + diff --git a/wii/pkg/meta.xml b/wii/pkg/meta.xml index 47e5dbef1a..677c2e8975 100644 --- a/wii/pkg/meta.xml +++ b/wii/pkg/meta.xml @@ -2,7 +2,7 @@ RetroArch GX Maister, Squarepusher, ToadKing - 0.9.8.1 + 0.9.8.3 2012-2013 Multi-system emulator A port of RetroArch to the GameCube/Wii.