From 95a46e3f961ec21561b7d79273d4ee3feae535b6 Mon Sep 17 00:00:00 2001 From: Cameron Cawley Date: Sat, 19 Oct 2019 17:06:52 +0100 Subject: [PATCH 1/5] Only build evdev code on GP2X and Pandora --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2903a689..40c9f617 100644 --- a/Makefile +++ b/Makefile @@ -98,6 +98,7 @@ platform/libpicofe/linux/plat.o: CFLAGS += -DPANDORA OBJS += platform/pandora/plat.o OBJS += platform/pandora/asm_utils.o OBJS += platform/common/arm_utils.o +OBJS += platform/libpicofe/linux/in_evdev.o OBJS += platform/libpicofe/linux/fbdev.o OBJS += platform/libpicofe/linux/xenv.o OBJS += platform/libpicofe/pandora/plat.o @@ -105,6 +106,7 @@ USE_FRONTEND = 1 endif ifeq "$(PLATFORM)" "gp2x" OBJS += platform/common/arm_utils.o +OBJS += platform/libpicofe/linux/in_evdev.o OBJS += platform/libpicofe/gp2x/in_gp2x.o OBJS += platform/libpicofe/gp2x/soc.o OBJS += platform/libpicofe/gp2x/soc_mmsp2.o @@ -132,8 +134,7 @@ OBJS += platform/common/main.o platform/common/emu.o \ # libpicofe OBJS += platform/libpicofe/input.o platform/libpicofe/readpng.o \ - platform/libpicofe/fonts.o platform/libpicofe/linux/in_evdev.o \ - platform/libpicofe/linux/plat.o + platform/libpicofe/fonts.o platform/libpicofe/linux/plat.o # libpicofe - sound OBJS += platform/libpicofe/sndout.o From 572ab2edc4660438fc109684d228daadfd40d47e Mon Sep 17 00:00:00 2001 From: Cameron Cawley Date: Sat, 19 Oct 2019 17:07:12 +0100 Subject: [PATCH 2/5] Remove unused header --- platform/linux/in_evdev.h | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 platform/linux/in_evdev.h diff --git a/platform/linux/in_evdev.h b/platform/linux/in_evdev.h deleted file mode 100644 index c5aef9bb..00000000 --- a/platform/linux/in_evdev.h +++ /dev/null @@ -1,5 +0,0 @@ - -struct in_default_bind; -extern int in_evdev_allow_abs_only; - -void in_evdev_init(const struct in_default_bind *defbinds); From d0eab7dae887dd75a33cfbb4c5a60f535d7fece3 Mon Sep 17 00:00:00 2001 From: notaz Date: Sat, 7 Dec 2019 21:40:24 +0200 Subject: [PATCH 3/5] deal with some gcc7+ warnings --- cpu/cyclone | 2 +- pico/cd/cd_image.c | 4 ++++ platform/common/emu.c | 4 ++++ platform/libpicofe | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/cpu/cyclone b/cpu/cyclone index 5fc93bdd..94a9d9a8 160000 --- a/cpu/cyclone +++ b/cpu/cyclone @@ -1 +1 @@ -Subproject commit 5fc93bddb71461abb7619cf506d6f15ba8a675f3 +Subproject commit 94a9d9a888e72cbfa4db12113cd113cf5e154f7f diff --git a/pico/cd/cd_image.c b/pico/cd/cd_image.c index ae2ef0cd..5638c9be 100644 --- a/pico/cd/cd_image.c +++ b/pico/cd/cd_image.c @@ -11,6 +11,10 @@ #include "cdd.h" #include "cue.h" +#if defined(__GNUC__) && __GNUC__ >= 7 +#pragma GCC diagnostic ignored "-Wformat-truncation" +#endif + static int handle_mp3(const char *fname, int index) { track_t *track = &cdd.toc.tracks[index]; diff --git a/platform/common/emu.c b/platform/common/emu.c index 0a9f0890..7385e159 100644 --- a/platform/common/emu.c +++ b/platform/common/emu.c @@ -28,6 +28,10 @@ #include #include +#if defined(__GNUC__) && __GNUC__ >= 7 +#pragma GCC diagnostic ignored "-Wformat-truncation" +#endif + #ifndef _WIN32 #define PATH_SEP "/" #define PATH_SEP_C '/' diff --git a/platform/libpicofe b/platform/libpicofe index f8cd6a08..795b71c5 160000 --- a/platform/libpicofe +++ b/platform/libpicofe @@ -1 +1 @@ -Subproject commit f8cd6a082bb9c228397a0436f28818b74d8e9636 +Subproject commit 795b71c571518b310a22138141bb6d1cd08d85f6 From ce32676eb890d4b4100e5d639514bfe7d6363bb4 Mon Sep 17 00:00:00 2001 From: dinkc64 Date: Fri, 13 Mar 2020 19:26:09 -0400 Subject: [PATCH 4/5] draw.c, DrawLayer(): impl. proper linescroll, fixes issue #56 --- pico/draw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pico/draw.c b/pico/draw.c index 680de3da..e5287b4e 100644 --- a/pico/draw.c +++ b/pico/draw.c @@ -411,6 +411,7 @@ static void DrawLayer(int plane_sh, int *hcache, int cellskip, int maxcells, { struct PicoVideo *pvid=&Pico.video; const char shift[4]={5,6,5,7}; // 32,64 or 128 sized tilemaps (2 is invalid) + const unsigned char h_masks[4] = { 0x00, 0x07, 0xf8, 0xff }; struct TileStrip ts; int width, height, ymask; int vscroll, htab; @@ -437,8 +438,7 @@ static void DrawLayer(int plane_sh, int *hcache, int cellskip, int maxcells, else ts.nametab=(pvid->reg[2]&0x38)<< 9; // A htab=pvid->reg[13]<<9; // Horizontal scroll table address - if ( pvid->reg[11]&2) htab+=est->DrawScanline<<1; // Offset by line - if ((pvid->reg[11]&1)==0) htab&=~0xf; // Offset by tile + htab+=(est->DrawScanline&h_masks[pvid->reg[11]&3])<<1; // Point to line (masked) htab+=plane_sh&1; // A or B // Get horizontal scroll value, will be masked later From 1d366b1ad9362fd463c42979c8a687dfc7f46c46 Mon Sep 17 00:00:00 2001 From: notaz Date: Tue, 13 Oct 2020 23:19:47 +0300 Subject: [PATCH 5/5] add a hack for Decap Attack Should delay the pull-up affect instead, but probably nothing needs this whole thing anyway. --- pico/memory.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pico/memory.c b/pico/memory.c index a31a08e9..a46760da 100644 --- a/pico/memory.c +++ b/pico/memory.c @@ -270,7 +270,12 @@ static NOINLINE u32 port_read(int i) u32 in, out; out = data_reg & ctrl_reg; - out |= 0x7f & ~ctrl_reg; // pull-ups + + // pull-ups: should be 0x7f, but Decap Attack has a bug where it temp. + // disables output before doing TH-low read, so don't emulate it for TH. + // Decap Attack reportedly doesn't work on Nomad but works on must + // other MD revisions (different pull-up strength?). + out |= 0x3f & ~ctrl_reg; in = port_readers[i](i, out);