WIP - Cleanup after merge #1

This commit is contained in:
Dimitris Panokostas 2017-09-18 12:54:23 +02:00
parent a2850730e0
commit 05387498c0
25 changed files with 325 additions and 359 deletions

View file

@ -104,25 +104,16 @@
<Image Include="..\data\file.ico">
<DeploymentContent>true</DeploymentContent>
</Image>
<Image Include="..\data\joystick.bmp">
<DeploymentContent>true</DeploymentContent>
</Image>
<Image Include="..\data\joystick.ico">
<DeploymentContent>true</DeploymentContent>
</Image>
<Image Include="..\data\misc.ico">
<DeploymentContent>true</DeploymentContent>
</Image>
<Image Include="..\data\mouse.bmp">
<DeploymentContent>true</DeploymentContent>
</Image>
<Image Include="..\data\paths.ico">
<DeploymentContent>true</DeploymentContent>
</Image>
<Image Include="..\data\quickstart.ico" />
<Image Include="..\data\remapping.bmp">
<DeploymentContent>true</DeploymentContent>
</Image>
<Image Include="..\data\savestate.png">
<DeploymentContent>true</DeploymentContent>
</Image>
@ -134,9 +125,6 @@
</Image>
</ItemGroup>
<ItemGroup>
<Font Include="..\data\FreeSans.ttf">
<DeploymentContent>true</DeploymentContent>
</Font>
<Font Include="..\data\Topaznew.ttf">
<DeploymentContent>true</DeploymentContent>
</Font>
@ -527,6 +515,7 @@
<ClInclude Include="..\src\archivers\wrp\warp.h" />
<ClInclude Include="..\src\archivers\zip\unzip.h" />
<ClInclude Include="..\src\include\akiko.h" />
<ClInclude Include="..\src\include\ar.h" />
<ClInclude Include="..\src\include\audio.h" />
<ClInclude Include="..\src\include\autoconf.h" />
<ClInclude Include="..\src\include\blit.h" />

View file

@ -110,24 +110,15 @@
<Image Include="..\data\file.ico">
<Filter>data</Filter>
</Image>
<Image Include="..\data\joystick.bmp">
<Filter>data</Filter>
</Image>
<Image Include="..\data\joystick.ico">
<Filter>data</Filter>
</Image>
<Image Include="..\data\misc.ico">
<Filter>data</Filter>
</Image>
<Image Include="..\data\mouse.bmp">
<Filter>data</Filter>
</Image>
<Image Include="..\data\paths.ico">
<Filter>data</Filter>
</Image>
<Image Include="..\data\remapping.bmp">
<Filter>data</Filter>
</Image>
<Image Include="..\data\savestate.png">
<Filter>data</Filter>
</Image>
@ -148,9 +139,6 @@
</Image>
</ItemGroup>
<ItemGroup>
<Font Include="..\data\FreeSans.ttf">
<Filter>data</Filter>
</Font>
<Font Include="..\data\Topaznew.ttf">
<Filter>data</Filter>
</Font>
@ -1241,6 +1229,9 @@
<ClInclude Include="..\src\archivers\mp2\kjmp2.h">
<Filter>src\archivers\mp2</Filter>
</ClInclude>
<ClInclude Include="..\src\include\ar.h">
<Filter>src\include</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\src\archivers\7z\7zVersion.rc">

View file

@ -344,25 +344,16 @@
<Image Include="..\..\data\file.ico">
<DeploymentContent>true</DeploymentContent>
</Image>
<Image Include="..\..\data\joystick.bmp">
<DeploymentContent>true</DeploymentContent>
</Image>
<Image Include="..\..\data\joystick.ico">
<DeploymentContent>true</DeploymentContent>
</Image>
<Image Include="..\..\data\misc.ico">
<DeploymentContent>true</DeploymentContent>
</Image>
<Image Include="..\..\data\mouse.bmp">
<DeploymentContent>true</DeploymentContent>
</Image>
<Image Include="..\..\data\paths.ico">
<DeploymentContent>true</DeploymentContent>
</Image>
<Image Include="..\..\data\quickstart.ico" />
<Image Include="..\..\data\remapping.bmp">
<DeploymentContent>true</DeploymentContent>
</Image>
<Image Include="..\..\data\savestate.png">
<DeploymentContent>true</DeploymentContent>
</Image>
@ -374,9 +365,6 @@
</Image>
</ItemGroup>
<ItemGroup>
<Font Include="..\..\data\FreeSans.ttf">
<DeploymentContent>true</DeploymentContent>
</Font>
<Font Include="..\..\data\Topaznew.ttf">
<DeploymentContent>true</DeploymentContent>
</Font>
@ -499,6 +487,7 @@
<ClInclude Include="..\..\src\guisan\include\guisan\widgets\window.hpp" />
<ClInclude Include="..\..\src\guisan\include\guisan\x.hpp" />
<ClInclude Include="..\..\src\include\akiko.h" />
<ClInclude Include="..\..\src\include\ar.h" />
<ClInclude Include="..\..\src\include\audio.h" />
<ClInclude Include="..\..\src\include\autoconf.h" />
<ClInclude Include="..\..\src\include\blit.h" />

