From ba11a48115de2d25531ddd5fec841ebee42166bd Mon Sep 17 00:00:00 2001 From: notaz Date: Sat, 14 Oct 2017 02:13:40 +0300 Subject: [PATCH] fix clang build yet another workaround for it... --- pico/cd/cdd.c | 2 ++ pico/cd/memory.c | 7 ++++++- platform/common/menu_pico.c | 2 -- platform/libpicofe | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/pico/cd/cdd.c b/pico/cd/cdd.c index c6b24b82..501d09e8 100644 --- a/pico/cd/cdd.c +++ b/pico/cd/cdd.c @@ -122,12 +122,14 @@ static const uint32 toc_ffightj[29] = 14553, 9834, 10542, 1699, 1792, 1781, 3783, 3052 }; +#if 0 /* supported WAVE file header (16-bit stereo samples @44.1kHz) */ static const unsigned char waveHeader[32] = { 0x57,0x41,0x56,0x45,0x66,0x6d,0x74,0x20,0x10,0x00,0x00,0x00,0x01,0x00,0x02,0x00, 0x44,0xac,0x00,0x00,0x10,0xb1,0x02,0x00,0x04,0x00,0x10,0x00,0x64,0x61,0x74,0x61 }; +#endif #ifdef USE_LIBTREMOR #ifdef DISABLE_MANY_OGG_OPEN_FILES diff --git a/pico/cd/memory.c b/pico/cd/memory.c index 94b81b7b..6890b576 100644 --- a/pico/cd/memory.c +++ b/pico/cd/memory.c @@ -1165,7 +1165,12 @@ PICO_INTERNAL void PicoMemSetupCD(void) // setup FAME fetchmap { +#ifdef __clang__ + volatile // prevent strange relocs from clang +#endif + unsigned long ptr_ram = (unsigned long)PicoMem.ram; int i; + // M68k // by default, point everything to fitst 64k of ROM (BIOS) for (i = 0; i < M68K_FETCHBANK1; i++) @@ -1175,7 +1180,7 @@ PICO_INTERNAL void PicoMemSetupCD(void) PicoCpuFM68k.Fetch[i] = (unsigned long)Pico.rom; // .. and RAM for (i = M68K_FETCHBANK1*14/16; i < M68K_FETCHBANK1; i++) - PicoCpuFM68k.Fetch[i] = (unsigned long)PicoMem.ram - (i<<(24-FAMEC_FETCHBITS)); + PicoCpuFM68k.Fetch[i] = ptr_ram - (i<<(24-FAMEC_FETCHBITS)); // S68k // PRG RAM is default for (i = 0; i < M68K_FETCHBANK1; i++) diff --git a/platform/common/menu_pico.c b/platform/common/menu_pico.c index f928f054..0f9fa612 100644 --- a/platform/common/menu_pico.c +++ b/platform/common/menu_pico.c @@ -406,8 +406,6 @@ static const char h_srcart[] = "Emulate the save RAM cartridge accessory\n" "most games don't need this"; static const char h_scfx[] = "Emulate scale/rotate ASIC chip for graphics effects\n" "disable to improve performance"; -static const char h_bsync[] = "More accurate mode for CPUs (needed for some games)\n" - "disable to improve performance"; static menu_entry e_menu_cd_options[] = { diff --git a/platform/libpicofe b/platform/libpicofe index 448ec62f..f287890d 160000 --- a/platform/libpicofe +++ b/platform/libpicofe @@ -1 +1 @@ -Subproject commit 448ec62f85a90e8a27368ddc05057a5a714944b8 +Subproject commit f287890d65ad36ca75bb71d05745693ae78b1490 -- 2.39.5