diff --git a/psx/octoshock/docs/upstreaminfo.txt b/psx/octoshock/docs/upstreaminfo.txt index 80c231e851..57c4aa9a48 100644 --- a/psx/octoshock/docs/upstreaminfo.txt +++ b/psx/octoshock/docs/upstreaminfo.txt @@ -198,4 +198,10 @@ 1.21.3 -> 1.22.0-UNSTABLE (mednafen namespaces added all over) [NO] endian : nothing important -[OK] psx/cdc : many changes (described well in changelog) \ No newline at end of file +[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 \ No newline at end of file diff --git a/psx/octoshock/psx/cdc.cpp b/psx/octoshock/psx/cdc.cpp index 603914213b..72e56eff8f 100644 --- a/psx/octoshock/psx/cdc.cpp +++ b/psx/octoshock/psx/cdc.cpp @@ -73,8 +73,8 @@ void PS_CDC::OpenTray() //track the tray state TrayOpen = true; - //effectively a NOP at t=0 - DMForceStop(); + //REMOVED in 1.22.0-UNSTABLE. this may cause problems. + //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. //so lets set it here, and rename it later if we're sure. diff --git a/psx/octoshock/psx/cdc.h b/psx/octoshock/psx/cdc.h index df2464a1eb..3a1bd3ab38 100644 --- a/psx/octoshock/psx/cdc.h +++ b/psx/octoshock/psx/cdc.h @@ -239,7 +239,6 @@ class PS_CDC uint8 MakeStatus(bool cmd_error = false); bool DecodeSubQ(uint8 *subpw); bool CommandCheckDiscPresent(void); - void DMForceStop(); void EnbufferizeCDDASector(const uint8 *buf); bool XA_Test(const uint8 *sdata); diff --git a/psx/octoshock/psx/cpu.cpp b/psx/octoshock/psx/cpu.cpp index dbc1f12830..e5479bf6a0 100644 --- a/psx/octoshock/psx/cpu.cpp +++ b/psx/octoshock/psx/cpu.cpp @@ -549,12 +549,12 @@ uint32 NO_INLINE PS_CPU::Exception(uint32 code, uint32 PC, const uint32 NP, cons template 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; - register uint32 new_PC; - register uint32 LDWhich; - register uint32 LDValue; + uint32 PC; + uint32 new_PC; + uint32 LDWhich; + uint32 LDValue; //printf("%d %d\n", gte_ts_done, muldiv_ts_done); diff --git a/psx/octoshock/psx/cpu.h b/psx/octoshock/psx/cpu.h index 2972a9f1cc..fc6cb5b3ac 100644 --- a/psx/octoshock/psx/cpu.h +++ b/psx/octoshock/psx/cpu.h @@ -221,7 +221,7 @@ class PS_CPU uint32 Exception(uint32 code, uint32 PC, const uint32 NP, const uint32 instr) MDFN_WARN_UNUSED_RESULT; - template pscpu_timestamp_t RunReal(pscpu_timestamp_t timestamp_in) NO_INLINE; + template NO_INLINE pscpu_timestamp_t RunReal(pscpu_timestamp_t timestamp_in) NO_INLINE; template T PeekMemory(uint32 address) MDFN_COLD; template void PokeMemory(uint32 address, T value) MDFN_COLD; diff --git a/psx/octoshock/psx/gpu_common.inc b/psx/octoshock/psx/gpu_common.inc index 8c1f29fcfa..649bdc0b1d 100644 --- a/psx/octoshock/psx/gpu_common.inc +++ b/psx/octoshock/psx/gpu_common.inc @@ -140,6 +140,9 @@ static INLINE void PlotPixel(uint32 x, uint32 y, uint16 fore_pix) // Efficient 15bpp pixel math algorithms from blargg switch(BlendMode) { + default: // to silence clang + break; + case 0: bg_pix |= 0x8000; pix = ((fore_pix + bg_pix) - ((fore_pix ^ bg_pix) & 0x0421)) >> 1; diff --git a/psx/octoshock/psx/mdec.cpp b/psx/octoshock/psx/mdec.cpp index 43c80ddc8f..9b9876a965 100644 --- a/psx/octoshock/psx/mdec.cpp +++ b/psx/octoshock/psx/mdec.cpp @@ -73,7 +73,7 @@ #include #endif -#if 0 //defined(__ARM_NEON__) +#if 0 //defined(HAVE_NEON_INTRINSICS) #include #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 -static void IDCT(int16 *in_coeff, int8 *out_coeff) NO_INLINE; -static void IDCT(int16 *in_coeff, int8 *out_coeff) +static NO_INLINE void IDCT(int16 *in_coeff, int8 *out_coeff) { alignas(16) int16 tmpbuf[64]; diff --git a/psx/octoshock/psx/psx.cpp b/psx/octoshock/psx/psx.cpp index 4534d52e6b..d8576f169a 100644 --- a/psx/octoshock/psx/psx.cpp +++ b/psx/octoshock/psx/psx.cpp @@ -2457,49 +2457,52 @@ EW_EXPORT s32 shock_AnalyzeDisc(ShockDiscRef* disc, ShockDiscInfo* info) fp->seek(file_lba * 2048, SEEK_SET); fp->read(fb, 2048); - bootpos = strstr((char*)fb, "BOOT") + 4; - while(*bootpos == ' ' || *bootpos == '\t') bootpos++; - if(*bootpos == '=') + if((bootpos = strstr((char*)fb, "BOOT"))) { - bootpos++; + bootpos += 4; while(*bootpos == ' ' || *bootpos == '\t') bootpos++; - if(!strncasecmp(bootpos, "cdrom:", 6)) - { - char* tmp; + if(*bootpos == '=') + { + 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. - //if((tmp = strrchr(bootpos, '\\'))) - // bootpos = tmp + 1; - while(*bootpos == '\\') - bootpos++; + // strrchr() way will pick up Tekken 3, but only enable if needed due to possibility of regressions. + //if((tmp = strrchr(bootpos, '\\'))) + // bootpos = tmp + 1; + while(*bootpos == '\\') + bootpos++; - if((tmp = strchr(bootpos, '_'))) *tmp = 0; - if((tmp = strchr(bootpos, '.'))) *tmp = 0; - if((tmp = strchr(bootpos, ';'))) *tmp = 0; - //puts(bootpos); + if((tmp = strchr(bootpos, '_'))) *tmp = 0; + if((tmp = strchr(bootpos, '.'))) *tmp = 0; + if((tmp = strchr(bootpos, ';'))) *tmp = 0; + //puts(bootpos); - if(strlen(bootpos) == 4 && bootpos[0] == 'S' && (bootpos[1] == 'C' || bootpos[1] == 'L' || bootpos[1] == 'I')) - { - switch(bootpos[2]) - { - case 'E': - info->region = REGION_EU; - strcpy(info->id,"SCEE"); - goto Breakout; + if(strlen(bootpos) == 4 && toupper(bootpos[0]) == 'S' && (toupper(bootpos[1]) == 'C' || toupper(bootpos[1]) == 'L' || toupper(bootpos[1]) == 'I')) + { + switch(toupper(bootpos[2])) + { + case 'E': + info->region = REGION_EU; + strcpy(info->id,"SCEE"); + goto Breakout; - case 'U': - info->region = REGION_NA; - strcpy(info->id,"SCEA"); - goto Breakout; + case 'U': + info->region = REGION_NA; + strcpy(info->id,"SCEA"); + goto Breakout; - case 'K': // Korea? - case 'B': - case 'P': - info->region = REGION_JP; - strcpy(info->id,"SCEI"); - goto Breakout; + case 'K': // Korea? + case 'B': + case 'P': + info->region = REGION_JP; + strcpy(info->id,"SCEI"); + goto Breakout; + } } } }