View file

@ -731,24 +731,15 @@
<Image Include="..\..\data\file.ico">
<Filter>Resource files\data</Filter>
</Image>
<Image Include="..\..\data\joystick.bmp">
<Filter>Resource files\data</Filter>
</Image>
<Image Include="..\..\data\joystick.ico">
<Filter>Resource files\data</Filter>
</Image>
<Image Include="..\..\data\misc.ico">
<Filter>Resource files\data</Filter>
</Image>
<Image Include="..\..\data\mouse.bmp">
<Filter>Resource files\data</Filter>
</Image>
<Image Include="..\..\data\paths.ico">
<Filter>Resource files\data</Filter>
</Image>
<Image Include="..\..\data\remapping.bmp">
<Filter>Resource files\data</Filter>
</Image>
<Image Include="..\..\data\savestate.png">
<Filter>Resource files\data</Filter>
</Image>
@ -769,9 +760,6 @@
</Image>
</ItemGroup>
<ItemGroup>
<Font Include="..\..\data\FreeSans.ttf">
<Filter>Resource files\data</Filter>
</Font>
<Font Include="..\..\data\Topaznew.ttf">
<Filter>Resource files\data</Filter>
</Font>
@ -1440,6 +1428,9 @@
<ClInclude Include="..\..\src\archivers\mp2\kjmp2.h">
<Filter>Header files\archivers\mp2</Filter>
</ClInclude>
<ClInclude Include="..\..\src\include\ar.h">
<Filter>Header files\include</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\src\archivers\7z\7zVersion.rc">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

View file

