From: kub Date: Fri, 15 Mar 2019 19:51:51 +0000 (+0100) Subject: fix gp2x compilation (using linaro arm gcc 4.7 on ubuntu) X-Git-Tag: v2.00~889 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c79d0bb90f98b1b3add067d87758b3269758078a;p=picodrive.git fix gp2x compilation (using linaro arm gcc 4.7 on ubuntu) --- diff --git a/Makefile b/Makefile index 2903a689..0df41f5d 100644 --- a/Makefile +++ b/Makefile @@ -119,9 +119,12 @@ OBJS += platform/gp2x/vid_pollux.o OBJS += platform/gp2x/warm.o USE_FRONTEND = 1 PLATFORM_MP3 = 1 +PLATFORM_ZLIB = 1 +HAVE_ARMv6 = 0 endif ifeq "$(PLATFORM)" "libretro" OBJS += platform/libretro/libretro.o +PLATFORM_ZLIB = 1 endif ifeq "$(USE_FRONTEND)" "1" @@ -164,7 +167,7 @@ else OBJS += platform/common/mp3_dummy.o endif -ifeq "$(PLATFORM)" "libretro" +ifeq "$(PLATFORM_ZLIB)" "1" # zlib OBJS += zlib/gzio.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o \ zlib/deflate.o zlib/crc32.o zlib/adler32.o zlib/zutil.o zlib/compress.o zlib/uncompr.o diff --git a/pico/sound/ym2612.h b/pico/sound/ym2612.h index a2921b22..bbe6b1a4 100644 --- a/pico/sound/ym2612.h +++ b/pico/sound/ym2612.h @@ -176,20 +176,19 @@ int YM2612PicoStateLoad2(int *tat, int *tbt); #else /* GP2X specific */ #include "../../platform/gp2x/940ctl.h" -extern int PicoIn.opt; #define YM2612Init(baseclock,rate) { \ - if (PicoIn.opt&0x200) YM2612Init_940(baseclock, rate); \ + if (PicoIn.opt&POPT_EXT_FM) YM2612Init_940(baseclock, rate); \ else YM2612Init_(baseclock, rate); \ } #define YM2612ResetChip() { \ - if (PicoIn.opt&0x200) YM2612ResetChip_940(); \ + if (PicoIn.opt&POPT_EXT_FM) YM2612ResetChip_940(); \ else YM2612ResetChip_(); \ } #define YM2612UpdateOne(buffer,length,stereo,is_buf_empty) \ - (PicoIn.opt&0x200) ? YM2612UpdateOne_940(buffer, length, stereo, is_buf_empty) : \ + (PicoIn.opt&POPT_EXT_FM) ? YM2612UpdateOne_940(buffer, length, stereo, is_buf_empty) : \ YM2612UpdateOne_(buffer, length, stereo, is_buf_empty); #define YM2612PicoStateLoad() { \ - if (PicoIn.opt&0x200) YM2612PicoStateLoad_940(); \ + if (PicoIn.opt&POPT_EXT_FM) YM2612PicoStateLoad_940(); \ else YM2612PicoStateLoad_(); \ } #endif /* __GP2X__ */ diff --git a/platform/common/common.mak b/platform/common/common.mak index 89e46051..e329c247 100644 --- a/platform/common/common.mak +++ b/platform/common/common.mak @@ -181,7 +181,7 @@ $(FR)cpu/cyclone/Cyclone.h: $(FR)cpu/cyclone/Cyclone.s: $(FR)cpu/$(CYCLONE_CONFIG) @echo building Cyclone... - @make -C $(R)cpu/cyclone/ CONFIG_FILE=../$(CYCLONE_CONFIG) + @make -C $(R)cpu/cyclone/ CONFIG_FILE=../$(CYCLONE_CONFIG) HAVE_ARMv6=$(HAVE_ARMv6) $(FR)cpu/cyclone/Cyclone.s: $(FR)cpu/cyclone/*.cpp $(FR)cpu/cyclone/*.h diff --git a/platform/gp2x/emu.c b/platform/gp2x/emu.c index 7e9a132f..18d8a57e 100644 --- a/platform/gp2x/emu.c +++ b/platform/gp2x/emu.c @@ -298,12 +298,12 @@ static int make_local_pal_md(int fast_mode) { int pallen = 0xc0; - bgr444_to_rgb32(localPal, Pico.cram); + bgr444_to_rgb32(localPal, PicoMem.cram); if (fast_mode) return 0x40; if (Pico.video.reg[0xC] & 8) { // shadow/hilight mode - bgr444_to_rgb32_sh(localPal, Pico.cram); + bgr444_to_rgb32_sh(localPal, PicoMem.cram); localPal[0xc0] = 0x0000c000; localPal[0xd0] = 0x00c00000; localPal[0xe0] = 0x00000000; // reserved pixels for OSD @@ -322,7 +322,7 @@ static int make_local_pal_md(int fast_mode) static int make_local_pal_sms(int fast_mode) { - unsigned short *spal = Pico.cram; + unsigned short *spal = PicoMem.cram; unsigned int *dpal = (void *)localPal; unsigned int i, t;