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
extern "C" {
#include <cstddef>
#endif
#ifdef CMAKE_BUILD
@ -36,6 +35,7 @@ extern "C" {
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <winsock2.h>
#include <ws2tcpip.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* 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;
}
@ -171,7 +178,7 @@ bool InitDrive(u32 fileflags)
printf("Loading default image \"%s\"\n",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;
}
else

View File

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

View File

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

File diff suppressed because it is too large Load Diff