ngen_mainloop for x86 updated to use PC value from context, CDI warning

and removed redundant header causing build failure on libwebsockets (VS)
This commit is contained in:
David Miller 2018-08-06 15:01:15 -04:00 committed by Ender's Games
parent 7ff9d0ec02
commit 1a4f597bd8
5 changed files with 569 additions and 561 deletions

View File

@ -24,7 +24,6 @@
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#include <cstddef>
#endif #endif
#ifdef CMAKE_BUILD #ifdef CMAKE_BUILD
@ -36,6 +35,7 @@ extern "C" {
#ifndef WIN32_LEAN_AND_MEAN #ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#endif #endif
#include <winsock2.h> #include <winsock2.h>
#include <ws2tcpip.h> #include <ws2tcpip.h>
#include <stddef.h> #include <stddef.h>

View File

@ -131,9 +131,16 @@ bool ConvertSector(u8* in_buff , u8* out_buff , int from , int to,int sector)
Disc* OpenDisc(const wchar* fn) Disc* OpenDisc(const wchar* fn)
{ {
Disc* rv; Disc* rv = nullptr;
for (int i=0;drivers[i] && !(rv=drivers[i](fn));i++) ; for (unat i=0; drivers[i] && !rv; i++) { // ;drivers[i] && !(rv=drivers[i](fn));
rv = drivers[i](fn);
if (cdi_parse == drivers[i]) {
const wchar warn_str[] = "Warning: CDI Image Loaded!\n Many CDI images are known to be defective, GDI or CHD format is preferred. Please only file bug reports when using images known to be good (GDI or CHD).";
msgboxf(warn_str,MBX_ICONASTERISK);// if (OS_DlgYes!=os_Dialog(OS_DialogYesNo, cdiWarn_S)) rv=0;
}
}
return rv; return rv;
} }
@ -171,7 +178,7 @@ bool InitDrive(u32 fileflags)
printf("Loading default image \"%s\"\n",settings.imgread.DefaultImage); printf("Loading default image \"%s\"\n",settings.imgread.DefaultImage);
if (!InitDrive_(settings.imgread.DefaultImage)) if (!InitDrive_(settings.imgread.DefaultImage))
{ {
msgboxf("Default image \"%s\" failed to load",MBX_ICONERROR); msgboxf("Default image \"%s\" failed to load",MBX_ICONERROR,settings.imgread.DefaultImage);
return false; return false;
} }
else else

View File

@ -93,7 +93,7 @@ ngen_mainloop:
push ebp push ebp
push ebx push ebx
mov ecx,0xA0000000 mov ecx,[eax-184] # PC - was 0xA0000000
mov dword ptr cycle_counter, 448 #SH4_TIMESLICE mov dword ptr cycle_counter, 448 #SH4_TIMESLICE
lea eax, no_update lea eax, no_update

View File

@ -71,7 +71,7 @@ naked void ngen_mainloop(void* cntx)
push ebp; push ebp;
push ebx; push ebx;
mov ecx,0xA0000000; mov ecx,[eax-184]; //# PC - was #0xA0000000
mov [cycle_counter],SH4_TIMESLICE; mov [cycle_counter],SH4_TIMESLICE;
mov [loop_no_update],offset no_update; mov [loop_no_update],offset no_update;

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Fast|Win32"> <ProjectConfiguration Include="Fast|Win32">
<Configuration>Fast</Configuration> <Configuration>Fast</Configuration>
@ -359,6 +359,7 @@
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>reicast</RootNamespace> <RootNamespace>reicast</RootNamespace>
<ProjectName>reicast</ProjectName> <ProjectName>reicast</ProjectName>
<WindowsTargetPlatformVersion>10.0.10586.0</WindowsTargetPlatformVersion>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Fast|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Fast|Win32'" Label="Configuration">
@ -366,26 +367,26 @@
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset> <PlatformToolset>v141</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Fast|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Fast|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset> <PlatformToolset>v141</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Slow|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Slow|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset> <PlatformToolset>v141</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Slow|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Slow|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset> <PlatformToolset>v141</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">