mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 07:17:45 -04:00
fix gp2x compilation (using linaro arm gcc 4.7 on ubuntu)
This commit is contained in:
parent
7ddd8501a7
commit
c79d0bb90f
4 changed files with 12 additions and 10 deletions
5
Makefile
5
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
|
||||
|
|
|
@ -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__ */
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue