Skip to content

Commit ba6c63d

Browse files
author
Niko
committed
audio progress
1 parent 3be04b8 commit ba6c63d

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

decompile/General/CDSYS/CDSYS_00_Init.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ void DECOMP_CDSYS_Init(int boolUseDisc)
2727
sdata->countPass_CdReadyCallback = 0;
2828
sdata->countFail_CdReadyCallback = 0;
2929
sdata->XA_CurrOffset = 0;
30+
31+
#if 0 // unused
3032
sdata->countPass_CdTransferCallback = 0;
33+
#endif
3134

3235
sdata->XA_Playing_Category = 0;
3336
sdata->XA_Playing_Index = 0;

decompile/General/CDSYS/CDSYS_08_SpuCallbackTransfer.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ void DECOMP_CDSYS_SpuCallbackTransfer()
99
sdata->irqAddr = 0;
1010

1111
SpuSetIRQAddr(sdata->irqAddr);
12-
1312
SpuSetIRQ(1);
1413

14+
#if 0 // unused
1515
sdata->countPass_CdTransferCallback++;
16+
#endif
1617

1718
DECOMP_CDSYS_SpuGetMaxSample();
1819
}

decompile/General/CDSYS/CDSYS_11_SpuGetMaxSample.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,18 @@ void DECOMP_CDSYS_SpuGetMaxSample(void)
1212
// if you are not using CD, quit
1313
if (sdata->boolUseDisc == false) return;
1414

15-
// range {0x0 - 0x100}
15+
// irqAddr = 0, index = {0x000 - 0x100}, byteRange = {0x000 - 0x200},
16+
// irqAddr = 1, index = {0x100 - 0x200}, byteRange = {0x200 - 0x400},
17+
18+
// this irqAddr value changes in CDSYS_SpuCallbackTransfer,
19+
// meaning this might always be 1 frame behind, even in retail CTR
20+
1621
if (sdata->irqAddr == 0)
1722
{
1823
currIndex = 0;
1924
endIndex = 0x100;
2025
}
21-
// otherwise, range {0x100 - 0x200}
26+
2227
else
2328
{
2429
currIndex = 0x100;

decompile/General/CDSYS/CDSYS_15_XAPlay.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ void DECOMP_CDSYS_XAPlay(int categoryID, int xaID)
4949
sdata->countPass_CdReadyCallback = 0;
5050
sdata->countFail_CdReadyCallback = 0;
5151
sdata->XA_CurrOffset = 0; // ND bug? Variable resuse?
52+
53+
#if 0 // unused
5254
sdata->countPass_CdTransferCallback = 0;
55+
#endif
5356

5457
if(CdControl(CdlReadS, &buf2[0], 0) == 1)
5558
{

0 commit comments

Comments
 (0)