Silence a stupid compiler warning, fix the layer1 detection code, and remove the hack I added before, as it does no good.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1527 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gigaherz 2009-07-16 00:04:22 +00:00
parent 258dc05529
commit c2e49ba245
3 changed files with 11 additions and 14 deletions

View File

@ -1356,14 +1356,6 @@ static void cdvdWrite16(u8 rt) // SCOMMAND
cdvd.Result[5] = 0x30;//min
break;
case 0x80: // completely stupid code, but might even work... whatever it is menat to be for :P
SetResultSize(1);
if((CDVD.getDiskType()==CDVD_TYPE_NODISC)||(CDVD.getTrayStatus()==CDVD_TRAY_OPEN))
cdvd.Result[0] = 0x80;
else
cdvd.Result[0] = 0x00;
break;
default:
SetResultSize(1);
cdvd.Result[0] = 0x80;

View File

@ -183,18 +183,23 @@ static void FindLayer1Start()
{
// search for it
int off = iso->blockofs;
u8* tempbuffer;
u8 tempbuffer[2352];
Console::Status("CDVD ISO: searching for layer1...");
tempbuffer = (u8*)malloc(CD_FRAMESIZE_RAW);
//tempbuffer = (u8*)malloc(CD_FRAMESIZE_RAW);
for (layer1start = (iso->blocks / 2 - 0x10) & ~0xf; layer1start < 0x200010; layer1start += 16)
{
isoReadBlock(iso, tempbuffer, layer1start);
isoReadBlock(iso, tempbuffer+off, layer1start);
// CD001
if (tempbuffer[off+1] == 0x43 && tempbuffer[off+2] == 0x44 && tempbuffer[off+3] == 0x30 && tempbuffer[off+4] == 0x30 && tempbuffer[off+5] == 0x31)
if ((tempbuffer[off+1] == 0x43) &&
(tempbuffer[off+2] == 0x44) &&
(tempbuffer[off+3] == 0x30) &&
(tempbuffer[off+4] == 0x30) &&
(tempbuffer[off+5] == 0x31)
)
break;
}
free(tempbuffer);
//free(tempbuffer);
if(layer1start == 0x200010)
{

View File

@ -178,7 +178,7 @@ static __forceinline void memzero_ptr( void *dest )
enum
{
remdat = bytes>>2
remdat = (bytes>>2)
};
// This case statement handles 5 special-case sizes (small blocks)