Fixed compiler warnings (and suppressed write-strings related ones)
This commit is contained in:
parent
ef51b5eec6
commit
0b6fc80b20
9 changed files with 68 additions and 165 deletions
2
Makefile
2
Makefile
|
@ -44,7 +44,7 @@ LDFLAGS += -lpthread -lm -lz -lpng -lrt -lxml2 -lFLAC -lmpg123 -ldl -lprofiler -
|
|||
LDFLAGS += -lSDL2 -lSDL2_image -lSDL2_ttf -lguisan -L/opt/vc/lib -Lsrc/guisan/lib
|
||||
|
||||
ifndef DEBUG
|
||||
MORE_CFLAGS += -Ofast -pipe
|
||||
MORE_CFLAGS += -Ofast -pipe -Wno-write-strings
|
||||
else
|
||||
MORE_CFLAGS += -g -DDEBUG -Wl,--export-dynamic
|
||||
|
||||
|
|
|
@ -48,29 +48,29 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|VisualGDB'">
|
||||
<ClCompile>
|
||||
<CPPLanguageStandard>GNUPP14</CPPLanguageStandard>
|
||||
<AdditionalIncludeDirectories>C:\SysGCC\raspberry\lib\gcc\arm-linux-gnueabihf\4.9\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\include\c++\4.9;C:\SysGCC\raspberry\arm-linux-gnueabihf\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vmcs_host\linux;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vcos\pthreads;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\local\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\local\include\SDL2;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\libxml2;../../src;../../src/include;../../src/osdep;../../src/threaddep;../../src/guisan/include;=/opt/vc/include;=/opt/vc/include/interface/vmcs_host/linux;=/opt/vc/include/interface/vcos/pthreads;=/usr/local/include;=/usr/local/include/SDL2;=/usr/include/libxml2;%(ClCompile.AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>C:\SysGCC\raspberry\lib\gcc\arm-linux-gnueabihf\4.9\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\include\c++\4.9;C:\SysGCC\raspberry\arm-linux-gnueabihf\include;../../src;../../src/include;../../src/osdep;../../src/threaddep;../../src/guisan/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include;=/opt/vc/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vmcs_host\linux;=/opt/vc/include/interface/vmcs_host/linux;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vcos\pthreads;=/opt/vc/include/interface/vcos/pthreads;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include;=/usr/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\SDL2;=/usr/include/SDL2;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\libxml2;=/usr/include/libxml2;%(ClCompile.AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>DEBUG=1;_REENTRANT;CAPSLOCK_DEBIAN_WORKAROUND;ARMV6T2;USE_ARMNEON;ARMV6_ASSEMBLY;AMIBERRY;USE_SDL;CPU_arm;ROM_PATH_PREFIX=\"./\";DATA_PREFIX=\"./data/\";SAVE_PREFIX=\"./saves/\";GCCCONSTFUNC="__attribute__((const))";%(ClCompile.PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalOptions>-march=armv8-a -mfpu=neon-fp-armv8 -mfloat-abi=hard -pipe %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalOptions>-march=armv8-a -mfpu=neon-fp-armv8 -mfloat-abi=hard -pipe -Wno-write-strings %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLinkerInputs>-Wl,-gc-sections,-rpath,/usr/local/lib;%(Link.AdditionalLinkerInputs)</AdditionalLinkerInputs>
|
||||
<LibrarySearchDirectories>../../src/guisan/lib;=/opt/vc/lib;=/usr/local/lib;%(Link.LibrarySearchDirectories)</LibrarySearchDirectories>
|
||||
<LibrarySearchDirectories>../../src/guisan/lib;=/opt/vc/lib;=/usr/lib/arm-linux-gnueabihf;%(Link.LibrarySearchDirectories)</LibrarySearchDirectories>
|
||||
<AdditionalLibraryNames>SDL2;SDL2_image;SDL2_ttf;pthread;m;z;png;rt;xml2;FLAC;mpg123;dl;guisan;profiler;tcmalloc;%(Link.AdditionalLibraryNames)</AdditionalLibraryNames>
|
||||
<LinkerScript />
|
||||
<AdditionalLinkerInputs>-Wl,-gc-sections;%(Link.AdditionalLinkerInputs)</AdditionalLinkerInputs>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|VisualGDB'">
|
||||
<ClCompile>
|
||||
<CPPLanguageStandard>GNUPP14</CPPLanguageStandard>
|
||||
<AdditionalIncludeDirectories>C:\SysGCC\raspberry\lib\gcc\arm-linux-gnueabihf\4.9\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\include\c++\4.9;C:\SysGCC\raspberry\arm-linux-gnueabihf\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vmcs_host\linux;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vcos\pthreads;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\local\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\local\include\SDL2;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\libxml2;../../src;../../src/include;../../src/osdep;../../src/threaddep;../../src/guisan/include;=/opt/vc/include;=/opt/vc/include/interface/vmcs_host/linux;=/opt/vc/include/interface/vcos/pthreads;=/usr/local/include;=/usr/local/include/SDL2;=/usr/include/libxml2;%(ClCompile.AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>C:\SysGCC\raspberry\lib\gcc\arm-linux-gnueabihf\4.9\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\include\c++\4.9;C:\SysGCC\raspberry\arm-linux-gnueabihf\include;../../src;../../src/include;../../src/osdep;../../src/threaddep;../../src/guisan/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include;=/opt/vc/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vmcs_host\linux;=/opt/vc/include/interface/vmcs_host/linux;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vcos\pthreads;=/opt/vc/include/interface/vcos/pthreads;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include;=/usr/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\SDL2;=/usr/include/SDL2;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\libxml2;=/usr/include/libxml2;%(ClCompile.AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NDEBUG=1;RELEASE=1;_REENTRANT;CAPSLOCK_DEBIAN_WORKAROUND;ARMV6T2;USE_ARMNEON;ARMV6_ASSEMBLY;AMIBERRY;USE_SDL;CPU_arm;ROM_PATH_PREFIX=\"./\";DATA_PREFIX=\"./data/\";SAVE_PREFIX=\"./saves/\";GCCCONSTFUNC="__attribute__((const))";%(ClCompile.PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalOptions>-march=armv8-a -mfpu=neon-fp-armv8 -mfloat-abi=hard -pipe -fweb %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalOptions>-march=armv8-a -mfpu=neon-fp-armv8 -mfloat-abi=hard -pipe -Wno-write-strings %(AdditionalOptions)</AdditionalOptions>
|
||||
<OmitFramePointer>true</OmitFramePointer>
|
||||
<InlineFunctions>true</InlineFunctions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLinkerInputs>-Wl,-gc-sections,-rpath,/usr/local/lib;%(Link.AdditionalLinkerInputs)</AdditionalLinkerInputs>
|
||||
<LibrarySearchDirectories>../../src/guisan/lib;=/opt/vc/lib;=/usr/local/lib;%(Link.LibrarySearchDirectories)</LibrarySearchDirectories>
|
||||
<AdditionalLinkerInputs>-Wl,-gc-sections;%(Link.AdditionalLinkerInputs)</AdditionalLinkerInputs>
|
||||
<LibrarySearchDirectories>../../src/guisan/lib;=/opt/vc/lib;=/usr/lib/arm-linux-gnueabihf;%(Link.LibrarySearchDirectories)</LibrarySearchDirectories>
|
||||
<AdditionalLibraryNames>SDL2;SDL2_image;SDL2_ttf;pthread;m;z;png;rt;xml2;FLAC;mpg123;dl;guisan;profiler;tcmalloc;%(Link.AdditionalLibraryNames)</AdditionalLibraryNames>
|
||||
<LinkerScript />
|
||||
<ExtraRPATH>
|
||||
|
@ -80,15 +80,15 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-rpi2|VisualGDB'">
|
||||
<ClCompile>
|
||||
<CPPLanguageStandard>GNUPP14</CPPLanguageStandard>
|
||||
<AdditionalIncludeDirectories>C:\SysGCC\raspberry\lib\gcc\arm-linux-gnueabihf\4.9\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\include\c++\4.9;C:\SysGCC\raspberry\arm-linux-gnueabihf\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vmcs_host\linux;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vcos\pthreads;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\local\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\local\include\SDL2;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\libxml2;../../src;../../src/include;../../src/osdep;../../src/threaddep;../../src/guisan/include;=/opt/vc/include;=/opt/vc/include/interface/vmcs_host/linux;=/opt/vc/include/interface/vcos/pthreads;=/usr/local/include;=/usr/local/include/SDL2;=/usr/include/libxml2;%(ClCompile.AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>C:\SysGCC\raspberry\lib\gcc\arm-linux-gnueabihf\4.9\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\include\c++\4.9;C:\SysGCC\raspberry\arm-linux-gnueabihf\include;../../src;../../src/include;../../src/osdep;../../src/threaddep;../../src/guisan/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include;=/opt/vc/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vmcs_host\linux;=/opt/vc/include/interface/vmcs_host/linux;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vcos\pthreads;=/opt/vc/include/interface/vcos/pthreads;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include;=/usr/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\SDL2;=/usr/include/SDL2;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\libxml2;=/usr/include/libxml2;%(ClCompile.AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NDEBUG=1;RELEASE=1;_REENTRANT;CAPSLOCK_DEBIAN_WORKAROUND;ARMV6T2;USE_ARMNEON;ARMV6_ASSEMBLY;AMIBERRY;USE_SDL;CPU_arm;ROM_PATH_PREFIX=\"./\";DATA_PREFIX=\"./data/\";SAVE_PREFIX=\"./saves/\";GCCCONSTFUNC="__attribute__((const))";%(ClCompile.PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalOptions>-march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -pipe -fweb %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalOptions>-march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -pipe -Wno-write-strings %(AdditionalOptions)</AdditionalOptions>
|
||||
<OmitFramePointer>true</OmitFramePointer>
|
||||
<InlineFunctions>true</InlineFunctions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLinkerInputs>-Wl,-gc-sections,-rpath,/usr/local/lib;%(Link.AdditionalLinkerInputs)</AdditionalLinkerInputs>
|
||||
<LibrarySearchDirectories>../../src/guisan/lib;=/opt/vc/lib;=/usr/local/lib;%(Link.LibrarySearchDirectories)</LibrarySearchDirectories>
|
||||
<AdditionalLinkerInputs>-Wl,-gc-sections;%(Link.AdditionalLinkerInputs)</AdditionalLinkerInputs>
|
||||
<LibrarySearchDirectories>../../src/guisan/lib;=/opt/vc/lib;=/usr/lib/arm-linux-gnueabihf;%(Link.LibrarySearchDirectories)</LibrarySearchDirectories>
|
||||
<AdditionalLibraryNames>SDL2;SDL2_image;SDL2_ttf;pthread;m;z;png;rt;xml2;FLAC;mpg123;dl;guisan;profiler;tcmalloc;%(Link.AdditionalLibraryNames)</AdditionalLibraryNames>
|
||||
<LinkerScript>
|
||||
</LinkerScript>
|
||||
|
@ -99,15 +99,15 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-rpi1|VisualGDB'">
|
||||
<ClCompile>
|
||||
<CPPLanguageStandard>GNUPP14</CPPLanguageStandard>
|
||||
<AdditionalIncludeDirectories>C:\SysGCC\raspberry\lib\gcc\arm-linux-gnueabihf\4.9\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\include\c++\4.9;C:\SysGCC\raspberry\arm-linux-gnueabihf\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vmcs_host\linux;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vcos\pthreads;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\local\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\local\include\SDL2;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\libxml2;../../src;../../src/include;../../src/osdep;../../src/threaddep;../../src/guisan/include;=/opt/vc/include;=/opt/vc/include/interface/vmcs_host/linux;=/opt/vc/include/interface/vcos/pthreads;=/usr/local/include;=/usr/local/include/SDL2;=/usr/include/libxml2;%(ClCompile.AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>C:\SysGCC\raspberry\lib\gcc\arm-linux-gnueabihf\4.9\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\include\c++\4.9;C:\SysGCC\raspberry\arm-linux-gnueabihf\include;../../src;../../src/include;../../src/osdep;../../src/threaddep;../../src/guisan/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include;=/opt/vc/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vmcs_host\linux;=/opt/vc/include/interface/vmcs_host/linux;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vcos\pthreads;=/opt/vc/include/interface/vcos/pthreads;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include;=/usr/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\SDL2;=/usr/include/SDL2;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\libxml2;=/usr/include/libxml2;%(ClCompile.AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NDEBUG=1;RELEASE=1;_REENTRANT;CAPSLOCK_DEBIAN_WORKAROUND;ARMV6_ASSEMBLY;AMIBERRY;USE_SDL;CPU_arm;ROM_PATH_PREFIX=\"./\";DATA_PREFIX=\"./data/\";SAVE_PREFIX=\"./saves/\";GCCCONSTFUNC="__attribute__((const))";%(ClCompile.PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalOptions>-march=armv6zk -mfpu=vfp -mfloat-abi=hard -pipe -fweb %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalOptions>-march=armv6zk -mfpu=vfp -mfloat-abi=hard -pipe -Wno-write-strings %(AdditionalOptions)</AdditionalOptions>
|
||||
<OmitFramePointer>true</OmitFramePointer>
|
||||
<InlineFunctions>true</InlineFunctions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLinkerInputs>-Wl,-gc-sections,-rpath,/usr/local/lib;%(Link.AdditionalLinkerInputs)</AdditionalLinkerInputs>
|
||||
<LibrarySearchDirectories>../../src/guisan/lib;=/opt/vc/lib;=/usr/local/lib;%(Link.LibrarySearchDirectories)</LibrarySearchDirectories>
|
||||
<AdditionalLinkerInputs>-Wl,-gc-sections;%(Link.AdditionalLinkerInputs)</AdditionalLinkerInputs>
|
||||
<LibrarySearchDirectories>../../src/guisan/lib;=/opt/vc/lib;=/usr/lib/arm-linux-gnueabihf;%(Link.LibrarySearchDirectories)</LibrarySearchDirectories>
|
||||
<AdditionalLibraryNames>SDL2;SDL2_image;SDL2_ttf;pthread;m;z;png;rt;xml2;FLAC;mpg123;dl;guisan;profiler;tcmalloc;%(Link.AdditionalLibraryNames)</AdditionalLibraryNames>
|
||||
<LinkerScript>
|
||||
</LinkerScript>
|
||||
|
|
|
@ -753,7 +753,7 @@ static void write_filesys_config(struct uae_prefs *p, struct zfile *f)
|
|||
{
|
||||
int i;
|
||||
TCHAR tmp[MAX_DPATH], tmp2[MAX_DPATH], tmp3[MAX_DPATH];
|
||||
TCHAR *hdcontrollers[] = { _T("uae"),
|
||||
char const *hdcontrollers[] = { _T("uae"),
|
||||
_T("ide0"), _T("ide1"), _T("ide2"), _T("ide3"),
|
||||
_T("scsi0"), _T("scsi1"), _T("scsi2"), _T("scsi3"), _T("scsi4"), _T("scsi5"), _T("scsi6"),
|
||||
_T("scsram"), _T("scide") }; /* scsram = smart card sram = pcmcia sram card */
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#pragma once
|
||||
|
||||
typedef uae_s64 (*ZFILEREAD)(void*, uae_u64, uae_u64, struct zfile*);
|
||||
typedef uae_s64 (*ZFILEWRITE)(const void*, uae_u64, uae_u64, struct zfile*);
|
||||
|
@ -84,19 +85,21 @@ struct zarchive_info
|
|||
struct mytimeval tv;
|
||||
};
|
||||
|
||||
#define ArchiveFormat7Zip '7z '
|
||||
#define ArchiveFormatRAR 'rar '
|
||||
#define ArchiveFormatZIP 'zip '
|
||||
#define ArchiveFormatLHA 'lha '
|
||||
#define ArchiveFormatLZX 'lzx '
|
||||
#define ArchiveFormatPLAIN '----'
|
||||
#define ArchiveFormatDIR 'DIR '
|
||||
#define ArchiveFormatAA 'aa ' // method only
|
||||
#define ArchiveFormatADF 'DOS '
|
||||
#define ArchiveFormatRDB 'RDSK'
|
||||
#define ArchiveFormatMBR 'MBR '
|
||||
#define ArchiveFormatFAT 'FAT '
|
||||
#define ArchiveFormatTAR 'tar '
|
||||
#define MCC(a,b,c,d) (((a)<<24) | ((b)<<16) | ((c)<<8) | (d))
|
||||
|
||||
#define ArchiveFormat7Zip MCC('7', 'z', ' ', ' ')
|
||||
#define ArchiveFormatRAR MCC('r', 'a', 'r', ' ')
|
||||
#define ArchiveFormatZIP MCC('z', 'i', 'p', ' ')
|
||||
#define ArchiveFormatLHA MCC('l', 'h', 'a', ' ')
|
||||
#define ArchiveFormatLZX MCC('l', 'z', 'x', ' ')
|
||||
#define ArchiveFormatPLAIN MCC('-', '-', '-', '-')
|
||||
#define ArchiveFormatDIR MCC('D', 'I', 'R', ' ')
|
||||
#define ArchiveFormatAA MCC('a', 'a', ' ', ' ') // method only
|
||||
#define ArchiveFormatADF MCC('D', 'O', 'S', ' ')
|
||||
#define ArchiveFormatRDB MCC('R', 'D', 'S', 'K')
|
||||
#define ArchiveFormatMBR MCC('M', 'B', 'R', ' ')
|
||||
#define ArchiveFormatFAT MCC('F', 'A', 'T', ' ')
|
||||
#define ArchiveFormatTAR MCC('t', 'a', 'r', ' ')
|
||||
|
||||
#define PEEK_BYTES 1024
|
||||
#define FILE_PEEK 1
|
||||
|
|
|
@ -45,16 +45,8 @@
|
|||
#include "comptbl.h"
|
||||
#include "compemu.h"
|
||||
#include "SDL.h"
|
||||
|
||||
#define DEBUG 0
|
||||
#include "debug.h"
|
||||
|
||||
#if DEBUG
|
||||
#define PROFILE_COMPILE_TIME 1
|
||||
#define PROFILE_UNTRANSLATED_INSNS 1
|
||||
#define bug printf
|
||||
#endif
|
||||
|
||||
#ifdef JIT_DEBUG
|
||||
#undef abort
|
||||
#define abort() do { \
|
||||
|
@ -65,26 +57,6 @@
|
|||
} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef PROFILE_COMPILE_TIME
|
||||
#include <time.h>
|
||||
static uae_u32 compile_count = 0;
|
||||
static clock_t compile_time = 0;
|
||||
static clock_t emul_start_time = 0;
|
||||
static clock_t emul_end_time = 0;
|
||||
#endif
|
||||
|
||||
#ifdef PROFILE_UNTRANSLATED_INSNS
|
||||
static int untranslated_top_ten = 30;
|
||||
static uae_u32 raw_cputbl_count[65536] = { 0, };
|
||||
static uae_u16 opcode_nums[65536];
|
||||
|
||||
|
||||
static int untranslated_compfn(const void *e1, const void *e2)
|
||||
{
|
||||
return raw_cputbl_count[*(const uae_u16 *)e1] < raw_cputbl_count[*(const uae_u16 *)e2];
|
||||
}
|
||||
#endif
|
||||
|
||||
#define NATMEM_OFFSETX (uae_u32)natmem_offset
|
||||
|
||||
// %%% BRIAN KING WAS HERE %%%
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#pragma once
|
||||
#include <SDL.h>
|
||||
extern SDL_Window* sdlWindow;
|
||||
extern SDL_Renderer* renderer;
|
||||
extern SDL_Texture* texture;
|
||||
|
|
|
@ -3499,7 +3499,7 @@ static uaecptr uaegfx_card_install(TrapContext* ctx, uae_u32 extrasize)
|
|||
uaecptr exec = get_long(4);
|
||||
|
||||
if (uaegfx_old || !gfxmem_bank.start)
|
||||
return NULL;
|
||||
return 0;
|
||||
|
||||
uaegfx_resid = ds(_T("UAE Graphics Card 3.3"));
|
||||
uaegfx_vblankname = ds(_T("UAE Graphics Card VBLANK"));
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#include <execinfo.h>
|
||||
#include "SDL.h"
|
||||
|
||||
#define DEBUG 0
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
|
@ -78,8 +77,8 @@ static bool handle_arm_instruction(unsigned long *pregs, uintptr addr)
|
|||
{
|
||||
unsigned int *pc = (unsigned int *)pregs[ARM_REG_PC];
|
||||
|
||||
panicbug("IP: %p [%08x] %p\n", pc, pc[0], addr);
|
||||
if (pc == 0)
|
||||
panicbug("IP: %p [%08x] %u\n", pc, pc[0], addr);
|
||||
if (pc == nullptr)
|
||||
return false;
|
||||
|
||||
if (in_handler > 0)
|
||||
|
@ -149,26 +148,6 @@ static bool handle_arm_instruction(unsigned long *pregs, uintptr addr)
|
|||
transfer_type = TYPE_STORE;
|
||||
|
||||
int rd = (opcode >> 12) & 0xf;
|
||||
#if DEBUG
|
||||
static const char * reg_names[] =
|
||||
{
|
||||
"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
|
||||
"r8", "r9", "sl", "fp", "ip", "sp", "lr", "pc"
|
||||
};
|
||||
panicbug("%s %s register %s\n",
|
||||
transfer_size == SIZE_BYTE ? "byte" :
|
||||
transfer_size == SIZE_WORD ? "word" :
|
||||
transfer_size == SIZE_INT ? "long" : "unknown",
|
||||
transfer_type == TYPE_LOAD ? "load to" : "store from",
|
||||
reg_names[rd]);
|
||||
panicbug("\n");
|
||||
// for (int i = 0; i < 16; i++) {
|
||||
// panicbug("%s : %p", reg_names[i], pregs[i]);
|
||||
// }
|
||||
#endif
|
||||
|
||||
// if ((addr < 0x00f00000) || (addr > 0x00ffffff))
|
||||
// goto buserr;
|
||||
|
||||
if (transfer_type == TYPE_LOAD)
|
||||
{
|
||||
|
@ -176,12 +155,12 @@ static bool handle_arm_instruction(unsigned long *pregs, uintptr addr)
|
|||
{
|
||||
case SIZE_BYTE:
|
||||
{
|
||||
pregs[rd] = style == SIGNED ? (uae_s8)get_byte(addr) : (uae_u8)get_byte(addr);
|
||||
pregs[rd] = style == SIGNED ? uae_s8(get_byte(addr)) : uae_u8(get_byte(addr));
|
||||
break;
|
||||
}
|
||||
case SIZE_WORD:
|
||||
{
|
||||
pregs[rd] = do_byteswap_16(style == SIGNED ? (uae_s16)get_word(addr) : (uae_u16)get_word(addr));
|
||||
pregs[rd] = do_byteswap_16(style == SIGNED ? uae_s16(get_word(addr)) : uae_u16(get_word(addr)));
|
||||
break;
|
||||
}
|
||||
case SIZE_INT:
|
||||
|
@ -214,18 +193,11 @@ static bool handle_arm_instruction(unsigned long *pregs, uintptr addr)
|
|||
}
|
||||
|
||||
pregs[ARM_REG_PC] += 4;
|
||||
panicbug("processed: %p \n", pregs[ARM_REG_PC]);
|
||||
panicbug("processed: %lu \n", pregs[ARM_REG_PC]);
|
||||
|
||||
in_handler--;
|
||||
|
||||
return true;
|
||||
|
||||
buserr:
|
||||
panicbug("Amiga bus error\n");
|
||||
in_handler--;
|
||||
|
||||
// BUS_ERROR(addr);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
@ -250,8 +222,8 @@ void signal_segv(int signum, siginfo_t* info, void*ptr)
|
|||
|
||||
mcontext_t *context = &(ucontext->uc_mcontext);
|
||||
unsigned long *regs = &context->arm_r0;
|
||||
uintptr addr = (uintptr)info->si_addr;
|
||||
addr = (uae_u32) addr - (uae_u32) natmem_offset;
|
||||
uintptr addr = uintptr(info->si_addr);
|
||||
addr = uae_u32(addr) - uae_u32(natmem_offset);
|
||||
if (handle_arm_instruction(regs, addr))
|
||||
return;
|
||||
|
||||
|
@ -289,57 +261,11 @@ void signal_segv(int signum, siginfo_t* info, void*ptr)
|
|||
printf("Err Code = 0x%08x\n", ucontext->uc_mcontext.error_code);
|
||||
printf("Old Mask = 0x%08x\n", ucontext->uc_mcontext.oldmask);
|
||||
|
||||
// dump_compiler((uae_u32*)ucontext->uc_mcontext.arm_pc);
|
||||
|
||||
void *getaddr = (void *)ucontext->uc_mcontext.arm_lr;
|
||||
if(dladdr(getaddr, &dlinfo))
|
||||
printf("LR - 0x%08X: <%s> (%s)\n", getaddr, dlinfo.dli_sname, dlinfo.dli_fname);
|
||||
printf("LR - 0x%08p: <%s> (%s)\n", getaddr, dlinfo.dli_sname, dlinfo.dli_fname);
|
||||
else
|
||||
printf("LR - 0x%08X: symbol not found\n", getaddr);
|
||||
|
||||
// printf("Stack trace:\n");
|
||||
|
||||
/*
|
||||
#define MAX_BACKTRACE 10
|
||||
|
||||
void *array[MAX_BACKTRACE];
|
||||
int size = backtrace(array, MAX_BACKTRACE);
|
||||
for(int i=0; i<size; ++i)
|
||||
{
|
||||
if (dladdr(array[i], &dlinfo)) {
|
||||
const char *symname = dlinfo.dli_sname;
|
||||
printf("%p <%s + 0x%08x> (%s)\n", array[i], symname,
|
||||
(unsigned long)array[i] - (unsigned long)dlinfo.dli_saddr, dlinfo.dli_fname);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
ip = (void*)ucontext->uc_mcontext.arm_r10;
|
||||
bp = (void**)ucontext->uc_mcontext.arm_r10;
|
||||
while(bp && ip) {
|
||||
if (!dladdr(ip, &dlinfo)) {
|
||||
printf("IP out of range\n");
|
||||
break;
|
||||
}
|
||||
const char *symname = dlinfo.dli_sname;
|
||||
printf("% 2d: %p <%s + 0x%08x> (%s)\n", ++f, ip, symname,
|
||||
(unsigned long)ip - (unsigned long)dlinfo.dli_saddr, dlinfo.dli_fname);
|
||||
if(dlinfo.dli_sname && !strcmp(dlinfo.dli_sname, "main"))
|
||||
break;
|
||||
ip = bp[1];
|
||||
bp = (void**)bp[0];
|
||||
}
|
||||
|
||||
printf("Stack trace (non-dedicated):\n");
|
||||
char **strings;
|
||||
void *bt[20];
|
||||
int sz = backtrace(bt, 20);
|
||||
strings = backtrace_symbols(bt, sz);
|
||||
for(i = 0; i < sz; ++i)
|
||||
printf("%s\n", strings[i]);
|
||||
printf("End of stack trace.\n");
|
||||
*/
|
||||
printf("LR - 0x%08p: symbol not found\n", getaddr);
|
||||
|
||||
SDL_Quit();
|
||||
exit(1);
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include "win32.h"
|
||||
#endif
|
||||
//#ifdef _WIN32
|
||||
//#include <windows.h>
|
||||
//#include "win32.h"
|
||||
//#endif
|
||||
|
||||
#include "options.h"
|
||||
#include "zfile.h"
|
||||
|
@ -30,18 +30,19 @@
|
|||
|
||||
static time_t fromdostime(uae_u32 dd)
|
||||
{
|
||||
struct tm tm;
|
||||
time_t t;
|
||||
memset(&tm, 0, sizeof tm);
|
||||
tm.tm_hour = (dd >> 11) & 0x1f;
|
||||
tm.tm_min = (dd >> 5) & 0x3f;
|
||||
tm.tm_sec = ((dd >> 0) & 0x1f) * 2;
|
||||
tm.tm_year = ((dd >> 25) & 0x7f) + 80;
|
||||
tm.tm_mon = ((dd >> 21) & 0x0f) - 1;
|
||||
tm.tm_mday = (dd >> 16) & 0x1f;
|
||||
t = mktime(&tm);
|
||||
t -= _timezone;
|
||||
return t;
|
||||
struct tm tm;
|
||||
time_t t;
|
||||
|
||||
memset(&tm, 0, sizeof tm);
|
||||
tm.tm_hour = (dd >> 11) & 0x1f;
|
||||
tm.tm_min = (dd >> 5) & 0x3f;
|
||||
tm.tm_sec = ((dd >> 0) & 0x1f) * 2;
|
||||
tm.tm_year = ((dd >> 25) & 0x7f) + 80;
|
||||
tm.tm_mon = ((dd >> 21) & 0x0f) - 1;
|
||||
tm.tm_mday = (dd >> 16) & 0x1f;
|
||||
t = mktime(&tm);
|
||||
t -= _timezone;
|
||||
return t;
|
||||
}
|
||||
|
||||
static struct zvolume *getzvolume (struct znode *parent, struct zfile *zf, unsigned int id)
|
||||
|
@ -1366,7 +1367,7 @@ struct zvolume *archive_directory_adf (struct znode *parent, struct zfile *z)
|
|||
goto fail;
|
||||
adf->dostype = gl (adf, 0);
|
||||
|
||||
if ((adf->dostype & 0xffffff00) == 'DOS\0') {
|
||||
if ((adf->dostype & 0xffffff00) == MCC('D', 'O', 'S', '\0')) {
|
||||
int bs = adf->blocksize;
|
||||
int res;
|
||||
|
||||
|
@ -1418,7 +1419,7 @@ struct zvolume *archive_directory_adf (struct znode *parent, struct zfile *z)
|
|||
name[0] = 0;
|
||||
recurseadf (&zv->root, adf->rootblock, name);
|
||||
|
||||
} else if ((adf->dostype & 0xffffff00) == 'SFS\0') {
|
||||
} else if ((adf->dostype & 0xffffff00) == MCC('S', 'F', 'S', '\0')) {
|
||||
|
||||
uae_u16 version, sfs2;
|
||||
|
||||
|
@ -1431,14 +1432,14 @@ struct zvolume *archive_directory_adf (struct znode *parent, struct zfile *z)
|
|||
adf->rootblock = gl (adf, 104);
|
||||
if (!adf_read_block (adf, adf->rootblock))
|
||||
break;
|
||||
if (gl (adf, 0) != 'OBJC')
|
||||
if (gl (adf, 0) != MCC('O', 'B', 'J', 'C'))
|
||||
break;
|
||||
if (sfs_checksum (adf->block, adf->blocksize, sfs2))
|
||||
break;
|
||||
adf->rootblock = gl (adf, 40);
|
||||
if (!adf_read_block (adf, adf->rootblock))
|
||||
break;
|
||||
if (gl (adf, 0) != 'OBJC')
|
||||
if (gl (adf, 0) != MCC('O', 'B', 'J', 'C'))
|
||||
break;
|
||||
if (sfs_checksum (adf->block, adf->blocksize, sfs2))
|
||||
break;
|
||||
|
@ -1549,7 +1550,7 @@ static struct zfile *archive_access_adf (struct znode *zn)
|
|||
if (!z)
|
||||
return NULL;
|
||||
|
||||
if ((adf->dostype & 0xffffff00) == 'DOS\0') {
|
||||
if ((adf->dostype & 0xffffff00) == MCC('D', 'O', 'S', '\0')) {
|
||||
|
||||
ffs = adf->dostype & 1;
|
||||
root = zn->offset;
|
||||
|
@ -1575,7 +1576,7 @@ static struct zfile *archive_access_adf (struct znode *zn)
|
|||
break;
|
||||
root = gl (adf, bs - 2 * 4);
|
||||
}
|
||||
} else if ((adf->dostype & 0xffffff00) == 'SFS\0') {
|
||||
} else if ((adf->dostype & 0xffffff00) == MCC('S', 'F', 'S', '\0')) {
|
||||
|
||||
struct sfsblock *sfsblocks;
|
||||
int sfsblockcnt, sfsmaxblockcnt, i;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue