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
parent 94c7e79c26
commit 38539a9c2f
6 changed files with 582 additions and 574 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;

View File

@ -110,7 +110,7 @@ void GD_HLE_Command(u32 cc, u32 prm)
switch(cc)
{
case GDCC_GETTOC:
printf("GDROM:\t*FIXME* CMD GETTOC PRM:%X\n",cc,prm);
printf("GDROM:\t*FIXME* CMD GETTOC PRM:%X\n",prm);
break;
case GDCC_GETTOC2:
@ -118,12 +118,12 @@ void GD_HLE_Command(u32 cc, u32 prm)
break;
case GDCC_GETSES:
debugf("GDROM:\tGETSES PRM:%X\n", cc, prm);
debugf("GDROM:\tGETSES PRM:%X\n", prm);
GDROM_HLE_ReadSES(r[5]);
break;
case GDCC_INIT:
printf("GDROM:\tCMD INIT PRM:%X\n",cc,prm);
printf("GDROM:\tCMD INIT PRM:%X\n",prm);
break;
case GDCC_PIOREAD:
@ -131,34 +131,34 @@ void GD_HLE_Command(u32 cc, u32 prm)
break;
case GDCC_DMAREAD:
debugf("GDROM:\tCMD DMAREAD PRM:%X\n", cc, prm);
debugf("GDROM:\tCMD DMAREAD PRM:%X\n", prm);
GDROM_HLE_ReadDMA(r[5]);
break;
case GDCC_PLAY_SECTOR:
printf("GDROM:\tCMD PLAYSEC? PRM:%X\n",cc,prm);
printf("GDROM:\tCMD PLAYSEC? PRM:%X\n",prm);
break;
case GDCC_RELEASE:
printf("GDROM:\tCMD RELEASE? PRM:%X\n",cc,prm);
printf("GDROM:\tCMD RELEASE? PRM:%X\n",prm);
break;
case GDCC_STOP: printf("GDROM:\tCMD STOP PRM:%X\n",cc,prm); break;
case GDCC_SEEK: printf("GDROM:\tCMD SEEK PRM:%X\n",cc,prm); break;
case GDCC_PLAY: printf("GDROM:\tCMD PLAY PRM:%X\n",cc,prm); break;
case GDCC_PAUSE:printf("GDROM:\tCMD PAUSE PRM:%X\n",cc,prm); break;
case GDCC_STOP: printf("GDROM:\tCMD STOP PRM:%X\n",prm); break;
case GDCC_SEEK: printf("GDROM:\tCMD SEEK PRM:%X\n",prm); break;
case GDCC_PLAY: printf("GDROM:\tCMD PLAY PRM:%X\n",prm); break;
case GDCC_PAUSE:printf("GDROM:\tCMD PAUSE PRM:%X\n",prm); break;
case GDCC_READ:
printf("GDROM:\tCMD READ PRM:%X\n",cc,prm);
printf("GDROM:\tCMD READ PRM:%X\n",prm);
break;
case GDCC_GETSCD:
debugf("GDROM:\tGETSCD PRM:%X\n",cc,prm);
debugf("GDROM:\tGETSCD PRM:%X\n",prm);
GDCC_HLE_GETSCD(r[5]);
break;
default: printf("GDROM:\tUnknown GDROM CC:%X PRM:%X\n",cc,prm); break;
default: printf("GDROM:\tUnknown GDROM CC:%X PRM:%X\n",prm); break;
}
}

File diff suppressed because it is too large Load Diff