fix gp2x compilation (using linaro arm gcc 4.7 on ubuntu)
authorkub <kub@kub.escape.de>
Fri, 15 Mar 2019 19:51:51 +0000 (20:51 +0100)
committerkub <derkub@gmail.com>
Tue, 30 Jul 2019 14:34:40 +0000 (16:34 +0200)
Makefile
pico/sound/ym2612.h
platform/common/common.mak
platform/gp2x/emu.c

index 2903a68..0df41f5 100644 (file)
--- 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
index a2921b2..bbe6b1a 100644 (file)
@@ -176,20 +176,19 @@ int  YM2612PicoStateLoad2(int *tat, int *tbt);
 #else\r
 /* GP2X specific */\r
 #include "../../platform/gp2x/940ctl.h"\r
-extern int PicoIn.opt;\r
 #define YM2612Init(baseclock,rate) { \\r
-       if (PicoIn.opt&0x200) YM2612Init_940(baseclock, rate); \\r
+       if (PicoIn.opt&POPT_EXT_FM) YM2612Init_940(baseclock, rate); \\r
        else               YM2612Init_(baseclock, rate); \\r
 }\r
 #define YM2612ResetChip() { \\r
-       if (PicoIn.opt&0x200) YM2612ResetChip_940(); \\r
+       if (PicoIn.opt&POPT_EXT_FM) YM2612ResetChip_940(); \\r
        else               YM2612ResetChip_(); \\r
 }\r
 #define YM2612UpdateOne(buffer,length,stereo,is_buf_empty) \\r
-       (PicoIn.opt&0x200) ? YM2612UpdateOne_940(buffer, length, stereo, is_buf_empty) : \\r
+       (PicoIn.opt&POPT_EXT_FM) ? YM2612UpdateOne_940(buffer, length, stereo, is_buf_empty) : \\r
                                YM2612UpdateOne_(buffer, length, stereo, is_buf_empty);\r
 #define YM2612PicoStateLoad() { \\r
-       if (PicoIn.opt&0x200) YM2612PicoStateLoad_940(); \\r
+       if (PicoIn.opt&POPT_EXT_FM) YM2612PicoStateLoad_940(); \\r
        else               YM2612PicoStateLoad_(); \\r
 }\r
 #endif /* __GP2X__ */\r
index 89e4605..e329c24 100644 (file)
@@ -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
 
index 7e9a132..18d8a57 100644 (file)
@@ -298,12 +298,12 @@ static int make_local_pal_md(int fast_mode)
 {\r
        int pallen = 0xc0;\r
 \r
-       bgr444_to_rgb32(localPal, Pico.cram);\r
+       bgr444_to_rgb32(localPal, PicoMem.cram);\r
        if (fast_mode)\r
                return 0x40;\r
 \r
        if (Pico.video.reg[0xC] & 8) { // shadow/hilight mode\r
-               bgr444_to_rgb32_sh(localPal, Pico.cram);\r
+               bgr444_to_rgb32_sh(localPal, PicoMem.cram);\r
                localPal[0xc0] = 0x0000c000;\r
                localPal[0xd0] = 0x00c00000;\r
                localPal[0xe0] = 0x00000000; // reserved pixels for OSD\r
@@ -322,7 +322,7 @@ static int make_local_pal_md(int fast_mode)
 \r
 static int make_local_pal_sms(int fast_mode)\r
 {\r
-       unsigned short *spal = Pico.cram;\r
+       unsigned short *spal = PicoMem.cram;\r
        unsigned int *dpal = (void *)localPal;\r
        unsigned int i, t;\r
 \r