From: notaz Date: Thu, 28 Aug 2008 12:21:04 +0000 (+0000) Subject: lowercasing filenames, part1; makefile adjustments X-Git-Tag: v1.85~390 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=efcba75f8a730340df6c1b679a207723f98d1ee6;p=picodrive.git lowercasing filenames, part1; makefile adjustments git-svn-id: file:///home/notaz/opt/svn/PicoDrive@574 be3aeb3a-fb24-0410-a615-afba39da0efa --- diff --git a/Pico/Pico/Memory.c b/Pico/Pico/memory.c similarity index 99% rename from Pico/Pico/Memory.c rename to Pico/Pico/memory.c index 13cff627..f124a06e 100644 --- a/Pico/Pico/Memory.c +++ b/Pico/Pico/memory.c @@ -1,4 +1,4 @@ -#include "../PicoInt.h" +#include "../pico_int.h" #include "../sound/sn76496.h" #ifndef UTYPES_DEFINED diff --git a/Pico/Pico/Pico.c b/Pico/Pico/pico.c similarity index 99% rename from Pico/Pico/Pico.c rename to Pico/Pico/pico.c index fcec65f6..298e57e0 100644 --- a/Pico/Pico/Pico.c +++ b/Pico/Pico/pico.c @@ -1,4 +1,4 @@ -#include "../PicoInt.h" +#include "../pico_int.h" // x: 0x03c - 0x19d // y: 0x1fc - 0x2f7 diff --git a/Pico/Pico/xpcm.c b/Pico/Pico/xpcm.c index 5fe98306..da3f480c 100644 --- a/Pico/Pico/xpcm.c +++ b/Pico/Pico/xpcm.c @@ -4,7 +4,7 @@ * best sounding of the ones that I tried. */ -#include "../PicoInt.h" +#include "../pico_int.h" #define ADPCMSHIFT 8 #define ADFIX(f) (int) ((double)f * (double)(1<= 2MB ROMs here. */ diff --git a/Pico/carthw/svp/compiler.c b/Pico/carthw/svp/compiler.c index d163eb4b..527077de 100644 --- a/Pico/carthw/svp/compiler.c +++ b/Pico/carthw/svp/compiler.c @@ -3,7 +3,7 @@ // (c) Copyright 2008, Grazvydas "notaz" Ignotas // Free for non-commercial use. -#include "../../PicoInt.h" +#include "../../pico_int.h" #include "compiler.h" #define u32 unsigned int diff --git a/Pico/carthw/svp/Memory.c b/Pico/carthw/svp/memory.c similarity index 98% rename from Pico/carthw/svp/Memory.c rename to Pico/carthw/svp/memory.c index e835d328..7f182fe0 100644 --- a/Pico/carthw/svp/Memory.c +++ b/Pico/carthw/svp/memory.c @@ -6,8 +6,7 @@ // For commercial use, separate licencing terms must be obtained. -#include "../../PicoInt.h" -#include "../../PicoInt.h" +#include "../../pico_int.h" #ifndef UTYPES_DEFINED typedef unsigned char u8; diff --git a/Pico/carthw/svp/ssp16.c b/Pico/carthw/svp/ssp16.c index feef99bb..1d594062 100644 --- a/Pico/carthw/svp/ssp16.c +++ b/Pico/carthw/svp/ssp16.c @@ -12,8 +12,6 @@ * Useful for homebrew or if a new VR revision pops up. */ //#define DO_CHECKS -#include "../../PicoInt.h" - /* * Register info * @@ -188,7 +186,7 @@ * ops not used by VR are not implemented */ -#include "../../PicoInt.h" +#include "../../pico_int.h" #define u32 unsigned int diff --git a/Pico/carthw/svp/svp.c b/Pico/carthw/svp/svp.c index 4e01a923..be9414e2 100644 --- a/Pico/carthw/svp/svp.c +++ b/Pico/carthw/svp/svp.c @@ -6,7 +6,7 @@ // For commercial use, separate licencing terms must be obtained. -#include "../../PicoInt.h" +#include "../../pico_int.h" #include "compiler.h" #ifdef __GP2X__ #include diff --git a/Pico/cd/LC89510.c b/Pico/cd/LC89510.c index efad0055..8a42ee5a 100644 --- a/Pico/cd/LC89510.c +++ b/Pico/cd/LC89510.c @@ -7,7 +7,7 @@ * * ***********************************************************/ -#include "../PicoInt.h" +#include "../pico_int.h" #define CDC_DMA_SPEED 256 diff --git a/Pico/cd/Area.c b/Pico/cd/area.c similarity index 99% rename from Pico/cd/Area.c rename to Pico/cd/area.c index 164d272f..88fe8828 100644 --- a/Pico/cd/Area.c +++ b/Pico/cd/area.c @@ -2,7 +2,7 @@ // (c) Copyright 2007, Grazvydas "notaz" Ignotas -#include "../PicoInt.h" +#include "../pico_int.h" // ym2612 #include "../sound/ym2612.h" diff --git a/Pico/cd/buffering.c b/Pico/cd/buffering.c index e0e888db..dbf7b284 100644 --- a/Pico/cd/buffering.c +++ b/Pico/cd/buffering.c @@ -1,7 +1,7 @@ // Buffering handling // (c) Copyright 2007, Grazvydas "notaz" Ignotas -#include "../PicoInt.h" +#include "../pico_int.h" int PicoCDBuffers = 0; static unsigned char *cd_buffer = NULL; diff --git a/Pico/cd/cd_file.c b/Pico/cd/cd_file.c index 1fdbef64..f5d8744c 100644 --- a/Pico/cd/cd_file.c +++ b/Pico/cd/cd_file.c @@ -7,7 +7,7 @@ * * ***********************************************************/ -#include "../PicoInt.h" +#include "../pico_int.h" #include "cd_file.h" #include "cue.h" diff --git a/Pico/cd/cd_sys.c b/Pico/cd/cd_sys.c index 03bf0d22..319f4f1a 100644 --- a/Pico/cd/cd_sys.c +++ b/Pico/cd/cd_sys.c @@ -9,7 +9,7 @@ #include -#include "../PicoInt.h" +#include "../pico_int.h" #include "cd_sys.h" #include "cd_file.h" diff --git a/Pico/cd/cd_sys.h b/Pico/cd/cd_sys.h index 6725efc9..fcac1d81 100644 --- a/Pico/cd/cd_sys.h +++ b/Pico/cd/cd_sys.h @@ -72,7 +72,7 @@ typedef struct { PICO_INTERNAL void LBA_to_MSF(int lba, _msf *MSF); PICO_INTERNAL int Track_to_LBA(int track); -// moved to Pico.h +// moved to pico.h // int Insert_CD(char *iso_name, int is_bin); // void Stop_CD(void); diff --git a/Pico/cd/cue.c b/Pico/cd/cue.c index 9d0b4980..ab09c103 100644 --- a/Pico/cd/cue.c +++ b/Pico/cd/cue.c @@ -3,7 +3,7 @@ #include #include "cue.h" -#include "../PicoInt.h" +#include "../pico_int.h" // #define elprintf(w,f,...) printf(f "\n",##__VA_ARGS__); #ifdef _MSC_VER diff --git a/Pico/cd/gfx_cd.c b/Pico/cd/gfx_cd.c index 02072c3c..69d4a001 100644 --- a/Pico/cd/gfx_cd.c +++ b/Pico/cd/gfx_cd.c @@ -5,7 +5,7 @@ // (c) Copyright 2007, Grazvydas "notaz" Ignotas -#include "../PicoInt.h" +#include "../pico_int.h" #define _rot_comp Pico_mcd->rot_comp diff --git a/Pico/cd/Memory.c b/Pico/cd/memory.c similarity index 96% rename from Pico/cd/Memory.c rename to Pico/cd/memory.c index 9f619754..593a4cb2 100644 --- a/Pico/cd/Memory.c +++ b/Pico/cd/memory.c @@ -3,7 +3,7 @@ // (c) Copyright 2007, Grazvydas "notaz" Ignotas -#include "../PicoInt.h" +#include "../pico_int.h" #include "../sound/ym2612.h" #include "../sound/sn76496.h" @@ -452,7 +452,7 @@ static void OtherWrite8End(u32 a, u32 d, int realsize) #ifndef _ASM_CD_MEMORY_C #define _CD_MEMORY_C #undef _ASM_MEMORY_C -#include "../MemoryCmn.c" +#include "../memory_cmn.c" #include "cell_map.c" #endif diff --git a/Pico/cd/Memory.s b/Pico/cd/memory_arm.s similarity index 100% rename from Pico/cd/Memory.s rename to Pico/cd/memory_arm.s diff --git a/Pico/cd/Misc.c b/Pico/cd/misc.c similarity index 98% rename from Pico/cd/Misc.c rename to Pico/cd/misc.c index 74beade9..c3dcf699 100644 --- a/Pico/cd/Misc.c +++ b/Pico/cd/misc.c @@ -1,7 +1,7 @@ // Some misc stuff // (c) Copyright 2007, Grazvydas "notaz" Ignotas -#include "../PicoInt.h" +#include "../pico_int.h" unsigned char formatted_bram[4*0x10] = { diff --git a/Pico/cd/Misc.s b/Pico/cd/misc_arm.s similarity index 100% rename from Pico/cd/Misc.s rename to Pico/cd/misc_arm.s diff --git a/Pico/cd/pcm.c b/Pico/cd/pcm.c index 7bd8685f..9217d37c 100644 --- a/Pico/cd/pcm.c +++ b/Pico/cd/pcm.c @@ -2,7 +2,7 @@ // Based on Gens code by Stéphane Dallongeville // (c) Copyright 2007, Grazvydas "notaz" Ignotas -#include "../PicoInt.h" +#include "../pico_int.h" #include "pcm.h" static unsigned int g_rate = 0; // 18.14 fixed point diff --git a/Pico/cd/Pico.c b/Pico/cd/pico.c similarity index 99% rename from Pico/cd/Pico.c rename to Pico/cd/pico.c index 3ab0fe3e..33899e49 100644 --- a/Pico/cd/Pico.c +++ b/Pico/cd/pico.c @@ -1,7 +1,7 @@ // (c) Copyright 2007 notaz, All rights reserved. -#include "../PicoInt.h" +#include "../pico_int.h" #include "../sound/ym2612.h" extern unsigned char formatted_bram[4*0x10]; @@ -235,7 +235,7 @@ static __inline void getSamples(int y) #define PICO_CD -#include "../PicoFrameHints.c" +#include "../pico_cmn.c" PICO_INTERNAL void PicoFrameMCD(void) diff --git a/Pico/cd/Pico.s b/Pico/cd/pico_arm.s similarity index 100% rename from Pico/cd/Pico.s rename to Pico/cd/pico_arm.s diff --git a/Pico/cd/Sek.c b/Pico/cd/sek.c similarity index 99% rename from Pico/cd/Sek.c rename to Pico/cd/sek.c index 24844d8c..3a7b1d6e 100644 --- a/Pico/cd/Sek.c +++ b/Pico/cd/sek.c @@ -1,7 +1,7 @@ // (c) Copyright 2007 notaz, All rights reserved. -#include "../PicoInt.h" +#include "../pico_int.h" int SekCycleCntS68k=0; // cycles done in this frame diff --git a/Pico/Debug.c b/Pico/debug.c similarity index 99% rename from Pico/Debug.c rename to Pico/debug.c index b2efa4dc..ac687f01 100644 --- a/Pico/Debug.c +++ b/Pico/debug.c @@ -1,8 +1,8 @@ // some debug code, just for fun of it // (c) Copyright 2008 notaz, All rights reserved. -#include "PicoInt.h" -#include "Debug.h" +#include "pico_int.h" +#include "debug.h" #define bit(r, x) ((r>>x)&1) #define MVP dstrp+=strlen(dstrp) diff --git a/Pico/Debug.h b/Pico/debug.h similarity index 100% rename from Pico/Debug.h rename to Pico/debug.h diff --git a/Pico/DebugCPU.c b/Pico/debugCPU.c similarity index 96% rename from Pico/DebugCPU.c rename to Pico/debugCPU.c index 45ba08b3..77ca4207 100644 --- a/Pico/DebugCPU.c +++ b/Pico/debugCPU.c @@ -1,4 +1,4 @@ -#include "PicoInt.h" +#include "pico_int.h" typedef unsigned char u8; diff --git a/Pico/Draw.c b/Pico/draw.c similarity index 96% rename from Pico/Draw.c rename to Pico/draw.c index 15d09927..551b3d64 100644 --- a/Pico/Draw.c +++ b/Pico/draw.c @@ -18,7 +18,7 @@ * AS is enabled by user and takes priority over "sonic mode". */ -#include "PicoInt.h" +#include "pico_int.h" int (*PicoScanBegin)(unsigned int num) = NULL; int (*PicoScanEnd) (unsigned int num) = NULL; diff --git a/Pico/Draw2.c b/Pico/draw2.c similarity index 96% rename from Pico/Draw2.c rename to Pico/draw2.c index 054cee97..b2e6a710 100644 --- a/Pico/Draw2.c +++ b/Pico/draw2.c @@ -9,7 +9,7 @@ // this is a frame-based renderer, alternative to Dave's line based which is in Draw.c -#include "PicoInt.h" +#include "pico_int.h" // port_config.h include must define these 2 defines: // #define START_ROW 1 // which row of tiles to start rendering at? diff --git a/Pico/Draw2.s b/Pico/draw2_arm.s similarity index 100% rename from Pico/Draw2.s rename to Pico/draw2_arm.s diff --git a/Pico/Draw_amips.s b/Pico/draw_amips.s similarity index 100% rename from Pico/Draw_amips.s rename to Pico/draw_amips.s diff --git a/Pico/Draw.s b/Pico/draw_arm.s similarity index 100% rename from Pico/Draw.s rename to Pico/draw_arm.s diff --git a/Pico/Memory.c b/Pico/memory.c similarity index 96% rename from Pico/Memory.c rename to Pico/memory.c index 8975fa20..074af246 100644 --- a/Pico/Memory.c +++ b/Pico/memory.c @@ -7,7 +7,7 @@ // For commercial use, separate licencing terms must be obtained. -#include "PicoInt.h" +#include "pico_int.h" #include "sound/ym2612.h" #include "sound/sn76496.h" @@ -317,7 +317,7 @@ static void OtherWrite8End(u32 a,u32 d,int realsize) Pico.m.prot_bytes[(a>>2)&1] = (u8)d; } -#include "MemoryCmn.c" +#include "memory_cmn.c" // ----------------------------------------------------------------- diff --git a/Pico/Memory_amips.s b/Pico/memory_amips.s similarity index 100% rename from Pico/Memory_amips.s rename to Pico/memory_amips.s diff --git a/Pico/Memory.s b/Pico/memory_arm.s similarity index 100% rename from Pico/Memory.s rename to Pico/memory_arm.s diff --git a/Pico/MemoryCmn.c b/Pico/memory_cmn.c similarity index 100% rename from Pico/MemoryCmn.c rename to Pico/memory_cmn.c diff --git a/Pico/Misc.c b/Pico/misc.c similarity index 97% rename from Pico/Misc.c rename to Pico/misc.c index 944e4c86..014ffa19 100644 --- a/Pico/Misc.c +++ b/Pico/misc.c @@ -6,7 +6,7 @@ // For commercial use, separate licencing terms must be obtained. -#include "PicoInt.h" +#include "pico_int.h" // H-counter table for hvcounter reads in 40col mode // based on Gens code diff --git a/Pico/Misc_amips.s b/Pico/misc_amips.s similarity index 100% rename from Pico/Misc_amips.s rename to Pico/misc_amips.s diff --git a/Pico/Misc.s b/Pico/misc_arm.s similarity index 100% rename from Pico/Misc.s rename to Pico/misc_arm.s diff --git a/Pico/Patch.c b/Pico/patch.c similarity index 99% rename from Pico/Patch.c rename to Pico/patch.c index e57d83f2..42c6a4eb 100644 --- a/Pico/Patch.c +++ b/Pico/patch.c @@ -25,8 +25,8 @@ //#include #include -#include "PicoInt.h" -#include "Patch.h" +#include "pico_int.h" +#include "patch.h" struct patch { diff --git a/Pico/Patch.h b/Pico/patch.h similarity index 100% rename from Pico/Patch.h rename to Pico/patch.h diff --git a/Pico/Pico.c b/Pico/pico.c similarity index 92% rename from Pico/Pico.c rename to Pico/pico.c index 296d5d52..08ba5106 100644 --- a/Pico/Pico.c +++ b/Pico/pico.c @@ -7,7 +7,7 @@ // For commercial use, separate licencing terms must be obtained. -#include "PicoInt.h" +#include "pico_int.h" #include "sound/ym2612.h" int PicoVer=0x0133; @@ -287,9 +287,7 @@ static __inline void getSamples(int y) #endif } - -#include "PicoFrameHints.c" - +#include "pico_cmn.c" int z80stopCycle; int z80_cycle_cnt; /* 'done' z80 cycles before z80_run() */ @@ -316,21 +314,6 @@ void PicoFrame(void) { Pico.m.frame_count++; -#if 0 - if ((Pico.m.frame_count & 0x3f) == 0) - { - extern int idlehit_addrs[], idlehit_counts[]; - int i; - printf("--\n"); - for (i = 0; i < 128 && idlehit_addrs[i] != 0; i++) { - if (idlehit_counts[i] != 0) { - printf("%06x %i %i\n", idlehit_addrs[i], idlehit_counts[i], idlehit_counts[i] >> 6); - idlehit_counts[i] = 0; - } - } - } -#endif - if (PicoAHW & PAHW_MCD) { PicoFrameMCD(); return; diff --git a/Pico/Pico.h b/Pico/pico.h similarity index 100% rename from Pico/Pico.h rename to Pico/pico.h diff --git a/Pico/PicoFrameHints.c b/Pico/pico_cmn.c similarity index 100% rename from Pico/PicoFrameHints.c rename to Pico/pico_cmn.c diff --git a/Pico/PicoInt.h b/Pico/pico_int.h similarity index 96% rename from Pico/PicoInt.h rename to Pico/pico_int.h index d0fc25c3..a7ea5e83 100644 --- a/Pico/PicoInt.h +++ b/Pico/pico_int.h @@ -12,7 +12,7 @@ #include #include #include -#include "Pico.h" +#include "pico.h" #include "carthw/carthw.h" // diff --git a/Pico/Sek.c b/Pico/sek.c similarity index 95% rename from Pico/Sek.c rename to Pico/sek.c index f72da65f..f085f612 100644 --- a/Pico/Sek.c +++ b/Pico/sek.c @@ -7,7 +7,7 @@ // For commercial use, separate licencing terms must be obtained. -#include "PicoInt.h" +#include "pico_int.h" int SekCycleCnt=0; // cycles done in this frame diff --git a/Pico/sound/mix.s b/Pico/sound/mix_arm.s similarity index 100% rename from Pico/sound/mix.s rename to Pico/sound/mix_arm.s diff --git a/Pico/sound/sound.c b/Pico/sound/sound.c index cfa21a4d..39ae2910 100644 --- a/Pico/sound/sound.c +++ b/Pico/sound/sound.c @@ -10,8 +10,7 @@ #include #include "ym2612.h" #include "sn76496.h" - -#include "../PicoInt.h" +#include "../pico_int.h" #include "../cd/pcm.h" #include "mix.h" diff --git a/Pico/sound/ym2612.s b/Pico/sound/ym2612_arm.s similarity index 100% rename from Pico/sound/ym2612.s rename to Pico/sound/ym2612_arm.s diff --git a/Pico/Utils.c b/Pico/utils.c similarity index 94% rename from Pico/Utils.c rename to Pico/utils.c index 22bd3ace..467bc785 100644 --- a/Pico/Utils.c +++ b/Pico/utils.c @@ -7,7 +7,7 @@ // For commercial use, separate licencing terms must be obtained. -#include "PicoInt.h" +#include "pico_int.h" int PicuAnd=0xf7de; diff --git a/Pico/VideoPort.c b/Pico/videoport.c similarity index 96% rename from Pico/VideoPort.c rename to Pico/videoport.c index 6aabe88e..3d74f519 100644 --- a/Pico/VideoPort.c +++ b/Pico/videoport.c @@ -7,7 +7,7 @@ // For commercial use, separate licencing terms must be obtained. -#include "PicoInt.h" +#include "pico_int.h" #include "cd/gfx_cd.h" extern const unsigned char hcounts_32[]; diff --git a/cpu/cz80/cz80.c b/cpu/cz80/cz80.c index 20e8053f..374325e2 100644 --- a/cpu/cz80/cz80.c +++ b/cpu/cz80/cz80.c @@ -15,7 +15,7 @@ #if PICODRIVE_HACKS #undef EMU_M68K -#include +#include #endif #ifndef ALIGN_DATA diff --git a/platform/common/common_arm.mak b/platform/common/common_arm.mak index 5308fb3f..ec0c65a6 100644 --- a/platform/common/common_arm.mak +++ b/platform/common/common_arm.mak @@ -1,3 +1,31 @@ +# asm stuff +ifeq "$(asm_render)" "1" +DEFINC += -D_ASM_DRAW_C +OBJS += pico/draw_arm.o pico/draw2_arm.o +endif +ifeq "$(asm_memory)" "1" +DEFINC += -D_ASM_MEMORY_C +OBJS += pico/memory_arm.o +endif +ifeq "$(asm_ym2612)" "1" +DEFINC += -D_ASM_YM2612_C +OBJS += pico/sound/ym2612_arm.o +endif +ifeq "$(asm_misc)" "1" +DEFINC += -D_ASM_MISC_C +OBJS += pico/misc_arm.o +OBJS += pico/cd/misc_arm.o +endif +ifeq "$(asm_cdpico)" "1" +DEFINC += -D_ASM_CD_PICO_C +OBJS += pico/cd/pico_arm.o +endif +ifeq "$(asm_cdmemory)" "1" +DEFINC += -D_ASM_CD_MEMORY_C +OBJS += pico/cd/memory_arm.o +endif + + .c.o: @echo ">>>" $< $(CC) $(CFLAGS) $(DEFINC) -c $< -o $@ @@ -18,47 +46,18 @@ mkdirs: mkdir -p $(DIRS) # deps -Pico/carthw/svp/compiler.o : ../../Pico/carthw/svp/ssp16.o ../../Pico/carthw/svp/gen_arm.c -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 - -# individual rules -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 $@ +pico/carthw/svp/compiler.o : ../../pico/carthw/svp/ssp16.o ../../pico/carthw/svp/gen_arm.c +pico/pico.o pico/cd/pico.o : ../../pico/pico_cmn.c ../../pico/pico_int.h +pico/memory.o pico/cd/memory.o : ../../pico/memory_cmn.c ../../pico/pico_int.h # 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 + # build helix libs ../common/helix/$(CROSS)helix-mp3.a: make -C ../common/helix clean all diff --git a/platform/common/config.c b/platform/common/config.c index c530c957..2704aca5 100644 --- a/platform/common/config.c +++ b/platform/common/config.c @@ -18,7 +18,7 @@ static char *mystrip(char *str); #include "menu.h" #include "emu.h" -#include +#include extern menu_entry opt_entries[]; extern menu_entry opt2_entries[]; diff --git a/platform/common/emu.c b/platform/common/emu.c index eaabe08f..73ca01bb 100644 --- a/platform/common/emu.c +++ b/platform/common/emu.c @@ -17,9 +17,9 @@ #include "config.h" #include "common.h" -#include -#include -#include +#include +#include +#include #include diff --git a/platform/common/menu.c b/platform/common/menu.c index 169b8923..1becb832 100644 --- a/platform/common/menu.c +++ b/platform/common/menu.c @@ -338,8 +338,8 @@ int me_process(menu_entry *entries, int count, menu_id id, int is_next) #include #include -#include -#include +#include +#include void SekStepM68k(void); diff --git a/platform/common/mp3_helix.c b/platform/common/mp3_helix.c index f28abda9..718c3def 100644 --- a/platform/common/mp3_helix.c +++ b/platform/common/mp3_helix.c @@ -6,8 +6,8 @@ #include #include -#include "../../Pico/PicoInt.h" -#include "../../Pico/sound/mix.h" +#include "../../pico/pico_int.h" +#include "../../pico/sound/mix.h" #include "helix/pub/mp3dec.h" #include "lprintf.h" diff --git a/platform/gizmondo/Makefile b/platform/gizmondo/Makefile index 0e37e2de..1a2c63ac 100644 --- a/platform/gizmondo/Makefile +++ b/platform/gizmondo/Makefile @@ -44,54 +44,27 @@ OBJS += platform/common/emu.o platform/common/menu.o platform/common/fonts.o pla # Pico ifeq "$(amalgamate)" "1" -OBJS += PicoAll.o +OBJS += picoAll.o else -OBJS += Pico/Area.o Pico/Cart.o Pico/Memory.o Pico/Misc.o Pico/Pico.o Pico/Sek.o \ - Pico/VideoPort.o Pico/Draw2.o Pico/Draw.o Pico/Patch.o Pico/Debug.o +OBJS += pico/area.o pico/cart.o pico/memory.o pico/misc.o pico/pico.o pico/sek.o \ + pico/videoport.o pico/draw2.o pico/draw.o pico/patch.o pico/debug.o # Pico - CD -OBJS += Pico/cd/Pico.o Pico/cd/Memory.o Pico/cd/Sek.o Pico/cd/LC89510.o \ - Pico/cd/cd_sys.o Pico/cd/cd_file.o Pico/cd/gfx_cd.o Pico/cd/cue.o \ - Pico/cd/Area.o Pico/cd/Misc.o Pico/cd/pcm.o Pico/cd/buffering.o +OBJS += pico/cd/pico.o pico/cd/memory.o pico/cd/sek.o pico/cd/LC89510.o \ + pico/cd/cd_sys.o pico/cd/cd_file.o pico/cd/gfx_cd.o pico/cd/cue.o \ + pico/cd/area.o pico/cd/misc.o pico/cd/pcm.o pico/cd/buffering.o endif # Pico - Pico -OBJS += Pico/Pico/Pico.o Pico/Pico/Memory.o Pico/Pico/xpcm.o +OBJS += pico/pico/pico.o pico/pico/memory.o pico/pico/xpcm.o # Pico - carthw -OBJS += Pico/carthw/carthw.o Pico/carthw/svp/svp.o Pico/carthw/svp/Memory.o \ - Pico/carthw/svp/ssp16.o Pico/carthw/svp/compiler.o Pico/carthw/svp/stub_arm.o - -# asm stuff -ifeq "$(asm_render)" "1" -DEFINC += -D_ASM_DRAW_C -OBJS += Pico/draw_asm.o Pico/draw2_asm.o -endif -ifeq "$(asm_memory)" "1" -DEFINC += -D_ASM_MEMORY_C -OBJS += Pico/memory_asm.o -endif -ifeq "$(asm_ym2612)" "1" -DEFINC += -D_ASM_YM2612_C -OBJS += Pico/sound/ym2612_asm.o -endif -ifeq "$(asm_misc)" "1" -DEFINC += -D_ASM_MISC_C -OBJS += Pico/misc_asm.o -OBJS += Pico/cd/misc_asm.o -endif -ifeq "$(asm_cdpico)" "1" -DEFINC += -D_ASM_CD_PICO_C -OBJS += Pico/cd/pico_asm.o -endif -ifeq "$(asm_cdmemory)" "1" -DEFINC += -D_ASM_CD_MEMORY_C -OBJS += Pico/cd/memory_asm.o -endif +OBJS += pico/carthw/carthw.o pico/carthw/svp/svp.o pico/carthw/svp/memory.o \ + pico/carthw/svp/ssp16.o pico/carthw/svp/compiler.o pico/carthw/svp/stub_arm.o # Pico - sound ifneq "$(amalgamate)" "1" -OBJS += Pico/sound/sound.o +OBJS += pico/sound/sound.o endif -OBJS += Pico/sound/mix_asm.o -OBJS += Pico/sound/sn76496.o Pico/sound/ym2612.o +OBJS += pico/sound/mix_asm.o +OBJS += pico/sound/sn76496.o pico/sound/ym2612.o # 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 @@ -108,7 +81,7 @@ OBJS += cpu/DrZ80/drz80.o vpath %.c = ../.. vpath %.s = ../.. vpath %.S = ../.. -DIRS = platform platform/common Pico Pico/cd Pico/Pico Pico/sound Pico/carthw/svp \ +DIRS = platform platform/common pico pico/cd pico/pico pico/sound pico/carthw/svp \ zlib unzip cpu cpu/musashi cpu/Cyclone/proj cpu/Cyclone/tools cpu/mz80 cpu/DrZ80 diff --git a/platform/gizmondo/emu.c b/platform/gizmondo/emu.c index ee5a1058..9f08f067 100644 --- a/platform/gizmondo/emu.c +++ b/platform/gizmondo/emu.c @@ -16,7 +16,7 @@ #include "giz.h" #include "asm_utils.h" -#include +#include #ifdef BENCHMARK #define OSD_FPS_X 220 diff --git a/platform/gizmondo/menu.c b/platform/gizmondo/menu.c index 50de347e..edd7ef07 100644 --- a/platform/gizmondo/menu.c +++ b/platform/gizmondo/menu.c @@ -26,8 +26,8 @@ #include "../common/readpng.h" #include "version.h" -#include -#include +#include +#include #include diff --git a/platform/gp2x/940ctl.c b/platform/gp2x/940ctl.c index f01ffa33..1c6e4caa 100644 --- a/platform/gp2x/940ctl.c +++ b/platform/gp2x/940ctl.c @@ -18,9 +18,9 @@ #include "../common/arm_utils.h" #include "../common/menu.h" #include "../common/emu.h" -#include "../../Pico/PicoInt.h" -#include "../../Pico/sound/ym2612.h" -#include "../../Pico/sound/mix.h" +#include "../../pico/pico_int.h" +#include "../../pico/sound/ym2612.h" +#include "../../pico/sound/mix.h" /* we will need some gp2x internals here */ extern volatile unsigned short *gp2x_memregs; /* from minimal library rlyeh */ diff --git a/platform/gp2x/Makefile b/platform/gp2x/Makefile index 06761a30..b8bf4482 100644 --- a/platform/gp2x/Makefile +++ b/platform/gp2x/Makefile @@ -64,54 +64,27 @@ OBJS += platform/common/emu.o platform/common/menu.o platform/common/fonts.o pla # Pico ifeq "$(amalgamate)" "1" -OBJS += ../../PicoAll.o +OBJS += ../../picoAll.o else -OBJS += Pico/Area.o Pico/Cart.o Pico/Memory.o Pico/Misc.o Pico/Pico.o Pico/Sek.o \ - Pico/VideoPort.o Pico/Draw2.o Pico/Draw.o Pico/Patch.o Pico/Debug.o +OBJS += pico/area.o pico/cart.o pico/memory.o pico/misc.o pico/pico.o pico/sek.o \ + pico/videoport.o pico/draw2.o pico/draw.o pico/patch.o pico/debug.o # Pico - CD -OBJS += Pico/cd/Pico.o Pico/cd/Memory.o Pico/cd/Sek.o Pico/cd/LC89510.o \ - Pico/cd/cd_sys.o Pico/cd/cd_file.o Pico/cd/cue.o Pico/cd/gfx_cd.o \ - Pico/cd/Area.o Pico/cd/Misc.o Pico/cd/pcm.o Pico/cd/buffering.o +OBJS += pico/cd/pico.o pico/cd/memory.o pico/cd/sek.o pico/cd/LC89510.o \ + pico/cd/cd_sys.o pico/cd/cd_file.o pico/cd/cue.o pico/cd/gfx_cd.o \ + pico/cd/area.o pico/cd/misc.o pico/cd/pcm.o pico/cd/buffering.o endif # Pico - Pico -OBJS += Pico/Pico/Pico.o Pico/Pico/Memory.o Pico/Pico/xpcm.o +OBJS += pico/pico/pico.o pico/pico/memory.o pico/pico/xpcm.o # Pico - carthw -OBJS += Pico/carthw/carthw.o Pico/carthw/svp/svp.o Pico/carthw/svp/Memory.o \ - Pico/carthw/svp/ssp16.o Pico/carthw/svp/compiler.o Pico/carthw/svp/stub_arm.o - -# asm stuff -ifeq "$(asm_render)" "1" -DEFINC += -D_ASM_DRAW_C -OBJS += Pico/draw_asm.o Pico/draw2_asm.o -endif -ifeq "$(asm_memory)" "1" -DEFINC += -D_ASM_MEMORY_C -OBJS += Pico/memory_asm.o -endif -ifeq "$(asm_ym2612)" "1" -DEFINC += -D_ASM_YM2612_C -OBJS += Pico/sound/ym2612_asm.o -endif -ifeq "$(asm_misc)" "1" -DEFINC += -D_ASM_MISC_C -OBJS += Pico/misc_asm.o -OBJS += Pico/cd/misc_asm.o -endif -ifeq "$(asm_cdpico)" "1" -DEFINC += -D_ASM_CD_PICO_C -OBJS += Pico/cd/pico_asm.o -endif -ifeq "$(asm_cdmemory)" "1" -DEFINC += -D_ASM_CD_MEMORY_C -OBJS += Pico/cd/memory_asm.o -endif +OBJS += pico/carthw/carthw.o pico/carthw/svp/svp.o pico/carthw/svp/memory.o \ + pico/carthw/svp/ssp16.o pico/carthw/svp/compiler.o pico/carthw/svp/stub_arm.o # Pico - sound ifneq "$(amalgamate)" "1" -OBJS += Pico/sound/sound.o +OBJS += pico/sound/sound.o endif -OBJS += Pico/sound/mix_asm.o -OBJS += Pico/sound/sn76496.o Pico/sound/ym2612.o +OBJS += pico/sound/mix_arm.o +OBJS += pico/sound/sn76496.o pico/sound/ym2612.o # 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 @@ -119,7 +92,7 @@ OBJS += zlib/gzio.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o \ OBJS += unzip/unzip.o unzip/unzip_stream.o # debug ifeq "$(debug_cyclone)" "1" -OBJS += Pico/DebugCPU.o cpu/musashi/m68kdasm.o +OBJS += pico/DebugCPU.o cpu/musashi/m68kdasm.o endif # CPU cores ifeq "$(use_musashi)" "1" @@ -142,12 +115,14 @@ endif vpath %.c = ../.. vpath %.s = ../.. vpath %.S = ../.. -DIRS = platform platform/gp2x platform/common Pico Pico/cd Pico/Pico Pico/sound Pico/carthw/svp \ +DIRS = platform platform/gp2x platform/common pico pico/cd pico/pico pico/sound pico/carthw/svp \ zlib unzip cpu cpu/musashi cpu/Cyclone/proj cpu/Cyclone/tools cpu/mz80 cpu/DrZ80 all: mkdirs PicoDrive.gpe +include ../common/common_arm.mak + PicoDrive.gpe : $(OBJS) ../common/helix/$(CROSS)helix-mp3.a @echo ">>>" $@ $(CC) -o $@ $(CFLAGS) $^ -lm -lpng -Wl,-Map=PicoDrive.map @@ -158,22 +133,14 @@ endif up: PicoDrive.gpe @cp -v PicoDrive.gpe /mnt/gp2x/mnt/sd/emus/PicoDrive/ -# @cmd //C copy PicoDrive.gpe \\\\10.0.1.2\\gp2x\\mnt\\sd\\games\\PicoDrive\\ - -# cleanup clean: tidy $(RM) PicoDrive.gpe tidy: $(RM) $(OBJS) -# rm -rf $(DIRS) # don't clean, gcda may be there -# @make -C ../../cpu/Cyclone/proj -f Makefile.linux clean - readme.txt: ../../tools/textfilter ../base_readme.txt ../../tools/textfilter ../base_readme.txt $@ GP2X -include ../common/common_arm.mak - # ----------- release ----------- ifneq ($(findstring rel,$(MAKECMDGOALS)),) ifeq ($(VER),) diff --git a/platform/gp2x/emu.c b/platform/gp2x/emu.c index dc785210..77bd83e6 100644 --- a/platform/gp2x/emu.c +++ b/platform/gp2x/emu.c @@ -24,9 +24,9 @@ #include "../common/config.h" #include "cpuctrl.h" -#include -#include -#include +#include +#include +#include #include //#define PFRAMES diff --git a/platform/gp2x/menu.c b/platform/gp2x/menu.c index b7bd3f17..e37c8788 100644 --- a/platform/gp2x/menu.c +++ b/platform/gp2x/menu.c @@ -20,8 +20,8 @@ #include "../common/readpng.h" #include "version.h" -#include -#include +#include +#include #include #ifndef _DIRENT_HAVE_D_TYPE diff --git a/platform/linux/940ctl_ym2612.c b/platform/linux/940ctl_ym2612.c index b6b593ac..9d7e38d3 100644 --- a/platform/linux/940ctl_ym2612.c +++ b/platform/linux/940ctl_ym2612.c @@ -8,13 +8,13 @@ #include #include -#include "../../Pico/sound/ym2612.h" +#include "../../pico/sound/ym2612.h" #include "../gp2x/gp2x.h" #include "../gp2x/emu.h" #include "../gp2x/menu.h" #include "../gp2x/code940/940shared.h" #include "../common/helix/pub/mp3dec.h" -#include "../../Pico/PicoInt.h" +#include "../../pico/pico_int.h" // static _940_data_t shared_data_; diff --git a/platform/linux/Makefile b/platform/linux/Makefile index 5b33ba3b..442b50a9 100644 --- a/platform/linux/Makefile +++ b/platform/linux/Makefile @@ -35,19 +35,19 @@ OBJS += platform/common/emu.o platform/common/menu.o platform/common/config.o pl platform/common/readpng.o platform/common/mp3_helix.o # Pico -OBJS += Pico/Area.o Pico/Cart.o Pico/Memory.o Pico/Misc.o Pico/Pico.o Pico/Sek.o \ - Pico/VideoPort.o Pico/Draw2.o Pico/Draw.o Pico/Patch.o Pico/Debug.o +OBJS += pico/area.o pico/cart.o pico/memory.o pico/misc.o pico/pico.o pico/sek.o \ + pico/videoport.o pico/draw2.o pico/draw.o pico/patch.o pico/debug.o # Pico - CD -OBJS += Pico/cd/Pico.o Pico/cd/Memory.o Pico/cd/Sek.o Pico/cd/LC89510.o \ - Pico/cd/cd_sys.o Pico/cd/cd_file.o Pico/cd/cue.o Pico/cd/gfx_cd.o \ - Pico/cd/Area.o Pico/cd/Misc.o Pico/cd/pcm.o Pico/cd/buffering.o +OBJS += pico/cd/pico.o pico/cd/memory.o pico/cd/sek.o pico/cd/LC89510.o \ + pico/cd/cd_sys.o pico/cd/cd_file.o pico/cd/cue.o pico/cd/gfx_cd.o \ + pico/cd/area.o pico/cd/misc.o pico/cd/pcm.o pico/cd/buffering.o # Pico - Pico -OBJS += Pico/Pico/Pico.o Pico/Pico/Memory.o Pico/Pico/xpcm.o +OBJS += pico/pico/pico.o pico/pico/memory.o pico/pico/xpcm.o # Pico - sound -OBJS += Pico/sound/sound.o Pico/sound/sn76496.o Pico/sound/ym2612.o Pico/sound/mix.o +OBJS += pico/sound/sound.o pico/sound/sn76496.o pico/sound/ym2612.o pico/sound/mix.o # Pico - carthw -OBJS += Pico/carthw/carthw.o Pico/carthw/svp/svp.o Pico/carthw/svp/Memory.o \ - Pico/carthw/svp/ssp16.o Pico/carthw/svp/compiler.o +OBJS += pico/carthw/carthw.o pico/carthw/svp/svp.o pico/carthw/svp/memory.o \ + pico/carthw/svp/ssp16.o pico/carthw/svp/compiler.o # 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 @@ -73,13 +73,14 @@ endif # misc ifeq "$(use_fame)" "1" ifeq "$(use_musashi)" "1" -OBJS += Pico/DebugCPU.o +OBJS += pico/debugCPU.o OBJS += cpu/musashi/m68kdasm.o endif endif +OBJS += cpu/musashi/m68kdasm.o vpath %.c = ../.. -DIRS = platform platform/gp2x platform/common Pico Pico/cd Pico/Pico Pico/sound Pico/carthw/svp \ +DIRS = platform platform/gp2x platform/common pico pico/cd pico/pico pico/sound pico/carthw/svp \ zlib unzip cpu cpu/musashi cpu/fame cpu/mz80 cpu/cz80 all: mkdirs PicoDrive @@ -98,9 +99,9 @@ PicoDrive : $(OBJS) ../common/helix/helix_mp3_x86.a mkdirs: mkdir -p $(DIRS) -Pico/carthw/svp/compiler.o : ../../Pico/carthw/svp/gen_arm.c -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 +pico/carthw/svp/compiler.o : ../../pico/carthw/svp/gen_arm.c +pico/pico.o pico/cd/pico.o : ../../pico/pico_cmn.c ../../pico/pico_int.h +pico/memory.o pico/cd/memory.o : ../../pico/memory_cmn.c ../../pico/pico_int.h ../../cpu/musashi/m68kops.c : @make -C ../../cpu/musashi @@ -123,7 +124,7 @@ cpu/mz80/mz80.o : ../../cpu/mz80/mz80.asm $(GCC) $(COPT) $(DEFINC) -c $< -o $@ -Pico/sound/ym2612.o : ../../Pico/sound/ym2612.c +pico/sound/ym2612.o : ../../pico/sound/ym2612.c @echo ">>>" $@ $(GCC) $(COPT_COMMON) $(DEFINC) -c $< -o $@ diff --git a/platform/pandora/Makefile b/platform/pandora/Makefile index 9cd4e1f6..50c34d69 100644 --- a/platform/pandora/Makefile +++ b/platform/pandora/Makefile @@ -41,9 +41,10 @@ endif ifeq "$(profile)" "2" COPT_COMMON += -fprofile-use endif -COPT = $(COPT_COMMON) -ASOPT = -GCC = $(CROSS)gcc +CFLAGS = $(COPT_COMMON) +SFLAGS = $(CFLAGS) +ASFLAGS = -mcpu=cortex-a8 +CC = $(CROSS)gcc STRIP = $(CROSS)strip AS = $(CROSS)as LD = $(CROSS)ld @@ -58,54 +59,27 @@ OBJS += platform/common/emu.o platform/common/menu.o platform/common/fonts.o pla # Pico ifeq "$(amalgamate)" "1" -OBJS += ../../PicoAll.o +OBJS += ../../picoAll.o else -OBJS += Pico/Area.o Pico/Cart.o Pico/Memory.o Pico/Misc.o Pico/Pico.o Pico/Sek.o \ - Pico/VideoPort.o Pico/Draw2.o Pico/Draw.o Pico/Patch.o Pico/Debug.o +OBJS += pico/area.o pico/cart.o pico/memory.o pico/misc.o pico/pico.o pico/sek.o \ + pico/videoport.o pico/draw2.o pico/draw.o pico/patch.o pico/debug.o # Pico - CD -OBJS += Pico/cd/Pico.o Pico/cd/Memory.o Pico/cd/Sek.o Pico/cd/LC89510.o \ - Pico/cd/cd_sys.o Pico/cd/cd_file.o Pico/cd/cue.o Pico/cd/gfx_cd.o \ - Pico/cd/Area.o Pico/cd/Misc.o Pico/cd/pcm.o Pico/cd/buffering.o +OBJS += pico/cd/pico.o pico/cd/memory.o pico/cd/sek.o pico/cd/LC89510.o \ + pico/cd/cd_sys.o pico/cd/cd_file.o pico/cd/cue.o pico/cd/gfx_cd.o \ + pico/cd/area.o pico/cd/misc.o pico/cd/pcm.o pico/cd/buffering.o endif # Pico - Pico -OBJS += Pico/Pico/Pico.o Pico/Pico/Memory.o Pico/Pico/xpcm.o +OBJS += pico/pico/pico.o pico/pico/memory.o pico/pico/xpcm.o # Pico - carthw -OBJS += Pico/carthw/carthw.o Pico/carthw/svp/svp.o Pico/carthw/svp/Memory.o \ - Pico/carthw/svp/ssp16.o Pico/carthw/svp/compiler.o Pico/carthw/svp/stub_arm.o - -# asm stuff -ifeq "$(asm_render)" "1" -DEFINC += -D_ASM_DRAW_C -OBJS += Pico/draw_asm.o Pico/draw2_asm.o -endif -ifeq "$(asm_memory)" "1" -DEFINC += -D_ASM_MEMORY_C -OBJS += Pico/memory_asm.o -endif -ifeq "$(asm_ym2612)" "1" -DEFINC += -D_ASM_YM2612_C -OBJS += Pico/sound/ym2612_asm.o -endif -ifeq "$(asm_misc)" "1" -DEFINC += -D_ASM_MISC_C -OBJS += Pico/misc_asm.o -OBJS += Pico/cd/misc_asm.o -endif -ifeq "$(asm_cdpico)" "1" -DEFINC += -D_ASM_CD_PICO_C -OBJS += Pico/cd/pico_asm.o -endif -ifeq "$(asm_cdmemory)" "1" -DEFINC += -D_ASM_CD_MEMORY_C -OBJS += Pico/cd/memory_asm.o -endif +OBJS += pico/carthw/carthw.o pico/carthw/svp/svp.o pico/carthw/svp/memory.o \ + pico/carthw/svp/ssp16.o pico/carthw/svp/compiler.o pico/carthw/svp/stub_arm.o # Pico - sound ifneq "$(amalgamate)" "1" -OBJS += Pico/sound/sound.o +OBJS += pico/sound/sound.o endif -OBJS += Pico/sound/mix_asm.o -OBJS += Pico/sound/sn76496.o Pico/sound/ym2612.o +OBJS += pico/sound/mix_arm.o +OBJS += pico/sound/sn76496.o pico/sound/ym2612.o # 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 @@ -113,7 +87,7 @@ OBJS += zlib/gzio.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o \ OBJS += unzip/unzip.o unzip/unzip_stream.o # debug ifeq "$(debug_cyclone)" "1" -OBJS += Pico/DebugCPU.o cpu/musashi/m68kdasm.o +OBJS += pico/DebugCPU.o cpu/musashi/m68kdasm.o endif # CPU cores ifeq "$(use_musashi)" "1" @@ -145,99 +119,29 @@ endif vpath %.c = ../.. vpath %.s = ../.. vpath %.S = ../.. -DIRS = platform platform/gp2x platform/common Pico Pico/cd Pico/Pico Pico/sound Pico/carthw/svp \ +DIRS = platform platform/gp2x platform/common pico pico/cd pico/pico pico/sound pico/carthw/svp \ zlib unzip cpu cpu/musashi cpu/Cyclone/proj cpu/Cyclone/tools cpu/mz80 cpu/DrZ80 all: mkdirs PicoDrive +include ../common/common_arm.mak + PicoDrive : $(OBJS) ../common/helix/$(CROSS)helix-mp3.a @echo ">>>" $@ - $(GCC) -o $@ $(COPT) $^ -lm -Wl,-Map=PicoDrive.map # -lpng + $(CC) -o $@ $(CFLAGS) $^ -lm -Wl,-Map=PicoDrive.map # -lpng ifeq ($(DEBUG),) $(STRIP) $@ endif - -# cleanup clean: tidy $(RM) PicoDrive tidy: $(RM) $(OBJS) -# rm -rf $(DIRS) # don't clean, gcda may be there -# @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 - - # ----------- release ----------- ifneq ($(findstring rel,$(MAKECMDGOALS)),) $(error TODO) diff --git a/platform/pandora/emu.c b/platform/pandora/emu.c index 0c6935b1..1d0b33bc 100644 --- a/platform/pandora/emu.c +++ b/platform/pandora/emu.c @@ -24,9 +24,9 @@ #include "../common/common.h" #include "asm_utils.h" -#include -#include -#include +#include +#include +#include #include //#define PFRAMES @@ -294,8 +294,8 @@ static int EmuScanEnd16(unsigned int num) len = 256; } - if (!sh && (rendstatus & PDRAW_ACC_SPRITES)) - mask=0x3f; // accurate sprites, upper bits are priority stuff + if (!sh && (rendstatus & PDRAW_SPR_LO_ON_HI)) + mask=0x3f; // messed sprites, upper bits are priority stuff #if 1 clut_line(pd, ps, pal, (mask<<16) | len); @@ -775,6 +775,11 @@ void emu_forcedFrame(int opts) currentConfig.EmuOpt = eo_old; } +void emu_platformDebugCat(char *str) +{ + // nothing +} + static void simpleWait(int thissec, int lim_time) { struct timeval tval; diff --git a/platform/psp/Makefile b/platform/psp/Makefile index 21b2d6a9..1d6b6738 100644 --- a/platform/psp/Makefile +++ b/platform/psp/Makefile @@ -10,7 +10,7 @@ for_15fw = 1 # :!touch platform/psp/psp.c -CFLAGS += -I../.. -I. -DNO_SYNC +CFLAGS += -I../.. -I. -DNO_SYNC -D_ASM_DRAW_C_AMIPS CFLAGS += -Wall -Winline -G0 #CFLAGS += -DLPRINTF_STDIO #CFLAGS += -pg @@ -32,28 +32,28 @@ OBJS += platform/common/emu.o platform/common/menu.o platform/common/fonts.o pla # Pico ifeq "$(amalgamate)" "1" -OBJS += ../../PicoAll.o +OBJS += ../../picoAll.o else -OBJS += Pico/Area.o Pico/Cart.o Pico/Memory.o Pico/Misc.o Pico/Pico.o Pico/Sek.o Pico/VideoPort.o \ - Pico/Draw2.o Pico/Draw.o Pico/Patch.o Pico/Draw_amips.o Pico/Memory_amips.o \ - Pico/Misc_amips.o Pico/Debug.o +OBJS += pico/area.o pico/cart.o pico/memory.o pico/misc.o pico/pico.o pico/sek.o pico/videoport.o \ + pico/draw2.o pico/draw.o pico/patch.o pico/draw_amips.o pico/memory_amips.o \ + pico/misc_amips.o pico/debug.o # Pico - CD -OBJS += Pico/cd/Pico.o Pico/cd/Memory.o Pico/cd/Sek.o Pico/cd/LC89510.o \ - Pico/cd/cd_sys.o Pico/cd/cd_file.o Pico/cd/cue.o Pico/cd/gfx_cd.o \ - Pico/cd/Area.o Pico/cd/Misc.o Pico/cd/pcm.o Pico/cd/buffering.o +OBJS += pico/cd/pico.o pico/cd/memory.o pico/cd/sek.o pico/cd/LC89510.o \ + pico/cd/cd_sys.o pico/cd/cd_file.o pico/cd/cue.o pico/cd/gfx_cd.o \ + pico/cd/area.o pico/cd/misc.o pico/cd/pcm.o pico/cd/buffering.o # Pico - carthw -OBJS += Pico/carthw/carthw.o Pico/carthw/svp/svp.o Pico/carthw/svp/Memory.o \ - Pico/carthw/svp/ssp16.o +OBJS += pico/carthw/carthw.o pico/carthw/svp/svp.o pico/carthw/svp/memory.o \ + pico/carthw/svp/ssp16.o # Pico - Pico -OBJS += Pico/Pico/Pico.o Pico/Pico/Memory.o Pico/Pico/xpcm.o +OBJS += pico/pico/pico.o pico/pico/memory.o pico/pico/xpcm.o endif # Pico - sound ifneq "$(amalgamate)" "1" -OBJS += Pico/sound/sound.o +OBJS += pico/sound/sound.o endif -OBJS += Pico/sound/mix.o -OBJS += Pico/sound/sn76496.o Pico/sound/ym2612.o +OBJS += pico/sound/mix.o +OBJS += pico/sound/sn76496.o pico/sound/ym2612.o # zlib (hacked) 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 \ @@ -81,7 +81,7 @@ OBJS += data/bg32.o data/bg40.o vpath %.c = ../.. vpath %.s = ../.. -DIRS = platform platform/psp platform/common Pico Pico/cd Pico/Pico Pico/sound Pico/carthw/svp \ +DIRS = platform platform/psp platform/common pico pico/cd pico/pico pico/sound pico/carthw/svp \ zlib unzip cpu cpu/musashi cpu/fame cpu/mz80 cpu/cz80 @@ -125,23 +125,19 @@ cpu/fame/famec.o : ../../cpu/fame/famec.c @echo ">>>" $< $(CC) $(CFLAGS) -Wno-unused -c $< -o $@ -Pico/Memory.o : ../../Pico/Memory.c +pico/misc.o : ../../pico/misc.c @echo ">>>" $< - $(CC) $(CFLAGS) -O2 -c $< -o $@ -D_ASM_MEMORY_C -D_ASM_MEMORY_C_AMIPS - -Pico/cd/Memory.o : ../../Pico/cd/Memory.c - @echo ">>>" $< - $(CC) $(CFLAGS) -O2 -c $< -o $@ + $(CC) $(CFLAGS) -c $< -o $@ -D_ASM_MISC_C_AMIPS -Pico/Draw.o : ../../Pico/Draw.c +pico/memory.o : ../../pico/memory.c @echo ">>>" $< - $(CC) $(CFLAGS) -c $< -o $@ -D_ASM_DRAW_C_AMIPS + $(CC) $(CFLAGS) -O2 -c $< -o $@ -D_ASM_MEMORY_C -D_ASM_MEMORY_C_AMIPS -Pico/Misc.o : ../../Pico/Misc.c +pico/cd/memory.o : ../../pico/cd/memory.c @echo ">>>" $< - $(CC) $(CFLAGS) -c $< -o $@ -D_ASM_MISC_C_AMIPS + $(CC) $(CFLAGS) -O2 -c $< -o $@ -Pico/cd/gfx_cd.o : ../../Pico/cd/gfx_cd.c +pico/cd/gfx_cd.o : ../../pico/cd/gfx_cd.c @echo ">>>" $< $(CC) $(CFLAGS) -O2 -c $< -o $@ diff --git a/platform/psp/emu.c b/platform/psp/emu.c index 5c87355c..91bd5634 100644 --- a/platform/psp/emu.c +++ b/platform/psp/emu.c @@ -21,8 +21,8 @@ #include "../common/emu.h" #include "../common/config.h" #include "../common/lprintf.h" -#include "../../Pico/PicoInt.h" -#include "../../Pico/cd/cue.h" +#include +#include #define OSD_FPS_X 432 diff --git a/platform/psp/menu.c b/platform/psp/menu.c index 0e578b13..6fe06ae6 100644 --- a/platform/psp/menu.c +++ b/platform/psp/menu.c @@ -27,8 +27,8 @@ #include "../common/lprintf.h" #include "version.h" -#include -#include +#include +#include #include diff --git a/platform/psp/mp3.c b/platform/psp/mp3.c index 19f6ec36..c1e60893 100644 --- a/platform/psp/mp3.c +++ b/platform/psp/mp3.c @@ -11,8 +11,8 @@ #include #include -#include "../../Pico/PicoInt.h" -#include "../../Pico/sound/mix.h" +#include "../../pico/pico_int.h" +#include "../../pico/sound/mix.h" #include "../common/lprintf.h" int mp3_last_error = 0; diff --git a/platform/uiq3/Engine.cpp b/platform/uiq3/Engine.cpp index ba93c815..a5205b8e 100644 --- a/platform/uiq3/Engine.cpp +++ b/platform/uiq3/Engine.cpp @@ -23,7 +23,7 @@ #include #include "version.h" -#include +#include #include "../common/emu.h" #include "engine/debug.h" #include "App.h" diff --git a/platform/uiq3/Makefile b/platform/uiq3/Makefile index dcfff24f..0f89a494 100644 --- a/platform/uiq3/Makefile +++ b/platform/uiq3/Makefile @@ -27,85 +27,58 @@ use_cyclone = 1 # objects # launcher -OBJ += App.o Engine.o Dialogs.o CSimpleTextParser.o emu.o +OBJS += App.o Engine.o Dialogs.o CSimpleTextParser.o emu.o # engine -OBJ += engine/main.o engine/vid.o engine/polledas.o engine/audio_mediaserver.o engine/debug.o +OBJS += engine/main.o engine/vid.o engine/polledas.o engine/audio_mediaserver.o engine/debug.o ifeq "$(asm_blit)" "1" -OBJ += engine/blit_asm.o +OBJS += engine/blit_asm.o else -OBJ += engine/blit.o +OBJS += engine/blit.o endif # common -OBJ += ../common/emu.o ../common/config.o ../common/menu.o ../common/mp3_helix.o +OBJS += ../common/emu.o ../common/config.o ../common/menu.o ../common/mp3_helix.o # Pico -OBJ += Pico/Area.o Pico/Cart.o Pico/Memory.o Pico/Misc.o Pico/Pico.o Pico/Sek.o \ - Pico/VideoPort.o Pico/Draw2.o Pico/Draw.o Pico/Patch.o Pico/Debug.o +OBJS += pico/area.o pico/cart.o pico/memory.o pico/misc.o pico/pico.o pico/sek.o \ + pico/videoport.o pico/draw2.o pico/draw.o pico/patch.o pico/debug.o # Pico - CD -OBJ += Pico/cd/Pico.o Pico/cd/Memory.o Pico/cd/Sek.o Pico/cd/LC89510.o \ - Pico/cd/cd_sys.o Pico/cd/cd_file.o Pico/cd/cue.o Pico/cd/gfx_cd.o \ - Pico/cd/Area.o Pico/cd/Misc.o Pico/cd/pcm.o Pico/cd/buffering.o +OBJS += pico/cd/pico.o pico/cd/memory.o pico/cd/sek.o pico/cd/LC89510.o \ + pico/cd/cd_sys.o pico/cd/cd_file.o pico/cd/cue.o pico/cd/gfx_cd.o \ + pico/cd/area.o pico/cd/misc.o pico/cd/pcm.o pico/cd/buffering.o # Pico - Pico -OBJ += Pico/Pico/Pico.o Pico/Pico/Memory.o Pico/Pico/xpcm.o +OBJS += pico/pico/pico.o pico/pico/memory.o pico/pico/xpcm.o # Pico - carthw -OBJ += Pico/carthw/carthw.o Pico/carthw/svp/svp.o Pico/carthw/svp/Memory.o \ - Pico/carthw/svp/ssp16.o Pico/carthw/svp/compiler.o Pico/carthw/svp/stub_arm.o - -# asm stuff -ifeq "$(asm_render)" "1" -CFLAGS += -D_ASM_DRAW_C -OBJ += Pico/draw_asm.o Pico/draw2_asm.o -endif -ifeq "$(asm_memory)" "1" -CFLAGS += -D_ASM_MEMORY_C -OBJ += Pico/memory_asm.o -endif -ifeq "$(asm_ym2612)" "1" -CFLAGS += -D_ASM_YM2612_C -OBJ += Pico/sound/ym2612_asm.o -endif -ifeq "$(asm_misc)" "1" -CFLAGS += -D_ASM_MISC_C -OBJ += Pico/misc_asm.o -OBJ += Pico/cd/misc_asm.o -endif -ifeq "$(asm_cdpico)" "1" -CFLAGS += -D_ASM_CD_PICO_C -OBJ += Pico/cd/pico_asm.o -endif -ifeq "$(asm_cdmemory)" "1" -CFLAGS += -D_ASM_CD_MEMORY_C -OBJ += Pico/cd/memory_asm.o -endif +OBJS += pico/carthw/carthw.o pico/carthw/svp/svp.o pico/carthw/svp/memory.o \ + pico/carthw/svp/ssp16.o pico/carthw/svp/compiler.o pico/carthw/svp/stub_arm.o # Pico - sound -OBJ += Pico/sound/sound.o -OBJ += Pico/sound/mix_asm.o -OBJ += Pico/sound/sn76496.o Pico/sound/ym2612.o +OBJS += pico/sound/sound.o +OBJS += pico/sound/mix_arm.o +OBJS += pico/sound/sn76496.o pico/sound/ym2612.o # zlib -OBJ += zlib/gzio.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o \ +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 # unzip -OBJ += unzip/unzip.o unzip/unzip_stream.o +OBJS += unzip/unzip.o unzip/unzip_stream.o # CPU cores ifeq "$(use_musashi)" "1" CFLAGS += -DEMU_M68K -OBJ += cpu/musashi/m68kops.o cpu/musashi/m68kcpu.o +OBJS += cpu/musashi/m68kops.o cpu/musashi/m68kcpu.o endif ifeq "$(use_cyclone)" "1" CFLAGS += -DEMU_C68K -OBJ += cpu/Cyclone/proj/Cyclone.o cpu/Cyclone/tools/idle.o +OBJS += cpu/Cyclone/proj/Cyclone.o cpu/Cyclone/tools/idle.o endif # drz80 CFLAGS += -D_USE_DRZ80 -OBJ += cpu/DrZ80/drz80.o +OBJS += cpu/DrZ80/drz80.o # helix -OBJ += ../common/helix/$(CROSS)helix-mp3.a +OBJS += ../common/helix/$(CROSS)helix-mp3.a vpath %.c = ../.. vpath %.s = ../.. vpath %.S = ../.. -DIRS = platform platform/common Pico Pico/cd Pico/Pico Pico/sound Pico/carthw/svp \ +DIRS = platform platform/common pico pico/cd pico/pico pico/sound pico/carthw/svp \ zlib unzip cpu cpu/musashi cpu/Cyclone/proj cpu/Cyclone/tools cpu/mz80 cpu/DrZ80 ICONS := $(shell echo rsc/*.bmp) @@ -125,8 +98,8 @@ EPOCRCFLAGS += -I./ all: mkdirs sis -include uiq3.mak include ../common/common_arm.mak +include uiq3.mak $(NAME).mbg $(NAME).mbm : $(ICONS) diff --git a/platform/uiq3/emu.c b/platform/uiq3/emu.c index 7f42562d..48fdc1d5 100644 --- a/platform/uiq3/emu.c +++ b/platform/uiq3/emu.c @@ -4,7 +4,7 @@ #include "../common/emu.h" #include "../common/config.h" #include "../common/menu.h" -#include "Pico/PicoInt.h" +#include "pico/pico_int.h" const char * const keyNames[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, diff --git a/platform/uiq3/engine/main.cpp b/platform/uiq3/engine/main.cpp index 53454c95..de5ac275 100644 --- a/platform/uiq3/engine/main.cpp +++ b/platform/uiq3/engine/main.cpp @@ -17,7 +17,7 @@ #include "debug.h" #include "../Engine.h" -#include +#include #include "../../common/emu.h" #include "../emu.h" #include "vid.h" diff --git a/platform/uiq3/engine/vid.cpp b/platform/uiq3/engine/vid.cpp index d21e8546..b07e4a4d 100644 --- a/platform/uiq3/engine/vid.cpp +++ b/platform/uiq3/engine/vid.cpp @@ -5,7 +5,7 @@ #include "vid.h" #include "../Engine.h" -#include +#include #include "../../common/emu.h" #include "blit.h" #include "debug.h" diff --git a/platform/uiq3/uiq3.mak b/platform/uiq3/uiq3.mak index f5ad1013..ddf2e846 100644 --- a/platform/uiq3/uiq3.mak +++ b/platform/uiq3/uiq3.mak @@ -77,7 +77,7 @@ REGDIR ?= ../reg SRCH += $(shell echo ../inc/*.h) SRC += $(shell echo ../src/*.cpp) SRCRES ?= $(shell echo $(RSCDIR)/*.rss $(RSCDIR)/*.rls $(REGDIR)/*.rss $(REGDIR)/*.rls) -OBJ ?= $(SRC:.cpp=.o) +OBJS ?= $(SRC:.cpp=.o) .PHONY : all mbm icon_mbm rsc reg loc bin sis run @@ -126,9 +126,9 @@ bin : bin_elf bin_elf : $(NAME).elf.exe -$(NAME).elf.exe : $(OBJ) $(EXTRALIB) +$(NAME).elf.exe : $(OBJS) $(EXTRALIB) @echo "Linking..." - $(LD) $(LDFLAGS) $(OBJ) $(EXTRALIB) $(LDFLAGS2) + $(LD) $(LDFLAGS) $(OBJS) $(EXTRALIB) $(LDFLAGS2) .cpp.o : @echo "Compiling $< ..." @@ -157,7 +157,7 @@ run : sis $(CXX) -M -DDEPS $(SRC) $(CXXFLAGS) >> $@ clean : - rm -f $(NAME).exe $(NAME).elf.exe $(OBJ) tags .deps $(NAME).exe.map + rm -f $(NAME).exe $(NAME).elf.exe $(OBJS) tags .deps $(NAME).exe.map rm -f *.bkp ../src/*.bkp ../inc/*.bkp $(RSCDIR)/*.bkp $(REGDIR)/*.bkp rm -f $(RSCDIR)/*.rsc $(RSCDIR)/*.rsg rm -f $(REGDIR)/*.rsc $(REGDIR)/*.rsg diff --git a/platform/win32/GenaDrive/Direct.cpp b/platform/win32/GenaDrive/Direct.cpp index 3c8f3769..da86b16f 100644 --- a/platform/win32/GenaDrive/Direct.cpp +++ b/platform/win32/GenaDrive/Direct.cpp @@ -305,6 +305,8 @@ int DirectPresent() } #ifdef USE_D3D +#define PI 3.14159265f + static int MakeVertexList() { struct CustomVertex *vert=NULL,*pv=NULL; diff --git a/platform/win32/GenaDrive/app.h b/platform/win32/GenaDrive/app.h index 30d59cb7..9bac46c7 100644 --- a/platform/win32/GenaDrive/app.h +++ b/platform/win32/GenaDrive/app.h @@ -7,9 +7,7 @@ #include -#include - -#define PI 3.14159265f +#include #define RELEASE(x) if (x) x->Release(); x=NULL;