[Florin Sasu/florinsasu@rol.ro/2002-08-26] - these are 80000601/OSDSND rpc services (as they are dispatched in spuFunc) - let's call parameter passed in a1 => 'param1' - (p) from 7xxx functions is (*param1) - (H4, H8, ...) are bytes, halves or words found at address (*param)+4, +8, +C , +10, etc... i.e. int H4==*(int)(((char*)(*param1))+4) or simpler (*param)->H4; i hope you got the ideea - these offsets are not so important, only number and quantity of params - for a programmer, only the Hx, where x is a number, are important and can be set - I hope I guessed the correct sign (uchar is unsigned char and so on) - there are few places where, instead of passing to the function the value of H4, for example, is passed the address of. e.g. [4020 short SsSepOpen(int *addrOfH4, short H8, short HC);] it could be a compilation bug; this should be checked - the returned values are put in 'ret' variable and '&ret' is then returned - anyway, I, also, could make mistakes, so... use it on your own risk - see the /Icewatus (icewatus@yahoo.com)'s ps2 sound lib & test program 0000 - 0001 void SpuInit (); 0002 int SpuSetCore (int H4); 0005 void SpuSetKey (int H4, int H8); 0006 int SpuSetReverb (int H4); 0007 int SpuClearReverbWorkArea (int H4); 0008 void SpuSetReverbEndAddr (int H4); 000A void SpuSetReverbModeDepth (short H4, short H8); 000B int SpuSetReverbVoice (int H4, int H8); 000C int SpuSetIRQ (int H4); 000D int SpuSetIRQAddr (int H4); 000E int SpuSetTransferMode (int H4); 0010 int SpuSetTransferStartAddr (int H4); 0011 int SpuWrite (int H4, int H8); 0012 int SpuWrite0 (int H4); 0013 int SpuIsTransferCompleted (int H4); 0017 int SpuGetReverbEndAddr (); 0018 int SpuWritePartly (int H4, int H8); 0019 void SpuInitHot (); 001A int SpuIsReverbWorkAreaReserved (int H4); 001B int SpuMallocWithStartAddr (int H4, int H8); 001C int SpuRead (int H4, int H8); 001D int SpuReadDecodedData (int H4, int H8); 001E int SpuReserveReverbWorkArea (int H4); 0020 int SpuSetMute (int H4); 0021 int SpuSetNoiseClock (int H4); 0022 int SpuSetNoiseVoice (int H4, int H8); 0023 int SpuSetPitchLFOVoice (int H4, int H8); 0024 int SpuStGetStatus (); 0025 int SpuStGetVoiceStatus (); 0100 int SpuInitMalloc (int H4, &spu_malloc_rec); 0101 int SpuMalloc (int H4); 0200 int *... (int H4); ... { gStPtr=SpuStInit(H4); ret=&gStBuff; SpuStSetPreparationFinishedCallback(&spustCB_preparation_finished); SpuStSetTransferFinishedCallback(&spustCB_transfer_finished); SpuStSetStreamFinishedCallback(&spustCB_stream_finished); return &ret; } 0201 int SpuStQuit (); 0202 int *... (int H4, int H8); ... { memcpy(gStPtr, &gStBuff, 392); ret=SpuStTransfer(H4, H8); return &ret; } 0203 int SpuStSetCore (int H4); 100C int SpuGetIRQAddr (); 1010 int SpuFlush (int H4); 1011 void SpuFree (int H4); 1013 int SpuGetIRQ (); 1014 int SpuGetMute (); 1015 int SpuGetNoiseClock (); 1016 int SpuGetNoiseVoice (); 1017 int SpuGetPitchLFOVoice (); 1018 int SpuGetReverb (); 1019 int SpuGetReverbVoice (); 101A int SpuGetTransferMode (); 101B int SpuGetTransferStartAddr (); 101C int SpuGetKeyStatus (int H4); 1020 int SpuAutoDMAWrite (int H4, int H8, int HC); 1021 void SpuAutoDMAStop (); 1022 int SpuAutoDMAGetStatus (); 1023 void SpuSetAutoDMAAttr (short H4, short H8, short HC, short H10); 1024 void SpuSetSerialInAttr (short H4, short H8); 1030 void ... (int H4); ... { gMultiVoiceNum=H4; } 1031 void SpuSetDigitalOut (int H4); 4001 char SsBlockVoiceAllocation (); 4002 void SsEnd (); 4003 void SsChannelMute (short H4, short H8, int HC); 4004 short SsGetActualProgFromProg (short H4, short H8); 4005 int SsGetChannelMute (short H4, short H8); 4006 int SsGetCurrentPoint (short H4, short H8); 4007 int SsGetVoiceMask (); 4008 void SsInit (); 4009 short SsIsEos (short H4, short H8); 400A void SsAllocateVoices (uchar H4, uchar H8); 4010 void SsPitchCorrect (short H4); 4011 ushort SsPitchFromNote (short H4, short H8, uchar HC, uchar H10); 4012 void SsPlayBack (short H4, short H8, short HC); 4013 void SsQueueKeyOn (int H4); 4014 void SsQueueReverb (int H4, int H8); 4015 void SsQuit (); 4017 void SsSetTableSize (&seq_table,short H8,short HC);); 4018 void SsSetTickMode (int H4); 4019 void SsSepClose (short H4); 4020 short SsSepOpen (int *H4, short H8, short HC); 4021 void SsSepPause (short H4, short H8); 4022 void SsSepPlay (short H4, short H8, char HC, short H10); 4023 void SsSepReplay (short H4, short H8); 4024 void SsSepSetAccelerando (short H4, short H8, int HC, int H10); 4025 void SsSepSetCrescendo (short H4, short H8, short HC, int H10); 4026 void SsSepSetDecrescendo (short H4, short H8, short HC, int H10); 4027 void SsSepSetRitardando (short H4, short H8, int HC, int H10); 4028 void SsSepSetVol (short H4, short H8, short HC, short H10); 4029 void SsSepStop (short H4, short H8); 4030 void SsSeqGetVol (short H4, short H8, int *HC, int *H10); 4031 short SsSeqOpen (int H4, short H8); 4032 void SsSeqPause (short H4); 4033 void SsSeqPlayPtoP (short H4, short H8, int HC, int H10, char HC, short H10); 4034 void SsSeqReplay (short H4); 4035 void SsSeqSetAccelerando (short H4, int H8, int HC); 4036 void SsSeqSetCrescendo (short H4, short H8, int HC); 4037 void SsSeqSetDecrescendo (short H4, short H8, int HC); 4038 void SsSeqSetRitardando (short H4, int H8, int HC); 4039 void SsSeqSetNext (short H4, short H8); 4040 void SsSeqCalledTbyT (); 4041 void SsSeqClose (short H4); 4042 void SsSeqPlay (short H4, char H8, short HC); 4043 void SsSeqSetVol (short H4, short H8, short HC); 4044 void SsSeqSkip (short H4, short H8, char HC, short H10); 4045 void SsSeqStop (short H4); 4046 void SsSetAutoKeyOffMode (short H4); 4047 void SsSetCurrentPoint (short H4, short H8, int HC); 4048 void SsSetLoop (short H4, short H8, short HC); 4049 void SsSetMono (); 404A void SsSetMVol (short H4, short H8); 4050 void SsSetNext (short H4, short H8, short HC, short H10); 4051 char SsSetReservedVoice (char H4); 4052 void SsSetStereo (); 4053 void SsSetTempo (short H4, short H8, short HC); 4054 void SsSetVoiceMask (int H4); 4055 void SsStart (); 4056 void SsStart2 (); 4057 char SsUnBlockVoiceAllocation (); 4058 void SsUtFlush (); 4059 int SsUtGetVagAddr (short H4, short H8); 4060 int SsUtGetVagAddrFromTone (short H4, short H8, short HC); 4061 int SsUtGetVBaddrInSB (short H4); 4062 void SsVabClose (short H4); 4063 short SsVabOpenHead (int H4, short H8); 4064 short SsVabTransBodyPartly (int H4, int H8, short HC); 4065 short SsVabTransCompleted (short H4); 4066 void SsVabTransBody (int H4, short H8); 4067 short SsVoiceCheck (int H4, int H8, short HC); 4068 int SsVoKeyOff (int H4, int H8); 4069 int SsVoKeyOn (int H4, int H8, uchar HC, uchar H10); 4070 short SsVabOpenHeadSticky (int H4, short H8, int HC); 5001 void StInit (); 5002 void StQuit (); 5003 void StCalledVSync (); 5004 - 5005 short StVabOpen (int H4, int H8, int HC); 5006 short StVabOpenFakeBody (int H4, int H8); 5007 void StVabOpenCompleted (); 5008 short StVabClose (short H4); 5009 short StBgmOpen (short H4, int H8); 500A void StSetTickMode (short H4); 500B short StBgmClose (short H4); 500C void StSetReverbType (short H4, short H8); 500D void StSetReverbDepth (short H4, short H8, short HC); 500E void StSetReverbDelaytime (short H4, short H8); 500F void StSetReverbFeedback (short H4, short H8); 5010 int StGetSlotStatus (short H4); 5011 void StSetSbClear (int H4); 5012 void StSetMasterVol (short H4, short H8, short HC); 5013 short StSetBgmVol (short H4, short H8); 5014 void StBgmPlay (short H4); 5015 void StBgmStop (short H4, short H8, int HC); 5016 void StSetBgmTempo (short H4, short H8); 5017 short StGetBgmTempo (short H4); 5018 short StGetBgmStatus (short H4); 5019 short StGetBgmChStatus (short H4, short H8, short HC); 501A short StDmaWrite (int H4, int H8, int HC); 501B short StDmaRead (int H4, int H8, int HC); 5100 int SetTimer (&common); 5101 int ReleaseTimer (&common); 5200 int StSePlay (short H4, short H8); 5201 int StSetSeVol (short H4, short H8); 6128 int *... (); ... { SpuGetCommonAttr(&c_attr); return &c_attr; } 6240 int *... (int H8); ... { s_attr=H8; SpuGetVoiceAttr(&s_attr); return &s_attr; } 6314 int *... (); ... { SpuGetReverbModeParam(&r_attr); return &r_attr; } 6418 int *... (); ... { SpuGetAllKeysStatus(&status); return &status; } 7128 void SpuSetCommonAttr (int p); 7240 void SpuSetVoiceAttr (int p); 7314 void SpuSetReverbModeParam (int p); 7440 void SpuSetKeyOnWithAttr (int p); 7508 void SpuSetEnv (int p); 7600 void ... (int p); ... {int i; for (i=0; i