Skip to content

Commit

Permalink
Revert "ngen_mainloop for x86 updated to use PC value from context, C…
Browse files Browse the repository at this point in the history
…DI warning"

This reverts commit 38539a9.
Reason: Breakage reported by beta testers

See flyinghead#1260
  • Loading branch information
skmp committed Aug 7, 2018
1 parent 38539a9 commit b121fd1
Show file tree
Hide file tree
Showing 6 changed files with 574 additions and 582 deletions.
2 changes: 1 addition & 1 deletion core/deps/libwebsocket/libwebsockets.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#ifdef __cplusplus
extern "C" {
#include <cstddef>
#endif

#ifdef CMAKE_BUILD
Expand All @@ -35,7 +36,6 @@ extern "C" {
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif

#include <winsock2.h>
#include <ws2tcpip.h>
#include <stddef.h>
Expand Down
13 changes: 3 additions & 10 deletions core/imgread/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,9 @@ bool ConvertSector(u8* in_buff , u8* out_buff , int from , int to,int sector)

Disc* OpenDisc(const wchar* fn)
{
Disc* rv = nullptr;
Disc* rv;

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;
}
}
for (int i=0;drivers[i] && !(rv=drivers[i](fn));i++) ;

return rv;
}
Expand Down Expand Up @@ -178,7 +171,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,settings.imgread.DefaultImage);
msgboxf("Default image \"%s\" failed to load",MBX_ICONERROR);
return false;
}
else
Expand Down
2 changes: 1 addition & 1 deletion core/rec-x86/rec_lin86_asm.S
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ ngen_mainloop:
push ebp
push ebx

mov ecx,[eax-184] # PC - was 0xA0000000
mov ecx,0xA0000000
mov dword ptr cycle_counter, 448 #SH4_TIMESLICE

lea eax, no_update
Expand Down
2 changes: 1 addition & 1 deletion core/rec-x86/rec_x86_asm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ naked void ngen_mainloop(void* cntx)
push ebp;
push ebx;

mov ecx,[eax-184]; //# PC - was #0xA0000000
mov ecx,0xA0000000;
mov [cycle_counter],SH4_TIMESLICE;

mov [loop_no_update],offset no_update;
Expand Down
26 changes: 13 additions & 13 deletions core/reios/gdrom_hle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,55 +110,55 @@ void GD_HLE_Command(u32 cc, u32 prm)
switch(cc)
{
case GDCC_GETTOC:
printf("GDROM:\t*FIXME* CMD GETTOC PRM:%X\n",prm);
printf("GDROM:\t*FIXME* CMD GETTOC PRM:%X\n",cc,prm);
break;

case GDCC_GETTOC2:
GDROM_HLE_ReadTOC(r[5]);
break;

case GDCC_GETSES:
debugf("GDROM:\tGETSES PRM:%X\n", prm);
debugf("GDROM:\tGETSES PRM:%X\n", cc, prm);
GDROM_HLE_ReadSES(r[5]);
break;

case GDCC_INIT:
printf("GDROM:\tCMD INIT PRM:%X\n",prm);
printf("GDROM:\tCMD INIT PRM:%X\n",cc,prm);
break;

case GDCC_PIOREAD:
GDROM_HLE_ReadPIO(r[5]);
break;

case GDCC_DMAREAD:
debugf("GDROM:\tCMD DMAREAD PRM:%X\n", prm);
debugf("GDROM:\tCMD DMAREAD PRM:%X\n", cc, prm);
GDROM_HLE_ReadDMA(r[5]);
break;


case GDCC_PLAY_SECTOR:
printf("GDROM:\tCMD PLAYSEC? PRM:%X\n",prm);
printf("GDROM:\tCMD PLAYSEC? PRM:%X\n",cc,prm);
break;

case GDCC_RELEASE:
printf("GDROM:\tCMD RELEASE? PRM:%X\n",prm);
printf("GDROM:\tCMD RELEASE? 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_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_READ:
printf("GDROM:\tCMD READ PRM:%X\n",prm);
printf("GDROM:\tCMD READ PRM:%X\n",cc,prm);
break;

case GDCC_GETSCD:
debugf("GDROM:\tGETSCD PRM:%X\n",prm);
debugf("GDROM:\tGETSCD PRM:%X\n",cc,prm);
GDCC_HLE_GETSCD(r[5]);
break;

default: printf("GDROM:\tUnknown GDROM CC:%X PRM:%X\n",prm); break;
default: printf("GDROM:\tUnknown GDROM CC:%X PRM:%X\n",cc,prm); break;
}
}

Expand Down
Loading

0 comments on commit b121fd1

Please sign in to comment.