Beispiel #1
0
u32 sceSasSetVoicePCM(u32 core, int voiceNum, u32 pcmAddr, int size, int loop)
{
	INFO_LOG_REPORT(HLE, "sceSasSetVoicePCM(%08x, %i, %08x, %i, %i)", core, voiceNum, pcmAddr, size, loop);

	if (voiceNum >= PSP_SAS_VOICES_MAX || voiceNum < 0)	{
		WARN_LOG(HLE, "%s: invalid voicenum %d", __FUNCTION__, voiceNum);
		return ERROR_SAS_INVALID_VOICE;
	}

	if (!Memory::IsValidAddress(pcmAddr)) {
		ERROR_LOG(HLE, "Ignoring invalid PCM audio address %08x", pcmAddr);
		return 0;
	}

	if (size <= 0 || size > 0x10000) {
		WARN_LOG(HLE, "%s: invalid size %d", __FUNCTION__, size);
		return ERROR_SAS_INVALID_SIZE;
	}

	SasVoice &v = sas->voices[voiceNum];
	u32 prevPcmAddr = v.pcmAddr;
	v.type = VOICETYPE_PCM;
	v.pcmAddr = pcmAddr;
	v.pcmSize = size;
	v.loop = loop ? false : true;
	v.playing = true;
	v.ChangedParams(pcmAddr == prevPcmAddr);
	return 0;
}
Beispiel #2
0
u32 sceUtilityGetSystemParamInt(u32 id, u32 destaddr)
{
	DEBUG_LOG(HLE,"sceUtilityGetSystemParamInt(%i, %08x)", id,destaddr);
	u32 param = 0;
	switch (id) {
	case PSP_SYSTEMPARAM_ID_INT_ADHOC_CHANNEL:
		param = g_Config.iWlanAdhocChannel;
		break;
	case PSP_SYSTEMPARAM_ID_INT_WLAN_POWERSAVE:
		param = g_Config.bWlanPowerSave?PSP_SYSTEMPARAM_WLAN_POWERSAVE_ON:PSP_SYSTEMPARAM_WLAN_POWERSAVE_OFF;
		break;
	case PSP_SYSTEMPARAM_ID_INT_DATE_FORMAT:
		param = g_Config.iDateFormat;
		INFO_LOG_REPORT(HLE, "sceUtilitySystemGetSystemParamInt: %s", "Date Format")
		break;
	case PSP_SYSTEMPARAM_ID_INT_TIME_FORMAT:
		param = g_Config.iTimeFormat?PSP_SYSTEMPARAM_TIME_FORMAT_12HR:PSP_SYSTEMPARAM_TIME_FORMAT_24HR;
		INFO_LOG_REPORT(HLE, "sceUtilitySystemGetSystemParamInt: %s", "Time Format")
		break;
	case PSP_SYSTEMPARAM_ID_INT_TIMEZONE:
		param = g_Config.iTimeZone;
		INFO_LOG_REPORT(HLE, "sceUtilitySystemGetSystemParamInt: %s", "Timezone")
		break;
	case PSP_SYSTEMPARAM_ID_INT_DAYLIGHTSAVINGS:
		param = g_Config.bDayLightSavings?PSP_SYSTEMPARAM_DAYLIGHTSAVINGS_SAVING:PSP_SYSTEMPARAM_DAYLIGHTSAVINGS_STD;
		INFO_LOG_REPORT(HLE, "sceUtilitySystemGetSystemParamInt: %s", "Daylight Savings");
		break;
	case PSP_SYSTEMPARAM_ID_INT_LANGUAGE:
		param = g_Config.ilanguage;
		break;
	case PSP_SYSTEMPARAM_ID_INT_BUTTON_PREFERENCE:
		param = g_Config.iButtonPreference;
		break;
	case PSP_SYSTEMPARAM_ID_INT_LOCK_PARENTAL_LEVEL:
		param = g_Config.iLockParentalLevel;
		INFO_LOG_REPORT(HLE, "sceUtilitySystemGetSystemParamInt: %s", "Lock Parental Level");
		break;
	default:
		return PSP_SYSTEMPARAM_RETVAL_FAIL;
	}

	Memory::Write_U32(param, destaddr);

	return 0;
}
Beispiel #3
0
u32 scePsmfSpecifyStreamWithStreamTypeNumber(u32 psmfStruct, u32 streamType, u32 typeNum)
{
	Psmf *psmf = getPsmf(psmfStruct);
	if (!psmf) {
		ERROR_LOG(HLE, "scePsmfSpecifyStreamWithStreamTypeNumber(%08x, %08x, %08x): invalid psmf", psmfStruct, streamType, typeNum);
		return ERROR_PSMF_NOT_FOUND;
	}
	INFO_LOG_REPORT(HLE, "scePsmfSpecifyStreamWithStreamTypeNumber(%08x, %08x, %08x)", psmfStruct, streamType, typeNum);
	// right now typeNum and channel are the same...
	if (!psmf->setStreamWithType(streamType, typeNum)) {
		psmf->setStreamNum(-1);
	}
	return 0;
}
Beispiel #4
0
static u32 sceAacInitResource(u32 numberIds)
{
	// Do nothing here
	INFO_LOG_REPORT(ME, "sceAacInitResource(%i)", numberIds);
	return 0;
}