@ -142,7 +142,7 @@ static SRes SzDecodeLzma(CSzCoderInfo *coder, UInt64 inSize, ILookInStream *inSt
size_t lookahead = (1 << 18);
if (lookahead > inSize)
lookahead = (size_t)inSize;
res = inStream->Look((void *)inStream, (const void **)&inBuf, &lookahead);
res = inStream->Look((void *)inStream, (void **)&inBuf, &lookahead);
if (res != SZ_OK)
break;
@ -192,7 +192,7 @@ static SRes SzDecodeLzma2(CSzCoderInfo *coder, UInt64 inSize, ILookInStream *inS
size_t lookahead = (1 << 18);
if (lookahead > inSize)
lookahead = (size_t)inSize;
res = inStream->Look((void *)inStream, (const void **)&inBuf, &lookahead);
res = inStream->Look((void *)inStream, (void **)&inBuf, &lookahead);
if (res != SZ_OK)
break;
@ -229,7 +229,7 @@ static SRes SzDecodeCopy(UInt64 inSize, ILookInStream *inStream, Byte *outBuffer
size_t curSize = (1 << 18);
if (curSize > inSize)
curSize = (size_t)inSize;
RINOK(inStream->Look((void *)inStream, (const void **)&inBuf, &curSize));
RINOK(inStream->Look((void *)inStream, (void **)&inBuf, &curSize));
if (curSize == 0)
return SZ_ERROR_INPUT_EOF;
memcpy(outBuffer, inBuf, curSize);

View file

@ -3,9 +3,9 @@
#include <string.h>
#include "../../Bcj2.h"
#include "../../Bra.h"
#include "../../LzmaDec.h"
#include "Bcj2.h"
#include "Bra.h"
#include "LzmaDec.h"
#include "7zDecode.h"
#define k_Copy 0
@ -20,23 +20,23 @@ static SRes SzDecodeLzma(CSzCoderInfo *coder, UInt64 inSize, ILookInStream *inSt
SRes res = SZ_OK;
LzmaDec_Construct(&state);
RINOK(LzmaDec_AllocateProbs(&state, coder->Props.data, (unsigned)coder->Props.size, allocMain));
RINOK(LzmaDec_AllocateProbs(&state, coder->Props.data, unsigned(coder->Props.size), allocMain));
state.dic = outBuffer;
state.dicBufSize = outSize;
LzmaDec_Init(&state);
for (;;)
{
Byte *inBuf = NULL;
Byte *inBuf = nullptr;
size_t lookahead = (1 << 18);
if (lookahead > inSize)
lookahead = (size_t)inSize;
lookahead = size_t(inSize);
res = inStream->Look((void *)inStream, (void **)&inBuf, &lookahead);
if (res != SZ_OK)
break;
{
SizeT inProcessed = (SizeT)lookahead, dicPos = state.dicPos;
SizeT inProcessed = SizeT(lookahead), dicPos = state.dicPos;
ELzmaStatus status;
res = LzmaDec_DecodeToDic(&state, outSize, inBuf, &inProcessed, LZMA_FINISH_END, &status);
lookahead -= inProcessed;
@ -59,16 +59,16 @@ static SRes SzDecodeLzma(CSzCoderInfo *coder, UInt64 inSize, ILookInStream *inSt
LzmaDec_FreeProbs(&state, allocMain);
return res;
}
}
static SRes SzDecodeCopy(UInt64 inSize, ILookInStream *inStream, Byte *outBuffer)
{
static SRes SzDecodeCopy(UInt64 inSize, ILookInStream *inStream, Byte *outBuffer)
{
while (inSize > 0)
{
void *inBuf;
size_t curSize = (1 << 18);
if (curSize > inSize)
curSize = (size_t)inSize;
curSize = size_t(inSize);
RINOK(inStream->Look((void *)inStream, (void **)&inBuf, &curSize));
if (curSize == 0)
return SZ_ERROR_INPUT_EOF;
@ -78,15 +78,15 @@ static SRes SzDecodeCopy(UInt64 inSize, ILookInStream *inStream, Byte *outBuffer
RINOK(inStream->Skip((void *)inStream, curSize));
}
return SZ_OK;
}
}
#define IS_UNSUPPORTED_METHOD(m) ((m) != k_Copy && (m) != k_LZMA)
#define IS_UNSUPPORTED_CODER(c) (IS_UNSUPPORTED_METHOD(c.MethodID) || c.NumInStreams != 1 || c.NumOutStreams != 1)
#define IS_NO_BCJ(c) (c.MethodID != k_BCJ || c.NumInStreams != 1 || c.NumOutStreams != 1)
#define IS_NO_BCJ2(c) (c.MethodID != k_BCJ2 || c.NumInStreams != 4 || c.NumOutStreams != 1)
SRes CheckSupportedFolder(const CSzFolder *f)
{
SRes CheckSupportedFolder(const CSzFolder *f)
{
if (f->NumCoders < 1 || f->NumCoders > 4)
return SZ_ERROR_UNSUPPORTED;
if (IS_UNSUPPORTED_CODER(f->Coders[0]))
@ -125,22 +125,22 @@ SRes CheckSupportedFolder(const CSzFolder *f)
return SZ_OK;
}
return SZ_ERROR_UNSUPPORTED;
}
}
UInt64 GetSum(const UInt64 *values, UInt32 index)
{
UInt64 GetSum(const UInt64 *values, UInt32 index)
{
UInt64 sum = 0;
UInt32 i;
for (i = 0; i < index; i++)
sum += values[i];
return sum;
}
}
SRes SzDecode2(const UInt64 *packSizes, const CSzFolder *folder,
SRes SzDecode2(const UInt64 *packSizes, const CSzFolder *folder,
ILookInStream *inStream, UInt64 startPos,
Byte *outBuffer, SizeT outSize, ISzAlloc *allocMain,
Byte *tempBuf[])
{
{
UInt32 ci;
SizeT tempSizes[3] = { 0, 0, 0};
SizeT tempSize3 = 0;
@ -238,12 +238,12 @@ SRes SzDecode2(const UInt64 *packSizes, const CSzFolder *folder,
return SZ_ERROR_UNSUPPORTED;
}
return SZ_OK;
}
}
SRes SzDecode(const UInt64 *packSizes, const CSzFolder *folder,
SRes SzDecode(const UInt64 *packSizes, const CSzFolder *folder,
ILookInStream *inStream, UInt64 startPos,
Byte *outBuffer, size_t outSize, ISzAlloc *allocMain)
{
{
Byte *tempBuf[3] = { 0, 0, 0};
int i;
SRes res = SzDecode2(packSizes, folder, inStream, startPos,
@ -251,4 +251,4 @@ SRes SzDecode(const UInt64 *packSizes, const CSzFolder *folder,
for (i = 0; i < 3; i++)
IAlloc_Free(allocMain, tempBuf[i]);
return res;
}
}

View file

@ -1,7 +1,7 @@
/* 7zExtract.c -- Extracting from 7z archive
2008-11-23 : Igor Pavlov : Public domain */
#include "../../7zCrc.h"
#include "7zCrc.h"
#include "7zDecode.h"
#include "7zExtract.h"

View file

@ -4,7 +4,7 @@
#ifndef __7Z_HEADER_H
#define __7Z_HEADER_H
#include "../../Types.h"
#include "Types.h"
#define k7zSignatureSize 6
extern Byte k7zSignature[k7zSignatureSize];

View file

@ -4,7 +4,7 @@
#ifndef __7Z_ITEM_H
#define __7Z_ITEM_H
#include "../../7zBuf.h"
#include "7zBuf.h"
typedef struct
{

View file

@ -39,7 +39,7 @@ SRes LookInStream_SeekTo(ILookInStream *stream, UInt64 offset)
SRes LookInStream_LookRead(ILookInStream *stream, void *buf, size_t *size)
{
const void *lookBuf;
void *lookBuf;
if (*size == 0)
return SZ_OK;
RINOK(stream->Look(stream, &lookBuf, size));
@ -66,7 +66,7 @@ SRes LookInStream_Read(ILookInStream *stream, void *buf, size_t size)
return LookInStream_Read2(stream, buf, size, SZ_ERROR_INPUT_EOF);
}
static SRes LookToRead_Look_Lookahead(void *pp, const void **buf, size_t *size)
static SRes LookToRead_Look_Lookahead(void *pp, void **buf, size_t *size)
{
SRes res = SZ_OK;
CLookToRead *p = (CLookToRead *)pp;
@ -84,7 +84,7 @@ static SRes LookToRead_Look_Lookahead(void *pp, const void **buf, size_t *size)
return res;
}
static SRes LookToRead_Look_Exact(void *pp, const void **buf, size_t *size)
static SRes LookToRead_Look_Exact(void *pp, void **buf, size_t *size)
{
SRes res = SZ_OK;
CLookToRead *p = (CLookToRead *)pp;

View file

@ -5,14 +5,14 @@
#ifdef MY_CPU_X86_OR_AMD64
#if (defined(_MSC_VER) && !defined(MY_CPU_AMD64)) || defined(__GNUC__)
#if (defined(_MSC_VER_) && !defined(MY_CPU_AMD64)) || defined(__GNUC__)
#define USE_ASM
#endif
#if defined(USE_ASM) && !defined(MY_CPU_AMD64)
static UInt32 CheckFlag(UInt32 flag)
{
#ifdef _MSC_VER
#ifdef _MSC_VER_
__asm pushfd;
__asm pop EAX;
__asm mov EDX, EAX;
@ -52,7 +52,7 @@ static void MyCPUID(UInt32 function, UInt32 *a, UInt32 *b, UInt32 *c, UInt32 *d)
{
#ifdef USE_ASM
#ifdef _MSC_VER
#ifdef _MSC_VER_
UInt32 a2, b2, c2, d2;
__asm xor EBX, EBX;

View file

@ -97,7 +97,7 @@ Stop_Compiling_Bad_Endian
#endif
#if defined(MY_CPU_LE_UNALIGN) && defined(_WIN64) && (defined(_MSC_VER) && (_MSC_VER >= 1300))
#if defined(MY_CPU_LE_UNALIGN) && defined(_WIN64) && (defined(_MSC_VER_) && (_MSC_VER_ >= 1300))
#include <stdlib.h>
#pragma intrinsic(_byteswap_ulong)

View file

@ -4,7 +4,7 @@
#ifndef __ROTATE_DEFS_H
#define __ROTATE_DEFS_H
#ifdef _MSC_VER
#ifdef _MSC_VER_
#include <stdlib.h>
#define rotlFixed(x, n) _rotl((x), (n))

View file

@ -70,14 +70,14 @@ WRes Semaphore_Release1(CSemaphore *p) { return Semaphore_ReleaseN(p, 1); }
WRes CriticalSection_Init(CCriticalSection *p)
{
/* InitializeCriticalSection can raise only STATUS_NO_MEMORY exception */
#ifdef _MSC_VER
#ifdef _MSC_VER_
__try
#endif
{
InitializeCriticalSection(p);
/* InitializeCriticalSectionAndSpinCount(p, 0); */
}
#ifdef _MSC_VER
#ifdef _MSC_VER_
__except (EXCEPTION_EXECUTE_HANDLER) { return 1; }
#endif
return 0;

View file

@ -74,7 +74,7 @@ typedef unsigned long UInt64;
#else
#if defined(_MSC_VER) || defined(__BORLANDC__)
#if defined(_MSC_VER_) || defined(__BORLANDC__)
typedef __int64 Int64;
typedef unsigned __int64 UInt64;
#define UINT64_CONST(n) n
@ -103,7 +103,7 @@ typedef int Bool;
#define MY_STD_CALL
#endif
#ifdef _MSC_VER
#ifdef _MSC_VER_
#if _MSC_VER >= 1300
#define MY_NO_INLINE __declspec(noinline)
@ -168,7 +168,7 @@ typedef struct
typedef struct
{
SRes (*Look)(void *p, const void **buf, size_t *size);
SRes (*Look)(void *p, void **buf, size_t *size);
/* if (input(*size) != 0 && output(*size) == 0) means end_of_stream.
(output(*size) > input(*size)) is not allowed
(output(*size) < input(*size)) is allowed */

View file

@ -25,7 +25,7 @@
#include "kjmp2.h"
#ifdef _MSC_VER
#ifdef _MSC_VER_
#define FASTCALL __fastcall
#else
#define FASTCALL

View file

@ -62,8 +62,8 @@
#include "guisan/platform.hpp"
#ifdef _MSC_VER
#if _MSC_VER <= 1200
#ifdef _MSC_VER_
#if _MSC_VER_ <= 1200
#define __FUNCTION__ "?"
#endif
#endif

View file

@ -68,10 +68,10 @@
#define GCN_CORE_DECLSPEC __declspec(dllimport)
#define GCN_EXTENSION_DECLSPEC __declspec(dllimport)
#elif defined(_MSC_VER) && defined(GUICHAN_BUILD)
#elif defined(_MSC_VER_) && defined(GUICHAN_BUILD)
#define GCN_CORE_DECLSPEC _declspec(dllexport)
#elif defined(_MSC_VER) && defined(GUICHAN_EXTENSION_BUILD)
#elif defined(_MSC_VER_) && defined(GUICHAN_EXTENSION_BUILD)
#define GCN_CORE_DECLSPEC _declspec(dllimport)
#define GCN_EXTENSION_DECLSPEC _declspec(dllexport)

75
src/include/ar.h Normal file
View file

@ -0,0 +1,75 @@
#ifndef UAE_AR_H
#define UAE_AR_H
#include "uae/types.h"
/* disable HRTMon support by commenting this out */
#define ACTION_REPLAY_HRTMON
#ifdef ACTION_REPLAY
#define ACTION_REPLAY_COMMON
#endif
#ifdef ACTION_REPLAY_HRTMON
#define ACTION_REPLAY_COMMON
#endif
#ifdef ACTION_REPLAY
/* disable Action Replay ROM/RAM hide by commenting this out */
/* Better not disable this unless you do plenty of testing first. -Mark */
#define ACTION_REPLAY_HIDE_CARTRIDGE
#endif
#define ACTION_REPLAY_WAIT_PC -3 /* Wait for a specified Program counter */
#define ACTION_REPLAY_INACTIVE -2
#define ACTION_REPLAY_WAITRESET -1
#define ACTION_REPLAY_IDLE 1
#define ACTION_REPLAY_ACTIVATE 2
#define ACTION_REPLAY_ACTIVE 3
#define ACTION_REPLAY_DORESET 4
#define ACTION_REPLAY_HIDE 5
extern int action_replay_freeze (void);
extern uaecptr wait_for_pc;
extern int action_replay_flag;
extern int armodel;
extern int is_ar_pc_in_rom(void);
extern int is_ar_pc_in_ram(void);
extern void action_replay_enter (void);
extern void action_replay_cia_access (bool write);
extern void action_replay_hide (void);
extern void action_replay_reset (bool hardreset, bool keyboardreset);
extern int action_replay_load (void);
extern int action_replay_unload (int in_memory_reset);
extern void action_replay_memory_reset (void);
extern void action_replay_init (int);
extern void action_replay_cleanup (void);
extern void REGPARAM3 chipmem_lput_actionreplay23 (uaecptr addr, uae_u32 l) REGPARAM;
extern void REGPARAM3 chipmem_wput_actionreplay23 (uaecptr addr, uae_u32 w) REGPARAM;
extern void REGPARAM3 chipmem_bput_actionreplay1 (uaecptr addr, uae_u32 b) REGPARAM;
extern void REGPARAM3 chipmem_wput_actionreplay1 (uaecptr addr, uae_u32 w) REGPARAM;
extern void REGPARAM3 chipmem_lput_actionreplay1 (uaecptr addr, uae_u32 l) REGPARAM;
extern void action_replay_version (void);
extern int hrtmon_flag;
extern void hrtmon_enter (void);
extern void hrtmon_breakenter (void);
extern void hrtmon_ciaread (void);
extern void hrtmon_hide (void);
extern void hrtmon_reset (void);
extern int hrtmon_load (void);
extern void hrtmon_map_banks (void);
/*extern uae_u8 *hrtmemory;*/
extern uae_u32 hrtmem_start, hrtmem_size, hrtmem2_start, hrtmem3_start;
extern uae_u8 ar_custom[2*256], ar_ciaa[16], ar_ciab[16];
extern int hrtmon_lang;
#endif /* UAE_AR_H */

View file

@ -54,7 +54,7 @@ using namespace std;
#endif
#ifndef __STDC__
#ifndef _MSC_VER
#ifndef _MSC_VER_
#error "Your compiler is not ANSI. Get a real one."
#endif
#endif
@ -369,7 +369,7 @@ extern void gui_message(const TCHAR *, ...);
#endif
#define NOINLINE __attribute__ ((noinline))
#define NORETURN __attribute__ ((noreturn))
#elif _MSC_VER
#elif _MSC_VER_
#define STATIC_INLINE static __forceinline
#define NOINLINE __declspec(noinline)
#define NORETURN __declspec(noreturn)

View file

@ -158,10 +158,8 @@ void fixup_cpu(struct uae_prefs *p)
switch (p->cpu_model)
{
case 68000:
p->address_space_24 = true;
break;
case 68010:
p->address_space_24 = true;
break;
case 68020:
break;
@ -171,52 +169,20 @@ void fixup_cpu(struct uae_prefs *p)
if (p->fpu_model)
p->fpu_model = 68040;
break;
case 68060:
if (p->fpu_model)
p->fpu_model = 68060;
break;
}
if (p->cpu_model < 68020 && p->cachesize) {
p->cachesize = 0;
error_log(_T("JIT requires 68020 or better CPU."));
}
if (p->cpu_model >= 68040 && p->cachesize && p->cpu_compatible)
if (p->cpu_model >= 68020 && p->cachesize && p->cpu_compatible)
p->cpu_compatible = false;
if (p->cpu_model >= 68040 && p->cpu_cycle_exact) {
p->cpu_cycle_exact = false;
error_log(_T("68040/060 cycle-exact is not supported."));
if (p->cachesize && (p->fpu_no_unimplemented)) {
error_log(_T("JIT is not compatible with unimplemented FPU instruction emulation."));
p->fpu_no_unimplemented = false;
}
if ((p->cpu_model < 68030 || p->cachesize) && p->mmu_model) {
error_log(_T("MMU emulation requires 68030/040/060 and it is not JIT compatible."));
p->mmu_model = 0;
}
if (p->cachesize && p->cpu_cycle_exact) {
error_log(_T("JIT and cycle-exact can't be enabled simultaneously."));
p->cachesize = 0;
}
if (p->cachesize && (p->fpu_no_unimplemented || p->int_no_unimplemented)) {
error_log(_T("JIT is not compatible with unimplemented CPU/FPU instruction emulation."));
p->fpu_no_unimplemented = p->int_no_unimplemented = false;
}
if (p->cpu_cycle_exact && p->m68k_speed < 0)
p->m68k_speed = 0;
if (p->immediate_blits && p->blitter_cycle_exact) {
error_log(_T("Cycle-exact and immediate blitter can't be enabled simultaneously.\n"));
p->immediate_blits = false;
}
if (p->immediate_blits && p->waiting_blits) {
error_log(_T("Immediate blitter and waiting blits can't be enabled simultaneously.\n"));
p->waiting_blits = 0;
}
if (p->cpu_cycle_exact)
p->cpu_compatible = true;
}
@ -485,41 +451,6 @@ static void parse_cmdline_2(int argc, TCHAR **argv)
}
}
static int diskswapper_cb(struct zfile *f, void *vrsd)
{
int *num = static_cast<int*>(vrsd);
if (*num >= MAX_SPARE_DRIVES)
return 1;
if (zfile_gettype(f) == ZFILE_DISKIMAGE) {
_tcsncpy(currprefs.dfxlist[*num], zfile_getname(f), 255);
(*num)++;
}
return 0;
}
static void parse_diskswapper(const TCHAR *s)
{
TCHAR *tmp = my_strdup(s);
TCHAR *delim = _T(",");
TCHAR *p1, *p2;
int num = 0;
p1 = tmp;
for (;;) {
p2 = strtok(p1, delim);
if (!p2)
break;
p1 = nullptr;
if (num >= MAX_SPARE_DRIVES)
break;
if (!zfile_zopen(p2, diskswapper_cb, &num)) {
_tcsncpy(currprefs.dfxlist[num], p2, 255);
num++;
}
}
free(tmp);
}
static TCHAR *parsetext(const TCHAR *s)
{
if (*s == '"' || *s == '\'') {
@ -793,7 +724,6 @@ static int real_main2 (int argc, TCHAR **argv)
memset(&gui_data, 0, sizeof gui_data);
gui_data.cd = -1;
gui_data.hd = -1;
gui_data.md = -1;
if (!init_shm()) {
if (currprefs.start_gui)

View file

@ -6,8 +6,9 @@
* Copyright 1997, 2001 Bernd Schmidt
*/
#include "SDL.h"
#include "SDL_thread.h"
#pragma once
#include <SDL.h>
#include <SDL_thread.h>
/* Sempahores. We use POSIX semaphores; if you are porting this to a machine
* with different ones, make them look like POSIX semaphores. */
@ -16,7 +17,7 @@ typedef SDL_sem *uae_sem_t;
STATIC_INLINE int uae_sem_init(uae_sem_t *sem, int dummy, int init)
{
*sem = SDL_CreateSemaphore (init);
return (*sem == 0);
return (*sem == nullptr);
}
#define uae_sem_destroy(PSEM) SDL_DestroySemaphore (*PSEM)
@ -40,7 +41,7 @@ STATIC_INLINE void uae_end_thread (uae_thread_id *tid)
STATIC_INLINE int uae_start_thread (const TCHAR *name, void *(*f) (void *), void *arg, uae_thread_id *foo)
{
uae_thread_id id = SDL_CreateThread ((int (*)(void *))f, arg);
uae_thread_id id = SDL_CreateThread ((int (*)(void *))f, "StartThread", arg);
if(foo != NULL)
*foo = id;
return (int)id;
@ -48,7 +49,7 @@ STATIC_INLINE int uae_start_thread (const TCHAR *name, void *(*f) (void *), void
STATIC_INLINE int uae_start_thread_fast (void *(*f) (void *), void *arg, uae_thread_id *foo)
{
uae_thread_id id = SDL_CreateThread ((int (*)(void *))f, arg);
uae_thread_id id = SDL_CreateThread ((int (*)(void *))f, "StartThreadFast", arg);
if(foo != NULL)
*foo = id;
return (int)id;