Пример #1
0
void VRC7SoundInstall(void)
{
	LogTableInitialize();
	sndp.kmif = OPLSoundAlloc(OPL_TYPE_VRC7);
	if (sndp.kmif)
	{
		NESAudioHandlerInstall(s_opll_audio_handler);
		NESVolumeHandlerInstall(s_opll_volume_handler);
		NESTerminateHandlerInstall(s_opll_terminate_handler);

		NESResetHandlerInstall(s_vrc7_reset_handler);
		NESWriteHandlerInstall(s_vrc7_write_handler);
	}
}
Пример #2
0
void FME7SoundInstall(NEZ_PLAY* pNezPlay)
{
	PSGSOUND *psgs;
	psgs = XMALLOC(sizeof(PSGSOUND));
	if (!psgs) return;
	XMEMSET(psgs, 0, sizeof(PSGSOUND));
	((NSFNSF*)pNezPlay->nsf)->psgs = psgs;

	psgs->psgp = PSGSoundAlloc(PSG_TYPE_YM2149); //エンベロープ31段階あったんでYM2149系でしょう。
	if (!psgs->psgp) return;

	LogTableInitialize();
	NESTerminateHandlerInstall(&pNezPlay->nth, s_psg_terminate_handler);
	NESVolumeHandlerInstall(pNezPlay, s_psg_volume_handler);

	NESAudioHandlerInstall(pNezPlay, s_psg_audio_handler);
	NESWriteHandlerInstall(pNezPlay, s_fme7_write_handler);
	NESResetHandlerInstall(pNezPlay->nrh, s_fme7_reset_handler);
}
Пример #3
0
Uint NSDPlayerInstall(Uint8 *pData, Uint uSize)
{
	nsdplayer.sync1 = pData[7];
	nsdplayer.sync2 = GetDwordLE(pData + 0x08);
	nsdplayer.top = XMALLOC(GetDwordLE(pData + 0x30));
	if (!nsdplayer.top) return NESERR_SHORTOFMEMORY;

	XMEMCPY(nsdplayer.top, pData + GetDwordLE(pData + 0x38), GetDwordLE(pData + 0x30));
	if (GetDwordLE(pData + 0x3C))
	{
		nsdplayer.loop = nsdplayer.top + GetDwordLE(pData + 0x3C) - GetDwordLE(pData + 0x38);
	}
	else
	{
		nsdplayer.loop = 0;
	}
	NESAudioHandlerInstall(nsdplay_audio_handler);
	NESResetHandlerInstall(nsdplay_reset_handler);
	NESTerminateHandlerInstall(nsdplay_terminate_handler);
	NSDPLAYReset();
	return NESERR_NOERROR;
}