Update to version 0.9.45.0

This commit is contained in:
libretroadmin 2022-06-10 15:41:39 +02:00
parent 9e910ac278
commit fdef9dcab8
7 changed files with 38 additions and 60 deletions

View File

@ -38,7 +38,7 @@ std::string retro_base_directory;
#define MEDNAFEN_CORE_NAME_MODULE "pce_fast"
#define MEDNAFEN_CORE_NAME "Beetle PCE Fast"
#define MEDNAFEN_CORE_VERSION "v0.9.44.1"
#define MEDNAFEN_CORE_VERSION "v0.9.45.0"
#define MEDNAFEN_CORE_EXTENSIONS "pce|cue|ccd|chd|toc|m3u"
#define MEDNAFEN_CORE_TIMING_FPS 59.82
#define MEDNAFEN_CORE_GEOMETRY_BASE_W 256
@ -740,19 +740,19 @@ static DECLFR(IORead)
{
PCEF_CASEL(VDC_00, 0x00):
HuC6280_StealCycle();
return(VDC_Read(0, FALSE));
return(VDC_Read(0, false));
PCEF_CASEL(VDC_01, 0x01):
HuC6280_StealCycle();
return(VDC_Read(1, FALSE));
return(VDC_Read(1, false));
PCEF_CASEL(VDC_02, 0x02):
HuC6280_StealCycle();
return(VDC_Read(2, FALSE));
return(VDC_Read(2, false));
PCEF_CASEL(VDC_03, 0x03):
HuC6280_StealCycle();
return(VDC_Read(3, FALSE));
return(VDC_Read(3, false));
PCEF_CASEL(VCE_00, 0x04):
PCEF_CASEL(VCE_01, 0x05):
@ -2373,7 +2373,7 @@ void retro_run(void)
if (last_palette_format != use_palette)
{
spec.VideoFormatChanged = TRUE;
spec.VideoFormatChanged = true;
last_palette_format = use_palette;
}

View File

@ -83,14 +83,14 @@ int CDIF::ReadSector(uint8_t* buf, int32_t lba, uint32_t sector_count, bool supp
uint8_t tmpbuf[2352 + 96];
if(!ReadRawSector(tmpbuf, lba))
return(FALSE);
return false;
if(!ValidateRawSector(tmpbuf))
{
if(!suppress_uncorrectable_message)
MDFN_DispMessage("Uncorrectable data at sector %d", lba);
return(false);
return false;
}
const int mode = tmpbuf[12 + 3];

View File

@ -18,7 +18,6 @@
Arcade Card emulation based on information provided by Ki and David Shadoff
*/
#include <errno.h>
#include <string.h>
#include "../../mednafen-types.h"

View File

@ -104,14 +104,6 @@ typedef uint16 UTF16; /* at least 16 bits */
typedef uint8 UTF8; /* typically 8 bits */
typedef unsigned char Boolean; /* 0 or 1 */
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
#define MDFN_COLD
#undef require

View File

@ -52,7 +52,7 @@ static std::vector<CHEATF> cheats;
static int savecheats;
static uint32 resultsbytelen = 1;
static bool resultsbigendian = 0;
static bool CheatsActive = TRUE;
static bool CheatsActive = true;
bool SubCheatsOn = 0;
std::vector<SUBCHEAT> SubCheats[8];

View File

@ -217,8 +217,8 @@ static INLINE uint8 read_1808(int32 timestamp)
{
if(PCECD_Drive_GetIO())
{
PCECD_Drive_SetACK(TRUE);
ACKStatus = TRUE;
PCECD_Drive_SetACK(true);
ACKStatus = true;
pcecd_drive_ne = PCECD_Drive_Run(timestamp);
ClearACKDelay = 15 * 3;
}
@ -263,7 +263,7 @@ bool PCECD_Init(const PCECD_Settings *settings, void (*irqcb)(bool), double mast
ADPCM.bigdivacc = (int64)((double)master_clock * OC_Multiplier * 65536 / 32087.5);
return(TRUE);
return true;
}
@ -286,7 +286,7 @@ void PCECD_Power(uint32 timestamp)
PCECD_Drive_Power(timestamp);
pcecd_drive_ne = 0x7fffffff;
bBRAMEnabled = FALSE;
bBRAMEnabled = false;
memset(_Port, 0, sizeof(_Port));
ACKStatus = 0;
ClearACKDelay = 0;
@ -322,7 +322,7 @@ void PCECD_Power(uint32 timestamp)
Fader.Volume = 0;
Fader.CycleCounter = 0;
Fader.CountValue = 0;
Fader.Clocked = FALSE;
Fader.Clocked = false;
}
bool PCECD_IsBRAMEnabled(void)
@ -367,7 +367,7 @@ uint8 PCECD_Read(uint32 timestamp, uint32 A)
case 0x2: ret = _Port[2];
break;
case 0x3: bBRAMEnabled = FALSE;
case 0x3: bBRAMEnabled = false;
/* switch left/right of digitized cd playback */
ret = _Port[0x3];
@ -511,9 +511,7 @@ void PCECD_Write(uint32 timestamp, uint32 physAddr, uint8 data)
case 0x7: // $1807: D7=1 enables backup ram
if (data & 0x80)
{
bBRAMEnabled = TRUE;
}
bBRAMEnabled = true;
break;
case 0x8: // Set ADPCM address low
@ -631,7 +629,7 @@ void PCECD_Write(uint32 timestamp, uint32 physAddr, uint8 data)
Fader.Volume = 65536;
Fader.CycleCounter = 0;
Fader.CountValue = 0;
Fader.Clocked = FALSE;
Fader.Clocked = false;
}
else
{
@ -640,7 +638,7 @@ void PCECD_Write(uint32 timestamp, uint32 physAddr, uint8 data)
if(!Fader.Clocked)
Fader.CycleCounter = Fader.CountValue;
Fader.Clocked = TRUE;
Fader.Clocked = true;
}
Fader_SyncWhich();
break;
@ -777,8 +775,8 @@ extern "C" void PCECD_Run(uint32 in_timestamp)
ClearACKDelay -= chunk_clocks;
if(ClearACKDelay <= 0)
{
ACKStatus = FALSE;
PCECD_Drive_SetACK(FALSE);
ACKStatus = false;
PCECD_Drive_SetACK(false);
PCECD_Drive_Run(running_ts);
if(PCECD_Drive_GetCD())
{

View File

@ -16,7 +16,6 @@
*/
#include <assert.h>
#include <math.h>
#include "../mednafen.h"
#include "../mednafen-endian.h"
@ -78,7 +77,7 @@ typedef struct
uint8 command_buffer_pos;
uint8 command_size_left;
// FALSE if not all pending data is in the FIFO, TRUE if it is.
// false if not all pending data is in the FIFO, true if it is.
// Used for multiple sector CD reads.
bool data_transfer_done;
@ -350,8 +349,8 @@ static void SendStatusAndMessage(uint8 status, uint8 message)
cd.message_pending = message;
cd.status_sent = FALSE;
cd.message_sent = FALSE;
cd.status_sent = false;
cd.message_sent = false;
if(status == STATUS_GOOD)
@ -870,16 +869,6 @@ static INLINE void RunCDDA(uint32 system_timestamp, int32 run_time)
if(cd.TrayOpen)
{
cdda.CDDAStatus = CDDASTATUS_STOPPED;
#if 0
cd.data_transfer_done = FALSE;
cd.key_pending = SENSEKEY_NOT_READY;
cd.asc_pending = ASC_MEDIUM_NOT_PRESENT;
cd.ascq_pending = 0x00;
cd.fru_pending = 0x00;
SendStatusAndMessage(STATUS_CHECK_CONDITION, 0x00);
#endif
break;
}
@ -953,7 +942,7 @@ static INLINE void RunCDRead(uint32 system_timestamp, int32 run_time)
if(cd.TrayOpen)
{
din.Flush();
cd.data_transfer_done = FALSE;
cd.data_transfer_done = false;
CommandCCError(SENSEKEY_NOT_READY, NSE_TRAY_OPEN);
}
@ -963,7 +952,7 @@ static INLINE void RunCDRead(uint32 system_timestamp, int32 run_time)
}
else if(!Cur_CDIF->ReadRawSector(tmp_read_buf, SectorAddr)) //, SectorAddr + SectorCount))
{
cd.data_transfer_done = FALSE;
cd.data_transfer_done = false;
CommandCCError(SENSEKEY_ILLEGAL_REQUEST);
}
@ -988,12 +977,12 @@ static INLINE void RunCDRead(uint32 system_timestamp, int32 run_time)
if(SectorCount)
{
cd.data_transfer_done = FALSE;
cd.data_transfer_done = false;
CDReadTimer += (uint64) 1 * 2048 * System_Clock / CD_DATA_TRANSFER_RATE;
}
else
{
cd.data_transfer_done = TRUE;
cd.data_transfer_done = true;
}
}
} // end else to if(!Cur_CDIF->ReadSector
@ -1035,7 +1024,7 @@ uint32 PCECD_Drive_Run(pcecd_drive_timestamp_t system_timestamp)
if(REQ_signal && ACK_signal) // Data bus is valid nowww
{
cd.command_buffer[cd.command_buffer_pos++] = cd_bus.DB;
SetREQ(FALSE);
SetREQ(false);
}
if(!REQ_signal && !ACK_signal && cd.command_buffer_pos) // Received at least one byte, what should we do?
@ -1079,21 +1068,21 @@ uint32 PCECD_Drive_Run(pcecd_drive_timestamp_t system_timestamp)
}
} // end if(cd.command_buffer_pos == RequiredCDBLen[cd.command_buffer[0] >> 4])
else // Otherwise, get more data for the command!
SetREQ(TRUE);
SetREQ(true);
}
break;
case PHASE_STATUS:
if(REQ_signal && ACK_signal)
{
SetREQ(FALSE);
cd.status_sent = TRUE;
SetREQ(false);
cd.status_sent = true;
}
if(!REQ_signal && !ACK_signal && cd.status_sent)
{
// Status sent, so get ready to send the message!
cd.status_sent = FALSE;
cd.status_sent = false;
cd_bus.DB = cd.message_pending;
ChangePhase(PHASE_MESSAGE_IN);
@ -1110,32 +1099,32 @@ uint32 PCECD_Drive_Run(pcecd_drive_timestamp_t system_timestamp)
if(cd.data_transfer_done)
{
SendStatusAndMessage(STATUS_GOOD, 0x00);
cd.data_transfer_done = FALSE;
cd.data_transfer_done = false;
CDIRQCallback(PCECD_Drive_IRQ_DATA_TRANSFER_DONE);
}
}
else
{
cd_bus.DB = din.ReadUnit();
SetREQ(TRUE);
SetREQ(true);
}
}
if(REQ_signal && ACK_signal)
{
SetREQ(FALSE);
SetREQ(false);
}
break;
case PHASE_MESSAGE_IN:
if(REQ_signal && ACK_signal)
{
SetREQ(FALSE);
cd.message_sent = TRUE;
SetREQ(false);
cd.message_sent = true;
}
if(!REQ_signal && !ACK_signal && cd.message_sent)
{
cd.message_sent = FALSE;
cd.message_sent = false;
ChangePhase(PHASE_BUS_FREE);
}
break;