UIQ3 update, some makefile unification, rm old configs, stuff

git-svn-id: file:///home/notaz/opt/svn/PicoDrive@569 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2008-08-21 10:45:54 +00:00
parent a6e5aa4181
commit ca482e5de8
66 changed files with 1748 additions and 1377 deletions

View file

@ -28,8 +28,9 @@ ifeq "$(profile)" "2"
COPT_COMMON += -fprofile-use
endif
CFLAGS = $(COPT_COMMON) -mcpu=arm920t -mtune=arm920t
SFLAGS = $(CFLAGS)
ASFLAGS = -mcpu=arm920t -mfloat-abi=soft
GCC = $(CROSS)gcc
CC = $(CROSS)gcc
STRIP = $(CROSS)strip
AS = $(CROSS)as
LD = $(CROSS)ld
@ -115,7 +116,7 @@ all: mkdirs PicoDrive.exe readme.txt
PicoDrive.exe : $(OBJS) ../common/helix/$(CROSS)helix-mp3.a
@echo ">>>" $@
$(GCC) -o $@ -static $(CFLAGS) $^ -lm -lpng -Lkgsdk/ -lKGSDK -Wl,-Map=PicoDrive.map \
$(CC) -o $@ -static $(CFLAGS) $^ -lm -lpng -Lkgsdk/ -lKGSDK -Wl,-Map=PicoDrive.map \
2>&1 | grep -v ".idata$$4" # | grep -v "supports interworking, whereas"
ifeq ($(DEBUG),)
$(STRIP) $@
@ -125,66 +126,10 @@ ifeq "$(profile)" "1"
endif
.c.o:
@echo ">>>" $<
$(GCC) $(CFLAGS) $(DEFINC) -c $< -o $@
#.s.o:
# @echo $<
# $(GCC) $(CFLAGS) $(DEFINC) -c $< -o $@
mkdirs:
mkdir -p $(DIRS)
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) $(ASFLAGS) $< -o $@
Pico/draw2_asm.o : ../../Pico/Draw2.s
@echo ">>>" $@
@$(AS) $(ASFLAGS) $< -o $@
Pico/memory_asm.o : ../../Pico/Memory.s
@echo ">>>" $@
@$(AS) $(ASFLAGS) $< -o $@
Pico/sound/ym2612_asm.o : ../../Pico/sound/ym2612.s
@echo ">>>" $@
@$(AS) $(ASFLAGS) $< -o $@
Pico/sound/mix_asm.o : ../../Pico/sound/mix.s
@echo ">>>" $@
@$(AS) $(ASFLAGS) $< -o $@
Pico/misc_asm.o : ../../Pico/Misc.s
@echo ">>>" $@
@$(AS) $(ASFLAGS) $< -o $@
Pico/cd/pico_asm.o : ../../Pico/cd/Pico.s
@echo ">>>" $@
@$(AS) $(ASFLAGS) $< -o $@
Pico/cd/memory_asm.o : ../../Pico/cd/Memory.s
@echo ">>>" $@
@$(AS) $(ASFLAGS) $< -o $@
Pico/cd/misc_asm.o : ../../Pico/cd/Misc.s
@echo ">>>" $@
@$(AS) $(ASFLAGS) $< -o $@
Pico/carthw/svp/stub_arm.o : ../../Pico/carthw/svp/stub_arm.S
@echo ">>>" $@
$(GCC) $(CFLAGS) $(DEFINC) -c $< -o $@
# build Cyclone
cpu/Cyclone/proj/Cyclone.s:
@echo building Cyclone...
@make -C ../../cpu/Cyclone/proj CONFIG_FILE=config_pico.h
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 $@ GIZ
../../tools/textfilter: ../../tools/textfilter.c
make -C ../../tools/ textfilter
include ../common/common_arm.mak
# cleanup
@ -194,10 +139,6 @@ tidy:
@$(RM) $(OBJS)
clean_prof:
find ../.. -name '*.gcno' -delete
find ../.. -name '*.gcda' -delete
up: PicoDrive.exe
synce-pcp -d 3 PicoDrive.exe ":/SD Card/emus/PicoDrive/PicoDrive.exe"

View file

@ -45,9 +45,11 @@ void emu_noticeMsgUpdated(void)
noticeMsgTime = GetTickCount();
}
void emu_getMainDir(char *dst, int len)
int emu_getMainDir(char *dst, int len)
{
if (len > 0) *dst = 0;
return 0;
}
static void emu_msg_cb(const char *msg)
@ -143,16 +145,6 @@ void emu_prepareDefaultConfig(void)
defaultConfig.turbo_rate = 15;
}
void emu_setDefaultConfig(void)
{
memcpy(&currentConfig, &defaultConfig, sizeof(currentConfig));
PicoOpt = currentConfig.s_PicoOpt;
PsndRate = currentConfig.s_PsndRate;
PicoRegionOverride = currentConfig.s_PicoRegion;
PicoAutoRgnOrder = currentConfig.s_PicoAutoRgnOrder;
PicoCDBuffers = currentConfig.s_PicoCDBuffers;
}
static int EmuScanBegin16(unsigned int num)
{

View file

@ -34,7 +34,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdL
break;
case PGS_ReloadRom:
if (emu_ReloadRom())
if (emu_ReloadRom(romFileName))
engineState = PGS_Running;
else {
lprintf("PGS_ReloadRom == 0\n");

View file

@ -813,7 +813,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, &currentConfig.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 },
@ -1438,10 +1438,10 @@ static void menu_loop_root(void)
{
char curr_path[MAX_PATH], *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, MAX_PATH);
@ -1586,10 +1586,10 @@ int menu_loop_tray(void)
menu_gfx_prepare();
if ( (tstf = fopen(lastRomFile, "rb")) )
if ( (tstf = fopen(loadedRomFName, "rb")) )
{
fclose(tstf);
strcpy(curr_path, lastRomFile);
strcpy(curr_path, loadedRomFName);
}
else
{
@ -1613,7 +1613,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) {

View file

@ -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 0
#define PATH_SEP "/" // because of cegcc
#define PATH_SEP_C '/'
#endif //PORT_CONFIG_H