Void SCSPDSP_Init(struct _SCSPDSP -126,7 +156,7 if(IRAMIXSMIXSMIXS+=sampleMIXS+=sampleMIXS+=sample ĭiff -Nru aosdk_base/eng_ssf/scsplfo.c aosdk/eng_ssf/scsplfo.c + smpr+=(SCSP->DSP.EFREG*SCSP->RPANTABLE)>SHIFT ĭiff -Nru aosdk_base/eng_ssf/scspdsp.c aosdk/eng_ssf/scspdsp.c + unsigned short Enc=((EFPAN(slot))DSP.EFREG*SCSP->LPANTABLE)>SHIFT smpr+=(SCSP->DSP.EFREG*SCSP->RPANTABLE)>(SHIFT-4) unsigned short Enc=(TL(slot))|((EFPAN(slot))DSP.EFREG*SCSP->LPANTABLE)>(SHIFT-4) smpr+=(sample*SCSP->RPANTABLE)>(SHIFT-1) + Enc=((TL(slot))DSP,(sample*SCSP->LPANTABLE)>SHIFT,ISEL(slot),IMXL(slot)) Įnc=((TL(slot))LPANTABLE)>(SHIFT-1) SCSPDSP_SetSample(&SCSP->DSP,sample>SHIFT,ISEL(slot),IMXL(slot)) Here's the fix again, slightly modified so that it compiles without warnings in MAME (strict C90 compliance):ĭiff -Nru aosdk_base/eng_ssf/scsp.c aosdk/eng_ssf/scsp.c Radiant Silvergun will need it for correct sound playback. Change the release rate calculation to use the decay table instead of the attack one.Īlso, I noticed in the MAME scsp.c source that the 16-bit PCM sample fix I posted earlier in this thread didn't get put in. To account for this, I change the envelope output to linear for attacks. Envelope steps in the attack state are apparently exponential. Prevented keyoffs from killing slots when already in the release state + -421,7 +422,7 void SCSP_StopSlot(struct _SLOT *slot,int keyoff) Static void Compute_EG(struct _SCSP *SCSP,struct _SLOT -366,9 +366,10 slot->EG.volume=0x17FEG.state=ATTACK Static void SCSP_StopSlot(struct _SLOT *slot,int -498,7 +502,7 SegaDB-=12 +// printf(" AR %x D1R %x D2R %x RR %x DL %x KRS %x EGHOLD %x LPSLNK %x\n", AR(slot), D1R(slot), D2R(slot), RR(slot), DL(slot), KRS(slot), EGHOLD(slot), LPSLNK(slot)) if(slot->EG.volume>(EG_SHIFT+5)>=slot->EG.DL)Ĭase -412,6 +415,7 SA %x PCM8B %x LPCTL %x ALFOS %x STWINH %x TL %x EFSDL %x\n", SA(slot), PCM8B(slot), LPCTL(slot), ALFOS(slot), STWINH(slot), TL(slot), EFSDL(slot)) offset = lib_decoded | lib_decodedtag_name, "psfby"))
+ if (corlett_decode(lib_raw_file, lib_raw_length, &lib_decoded, &lib_len, &lib) != AO_SUCCESS) if (corlett_decode(lib_raw_file, lib_raw_length, &lib_decoded, &lib_len, &lib) != AO_SUCCESS) + if (ao_get_lib(libfile, &lib_raw_file, &tmp_length) != AO_SUCCESS) + printf("Loading library: %s\n", c->lib) if (ao_get_lib(c->lib, &lib_raw_file, &tmp_length) != AO_SUCCESS) printf("Loading library: %s\n", c->lib) clear Saturn work RAM before we start scribbling in -64,34 +65,37 Get the library file, if any Uint64 file_len, lib_len, lib_raw_length Diff -Nru aosdk/eng_ssf/eng_ssf.c aosdk_new/eng_ssf/eng_ssf.c