Implement AXWii command 01: ADD_TO_LR
This commit is contained in:
parent
4ef021e975
commit
1612225e79
|
@ -67,7 +67,12 @@ void CUCode_AXWii::HandleCommandList()
|
||||||
SetupProcessing(HILO_TO_32(addr));
|
SetupProcessing(HILO_TO_32(addr));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_UNK_01: curr_idx += 2; break;
|
case CMD_ADD_TO_LR:
|
||||||
|
addr_hi = m_cmdlist[curr_idx++];
|
||||||
|
addr_lo = m_cmdlist[curr_idx++];
|
||||||
|
AddToLR(HILO_TO_32(addr));
|
||||||
|
break;
|
||||||
|
|
||||||
case CMD_UNK_02: curr_idx += 2; break;
|
case CMD_UNK_02: curr_idx += 2; break;
|
||||||
case CMD_UNK_03: curr_idx += 2; break;
|
case CMD_UNK_03: curr_idx += 2; break;
|
||||||
|
|
||||||
|
@ -182,6 +187,18 @@ void CUCode_AXWii::SetupProcessing(u32 init_addr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CUCode_AXWii::AddToLR(u32 val_addr)
|
||||||
|
{
|
||||||
|
int* ptr = (int*)HLEMemory_Get_Pointer(val_addr);
|
||||||
|
for (int i = 0; i < 32 * 3; ++i)
|
||||||
|
{
|
||||||
|
int val = (int)Common::swap32(*ptr++);
|
||||||
|
|
||||||
|
m_samples_left[i] += val;
|
||||||
|
m_samples_right[i] += val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
AXMixControl CUCode_AXWii::ConvertMixerControl(u32 mixer_control)
|
AXMixControl CUCode_AXWii::ConvertMixerControl(u32 mixer_control)
|
||||||
{
|
{
|
||||||
u32 ret = 0;
|
u32 ret = 0;
|
||||||
|
|
|
@ -51,6 +51,7 @@ protected:
|
||||||
virtual void HandleCommandList();
|
virtual void HandleCommandList();
|
||||||
|
|
||||||
void SetupProcessing(u32 init_addr);
|
void SetupProcessing(u32 init_addr);
|
||||||
|
void AddToLR(u32 val_addr);
|
||||||
void ProcessPBList(u32 pb_addr);
|
void ProcessPBList(u32 pb_addr);
|
||||||
void MixAUXSamples(int aux_id, u32 write_addr, u32 read_addr, u16 volume);
|
void MixAUXSamples(int aux_id, u32 write_addr, u32 read_addr, u16 volume);
|
||||||
void OutputSamples(u32 lr_addr, u32 surround_addr, u16 volume);
|
void OutputSamples(u32 lr_addr, u32 surround_addr, u16 volume);
|
||||||
|
@ -60,7 +61,7 @@ private:
|
||||||
enum CmdType
|
enum CmdType
|
||||||
{
|
{
|
||||||
CMD_SETUP = 0x00,
|
CMD_SETUP = 0x00,
|
||||||
CMD_UNK_01 = 0x01,
|
CMD_ADD_TO_LR = 0x01,
|
||||||
CMD_UNK_02 = 0x02,
|
CMD_UNK_02 = 0x02,
|
||||||
CMD_UNK_03 = 0x03,
|
CMD_UNK_03 = 0x03,
|
||||||
CMD_PROCESS = 0x04,
|
CMD_PROCESS = 0x04,
|
||||||
|
|
Loading…
Reference in New Issue