Skip to content

Commit f876822

Browse files
author
Niko
committed
PCDRV progress
1 parent 0a5bdb5 commit f876822

3 files changed

Lines changed: 12 additions & 13 deletions

File tree

decompile/General/LOAD/LOAD_24_HowlHeaderSectors.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ int DECOMP_LOAD_HowlHeaderSectors(CdlFILE* cdlFileHWL, void* ptrDestination, int
66

77
DECOMP_CDSYS_SetMode_StreamData();
88

9-
#ifndef USE_PCDRV
9+
// This will never fail. HowlHeaderSectors will load 1 sector
10+
// for the beginning of the header, then that says how big the
11+
// rest of the header is, then load more sectors to complete header
12+
#if 0
13+
// Return error, if reading out-of-bounds after the end of KART HWL
1014
int sizeOver = ((firstSector + numSector) * 0x800 - cdlFileHWL->size);
11-
12-
// If reading out of file bounds, quit
13-
if (sizeOver >= 0x800 )
14-
return 0;
15+
if (sizeOver >= 0x800 ) return 0;
1516
#endif
1617

1718
CdIntToPos(CdPosToInt(&cdlFileHWL->pos) + firstSector, &loc);

decompile/General/LOAD/LOAD_26_HowlSectorChainStart.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@ int DECOMP_LOAD_HowlSectorChainStart(CdlFILE* cdlFileHWL, void* ptrDestination,
1515

1616
DECOMP_CDSYS_SetMode_StreamData();
1717

18-
#ifndef USE_PCDRV
18+
// This will never fail. HowlSectorChainStart will load 1 sector
19+
// for songHeader (or sfx bankHeader), then that says how big the
20+
// rest of the data is, then load more sectors to complete the data
21+
#if 0
22+
// Return error, if reading out-of-bounds after the end of KART HWL
1923
int sizeOver = ((firstSector + numSector) * 0x800 - cdlFileHWL->size);
20-
21-
// If reading out of file bounds, quit
22-
if (sizeOver >= 0x800 )
23-
return 0;
24+
if (sizeOver >= 0x800 ) return 0;
2425
#endif
2526

2627
CdIntToPos(CdPosToInt(&cdlFileHWL->pos) + firstSector, &loc);

decompile/General/MAIN/MainMain.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -874,14 +874,11 @@ void StateZero()
874874
// "Start your engines, for Sony Computer..."
875875
DECOMP_CDSYS_XAPlay(CDSYS_XA_TYPE_EXTRA, 0x50);
876876

877-
#if !defined(USE_PCDRV)
878877
while (sdata->XA_State != 0)
879878
{
880879
// WARNING: Read-only address (ram, 0x8008d888) is written
881880
DECOMP_CDSYS_XAPauseAtEnd();
882881
}
883-
#endif
884-
885882
#endif
886883

887884
DECOMP_DecalGlobal_Clear(gGT);

0 commit comments

Comments
 (0)