mirror of
https://github.com/RaySollium99/libpicofe.git
synced 2025-09-05 06:47:45 -04:00
UIQ3 update, some makefile unification, rm old configs, stuff
git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@569 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
5d239ae7a4
commit
36f6fd5afe
18 changed files with 339 additions and 264 deletions
|
@ -44,16 +44,17 @@ endif
|
|||
ifeq "$(profile)" "2"
|
||||
COPT_COMMON += -fprofile-use
|
||||
endif
|
||||
COPT = $(COPT_COMMON) -mtune=arm920t
|
||||
ASOPT = -mcpu=arm920t -mfloat-abi=soft
|
||||
GCC = $(CROSS)gcc
|
||||
CFLAGS = $(COPT_COMMON) -mcpu=arm920t -mtune=arm920t
|
||||
SFLAGS = $(CFLAGS)
|
||||
ASFLAGS = -mcpu=arm920t -mfloat-abi=soft
|
||||
CC = $(CROSS)gcc
|
||||
STRIP = $(CROSS)strip
|
||||
AS = $(CROSS)as
|
||||
LD = $(CROSS)ld
|
||||
OBJCOPY = $(CROSS)objcopy
|
||||
|
||||
# frontend
|
||||
OBJS += main.o menu.o gp2x.o usbjoy.o emu.o squidgehack.o cpuctrl.o
|
||||
OBJS += main.o menu.o gp2x.o usbjoy.o emu.o squidgehack.o cpuctrl.o asm_utils.o
|
||||
# 940 core control
|
||||
OBJS += 940ctl.o
|
||||
|
||||
|
@ -149,7 +150,7 @@ all: mkdirs PicoDrive.gpe
|
|||
|
||||
PicoDrive.gpe : $(OBJS) ../common/helix/$(CROSS)helix-mp3.a
|
||||
@echo ">>>" $@
|
||||
$(GCC) -o $@ $(COPT) $^ -lm -lpng -Wl,-Map=PicoDrive.map
|
||||
$(CC) -o $@ $(CFLAGS) $^ -lm -lpng -Wl,-Map=PicoDrive.map
|
||||
ifeq ($(DEBUG),)
|
||||
$(STRIP) $@
|
||||
endif
|
||||
|
@ -168,75 +169,10 @@ tidy:
|
|||
# @make -C ../../cpu/Cyclone/proj -f Makefile.linux clean
|
||||
|
||||
|
||||
clean_prof:
|
||||
find ../.. -name '*.gcno' -delete
|
||||
find ../.. -name '*.gcda' -delete
|
||||
|
||||
|
||||
mkdirs:
|
||||
mkdir -p $(DIRS)
|
||||
|
||||
.c.o:
|
||||
@echo ">>>" $<
|
||||
$(GCC) $(COPT) $(DEFINC) -c $< -o $@
|
||||
.s.o:
|
||||
@echo ">>>" $<
|
||||
$(GCC) $(COPT) $(DEFINC) -c $< -o $@
|
||||
.S.o:
|
||||
@echo ">>>" $<
|
||||
$(GCC) $(COPT) $(DEFINC) -c $< -o $@
|
||||
|
||||
Pico/carthw/svp/compiler.o : ../../Pico/carthw/svp/ssp16.o ../../Pico/carthw/svp/gen_arm.c
|
||||
|
||||
Pico/draw_asm.o : ../../Pico/Draw.s
|
||||
@echo ">>>" $<
|
||||
$(AS) $(ASOPT) $< -o $@
|
||||
Pico/draw2_asm.o : ../../Pico/Draw2.s
|
||||
@echo ">>>" $<
|
||||
$(AS) $(ASOPT) $< -o $@
|
||||
Pico/memory_asm.o : ../../Pico/Memory.s
|
||||
@echo ">>>" $<
|
||||
$(AS) $(ASOPT) $< -o $@
|
||||
Pico/sound/ym2612_asm.o : ../../Pico/sound/ym2612.s
|
||||
@echo ">>>" $<
|
||||
$(AS) $(ASOPT) $< -o $@
|
||||
Pico/sound/mix_asm.o : ../../Pico/sound/mix.s
|
||||
@echo ">>>" $<
|
||||
$(AS) $(ASOPT) $< -o $@
|
||||
Pico/misc_asm.o : ../../Pico/Misc.s
|
||||
@echo ">>>" $<
|
||||
$(AS) $(ASOPT) $< -o $@
|
||||
Pico/cd/pico_asm.o : ../../Pico/cd/Pico.s
|
||||
@echo ">>>" $<
|
||||
$(AS) $(ASOPT) $< -o $@
|
||||
Pico/cd/memory_asm.o : ../../Pico/cd/Memory.s
|
||||
@echo ">>>" $<
|
||||
$(AS) $(ASOPT) $< -o $@
|
||||
Pico/cd/misc_asm.o : ../../Pico/cd/Misc.s
|
||||
@echo ">>>" $<
|
||||
$(AS) $(ASOPT) $< -o $@
|
||||
|
||||
# build Cyclone
|
||||
../../cpu/Cyclone/proj/Cyclone.s :
|
||||
@echo building Cyclone...
|
||||
@make -C ../../cpu/Cyclone/proj CONFIG_FILE=config_pico.h
|
||||
|
||||
../../cpu/musashi/m68kops.c :
|
||||
@make -C ../../cpu/musashi
|
||||
|
||||
Pico/Pico.o Pico/cd/Pico.o: ../../Pico/PicoFrameHints.c ../../Pico/PicoInt.h
|
||||
Pico/Memory.o Pico/cd/Memory.o : ../../Pico/MemoryCmn.c ../../Pico/PicoInt.h
|
||||
|
||||
# build helix libs
|
||||
../common/helix/$(CROSS)helix-mp3.a:
|
||||
make -C ../common/helix clean all
|
||||
|
||||
readme.txt: ../../tools/textfilter ../base_readme.txt
|
||||
../../tools/textfilter ../base_readme.txt $@ GP2X
|
||||
|
||||
../../tools/textfilter: ../../tools/textfilter.c
|
||||
make -C ../../tools/ textfilter
|
||||
|
||||
include ../common/common_arm.mak
|
||||
|
||||
# ----------- release -----------
|
||||
ifneq ($(findstring rel,$(MAKECMDGOALS)),)
|
||||
|
|
15
gp2x/emu.c
15
gp2x/emu.c
|
@ -49,7 +49,6 @@ static short __attribute__((aligned(4))) sndBuffer[2*44100/50];
|
|||
static struct timeval noticeMsgTime = { 0, 0 }; // when started showing
|
||||
static int osd_fps_x;
|
||||
static int gp2x_old_gamma = 100;
|
||||
char noticeMsg[64]; // notice msg to draw
|
||||
unsigned char *PicoDraw2FB = NULL; // temporary buffer for alt renderer
|
||||
int reset_timing = 0;
|
||||
|
||||
|
@ -66,7 +65,7 @@ void emu_noticeMsgUpdated(void)
|
|||
gettimeofday(¬iceMsgTime, 0);
|
||||
}
|
||||
|
||||
void emu_getMainDir(char *dst, int len)
|
||||
int emu_getMainDir(char *dst, int len)
|
||||
{
|
||||
extern char **g_argv;
|
||||
int j;
|
||||
|
@ -77,6 +76,8 @@ void emu_getMainDir(char *dst, int len)
|
|||
dst[len] = 0;
|
||||
for (j = strlen(dst); j > 0; j--)
|
||||
if (dst[j] == '/') { dst[j+1] = 0; break; }
|
||||
|
||||
return j + 1;
|
||||
}
|
||||
|
||||
void emu_Init(void)
|
||||
|
@ -167,16 +168,6 @@ void emu_prepareDefaultConfig(void)
|
|||
defaultConfig.turbo_rate = 15;
|
||||
}
|
||||
|
||||
void emu_setDefaultConfig(void)
|
||||
{
|
||||
memcpy(¤tConfig, &defaultConfig, sizeof(currentConfig));
|
||||
PicoOpt = currentConfig.s_PicoOpt;
|
||||
PsndRate = currentConfig.s_PsndRate;
|
||||
PicoRegionOverride = currentConfig.s_PicoRegion;
|
||||
PicoAutoRgnOrder = currentConfig.s_PicoAutoRgnOrder;
|
||||
PicoCDBuffers = currentConfig.s_PicoCDBuffers;
|
||||
}
|
||||
|
||||
void osd_text(int x, int y, const char *text)
|
||||
{
|
||||
int len = strlen(text)*8;
|
||||
|
|
|
@ -118,7 +118,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
if (engineState == PGS_ReloadRom)
|
||||
{
|
||||
if (emu_ReloadRom()) {
|
||||
if (emu_ReloadRom(romFileName)) {
|
||||
engineState = PGS_Running;
|
||||
if (load_state_slot >= 0) {
|
||||
state_slot = load_state_slot;
|
||||
|
@ -136,7 +136,7 @@ int main(int argc, char *argv[])
|
|||
break;
|
||||
|
||||
case PGS_ReloadRom:
|
||||
if (emu_ReloadRom())
|
||||
if (emu_ReloadRom(romFileName))
|
||||
engineState = PGS_Running;
|
||||
else {
|
||||
printf("PGS_ReloadRom == 0\n");
|
||||
|
|
12
gp2x/menu.c
12
gp2x/menu.c
|
@ -901,7 +901,7 @@ menu_entry cdopt_entries[] =
|
|||
{ NULL, MB_NONE, MA_CDOPT_TESTBIOS_EUR, NULL, 0, 0, 0, 1, 0 },
|
||||
{ NULL, MB_NONE, MA_CDOPT_TESTBIOS_JAP, NULL, 0, 0, 0, 1, 0 },
|
||||
{ "CD LEDs", MB_ONOFF, MA_CDOPT_LEDS, ¤tConfig.EmuOpt, 0x0400, 0, 0, 1, 1 },
|
||||
{ "CDDA audio (using mp3s)", MB_ONOFF, MA_CDOPT_CDDA, &PicoOpt, 0x0800, 0, 0, 1, 1 },
|
||||
{ "CDDA audio", MB_ONOFF, MA_CDOPT_CDDA, &PicoOpt, 0x0800, 0, 0, 1, 1 },
|
||||
{ "PCM audio", MB_ONOFF, MA_CDOPT_PCM, &PicoOpt, 0x0400, 0, 0, 1, 1 },
|
||||
{ NULL, MB_NONE, MA_CDOPT_READAHEAD, NULL, 0, 0, 0, 1, 1 },
|
||||
{ "SaveRAM cart", MB_ONOFF, MA_CDOPT_SAVERAM, &PicoOpt, 0x8000, 0, 0, 1, 1 },
|
||||
|
@ -1551,10 +1551,10 @@ static void menu_loop_root(void)
|
|||
{
|
||||
char curr_path[PATH_MAX], *selfname;
|
||||
FILE *tstf;
|
||||
if ( (tstf = fopen(lastRomFile, "rb")) )
|
||||
if ( (tstf = fopen(loadedRomFName, "rb")) )
|
||||
{
|
||||
fclose(tstf);
|
||||
strcpy(curr_path, lastRomFile);
|
||||
strcpy(curr_path, loadedRomFName);
|
||||
}
|
||||
else
|
||||
getcwd(curr_path, PATH_MAX);
|
||||
|
@ -1694,10 +1694,10 @@ int menu_loop_tray(void)
|
|||
gp2x_memset_all_buffers(0, 0, 320*240*2);
|
||||
menu_gfx_prepare();
|
||||
|
||||
if ( (tstf = fopen(lastRomFile, "rb")) )
|
||||
if ( (tstf = fopen(loadedRomFName, "rb")) )
|
||||
{
|
||||
fclose(tstf);
|
||||
strcpy(curr_path, lastRomFile);
|
||||
strcpy(curr_path, loadedRomFName);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1721,7 +1721,7 @@ int menu_loop_tray(void)
|
|||
if (selfname) {
|
||||
int ret = -1;
|
||||
cd_img_type cd_type;
|
||||
cd_type = emu_cdCheck(NULL);
|
||||
cd_type = emu_cdCheck(NULL, romFileName);
|
||||
if (cd_type != CIT_NOT_CD)
|
||||
ret = Insert_CD(romFileName, cd_type);
|
||||
if (ret != 0) {
|
||||
|
|
|
@ -24,4 +24,10 @@
|
|||
//#define dprintf(f,...) printf("%05i:%03i: " f "\n",Pico.m.frame_count,Pico.m.scanline,##__VA_ARGS__)
|
||||
#define dprintf(x...)
|
||||
|
||||
// platform
|
||||
#define PLAT_MAX_KEYS 32
|
||||
#define PLAT_HAVE_JOY 1
|
||||
#define PATH_SEP "/"
|
||||
#define PATH_SEP_C '/'
|
||||
|
||||
#endif //PORT_CONFIG_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue