From 0b02eb7712f1272fa7f38b0af41968b53af3b5a8 Mon Sep 17 00:00:00 2001 From: notaz Date: Mon, 13 Aug 2012 00:02:23 +0300 Subject: add support for software-enhanced rendering --- frontend/main.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'frontend/main.c') diff --git a/frontend/main.c b/frontend/main.c index 19e8319..c98e9e0 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -143,6 +143,8 @@ void emu_set_default_config(void) Config.PsxAuto = 1; pl_rearmed_cbs.gpu_neon.allow_interlace = 2; // auto + pl_rearmed_cbs.gpu_neon.enhancement_enable = + pl_rearmed_cbs.gpu_neon.enhancement_no_main = 0; pl_rearmed_cbs.gpu_peops.iUseDither = 0; pl_rearmed_cbs.gpu_peops.dwActFixes = 1<<7; pl_rearmed_cbs.gpu_unai.abe_hack = -- cgit v1.2.3 From d81b8e972678928ffece2d38213de8048f5e872d Mon Sep 17 00:00:00 2001 From: notaz Date: Wed, 15 Aug 2012 21:52:52 +0300 Subject: frontend: add renderer toggle option --- frontend/main.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'frontend/main.c') diff --git a/frontend/main.c b/frontend/main.c index c98e9e0..7c15cb0 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -232,6 +232,11 @@ do_state_slot: pl_rearmed_cbs.frameskip == 0 ? "OFF" : "1" ); plugin_call_rearmed_cbs(); break; + case SACTION_TOGGLE_RENDERER: + pl_rearmed_cbs.gpu_neon.enhancement_enable = + !pl_rearmed_cbs.gpu_neon.enhancement_enable; + plugin_call_rearmed_cbs(); + break; case SACTION_SCREENSHOT: { char buf[MAXPATHLEN]; -- cgit v1.2.3 From fa56d36096cd4ab2b227ce2aa61c8404b8874689 Mon Sep 17 00:00:00 2001 From: notaz Date: Mon, 29 Oct 2012 01:08:35 +0200 Subject: move blit to core, allow filtering while blitting also adds libpicofe to pull filters from, and filter related UI stuff --- frontend/main.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'frontend/main.c') diff --git a/frontend/main.c b/frontend/main.c index 7c15cb0..56b5cb7 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -232,10 +232,13 @@ do_state_slot: pl_rearmed_cbs.frameskip == 0 ? "OFF" : "1" ); plugin_call_rearmed_cbs(); break; - case SACTION_TOGGLE_RENDERER: - pl_rearmed_cbs.gpu_neon.enhancement_enable = - !pl_rearmed_cbs.gpu_neon.enhancement_enable; + case SACTION_SWITCH_DISPMODE: + pl_switch_dispmode(); plugin_call_rearmed_cbs(); + if (GPU_open != NULL && GPU_close != NULL) { + GPU_close(); + GPU_open(&gpuDisp, "PCSX", NULL); + } break; case SACTION_SCREENSHOT: { -- cgit v1.2.3 From cc56203b76e1fcef2c7e55b460daf07e654a1547 Mon Sep 17 00:00:00 2001 From: notaz Date: Mon, 5 Nov 2012 00:28:57 +0200 Subject: switch over to libpicofe - libretro should not be affected by this, all others need to do 'git submodule init && git submodule update' from now on. - pandora should get gamma control support --- frontend/main.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'frontend/main.c') diff --git a/frontend/main.c b/frontend/main.c index 56b5cb7..24e1f12 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -25,12 +25,14 @@ #include "../libpcsxcore/cheat.h" #include "../libpcsxcore/new_dynarec/new_dynarec.h" #include "../plugins/cdrcimg/cdrcimg.h" -#include "common/plat.h" -#include "common/readpng.h" -#include "common/input.h" -#include "linux/in_evdev.h" #include "revision.h" +#ifndef NO_FRONTEND +#include "libpicofe/input.h" +#include "libpicofe/plat.h" +#include "libpicofe/readpng.h" +#endif + // don't include debug.h - it breaks ARM build (R1 redefined) void StartDebugger(); void StopDebugger(); @@ -262,7 +264,7 @@ do_state_slot: } case SACTION_VOLUME_UP: case SACTION_VOLUME_DOWN: - plat_step_volume(emu_action == SACTION_VOLUME_UP); + plat_target_step_volume(emu_action == SACTION_VOLUME_UP); return; case SACTION_MINIMIZE: if (GPU_close != NULL) -- cgit v1.2.3 From e0aec5eebf0fefe7a7314940546ef8a23d2169b7 Mon Sep 17 00:00:00 2001 From: notaz Date: Mon, 5 Nov 2012 01:23:29 +0200 Subject: drop some unused code --- frontend/main.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'frontend/main.c') diff --git a/frontend/main.c b/frontend/main.c index 24e1f12..a71ddea 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -860,15 +860,6 @@ void *SysLoadLibrary(const char *lib) { return (void *)(long)(PLUGIN_DL_BASE + builtin_plugin_ids[i]); } -#if defined(__x86_64__) || defined(__i386__) - // convenience hack - if (strstr(lib, ".x86") == NULL) { - char name[MAXPATHLEN]; - snprintf(name, sizeof(name), "%s.x86_64", lib); - lib = name; - } -#endif - ret = dlopen(lib, RTLD_NOW); if (ret == NULL) fprintf(stderr, "dlopen: %s\n", dlerror()); -- cgit v1.2.3 From 456f1b86b44a631e7c58e42ae72ce07970843944 Mon Sep 17 00:00:00 2001 From: notaz Date: Tue, 6 Nov 2012 02:36:42 +0200 Subject: frontend: add fast forward support --- frontend/main.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'frontend/main.c') diff --git a/frontend/main.c b/frontend/main.c index a71ddea..53e3674 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -51,6 +51,8 @@ enum sched_action emu_action, emu_action_old; char hud_msg[64]; int hud_new_msg; +static void toggle_fast_forward(int force_off); + static void make_path(char *buf, size_t size, const char *dir, const char *fname) { if (fname) @@ -207,6 +209,7 @@ void do_emu_action(void) break; #ifndef NO_FRONTEND case SACTION_ENTER_MENU: + toggle_fast_forward(1); menu_loop(); return; case SACTION_NEXT_SSLOT: @@ -242,6 +245,10 @@ do_state_slot: GPU_open(&gpuDisp, "PCSX", NULL); } break; + case SACTION_FAST_FORWARD: + toggle_fast_forward(0); + plugin_call_rearmed_cbs(); + break; case SACTION_SCREENSHOT: { char buf[MAXPATHLEN]; @@ -588,6 +595,40 @@ int main(int argc, char *argv[]) return 0; } + +static void toggle_fast_forward(int force_off) +{ + static int fast_forward; + static int normal_g_opts; + static int normal_frameskip; + static int normal_enhancement_enable; + + if (force_off && !fast_forward) + return; + + fast_forward = !fast_forward; + if (fast_forward) { + normal_g_opts = g_opts; + normal_frameskip = pl_rearmed_cbs.frameskip; + normal_enhancement_enable = + pl_rearmed_cbs.gpu_neon.enhancement_enable; + + g_opts |= OPT_NO_FRAMELIM; + pl_rearmed_cbs.frameskip = 3; + pl_rearmed_cbs.gpu_neon.enhancement_enable = 0; + } else { + g_opts = normal_g_opts; + pl_rearmed_cbs.frameskip = normal_frameskip; + pl_rearmed_cbs.gpu_neon.enhancement_enable = + normal_enhancement_enable; + + pl_timing_prepare(Config.PsxType); + } + + if (!force_off) + snprintf(hud_msg, sizeof(hud_msg), "FAST FORWARD %s", + fast_forward ? "ON" : "OFF"); +} #endif void SysRunGui() { -- cgit v1.2.3 From a1b44e3650691750cff4bf1c5bc04a36c3e8066d Mon Sep 17 00:00:00 2001 From: notaz Date: Tue, 6 Nov 2012 03:37:53 +0200 Subject: frontend: make platform menu customizations more explicit --- frontend/main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'frontend/main.c') diff --git a/frontend/main.c b/frontend/main.c index 53e3674..c1ceb57 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -32,6 +32,9 @@ #include "libpicofe/plat.h" #include "libpicofe/readpng.h" #endif +#ifndef BOOT_MSG +#define BOOT_MSG "Booting up..." +#endif // don't include debug.h - it breaks ARM build (R1 redefined) void StartDebugger(); @@ -403,8 +406,8 @@ void emu_on_new_cd(void) printf("----------------------------------------------------------\n"); } - snprintf(hud_msg, sizeof(hud_msg), "Booting up..."); - hud_new_msg = 2; + snprintf(hud_msg, sizeof(hud_msg), BOOT_MSG); + hud_new_msg = 3; } int emu_core_preinit(void) -- cgit v1.2.3 From 79f216e32563acc81517729fe56a6f11f110b0a4 Mon Sep 17 00:00:00 2001 From: notaz Date: Sat, 10 Nov 2012 22:23:37 +0200 Subject: frontend: avoid loading msg when not needed --- frontend/main.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'frontend/main.c') diff --git a/frontend/main.c b/frontend/main.c index c1ceb57..4803198 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -396,7 +396,7 @@ out: fclose(f); } -void emu_on_new_cd(void) +void emu_on_new_cd(int show_hud_msg) { ClearAllCheats(); parse_cwcheat(); @@ -406,8 +406,10 @@ void emu_on_new_cd(void) printf("----------------------------------------------------------\n"); } - snprintf(hud_msg, sizeof(hud_msg), BOOT_MSG); - hud_new_msg = 3; + if (show_hud_msg) { + snprintf(hud_msg, sizeof(hud_msg), BOOT_MSG); + hud_new_msg = 3; + } } int emu_core_preinit(void) @@ -563,7 +565,7 @@ int main(int argc, char *argv[]) printf(_("Could not load CD-ROM!\n")); return -1; } - emu_on_new_cd(); + emu_on_new_cd(!loadst); ready_to_go = 1; } } -- cgit v1.2.3 From dde7da71ec95f2d83a9427bd381448438aa9201c Mon Sep 17 00:00:00 2001 From: notaz Date: Sun, 11 Nov 2012 21:18:41 +0200 Subject: frontend: add toggle FPS option --- frontend/main.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'frontend/main.c') diff --git a/frontend/main.c b/frontend/main.c index 4803198..4aa8968 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -1,5 +1,5 @@ /* - * (C) notaz, 2010-2011 + * (C) notaz, 2010-2012 * * This work is licensed under the terms of the GNU GPLv2 or later. * See the COPYING file in the top-level directory. @@ -252,6 +252,15 @@ do_state_slot: toggle_fast_forward(0); plugin_call_rearmed_cbs(); break; + case SACTION_TOGGLE_FPS: + if ((g_opts & (OPT_SHOWFPS|OPT_SHOWCPU)) + == (OPT_SHOWFPS|OPT_SHOWCPU)) + g_opts &= ~(OPT_SHOWFPS|OPT_SHOWCPU); + else if (g_opts & OPT_SHOWFPS) + g_opts |= OPT_SHOWCPU; + else + g_opts |= OPT_SHOWFPS; + break; case SACTION_SCREENSHOT: { char buf[MAXPATHLEN]; @@ -723,6 +732,8 @@ int emu_load_state(int slot) char fname[MAXPATHLEN]; int ret; + hud_msg[0] = 0; + ret = get_state_filename(fname, sizeof(fname), slot); if (ret != 0) return ret; -- cgit v1.2.3 From a83762012066e4799394f63d08a161a45f982ab6 Mon Sep 17 00:00:00 2001 From: notaz Date: Sat, 17 Nov 2012 02:09:49 +0200 Subject: frontend: initial sdl overlay implementation --- frontend/main.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'frontend/main.c') diff --git a/frontend/main.c b/frontend/main.c index 4aa8968..29df6d9 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -261,6 +261,9 @@ do_state_slot: else g_opts |= OPT_SHOWFPS; break; + case SACTION_TOGGLE_FULLSCREEN: + g_fullscreen = !g_fullscreen; + break; case SACTION_SCREENSHOT: { char buf[MAXPATHLEN]; -- cgit v1.2.3 From c9099d020a1e523d97541f426f7d44da1392526f Mon Sep 17 00:00:00 2001 From: notaz Date: Sun, 18 Nov 2012 00:31:30 +0200 Subject: frontend: overlay improvements work directly on psx vram --- frontend/main.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'frontend/main.c') diff --git a/frontend/main.c b/frontend/main.c index 29df6d9..f5da18b 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -263,6 +263,10 @@ do_state_slot: break; case SACTION_TOGGLE_FULLSCREEN: g_fullscreen = !g_fullscreen; + if (GPU_open != NULL && GPU_close != NULL) { + GPU_close(); + GPU_open(&gpuDisp, "PCSX", NULL); + } break; case SACTION_SCREENSHOT: { -- cgit v1.2.3 From ea66e8840b75b0284f192e6fa068857b91ef08eb Mon Sep 17 00:00:00 2001 From: notaz Date: Thu, 22 Nov 2012 00:48:51 +0200 Subject: frontend: allow sstates without cd img --- frontend/main.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'frontend/main.c') diff --git a/frontend/main.c b/frontend/main.c index f5da18b..29d2c25 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -586,6 +586,12 @@ int main(int argc, char *argv[]) } } + if (loadst_f) { + int ret = LoadState(loadst_f); + printf("%s state file: %s\n", ret ? "failed to load" : "loaded", loadst_f); + ready_to_go |= ret == 0; + } + if (ready_to_go) { menu_prepare_emu(); @@ -594,10 +600,6 @@ int main(int argc, char *argv[]) int ret = emu_load_state(loadst - 1); printf("%s state %d\n", ret ? "failed to load" : "loaded", loadst); } - if (loadst_f) { - int ret = LoadState(loadst_f); - printf("%s state file: %s\n", ret ? "failed to load" : "loaded", loadst_f); - } } else menu_loop(); -- cgit v1.2.3