mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-04 23:07:46 -04:00
compile fixes for CI
This commit is contained in:
parent
725e007ae5
commit
3167aa9a94
15 changed files with 56 additions and 51 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -7,9 +7,10 @@
|
||||||
[submodule "pico/sound/emu2413"]
|
[submodule "pico/sound/emu2413"]
|
||||||
path = pico/sound/emu2413
|
path = pico/sound/emu2413
|
||||||
url = https://github.com/digital-sound-antiques/emu2413.git
|
url = https://github.com/digital-sound-antiques/emu2413.git
|
||||||
|
branch = main
|
||||||
[submodule "pico/cd/libchdr"]
|
[submodule "pico/cd/libchdr"]
|
||||||
path = pico/cd/libchdr
|
path = pico/cd/libchdr
|
||||||
url = https://github.com/rtissera/libchdr.git
|
url = https://github.com/irixxxx/libchdr.git
|
||||||
[submodule "platform/common/dr_libs"]
|
[submodule "platform/common/dr_libs"]
|
||||||
path = platform/common/dr_libs
|
path = platform/common/dr_libs
|
||||||
url = https://github.com/mackron/dr_libs.git
|
url = https://github.com/mackron/dr_libs.git
|
||||||
|
|
7
Makefile
7
Makefile
|
@ -231,7 +231,7 @@ OBJS += platform/gp2x/vid_mmsp2.o
|
||||||
OBJS += platform/gp2x/vid_pollux.o
|
OBJS += platform/gp2x/vid_pollux.o
|
||||||
OBJS += platform/gp2x/warm.o
|
OBJS += platform/gp2x/warm.o
|
||||||
USE_FRONTEND = 1
|
USE_FRONTEND = 1
|
||||||
PLATFORM_MP3 = 1
|
PLATFORM_MP3 ?= 1
|
||||||
endif
|
endif
|
||||||
ifeq "$(PLATFORM)" "psp"
|
ifeq "$(PLATFORM)" "psp"
|
||||||
CFLAGS += -DUSE_BGR565 -G8 # -DLPRINTF_STDIO -DFW15
|
CFLAGS += -DUSE_BGR565 -G8 # -DLPRINTF_STDIO -DFW15
|
||||||
|
@ -373,6 +373,7 @@ clean:
|
||||||
$(RM) $(TARGET) $(OBJS) pico/pico_int_offs.h
|
$(RM) $(TARGET) $(OBJS) pico/pico_int_offs.h
|
||||||
$(MAKE) -C cpu/cyclone clean
|
$(MAKE) -C cpu/cyclone clean
|
||||||
$(MAKE) -C cpu/musashi clean
|
$(MAKE) -C cpu/musashi clean
|
||||||
|
$(MAKE) -C tools clean
|
||||||
$(RM) -r .od_data
|
$(RM) -r .od_data
|
||||||
|
|
||||||
$(TARGET): $(OBJS)
|
$(TARGET): $(OBJS)
|
||||||
|
@ -439,7 +440,9 @@ cpu/fame/famec.o: CFLAGS += -Od
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
pico/carthw_cfg.c: pico/carthw.cfg
|
tools/make_carthw_c:
|
||||||
|
make -C tools make_carthw_c
|
||||||
|
pico/carthw_cfg.c: pico/carthw.cfg tools/make_carthw_c
|
||||||
tools/make_carthw_c $< $@
|
tools/make_carthw_c $< $@
|
||||||
|
|
||||||
# preprocessed asm files most probably include the offsets file
|
# preprocessed asm files most probably include the offsets file
|
||||||
|
|
|
@ -52,14 +52,14 @@ MP3 audio files with CD games. The helix source files are however not supplied
|
||||||
due to licensing issues. If you have legally obtained the sources, put them in
|
due to licensing issues. If you have legally obtained the sources, put them in
|
||||||
the platform/common/helix directory.
|
the platform/common/helix directory.
|
||||||
|
|
||||||
To compile the helix sources, set CROSS to your cross compiler prefix
|
To compile the helix sources, set CROSS_COMPILE to your cross compiler prefix
|
||||||
(e.g. arm-linux-gnueabi-) and LIBGCC to your cross compiler's libgcc.a
|
(e.g. arm-linux-gnueabi-) and LIBGCC to your cross compiler's libgcc.a
|
||||||
(e.g. /usr/lib/gcc-cross/arm-linux-gnueabi/4.7/libgcc.a), and compile with
|
(e.g. /usr/lib/gcc-cross/arm-linux-gnueabi/4.7/libgcc.a), and compile with
|
||||||
|
|
||||||
> make -C platform/common/helix CROSS=$CROSS LIBGCC=$LIBGCC
|
> make -C platform/common/helix CROSS_COMPILE=$CROSS_COMPILE LIBGCC=$LIBGCC
|
||||||
|
|
||||||
This will result in a shared library named ${CROSS}helix_mp3.so. Copy this
|
This will result in a shared library named ${CROSS_COMPILE}helix_mp3.so. Copy
|
||||||
as libhelix.so to where the PicoDrive binary is on the target device.
|
this as libhelix.so to where the PicoDrive binary is on the target device.
|
||||||
|
|
||||||
|
|
||||||
Also, the support for helix must be enabled in PicoDrive by compiling with
|
Also, the support for helix must be enabled in PicoDrive by compiling with
|
||||||
|
|
|
@ -282,7 +282,7 @@ static void p32x_end_blank(void)
|
||||||
Pico32x.vdp_regs[0x0a/2] &= ~P32XV_PEN; // no palette access
|
Pico32x.vdp_regs[0x0a/2] &= ~P32XV_PEN; // no palette access
|
||||||
if (!(Pico32x.sh2_regs[0] & 0x80)) {
|
if (!(Pico32x.sh2_regs[0] & 0x80)) {
|
||||||
// NB must precede VInt per hw manual, min 4 SH-2 cycles to pass Mars Check
|
// NB must precede VInt per hw manual, min 4 SH-2 cycles to pass Mars Check
|
||||||
Pico32x.hint_counter = -0x18;
|
Pico32x.hint_counter = (int)(-1.5*0x10);
|
||||||
p32x_schedule_hint(NULL, Pico.t.m68c_aim);
|
p32x_schedule_hint(NULL, Pico.t.m68c_aim);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -120,6 +120,12 @@ static void YM2612_setup_FIR(int inrate, int outrate, int stereo)
|
||||||
0.85, 2, 2*inrate/50, stereo);
|
0.85, 2, 2*inrate/50, stereo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// wrapper for the YM2612UpdateONE macro
|
||||||
|
static int YM2612UpdateONE(s32 *buffer, int length, int stereo, int is_buf_empty)
|
||||||
|
{
|
||||||
|
return YM2612UpdateOne(buffer, length, stereo, is_buf_empty);
|
||||||
|
}
|
||||||
|
|
||||||
// to be called after changing sound rate or chips
|
// to be called after changing sound rate or chips
|
||||||
void PsndRerate(int preserve_state)
|
void PsndRerate(int preserve_state)
|
||||||
{
|
{
|
||||||
|
@ -146,7 +152,7 @@ void PsndRerate(int preserve_state)
|
||||||
YM2612Init(ym2612_clock, PicoIn.sndRate,
|
YM2612Init(ym2612_clock, PicoIn.sndRate,
|
||||||
((PicoIn.opt&POPT_DIS_FM_SSGEG) ? 0 : ST_SSG) |
|
((PicoIn.opt&POPT_DIS_FM_SSGEG) ? 0 : ST_SSG) |
|
||||||
((PicoIn.opt&POPT_EN_FM_DAC) ? ST_DAC : 0));
|
((PicoIn.opt&POPT_EN_FM_DAC) ? ST_DAC : 0));
|
||||||
PsndFMUpdate = YM2612UpdateOne;
|
PsndFMUpdate = YM2612UpdateONE;
|
||||||
}
|
}
|
||||||
if (preserve_state) {
|
if (preserve_state) {
|
||||||
// feed it back it's own registers, just like after loading state
|
// feed it back it's own registers, just like after loading state
|
||||||
|
|
|
@ -179,6 +179,7 @@ void *YM2612GetRegs(void);
|
||||||
void YM2612PicoStateSave2(int tat, int tbt);
|
void YM2612PicoStateSave2(int tat, int tbt);
|
||||||
int YM2612PicoStateLoad2(int *tat, int *tbt);
|
int YM2612PicoStateLoad2(int *tat, int *tbt);
|
||||||
|
|
||||||
|
/* NB must be macros for compiling GP2X 940 code */
|
||||||
#ifndef __GP2X__
|
#ifndef __GP2X__
|
||||||
#define YM2612Init YM2612Init_
|
#define YM2612Init YM2612Init_
|
||||||
#define YM2612ResetChip YM2612ResetChip_
|
#define YM2612ResetChip YM2612ResetChip_
|
||||||
|
@ -187,23 +188,14 @@ int YM2612PicoStateLoad2(int *tat, int *tbt);
|
||||||
#else
|
#else
|
||||||
/* GP2X specific */
|
/* GP2X specific */
|
||||||
#include <platform/gp2x/940ctl.h>
|
#include <platform/gp2x/940ctl.h>
|
||||||
static inline void YM2612Init(int baseclock, int rate, int flags) {
|
#define YM2612Init(baseclock, rate, flags) \
|
||||||
if (PicoIn.opt&POPT_EXT_FM) YM2612Init_940(baseclock, rate, flags);
|
(PicoIn.opt & POPT_EXT_FM ? YM2612Init_940 : YM2612Init_)(baseclock, rate, flags)
|
||||||
else YM2612Init_(baseclock, rate, flags);
|
#define YM2612ResetChip() \
|
||||||
}
|
(PicoIn.opt & POPT_EXT_FM ? YM2612ResetChip_940 : YM2612ResetChip_)()
|
||||||
|
#define YM2612PicoStateLoad() \
|
||||||
static inline void YM2612ResetChip(void) {
|
(PicoIn.opt & POPT_EXT_FM ? YM2612PicoStateLoad_940 : YM2612PicoStateLoad_)()
|
||||||
if (PicoIn.opt&POPT_EXT_FM) YM2612ResetChip_940();
|
#define YM2612UpdateOne(buffer, length, sterao, isempty) \
|
||||||
else YM2612ResetChip_();
|
(PicoIn.opt & POPT_EXT_FM ? YM2612UpdateOne_940 : YM2612UpdateOne_)(buffer, length, stereo, isempty)
|
||||||
}
|
|
||||||
static inline int YM2612UpdateOne(s32 *buffer, int length, int stereo, int is_buf_empty) {
|
|
||||||
return (PicoIn.opt&POPT_EXT_FM) ? YM2612UpdateOne_940(buffer, length, stereo, is_buf_empty) :
|
|
||||||
YM2612UpdateOne_(buffer, length, stereo, is_buf_empty);
|
|
||||||
}
|
|
||||||
static inline void YM2612PicoStateLoad(void) {
|
|
||||||
if (PicoIn.opt&POPT_EXT_FM) YM2612PicoStateLoad_940();
|
|
||||||
else YM2612PicoStateLoad_();
|
|
||||||
}
|
|
||||||
#endif /* __GP2X__ */
|
#endif /* __GP2X__ */
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
CROSS ?= arm-linux-gnueabi-
|
CROSS_COMPILE ?= arm-linux-gnueabi-
|
||||||
|
|
||||||
CC = $(CROSS)gcc
|
CC = $(CROSS_COMPILE)gcc
|
||||||
AS = $(CROSS)as
|
AS = $(CROSS_COMPILE)as
|
||||||
AR = $(CROSS)ar
|
AR = $(CROSS_COMPILE)ar
|
||||||
TOOLCHAIN = $(notdir $(CROSS))
|
TOOLCHAIN = $(notdir $(CROSS_COMPILE))
|
||||||
LIBGCC ?= ${HOME}/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/gcc/arm-open2x-linux/4.1.1/libgcc.a
|
LIBGCC ?= ${HOME}/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/gcc/arm-open2x-linux/4.1.1/libgcc.a
|
||||||
|
|
||||||
CFLAGS += -Ipub -O2 -Wall -fstrict-aliasing -ffast-math
|
CFLAGS += -Ipub -O2 -Wall -fstrict-aliasing -ffast-math
|
||||||
|
|
|
@ -12,10 +12,16 @@
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
|
||||||
#include <pico/pico_int.h>
|
#include <pico/pico_int.h>
|
||||||
#include "helix/pub/mp3dec.h"
|
/*#include "helix/pub/mp3dec.h"*/
|
||||||
#include "mp3.h"
|
#include "mp3.h"
|
||||||
|
|
||||||
static HMP3Decoder mp3dec;
|
#ifndef _MP3DEC_H
|
||||||
|
typedef void *HMP3Decoder;
|
||||||
|
#define ERR_MP3_INDATA_UNDERFLOW -1
|
||||||
|
#define ERR_MP3_MAINDATA_UNDERFLOW -2
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static void *mp3dec;
|
||||||
static unsigned char mp3_input_buffer[2 * 1024];
|
static unsigned char mp3_input_buffer[2 * 1024];
|
||||||
|
|
||||||
#ifdef __GP2X__
|
#ifdef __GP2X__
|
||||||
|
|
|
@ -1,15 +1,6 @@
|
||||||
# you may or may not need to change this
|
# you may or may not need to change this
|
||||||
#devkit_path ?= $(HOME)/opt/devkitGP2X/
|
|
||||||
#lgcc_path = $(devkit_path)lib/gcc/arm-linux/4.0.3/
|
|
||||||
#CROSS = $(devkit_path)bin/arm-linux-
|
|
||||||
#devkit_path ?= $(HOME)/opt/open2x
|
|
||||||
#lgcc_path = $(devkit_path)/gcc-4.1.1-glibc-2.3.6/lib/gcc/arm-open2x-linux/4.1.1/
|
|
||||||
#CROSS ?= $(devkit_path)/gcc-4.1.1-glibc-2.3.6/bin/arm-open2x-linux-
|
|
||||||
#devkit_path ?= $(HOME)/opt/arm-unknown-linux-gnu
|
|
||||||
#lgcc_path = $(HOME)/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/gcc/arm-open2x-linux/4.1.1/
|
|
||||||
#CROSS ?= $(devkit_path)/bin/arm-unknown-linux-gnu-
|
|
||||||
lgcc_path = $(HOME)/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/gcc/arm-open2x-linux/4.1.1/
|
lgcc_path = $(HOME)/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/gcc/arm-open2x-linux/4.1.1/
|
||||||
CROSS ?= arm-linux-gnueabi-
|
CROSS_COMPILE ?= arm-none-eabi-
|
||||||
|
|
||||||
# settings
|
# settings
|
||||||
#up = 1
|
#up = 1
|
||||||
|
@ -19,11 +10,11 @@ CFLAGS += -I../../common/helix/pub -I../../.. -I. -D__GP2X__ -DARM
|
||||||
CFLAGS += -mcpu=arm940t -mtune=arm940t -mabi=apcs-gnu -mfloat-abi=soft -mfpu=fpa
|
CFLAGS += -mcpu=arm940t -mtune=arm940t -mabi=apcs-gnu -mfloat-abi=soft -mfpu=fpa
|
||||||
LDFLAGS = -static -e code940 -Ttext 0x0 -L$(lgcc_path) -lgcc
|
LDFLAGS = -static -e code940 -Ttext 0x0 -L$(lgcc_path) -lgcc
|
||||||
|
|
||||||
GCC = $(CROSS)gcc
|
GCC = $(CROSS_COMPILE)gcc
|
||||||
STRIP = $(CROSS)strip
|
STRIP = $(CROSS_COMPILE)strip
|
||||||
AS = $(CROSS)as
|
AS = $(CROSS_COMPILE)as
|
||||||
LD = $(CROSS)ld
|
LD = $(CROSS_COMPILE)ld
|
||||||
OBJCOPY = $(CROSS)objcopy
|
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||||
|
|
||||||
vpath %.c = ../../common
|
vpath %.c = ../../common
|
||||||
|
|
||||||
|
@ -52,7 +43,7 @@ OBJS940 += 940init.o 940.o 940ym2612.o misc_arm.o mp3_sync.o
|
||||||
OBJS940 += uClibc/memset.o uClibc/s_floor.o uClibc/e_pow.o uClibc/e_sqrt.o uClibc/s_fabs.o
|
OBJS940 += uClibc/memset.o uClibc/s_floor.o uClibc/e_pow.o uClibc/e_sqrt.o uClibc/s_fabs.o
|
||||||
OBJS940 += uClibc/s_scalbn.o uClibc/s_copysign.o uClibc/k_sin.o uClibc/k_cos.o uClibc/s_sin.o
|
OBJS940 += uClibc/s_scalbn.o uClibc/s_copysign.o uClibc/k_sin.o uClibc/k_cos.o uClibc/s_sin.o
|
||||||
OBJS940 += uClibc/e_rem_pio2.o uClibc/k_rem_pio2.o uClibc/e_log.o uClibc/wrappers.o
|
OBJS940 += uClibc/e_rem_pio2.o uClibc/k_rem_pio2.o uClibc/e_log.o uClibc/wrappers.o
|
||||||
LIBHELIX ?= ../../common/helix/$(notdir $(CROSS))helix_mp3.a
|
LIBHELIX ?= ../../common/helix/$(notdir $(CROSS_COMPILE))helix_mp3.a
|
||||||
|
|
||||||
$(BIN) : code940.elf
|
$(BIN) : code940.elf
|
||||||
@echo ">>>" $@
|
@echo ">>>" $@
|
||||||
|
@ -75,7 +66,7 @@ mp3_sync.o: ../../common/mp3_sync.c
|
||||||
$(GCC) $(CFLAGS) -Os -DCODE940 -c $< -o $@
|
$(GCC) $(CFLAGS) -Os -DCODE940 -c $< -o $@
|
||||||
|
|
||||||
$(LIBHELIX):
|
$(LIBHELIX):
|
||||||
@$(MAKE) -C ../../common/helix/ CROSS=$(CROSS)
|
@$(MAKE) -C ../../common/helix/ CROSS_COMPILE=$(CROSS_COMPILE)
|
||||||
|
|
||||||
|
|
||||||
up: $(BIN)
|
up: $(BIN)
|
||||||
|
|
BIN
platform/gp2x/code940/pico940_v3.bin
Executable file
BIN
platform/gp2x/code940/pico940_v3.bin
Executable file
Binary file not shown.
BIN
platform/gp2x/warm_2.4.25.o
Normal file
BIN
platform/gp2x/warm_2.4.25.o
Normal file
Binary file not shown.
BIN
platform/gp2x/warm_2.4.26-open2x.o
Normal file
BIN
platform/gp2x/warm_2.4.26-open2x.o
Normal file
Binary file not shown.
BIN
platform/gp2x/warm_2.6.24.ko
Normal file
BIN
platform/gp2x/warm_2.6.24.ko
Normal file
Binary file not shown.
|
@ -6,6 +6,12 @@ $(error need VER)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
../../tools/textfilter: ../../tools/textfilter.c
|
||||||
|
make -C ../../tools/ textfilter
|
||||||
|
|
||||||
|
readme.txt: ../../tools/textfilter ../base_readme.txt ../../ChangeLog
|
||||||
|
../../tools/textfilter ../base_readme.txt $@ PSP
|
||||||
|
|
||||||
# ?
|
# ?
|
||||||
rel: ../../EBOOT.PBP readme.txt ../game_def.cfg
|
rel: ../../EBOOT.PBP readme.txt ../game_def.cfg
|
||||||
mkdir -p PicoDrive/skin/
|
mkdir -p PicoDrive/skin/
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
TARGETS = amalgamate textfilter
|
TARGETS = amalgamate textfilter make_carthw_c
|
||||||
HOSTCC ?= cc
|
HOSTCC ?= cc
|
||||||
|
|
||||||
all:
|
all:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue