imgread: use new logging
This commit is contained in:
parent
35cd1fcf14
commit
b388fa4377
|
@ -307,7 +307,7 @@ u32 GetFAD(u8* data, bool msf)
|
|||
{
|
||||
if(msf)
|
||||
{
|
||||
printf("GDROM: MSF FORMAT");
|
||||
INFO_LOG(GDROM, "GDROM: MSF FORMAT");
|
||||
return ((data[0]*60*75) + (data[1]*75) + (data[2]));
|
||||
}
|
||||
else
|
||||
|
@ -399,8 +399,7 @@ void gd_process_ata_cmd()
|
|||
break;
|
||||
|
||||
case ATA_EXEC_DIAG:
|
||||
printf_ata("ATA_EXEC_DIAG");
|
||||
printf("ATA_EXEC_DIAG -- not implemented");
|
||||
printf_ata("ATA_EXEC_DIAG -- not implemented");
|
||||
break;
|
||||
|
||||
case ATA_SPI_PACKET:
|
||||
|
@ -475,7 +474,7 @@ void gd_process_spi_cmd()
|
|||
if (readcmd.head ==1 && readcmd.subh==1 && readcmd.data==1 && readcmd.expdtype==3 && readcmd.other==0)
|
||||
sector_type=2340;
|
||||
else if(readcmd.head ||readcmd.subh || readcmd.other || (!readcmd.data)) // assert
|
||||
printf("GDROM: *FIXME* ADD MORE CD READ SETTINGS %d %d %d %d 0x%01X",readcmd.head,readcmd.subh,readcmd.other,readcmd.data,readcmd.expdtype);
|
||||
WARN_LOG(GDROM, "GDROM: *FIXME* ADD MORE CD READ SETTINGS %d %d %d %d 0x%01X",readcmd.head,readcmd.subh,readcmd.other,readcmd.data,readcmd.expdtype);
|
||||
|
||||
u32 start_sector = GetFAD(&readcmd.b[2],readcmd.prmtype);
|
||||
u32 sector_count = (readcmd.b[8]<<16) | (readcmd.b[9]<<8) | (readcmd.b[10]);
|
||||
|
@ -554,8 +553,7 @@ void gd_process_spi_cmd()
|
|||
break;
|
||||
|
||||
case SPI_CD_READ2:
|
||||
printf_spicmd("SPI_CD_READ2");
|
||||
printf("GDROM: Unhandled Sega SPI frame: SPI_CD_READ2");
|
||||
printf_spicmd("SPI_CD_READ2 Unhandled");
|
||||
|
||||
gd_set_state(gds_procpacketdone);
|
||||
break;
|
||||
|
@ -564,7 +562,6 @@ void gd_process_spi_cmd()
|
|||
case SPI_REQ_STAT:
|
||||
{
|
||||
printf_spicmd("SPI_REQ_STAT");
|
||||
//printf("GDROM: Unhandled Sega SPI frame: SPI_REQ_STAT\n");
|
||||
u8 stat[10];
|
||||
|
||||
//0 0 0 0 0 STATUS
|
||||
|
@ -596,7 +593,6 @@ void gd_process_spi_cmd()
|
|||
|
||||
case SPI_REQ_ERROR:
|
||||
printf_spicmd("SPI_REQ_ERROR");
|
||||
//printf("GDROM: Unhandled Sega SPI frame: SPI_REQ_ERROR\n");
|
||||
|
||||
u8 resp[10];
|
||||
resp[0]=0xF0;
|
||||
|
@ -624,9 +620,7 @@ void gd_process_spi_cmd()
|
|||
break;
|
||||
|
||||
case SPI_CD_OPEN:
|
||||
printf_spicmd("SPI_CD_OPEN");
|
||||
printf("GDROM: Unhandled Sega SPI frame: SPI_CD_OPEN\n");
|
||||
|
||||
printf_spicmd("SPI_CD_OPEN Unhandled");
|
||||
|
||||
gd_set_state(gds_procpacketdone);
|
||||
break;
|
||||
|
@ -634,14 +628,13 @@ void gd_process_spi_cmd()
|
|||
case SPI_CD_PLAY:
|
||||
{
|
||||
printf_spicmd("SPI_CD_PLAY");
|
||||
printf("GDROM: Unhandled Sega SPI frame: SPI_CD_PLAY\n");
|
||||
//cdda.CurrAddr.FAD=60000;
|
||||
|
||||
cdda.playing=true;
|
||||
SecNumber.Status=GD_PLAY;
|
||||
|
||||
u32 param_type=packet_cmd.data_8[1]&0x7;
|
||||
printf("param_type=%d\n",param_type);
|
||||
DEBUG_LOG(GDROM, "param_type=%d", param_type);
|
||||
if (param_type==1)
|
||||
{
|
||||
cdda.StartAddr.FAD=cdda.CurrAddr.FAD=GetFAD(&packet_cmd.data_8[2],0);
|
||||
|
@ -663,11 +656,11 @@ void gd_process_spi_cmd()
|
|||
die("SPI_CD_SEEK : not known parameter..");
|
||||
}
|
||||
cdda.repeats=packet_cmd.data_8[6]&0xF;
|
||||
printf("cdda.StartAddr=%d\n",cdda.StartAddr.FAD);
|
||||
printf("cdda.EndAddr=%d\n",cdda.EndAddr.FAD);
|
||||
printf("cdda.repeats=%d\n",cdda.repeats);
|
||||
printf("cdda.playing=%d\n",cdda.playing);
|
||||
printf("cdda.CurrAddr=%d\n",cdda.CurrAddr.FAD);
|
||||
DEBUG_LOG(GDROM, "cdda.StartAddr=%d",cdda.StartAddr.FAD);
|
||||
DEBUG_LOG(GDROM, "cdda.EndAddr=%d",cdda.EndAddr.FAD);
|
||||
DEBUG_LOG(GDROM, "cdda.repeats=%d",cdda.repeats);
|
||||
DEBUG_LOG(GDROM, "cdda.playing=%d",cdda.playing);
|
||||
DEBUG_LOG(GDROM, "cdda.CurrAddr=%d",cdda.CurrAddr.FAD);
|
||||
|
||||
gd_set_state(gds_procpacketdone);
|
||||
}
|
||||
|
@ -676,13 +669,12 @@ void gd_process_spi_cmd()
|
|||
case SPI_CD_SEEK:
|
||||
{
|
||||
printf_spicmd("SPI_CD_SEEK");
|
||||
printf("GDROM: Unhandled Sega SPI frame: SPI_CD_SEEK\n");
|
||||
|
||||
SecNumber.Status=GD_PAUSE;
|
||||
cdda.playing=false;
|
||||
|
||||
u32 param_type=packet_cmd.data_8[1]&0x7;
|
||||
printf("param_type=%d\n",param_type);
|
||||
DEBUG_LOG(GDROM, "param_type=%d",param_type);
|
||||
if (param_type==1)
|
||||
{
|
||||
cdda.StartAddr.FAD=cdda.CurrAddr.FAD=GetFAD(&packet_cmd.data_8[2],0);
|
||||
|
@ -709,11 +701,11 @@ void gd_process_spi_cmd()
|
|||
die("SPI_CD_SEEK : not known parameter..");
|
||||
}
|
||||
|
||||
printf("cdda.StartAddr=%d\n",cdda.StartAddr.FAD);
|
||||
printf("cdda.EndAddr=%d\n",cdda.EndAddr.FAD);
|
||||
printf("cdda.repeats=%d\n",cdda.repeats);
|
||||
printf("cdda.playing=%d\n",cdda.playing);
|
||||
printf("cdda.CurrAddr=%d\n",cdda.CurrAddr.FAD);
|
||||
DEBUG_LOG(GDROM, "cdda.StartAddr=%d",cdda.StartAddr.FAD);
|
||||
DEBUG_LOG(GDROM, "cdda.EndAddr=%d",cdda.EndAddr.FAD);
|
||||
DEBUG_LOG(GDROM, "cdda.repeats=%d",cdda.repeats);
|
||||
DEBUG_LOG(GDROM, "cdda.playing=%d",cdda.playing);
|
||||
DEBUG_LOG(GDROM, "cdda.CurrAddr=%d",cdda.CurrAddr.FAD);
|
||||
|
||||
|
||||
gd_set_state(gds_procpacketdone);
|
||||
|
@ -721,8 +713,7 @@ void gd_process_spi_cmd()
|
|||
break;
|
||||
|
||||
case SPI_CD_SCAN:
|
||||
printf_spicmd("SPI_CD_SCAN");
|
||||
printf("GDROM: Unhandled Sega SPI frame: SPI_CD_SCAN\n");
|
||||
printf_spicmd("SPI_CD_SCAN Unhandled");
|
||||
|
||||
|
||||
gd_set_state(gds_procpacketdone);
|
||||
|
@ -731,7 +722,6 @@ void gd_process_spi_cmd()
|
|||
case SPI_GET_SCD:
|
||||
{
|
||||
printf_spicmd("SPI_GET_SCD");
|
||||
//printf("\nGDROM:\tUnhandled Sega SPI frame: SPI_GET_SCD\n");
|
||||
|
||||
u32 format;
|
||||
format=packet_cmd.data_8[1]&0xF;
|
||||
|
@ -810,7 +800,7 @@ void gd_process_spi_cmd()
|
|||
break;
|
||||
|
||||
default:
|
||||
printf("GDROM: Unhandled Sega SPI frame: %X\n", packet_cmd.data_8[0]);
|
||||
INFO_LOG(GDROM, "GDROM: Unhandled Sega SPI frame: %X", packet_cmd.data_8[0]);
|
||||
|
||||
gd_set_state(gds_procpacketdone);
|
||||
break;
|
||||
|
@ -841,13 +831,13 @@ u32 ReadMem_gdrom(u32 Addr, u32 sz)
|
|||
|
||||
case GD_DATA:
|
||||
if(2!=sz)
|
||||
printf("GDROM: Bad size on DATA REG Read\n");
|
||||
INFO_LOG(GDROM, "GDROM: Bad size on DATA REG Read");
|
||||
|
||||
//if (gd_state == gds_pio_send_data)
|
||||
//{
|
||||
if (pio_buff.index == pio_buff.size)
|
||||
{
|
||||
printf("GDROM: Illegal Read From DATA (underflow)\n");
|
||||
INFO_LOG(GDROM, "GDROM: Illegal Read From DATA (underflow)");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -887,7 +877,7 @@ u32 ReadMem_gdrom(u32 Addr, u32 sz)
|
|||
return SecNumber.full;
|
||||
|
||||
default:
|
||||
printf("GDROM: Unhandled read from address %X, Size:%X",Addr,sz);
|
||||
INFO_LOG(GDROM, "GDROM: Unhandled read from address %X, Size:%X",Addr,sz);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -910,7 +900,7 @@ void WriteMem_gdrom(u32 Addr, u32 data, u32 sz)
|
|||
case GD_DATA:
|
||||
{
|
||||
if(2!=sz)
|
||||
printf("GDROM: Bad size on DATA REG\n");
|
||||
INFO_LOG(GDROM, "GDROM: Bad size on DATA REG");
|
||||
if (gd_state == gds_waitpacket)
|
||||
{
|
||||
packet_cmd.data_16[packet_cmd.index]=(u16)data;
|
||||
|
@ -930,18 +920,18 @@ void WriteMem_gdrom(u32 Addr, u32 data, u32 sz)
|
|||
}
|
||||
else
|
||||
{
|
||||
printf("GDROM: Illegal Write to DATA\n");
|
||||
INFO_LOG(GDROM, "GDROM: Illegal Write to DATA");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
case GD_DEVCTRL_Write:
|
||||
printf("GDROM: Write GD_DEVCTRL (Not implemented on Dreamcast)\n");
|
||||
INFO_LOG(GDROM, "GDROM: Write GD_DEVCTRL (Not implemented on Dreamcast)");
|
||||
break;
|
||||
|
||||
case GD_DRVSEL:
|
||||
if (data != 0) {
|
||||
printf("GDROM: Write to GD_DRVSEL, !=0. Value is: %02X\n", data);
|
||||
INFO_LOG(GDROM, "GDROM: Write to GD_DRVSEL, !=0. Value is: %02X", data);
|
||||
}
|
||||
DriveSel = data;
|
||||
break;
|
||||
|
@ -956,12 +946,12 @@ void WriteMem_gdrom(u32 Addr, u32 data, u32 sz)
|
|||
break;
|
||||
|
||||
case GD_SECTCNT_Write:
|
||||
printf("GDROM: Write to SecCount = %X", data);
|
||||
DEBUG_LOG(GDROM, "GDROM: Write to SecCount = %X", data);
|
||||
SecCount.full =(u8) data;
|
||||
break;
|
||||
|
||||
case GD_SECTNUM:
|
||||
printf("GDROM: Write to SecNum; not possible = %X", data);
|
||||
INFO_LOG(GDROM, "GDROM: Write to SecNum; not possible = %X", data);
|
||||
break;
|
||||
|
||||
case GD_COMMAND_Write:
|
||||
|
@ -974,7 +964,7 @@ void WriteMem_gdrom(u32 Addr, u32 data, u32 sz)
|
|||
break;
|
||||
|
||||
default:
|
||||
printf("\nGDROM:\tUnhandled write to address %X <= %X, Size:%X",Addr,data,sz);
|
||||
INFO_LOG(GDROM, "GDROM: Unhandled write to address %X <= %X, Size:%X",Addr,data,sz);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1025,13 +1015,13 @@ int GDRomschd(int i, int c, int j)
|
|||
// do we need to do this for GDROM DMA?
|
||||
if(0x8201 != (dmaor &DMAOR_MASK))
|
||||
{
|
||||
printf("\n!\tGDROM: DMAOR has invalid settings (%X) !\n", dmaor);
|
||||
INFO_LOG(GDROM, "GDROM: DMAOR has invalid settings (%X)", dmaor);
|
||||
//return;
|
||||
}
|
||||
|
||||
if(len == 0)
|
||||
{
|
||||
printf("\n!\tGDROM: Len: %X, Abnormal Termination !\n", len);
|
||||
INFO_LOG(GDROM, "GDROM: Len: %X, Abnormal Termination !", len);
|
||||
}
|
||||
|
||||
u32 len_backup = len;
|
||||
|
@ -1061,7 +1051,7 @@ int GDRomschd(int i, int c, int j)
|
|||
}
|
||||
else
|
||||
{
|
||||
msgboxf("GDROM: SB_GDDIR %X (TO AICA WAVE MEM?)", MBX_ICONERROR, SB_GDDIR);
|
||||
WARN_LOG(GDROM, "GDROM: SB_GDDIR %X (TO AICA WAVE MEM?)", src);
|
||||
}
|
||||
|
||||
//SB_GDLEN = 0x00000000; //13/5/2k7 -> according to docs these regs are not updated by hardware
|
||||
|
@ -1096,7 +1086,7 @@ void GDROM_DmaStart(u32 addr, u32 data)
|
|||
{
|
||||
if (SB_GDEN==0)
|
||||
{
|
||||
printf("Invalid GD-DMA start, SB_GDEN=0.Ingoring it.\n");
|
||||
INFO_LOG(GDROM, "Invalid GD-DMA start, SB_GDEN=0.Ingoring it.");
|
||||
return;
|
||||
}
|
||||
SB_GDST|=data&1;
|
||||
|
@ -1105,7 +1095,7 @@ void GDROM_DmaStart(u32 addr, u32 data)
|
|||
{
|
||||
SB_GDSTARD=SB_GDSTAR;
|
||||
SB_GDLEND=0;
|
||||
//printf("GDROM-DMA start addr %08X len %d\n", SB_GDSTAR, SB_GDLEN);
|
||||
DEBUG_LOG(GDROM, "GDROM-DMA start addr %08X len %d", SB_GDSTAR, SB_GDLEN);
|
||||
|
||||
int ticks = getGDROMTicks();
|
||||
if (ticks < 448) // FIXME #define
|
||||
|
|
|
@ -43,7 +43,7 @@ Disc* cdi_parse(const wchar* file)
|
|||
//printf("\nSession %d has %d track(s)\n",image.global_current_session,image.tracks);
|
||||
|
||||
if (image.tracks == 0)
|
||||
printf("Open session\n");
|
||||
INFO_LOG(GDROM, "Open session");
|
||||
else
|
||||
{
|
||||
// Clear cuesheet
|
||||
|
@ -111,14 +111,13 @@ Disc* cdi_parse(const wchar* file)
|
|||
// if (track.pregap_length != 150) printf("Warning! This track seems to have a non-standard pregap...\n");
|
||||
|
||||
if (track.length < 0)
|
||||
printf( "Negative track size found\n"
|
||||
"You must extract image with /pregap option");
|
||||
WARN_LOG(GDROM, "Negative track size found. You must extract image with /pregap option");
|
||||
|
||||
//if (!opts.showinfo)
|
||||
{
|
||||
if (track.total_length < track.length + track.pregap_length)
|
||||
{
|
||||
printf("\nThis track seems truncated. Skipping...\n");
|
||||
WARN_LOG(GDROM, "This track seems truncated. Skipping...");
|
||||
core_fseek(fsource, track.position, SEEK_SET);
|
||||
core_fseek(fsource, track.total_length, SEEK_CUR);
|
||||
track.position = core_ftell(fsource);
|
||||
|
|
|
@ -85,11 +85,11 @@ bool CHDDisc::TryOpen(const wchar* file)
|
|||
|
||||
if (err!=CHDERR_NONE)
|
||||
{
|
||||
printf("chd: chd_open failed for file %s: %d\n", file, err);
|
||||
INFO_LOG(GDROM, "chd: chd_open failed for file %s: %d", file, err);
|
||||
return false;
|
||||
}
|
||||
|
||||
printf("chd: parsing file %s\n",file);
|
||||
INFO_LOG(GDROM, "chd: parsing file %s", file);
|
||||
|
||||
const chd_header* head = chd_get_header(chd);
|
||||
|
||||
|
@ -101,7 +101,7 @@ bool CHDDisc::TryOpen(const wchar* file)
|
|||
|
||||
if (hunkbytes%(2352+96)!=0)
|
||||
{
|
||||
printf("chd: hunkbytes is invalid, %d\n",hunkbytes);
|
||||
INFO_LOG(GDROM, "chd: hunkbytes is invalid, %d\n",hunkbytes);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -149,10 +149,10 @@ bool CHDDisc::TryOpen(const wchar* file)
|
|||
|
||||
if (tkid!=(tracks.size()+1) || (strcmp(type,"MODE1_RAW")!=0 && strcmp(type,"AUDIO")!=0 && strcmp(type,"MODE1")!=0) || strcmp(subtype,"NONE")!=0 || pregap!=0 || postgap!=0)
|
||||
{
|
||||
printf("chd: track type %s is not supported\n",type);
|
||||
INFO_LOG(GDROM, "chd: track type %s is not supported", type);
|
||||
return false;
|
||||
}
|
||||
printf("%s\n",temp);
|
||||
DEBUG_LOG(GDROM, "%s", temp);
|
||||
Track t;
|
||||
t.StartFAD = total_frames;
|
||||
total_frames += frames;
|
||||
|
@ -173,7 +173,7 @@ bool CHDDisc::TryOpen(const wchar* file)
|
|||
|
||||
if (total_frames!=549300 || tracks.size()<3)
|
||||
{
|
||||
printf("WARNING: chd: Total frames is wrong: %u frames in %u tracks\n",total_frames,tracks.size());
|
||||
WARN_LOG(GDROM, "WARNING: chd: Total frames is wrong: %u frames in %zu tracks", total_frames, tracks.size());
|
||||
#ifndef NOT_REICAST
|
||||
msgboxf("This is an improper dump!",MBX_ICONEXCLAMATION);
|
||||
#endif
|
||||
|
|
|
@ -38,7 +38,7 @@ void PatchRegion_0(u8* sector,int size)
|
|||
|
||||
if (size!=2048)
|
||||
{
|
||||
printf("PatchRegion_0 -> sector size %d , skipping patch\n",size);
|
||||
INFO_LOG(GDROM, "PatchRegion_0 -> sector size %d , skipping patch", size);
|
||||
}
|
||||
|
||||
//patch meta info
|
||||
|
@ -58,7 +58,7 @@ void PatchRegion_6(u8* sector,int size)
|
|||
|
||||
if (size!=2048)
|
||||
{
|
||||
printf("PatchRegion_6 -> sector size %d , skipping patch\n",size);
|
||||
INFO_LOG(GDROM, "PatchRegion_6 -> sector size %d , skipping patch", size);
|
||||
}
|
||||
|
||||
//patch area symbols
|
||||
|
@ -124,7 +124,7 @@ bool ConvertSector(u8* in_buff , u8* out_buff , int from , int to,int sector)
|
|||
}
|
||||
break;
|
||||
default :
|
||||
printf("Sector conversion from %d to %d not supported \n", from , to);
|
||||
INFO_LOG(GDROM, "Sector conversion from %d to %d not supported \n", from , to);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -139,9 +139,9 @@ Disc* OpenDisc(const wchar* fn)
|
|||
rv = drivers[i](fn);
|
||||
|
||||
if (rv && cdi_parse == drivers[i]) {
|
||||
const wchar warn_str[] = "Warning: CDI Image Loaded!\n Many CDI images are known to be defective, GDI, CUE or CHD format is preferred. "
|
||||
const wchar warn_str[] = "Warning: CDI Image Loaded! Many CDI images are known to be defective, GDI, CUE or CHD format is preferred. "
|
||||
"Please only file bug reports when using images known to be good (GDI, CUE or CHD).";
|
||||
printf("%s\n", warn_str);
|
||||
WARN_LOG(GDROM, "%s", warn_str);
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ bool InitDrive_(wchar* fn)
|
|||
|
||||
if (disc!=0)
|
||||
{
|
||||
printf("gdrom: Opened image \"%s\"\n",fn);
|
||||
INFO_LOG(GDROM, "gdrom: Opened image \"%s\"", fn);
|
||||
NullDriveDiscType=Busy;
|
||||
#ifndef NOT_REICAST
|
||||
libCore_gdrom_disc_change();
|
||||
|
@ -169,7 +169,7 @@ bool InitDrive_(wchar* fn)
|
|||
}
|
||||
else
|
||||
{
|
||||
printf("gdrom: Failed to open image \"%s\"\n",fn);
|
||||
INFO_LOG(GDROM, "gdrom: Failed to open image \"%s\"", fn);
|
||||
NullDriveDiscType=NoDisk; //no disc :)
|
||||
}
|
||||
return false;
|
||||
|
@ -180,7 +180,7 @@ bool InitDrive(u32 fileflags)
|
|||
{
|
||||
if (settings.imgread.LoadDefaultImage)
|
||||
{
|
||||
printf("Loading default image \"%s\"\n",settings.imgread.DefaultImage);
|
||||
INFO_LOG(GDROM, "Loading default image \"%s\"", settings.imgread.DefaultImage);
|
||||
if (!InitDrive_(settings.imgread.DefaultImage))
|
||||
{
|
||||
msgboxf("Default image \"%s\" failed to load",MBX_ICONERROR,settings.imgread.DefaultImage);
|
||||
|
@ -244,7 +244,7 @@ bool DiscSwap(u32 fileflags)
|
|||
sns_key = 0x6;
|
||||
if (settings.imgread.LoadDefaultImage)
|
||||
{
|
||||
printf("Loading default image \"%s\"\n",settings.imgread.DefaultImage);
|
||||
INFO_LOG(GDROM, "Loading default image \"%s\"", settings.imgread.DefaultImage);
|
||||
if (!InitDrive_(settings.imgread.DefaultImage))
|
||||
{
|
||||
msgboxf("Default image \"%s\" failed to load",MBX_ICONERROR,settings.imgread.DefaultImage);
|
||||
|
@ -409,19 +409,19 @@ void GetDriveSessionInfo(u8* to,u8 session)
|
|||
|
||||
void printtoc(TocInfo* toc,SessionInfo* ses)
|
||||
{
|
||||
printf("Sessions %d\n",ses->SessionCount);
|
||||
INFO_LOG(GDROM, "Sessions %d", ses->SessionCount);
|
||||
for (u32 i=0;i<ses->SessionCount;i++)
|
||||
{
|
||||
printf("Session %d: FAD %d,First Track %d\n",i+1,ses->SessionFAD[i],ses->SessionStart[i]);
|
||||
INFO_LOG(GDROM, "Session %d: FAD %d,First Track %d", i + 1, ses->SessionFAD[i], ses->SessionStart[i]);
|
||||
for (u32 t=toc->FistTrack-1;t<=toc->LastTrack;t++)
|
||||
{
|
||||
if (toc->tracks[t].Session==i+1)
|
||||
{
|
||||
printf("\tTrack %d : FAD %d CTRL %d ADR %d\n",t,toc->tracks[t].FAD,toc->tracks[t].Control,toc->tracks[t].Addr);
|
||||
INFO_LOG(GDROM, " Track %d : FAD %d CTRL %d ADR %d", t, toc->tracks[t].FAD, toc->tracks[t].Control, toc->tracks[t].Addr);
|
||||
}
|
||||
}
|
||||
}
|
||||
printf("Session END: FAD END %d\n",ses->SessionsEndFAD);
|
||||
INFO_LOG(GDROM, "Session END: FAD END %d", ses->SessionsEndFAD);
|
||||
}
|
||||
|
||||
DiscType GuessDiscType(bool m1, bool m2, bool da)
|
||||
|
|
|
@ -190,7 +190,7 @@ struct Disc
|
|||
}
|
||||
else if (fmt==2352 && (secfmt==SECFMT_2048_MODE1 || secfmt==SECFMT_2048_MODE2_FORM1 ))
|
||||
{
|
||||
printf("GDR:fmt=2352;secfmt=2048\n");
|
||||
INFO_LOG(GDROM, "GDR:fmt=2352;secfmt=2048");
|
||||
memcpy(dst,temp,2048);
|
||||
}
|
||||
else if (fmt==2048 && secfmt==SECFMT_2448_MODE2)
|
||||
|
@ -200,13 +200,13 @@ struct Disc
|
|||
}
|
||||
else
|
||||
{
|
||||
printf("ERROR: UNABLE TO CONVERT SECTOR. THIS IS FATAL. Format: %d Sector format: %d\n", fmt, secfmt);
|
||||
WARN_LOG(GDROM, "ERROR: UNABLE TO CONVERT SECTOR. THIS IS FATAL. Format: %d Sector format: %d", fmt, secfmt);
|
||||
//verify(false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Sector Read miss FAD: %d\n", FAD);
|
||||
INFO_LOG(GDROM, "Sector Read miss FAD: %d", FAD);
|
||||
}
|
||||
dst+=fmt;
|
||||
FAD++;
|
||||
|
|
|
@ -60,7 +60,7 @@ Disc* cue_parse(const wchar* file)
|
|||
|
||||
if (cue_len >= sizeof(cue_data))
|
||||
{
|
||||
printf("CUE parse error: CUE file too big\n");
|
||||
WARN_LOG(GDROM, "CUE parse error: CUE file too big");
|
||||
core_fclose(fsource);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -90,10 +90,10 @@ Disc* cue_parse(const wchar* file)
|
|||
current_fad = 45000 + 150;
|
||||
}
|
||||
else if (token != "SINGLE-DENSITY")
|
||||
printf("CUE parse error: unrecognized REM token %s. Expected SINGLE-DENSITY or HIGH-DENSITY\n", token.c_str());
|
||||
WARN_LOG(GDROM, "CUE parse error: unrecognized REM token %s. Expected SINGLE-DENSITY or HIGH-DENSITY", token.c_str());
|
||||
cuesheet >> token;
|
||||
if (token != "AREA")
|
||||
printf("CUE parse error: unrecognized REM token %s. Expected AREA\n", token.c_str());
|
||||
WARN_LOG(GDROM, "CUE parse error: unrecognized REM token %s. Expected AREA", token.c_str());
|
||||
}
|
||||
else if (token == "FILE")
|
||||
{
|
||||
|
@ -121,7 +121,7 @@ Disc* cue_parse(const wchar* file)
|
|||
}
|
||||
cuesheet >> token; // BINARY
|
||||
if (token != "BINARY")
|
||||
printf("CUE parse error: unrecognized FILE token %s. Expected BINARY\n", token.c_str());
|
||||
WARN_LOG(GDROM, "CUE parse error: unrecognized FILE token %s. Expected BINARY", token.c_str());
|
||||
}
|
||||
else if (token == "TRACK")
|
||||
{
|
||||
|
@ -142,17 +142,17 @@ Disc* cue_parse(const wchar* file)
|
|||
core_file* track_file = core_fopen(path.c_str());
|
||||
if (track_file == NULL)
|
||||
{
|
||||
printf("CUE file: cannot open track %d: %s\n", track_number, path.c_str());
|
||||
WARN_LOG(GDROM, "CUE file: cannot open track %d: %s", track_number, path.c_str());
|
||||
return NULL;
|
||||
}
|
||||
u32 sector_size = getSectorSize(track_type);
|
||||
if (sector_size == 0)
|
||||
{
|
||||
printf("CUE file: track %d has unknown sector type: %s\n", track_number, track_type.c_str());
|
||||
WARN_LOG(GDROM, "CUE file: track %d has unknown sector type: %s", track_number, track_type.c_str());
|
||||
return NULL;
|
||||
}
|
||||
if (core_fsize(track_file) % sector_size != 0)
|
||||
printf("Warning: Size of track %s is not multiple of sector size %d\n", track_filename.c_str(), sector_size);
|
||||
WARN_LOG(GDROM, "Warning: Size of track %s is not multiple of sector size %d", track_filename.c_str(), sector_size);
|
||||
current_fad = t.StartFAD + (u32)core_fsize(track_file) / sector_size;
|
||||
|
||||
//printf("file[%lu] \"%s\": StartFAD:%d, sector_size:%d file_size:%d\n", disc->tracks.size(),
|
||||
|
|
|
@ -87,7 +87,7 @@ Disc* load_gdi(const char* file)
|
|||
istringstream gdi(gdi_data);
|
||||
|
||||
gdi >> iso_tc;
|
||||
printf("\nGDI : %d tracks\n",iso_tc);
|
||||
INFO_LOG(GDROM, "GDI : %d tracks", iso_tc);
|
||||
|
||||
|
||||
string basepath = OS_dirname(file);
|
||||
|
@ -129,7 +129,7 @@ Disc* load_gdi(const char* file)
|
|||
|
||||
gdi >> OFFSET;
|
||||
|
||||
printf("file[%d] \"%s\": FAD:%d, CTRL:%d, SSIZE:%d, OFFSET:%d\n", TRACK, track_filename.c_str(), FADS, CTRL, SSIZE, OFFSET);
|
||||
DEBUG_LOG(GDROM, "file[%d] \"%s\": FAD:%d, CTRL:%d, SSIZE:%d, OFFSET:%d", TRACK, track_filename.c_str(), FADS, CTRL, SSIZE, OFFSET);
|
||||
|
||||
Track t;
|
||||
t.ADDR=0;
|
||||
|
|
|
@ -143,7 +143,7 @@ void LoadSpecialSettings()
|
|||
|
||||
if (reios_windows_ce)
|
||||
{
|
||||
INFO_LOG(BOOT, "Enabling Full MMU and Extra depth scaling for Windows CE game\n");
|
||||
INFO_LOG(BOOT, "Enabling Full MMU and Extra depth scaling for Windows CE game");
|
||||
settings.rend.ExtraDepthScale = 0.1;
|
||||
extra_depth_game = true;
|
||||
settings.dreamcast.FullMMU = true;
|
||||
|
@ -188,14 +188,14 @@ void LoadSpecialSettings()
|
|||
// Ducati World (PAL)
|
||||
|| !strncmp("T-8121D-50", reios_product_number, 10))
|
||||
{
|
||||
INFO_LOG(BOOT, "Enabling Dynarec safe mode for game %s\n", reios_product_number);
|
||||
INFO_LOG(BOOT, "Enabling Dynarec safe mode for game %s", reios_product_number);
|
||||
settings.dynarec.safemode = 1;
|
||||
safemode_game = true;
|
||||
}
|
||||
// NHL 2K2
|
||||
if (!strncmp("MK-51182", reios_product_number, 8))
|
||||
{
|
||||
INFO_LOG(BOOT, "Enabling Extra depth scaling for game %s\n", reios_product_number);
|
||||
INFO_LOG(BOOT, "Enabling Extra depth scaling for game %s", reios_product_number);
|
||||
settings.rend.ExtraDepthScale = 10000;
|
||||
extra_depth_game = true;
|
||||
}
|
||||
|
@ -218,7 +218,7 @@ void LoadSpecialSettings()
|
|||
// Marionette Company 2
|
||||
|| !strncmp("T5203M", reios_product_number, 6))
|
||||
{
|
||||
INFO_LOG(BOOT, "Disabling 32-bit virtual memory for game %s\n", reios_product_number);
|
||||
INFO_LOG(BOOT, "Disabling 32-bit virtual memory for game %s", reios_product_number);
|
||||
settings.dynarec.disable_vmem32 = true;
|
||||
disable_vmem32_game = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue