update to 1.22.0-unstable

This commit is contained in:
zeromus 2020-04-06 02:54:15 -04:00
parent 6b41bc2871
commit d0a3bb0348
8 changed files with 59 additions and 49 deletions

View File

@ -198,4 +198,10 @@
1.21.3 -> 1.22.0-UNSTABLE 1.21.3 -> 1.22.0-UNSTABLE
(mednafen namespaces added all over) (mednafen namespaces added all over)
[NO] endian : nothing important [NO] endian : nothing important
[OK] psx/cdc : many changes (described well in changelog) [OK] psx/cdc : many changes (described well in changelog). CAUTION: DMForceStop is removed, this may cause problems
[OK] psx/psx : remove register keyword, add NO_INLINE
[NO] psx/dis : minor change, we do it different
[OK] psx/gpu : silence warning
[OK] psx/mdec : change intrinsics macros; change inline keyword
[NO] psx/psx : change memcard flushing logic, change cd interface, PSF loading
[OK] psx/psx : change CNF parsing

View File

@ -73,8 +73,8 @@ void PS_CDC::OpenTray()
//track the tray state //track the tray state
TrayOpen = true; TrayOpen = true;
//effectively a NOP at t=0 //REMOVED in 1.22.0-UNSTABLE. this may cause problems.
DMForceStop(); //DMForceStop();
//zero 31-jan-2015 - psxtech says that what this is used for is actually a 'was open' flag which gets cleared after the status gets polled. //zero 31-jan-2015 - psxtech says that what this is used for is actually a 'was open' flag which gets cleared after the status gets polled.
//so lets set it here, and rename it later if we're sure. //so lets set it here, and rename it later if we're sure.

View File

@ -239,7 +239,6 @@ class PS_CDC
uint8 MakeStatus(bool cmd_error = false); uint8 MakeStatus(bool cmd_error = false);
bool DecodeSubQ(uint8 *subpw); bool DecodeSubQ(uint8 *subpw);
bool CommandCheckDiscPresent(void); bool CommandCheckDiscPresent(void);
void DMForceStop();
void EnbufferizeCDDASector(const uint8 *buf); void EnbufferizeCDDASector(const uint8 *buf);
bool XA_Test(const uint8 *sdata); bool XA_Test(const uint8 *sdata);

View File

