update psx to mednafen 0.9.38.5
This commit is contained in:
parent
0e4a641a81
commit
ee2d0aafdf
Binary file not shown.
|
@ -67,4 +67,15 @@
|
|||
0.9.38-UNSTABLE -> 0.9.38.1
|
||||
[NO] psx/psx : DiscSanityChecks fix (OK if we used this feature)
|
||||
0.9.38.1 -> 0.9.38.2
|
||||
[OK] psx/gpu_polygon : Fixes to poly rasterizing
|
||||
[OK] psx/gpu_polygon : Fixes to poly rasterizing
|
||||
0.9.38.2 -> 0.9.38.4
|
||||
[OK] psx/cdc : Change to fundamental sector reading for tomb raider
|
||||
[OK] psx/cpu : Elaborate debug poke capabilities
|
||||
[OK] psx/debug : Elaborate debug poke capabilities
|
||||
[OK] psx/gpu : Alter mouse coordinate translation
|
||||
[OK] psx/gpu : Alter texcache invalidation, TPage and DrawMode commands
|
||||
[OK] psx/psx : Elaborate debug poke capabilities
|
||||
0.9.38.4 -> 0.9.38.5
|
||||
[OK] psx/cdc : substantial changes to disc swapping and seek retries
|
||||
[OK] psx/gpu : change to comments
|
||||
[OK] psx/memcard : change to debug output
|
|
@ -232,6 +232,7 @@ void PS_CDC::SoftReset(void)
|
|||
DriveStatus = DS_STOPPED;
|
||||
ClearAIP();
|
||||
StatusAfterSeek = DS_STOPPED;
|
||||
SeekRetryCounter = 0;
|
||||
|
||||
Forward = false;
|
||||
Backward = false;
|
||||
|
@ -346,6 +347,7 @@ SYNCFUNC(PS_CDC)
|
|||
NSS(AsyncResultsPendingCount);
|
||||
|
||||
NSS(SeekTarget);
|
||||
NSS(SeekRetryCounter);
|
||||
|
||||
// FIXME: Save TOC stuff?
|
||||
#if 0
|
||||
|
@ -448,7 +450,6 @@ uint8 PS_CDC::MakeStatus(bool cmd_error)
|
|||
else if(DriveStatus == DS_SEEKING || DriveStatus == DS_SEEKING_LOGICAL)
|
||||
ret |= 0x40;
|
||||
|
||||
// TODO: shell open and seek error
|
||||
if(Status_TrayOpenBit)
|
||||
ret |= 0x10;
|
||||
|
||||
|
@ -458,6 +459,9 @@ uint8 PS_CDC::MakeStatus(bool cmd_error)
|
|||
if(cmd_error)
|
||||
ret |= 0x01;
|
||||
|
||||
//DiscChanged = false; // FIXME: Only do it on NOP command execution? //comment added with 0.9.38.5 - code removed by octoshock at some unknown point
|
||||
//maybe a good point for looking at disc swap related bugs
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
@ -1178,12 +1182,27 @@ pscpu_timestamp_t PS_CDC::Update(const pscpu_timestamp_t timestamp)
|
|||
Cur_disc->ReadLBA_PW(pwbuf, CurSector, false);
|
||||
DecodeSubQ(pwbuf);
|
||||
|
||||
DriveStatus = StatusAfterSeek;
|
||||
|
||||
if(DriveStatus != DS_PAUSED && DriveStatus != DS_STANDBY)
|
||||
if(!(Mode & MODE_CDDA) && !(SubQBuf_Safe[0] & 0x40))
|
||||
{
|
||||
// TODO: SetAIP(CDCIRQ_DISC_ERROR, MakeStatus() | 0x04, 0x04); when !(Mode & MODE_CDDA) and the sector isn't a data sector.
|
||||
PSRCounter = 33868800 / (75 * ((Mode & MODE_SPEED) ? 2 : 1));
|
||||
if(!SeekRetryCounter)
|
||||
{
|
||||
DriveStatus = DS_STANDBY;
|
||||
SetAIP(CDCIRQ_DISC_ERROR, MakeStatus() | 0x04, 0x04);
|
||||
}
|
||||
else
|
||||
{
|
||||
SeekRetryCounter--;
|
||||
PSRCounter = 33868800 / 75;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DriveStatus = StatusAfterSeek;
|
||||
|
||||
if(DriveStatus != DS_PAUSED && DriveStatus != DS_STANDBY)
|
||||
{
|
||||
PSRCounter = 33868800 / (75 * ((Mode & MODE_SPEED) ? 2 : 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(DriveStatus == DS_READING || DriveStatus == DS_PLAYING)
|
||||
|
@ -1673,6 +1692,7 @@ void PS_CDC::PreSeekHack(int32 target)
|
|||
int max_try = 32;
|
||||
|
||||
CurSector = target; // If removing/changing this, take into account how it will affect ReadN/ReadS/Play/etc command calls that interrupt a seek.
|
||||
SeekRetryCounter = 128;
|
||||
|
||||
// If removing this SubQ reading bit, think about how it will interact with a Read command of data(or audio :b) sectors when Mode bit0 is 1.
|
||||
do
|
||||
|
@ -1791,6 +1811,15 @@ void PS_CDC::ReadBase(void)
|
|||
if(!CommandCheckDiscPresent())
|
||||
return;
|
||||
|
||||
if(!IsPSXDisc)
|
||||
{
|
||||
WriteResult(MakeStatus(true));
|
||||
WriteResult(ERRCODE_BAD_COMMAND);
|
||||
|
||||
WriteIRQ(CDCIRQ_DISC_ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
WriteResult(MakeStatus());
|
||||
WriteIRQ(CDCIRQ_ACKNOWLEDGE);
|
||||
|
||||
|
|
|
@ -198,6 +198,7 @@ class PS_CDC
|
|||
void SetAIP(unsigned irq, uint8 result0, uint8 result1);
|
||||
|
||||
int32 SeekTarget;
|
||||
uint32 SeekRetryCounter;
|
||||
|
||||
pscpu_timestamp_t lastts;
|
||||
|
||||
|
|
|
@ -734,7 +734,7 @@ void PS_GPU::ProcessFIFO(void)
|
|||
break;
|
||||
|
||||
case INCMD_FBREAD:
|
||||
puts("BOGUS SALAMANDERS, CAPTAIN!");
|
||||
PSX_WARNING("[GPU] Command FIFO not empty while in FB Read?!");
|
||||
return;
|
||||
|
||||
case INCMD_FBWRITE:
|
||||
|
|
|
@ -267,7 +267,7 @@ void InputDevice_Memcard::SetDTR(bool new_dtr)
|
|||
else if(dtr && !new_dtr)
|
||||
{
|
||||
if(command_phase > 0)
|
||||
PSX_WARNING("[MCR] Communication aborted???");
|
||||
PSX_WARNING("[MCR] Communication aborted on phase %d", command_phase);
|
||||
}
|
||||
dtr = new_dtr;
|
||||
}
|
||||
|
@ -379,7 +379,7 @@ bool InputDevice_Memcard::Clock(bool TxD, int32 &dsr_pulse_delay)
|
|||
}
|
||||
else if(command_phase == 1002)
|
||||
{
|
||||
//printf("[MCR] READ ADDR=0x%04x\n", addr);
|
||||
PSX_DBG(PSX_DBG_SPARSE, "[MCR] Read Command: 0x%04x\n", addr);
|
||||
if(addr >= (sizeof(card_data) >> 7))
|
||||
addr = 0xFFFF;
|
||||
|
||||
|
@ -454,7 +454,7 @@ bool InputDevice_Memcard::Clock(bool TxD, int32 &dsr_pulse_delay)
|
|||
{
|
||||
calced_xor ^= receive_buffer;
|
||||
addr |= receive_buffer & 0xFF;
|
||||
//printf("[MCR] WRITE ADDR=0x%04x\n", addr);
|
||||
PSX_DBG(PSX_DBG_SPARSE, "[MCR] Write command: 0x%04x\n", addr);
|
||||
transmit_buffer = receive_buffer;
|
||||
transmit_count = 1;
|
||||
command_phase = 2048;
|
||||
|
@ -487,9 +487,15 @@ bool InputDevice_Memcard::Clock(bool TxD, int32 &dsr_pulse_delay)
|
|||
//printf("[MCR] Write End. Actual_XOR=0x%02x, CW_XOR=0x%02x\n", calced_xor, write_xor);
|
||||
|
||||
if(calced_xor != write_xor)
|
||||
{
|
||||
transmit_buffer = 'N';
|
||||
PSX_WARNING("[MCR] Write end, calced_xor(0x%02x) != written_xor(0x%02x)", calced_xor, write_xor);
|
||||
}
|
||||
else if(addr >= (sizeof(card_data) >> 7))
|
||||
{
|
||||
transmit_buffer = 0xFF;
|
||||
PSX_WARNING("[MCR] Attempt to write to invalid block 0x%04x", addr);
|
||||
}
|
||||
else
|
||||
{
|
||||
transmit_buffer = 'G';
|
||||
|
|
Loading…
Reference in New Issue