@ -549,12 +549,12 @@ uint32 NO_INLINE PS_CPU::Exception(uint32 code, uint32 PC, const uint32 NP, cons
template<bool DebugMode, bool BIOSPrintMode, bool ILHMode> template<bool DebugMode, bool BIOSPrintMode, bool ILHMode>
pscpu_timestamp_t PS_CPU::RunReal(pscpu_timestamp_t timestamp_in) pscpu_timestamp_t PS_CPU::RunReal(pscpu_timestamp_t timestamp_in)
{ {
register pscpu_timestamp_t timestamp = timestamp_in; pscpu_timestamp_t timestamp = timestamp_in;
register uint32 PC; uint32 PC;
register uint32 new_PC; uint32 new_PC;
register uint32 LDWhich; uint32 LDWhich;
register uint32 LDValue; uint32 LDValue;
//printf("%d %d\n", gte_ts_done, muldiv_ts_done); //printf("%d %d\n", gte_ts_done, muldiv_ts_done);

View File

@ -221,7 +221,7 @@ class PS_CPU
uint32 Exception(uint32 code, uint32 PC, const uint32 NP, const uint32 instr) MDFN_WARN_UNUSED_RESULT; uint32 Exception(uint32 code, uint32 PC, const uint32 NP, const uint32 instr) MDFN_WARN_UNUSED_RESULT;
template<bool DebugMode, bool BIOSPrintMode, bool ILHMode> pscpu_timestamp_t RunReal(pscpu_timestamp_t timestamp_in) NO_INLINE; template<bool DebugMode, bool BIOSPrintMode, bool ILHMode> NO_INLINE pscpu_timestamp_t RunReal(pscpu_timestamp_t timestamp_in) NO_INLINE;
template<typename T> T PeekMemory(uint32 address) MDFN_COLD; template<typename T> T PeekMemory(uint32 address) MDFN_COLD;
template<typename T> void PokeMemory(uint32 address, T value) MDFN_COLD; template<typename T> void PokeMemory(uint32 address, T value) MDFN_COLD;

View File

@ -140,6 +140,9 @@ static INLINE void PlotPixel(uint32 x, uint32 y, uint16 fore_pix)
// Efficient 15bpp pixel math algorithms from blargg // Efficient 15bpp pixel math algorithms from blargg
switch(BlendMode) switch(BlendMode)
{ {
default: // to silence clang
break;
case 0: case 0:
bg_pix |= 0x8000; bg_pix |= 0x8000;
pix = ((fore_pix + bg_pix) - ((fore_pix ^ bg_pix) & 0x0421)) >> 1; pix = ((fore_pix + bg_pix) - ((fore_pix ^ bg_pix) & 0x0421)) >> 1;

View File

@ -73,7 +73,7 @@
#include <emmintrin.h> #include <emmintrin.h>
#endif #endif
#if 0 //defined(__ARM_NEON__) #if 0 //defined(HAVE_NEON_INTRINSICS)
#include <arm_neon.h> #include <arm_neon.h>
#endif #endif
@ -283,7 +283,7 @@ static INLINE void IDCT_1D_Multi(int16 *in_coeff, T *out_coeff)
// //
// //
// //
#elif 0 //defined(__ARM_NEON__) #elif 0 //defined(HAVE_NEON_INTRINSICS)
// //
// //
// //
@ -351,8 +351,7 @@ static INLINE void IDCT_1D_Multi(int16 *in_coeff, T *out_coeff)
// //
#endif #endif
static void IDCT(int16 *in_coeff, int8 *out_coeff) NO_INLINE; static NO_INLINE void IDCT(int16 *in_coeff, int8 *out_coeff)
static void IDCT(int16 *in_coeff, int8 *out_coeff)
{ {
alignas(16) int16 tmpbuf[64]; alignas(16) int16 tmpbuf[64];

View File

@ -2457,49 +2457,52 @@ EW_EXPORT s32 shock_AnalyzeDisc(ShockDiscRef* disc, ShockDiscInfo* info)
fp->seek(file_lba * 2048, SEEK_SET); fp->seek(file_lba * 2048, SEEK_SET);
fp->read(fb, 2048); fp->read(fb, 2048);
bootpos = strstr((char*)fb, "BOOT") + 4; if((bootpos = strstr((char*)fb, "BOOT")))
while(*bootpos == ' ' || *bootpos == '\t') bootpos++;
if(*bootpos == '=')
{ {
bootpos++; bootpos += 4;
while(*bootpos == ' ' || *bootpos == '\t') bootpos++; while(*bootpos == ' ' || *bootpos == '\t') bootpos++;
if(!strncasecmp(bootpos, "cdrom:", 6)) if(*bootpos == '=')
{ {
char* tmp; bootpos++;
while(*bootpos == ' ' || *bootpos == '\t') bootpos++;
if(!strncasecmp(bootpos, "cdrom:", 6))
{
char* tmp;
bootpos += 6; bootpos += 6;
// strrchr() way will pick up Tekken 3, but only enable if needed due to possibility of regressions. // strrchr() way will pick up Tekken 3, but only enable if needed due to possibility of regressions.
//if((tmp = strrchr(bootpos, '\\'))) //if((tmp = strrchr(bootpos, '\\')))
// bootpos = tmp + 1; // bootpos = tmp + 1;
while(*bootpos == '\\') while(*bootpos == '\\')
bootpos++; bootpos++;
if((tmp = strchr(bootpos, '_'))) *tmp = 0; if((tmp = strchr(bootpos, '_'))) *tmp = 0;
if((tmp = strchr(bootpos, '.'))) *tmp = 0; if((tmp = strchr(bootpos, '.'))) *tmp = 0;
if((tmp = strchr(bootpos, ';'))) *tmp = 0; if((tmp = strchr(bootpos, ';'))) *tmp = 0;
//puts(bootpos); //puts(bootpos);
if(strlen(bootpos) == 4 && bootpos[0] == 'S' && (bootpos[1] == 'C' || bootpos[1] == 'L' || bootpos[1] == 'I')) if(strlen(bootpos) == 4 && toupper(bootpos[0]) == 'S' && (toupper(bootpos[1]) == 'C' || toupper(bootpos[1]) == 'L' || toupper(bootpos[1]) == 'I'))
{ {
switch(bootpos[2]) switch(toupper(bootpos[2]))
{ {
case 'E': case 'E':
info->region = REGION_EU; info->region = REGION_EU;
strcpy(info->id,"SCEE"); strcpy(info->id,"SCEE");
goto Breakout; goto Breakout;
case 'U': case 'U':
info->region = REGION_NA; info->region = REGION_NA;
strcpy(info->id,"SCEA"); strcpy(info->id,"SCEA");
goto Breakout; goto Breakout;
case 'K': // Korea? case 'K': // Korea?
case 'B': case 'B':
case 'P': case 'P':
info->region = REGION_JP; info->region = REGION_JP;
strcpy(info->id,"SCEI"); strcpy(info->id,"SCEI");
goto Breakout; goto Breakout;
}
} }
} }
} }