Implement command 07 in GC AX (download data to main LR and reset main surround)
This commit is contained in:
parent
9b1a66245e
commit
2120f536d5
|
@ -136,7 +136,12 @@ void CUCode_AX::HandleCommandList()
|
||||||
UploadLRS(HILO_TO_32(addr));
|
UploadLRS(HILO_TO_32(addr));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_SBUFFER_ADDR: curr_idx += 2; break;
|
case CMD_SET_LR:
|
||||||
|
addr_hi = m_cmdlist[curr_idx++];
|
||||||
|
addr_lo = m_cmdlist[curr_idx++];
|
||||||
|
SetMainLR(HILO_TO_32(addr));
|
||||||
|
break;
|
||||||
|
|
||||||
case CMD_UNK_08: curr_idx += 10; break; // TODO: check
|
case CMD_UNK_08: curr_idx += 10; break; // TODO: check
|
||||||
|
|
||||||
case CMD_MIX_AUXB_NOWRITE:
|
case CMD_MIX_AUXB_NOWRITE:
|
||||||
|
@ -419,6 +424,18 @@ void CUCode_AX::UploadLRS(u32 dst_addr)
|
||||||
memcpy(HLEMemory_Get_Pointer(dst_addr), buffers, sizeof (buffers));
|
memcpy(HLEMemory_Get_Pointer(dst_addr), buffers, sizeof (buffers));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CUCode_AX::SetMainLR(u32 src_addr)
|
||||||
|
{
|
||||||
|
int* ptr = (int*)HLEMemory_Get_Pointer(src_addr);
|
||||||
|
for (u32 i = 0; i < 5 * 32; ++i)
|
||||||
|
{
|
||||||
|
int samp = (int)Common::swap32(*ptr++);
|
||||||
|
m_samples_left[i] = samp;
|
||||||
|
m_samples_right[i] = samp;
|
||||||
|
m_samples_surround[i] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CUCode_AX::OutputSamples(u32 lr_addr, u32 surround_addr)
|
void CUCode_AX::OutputSamples(u32 lr_addr, u32 surround_addr)
|
||||||
{
|
{
|
||||||
int surround_buffer[5 * 32];
|
int surround_buffer[5 * 32];
|
||||||
|
|
|
@ -134,6 +134,7 @@ protected:
|
||||||
void ProcessPBList(u32 pb_addr);
|
void ProcessPBList(u32 pb_addr);
|
||||||
void MixAUXSamples(int aux_id, u32 write_addr, u32 read_addr);
|
void MixAUXSamples(int aux_id, u32 write_addr, u32 read_addr);
|
||||||
void UploadLRS(u32 dst_addr);
|
void UploadLRS(u32 dst_addr);
|
||||||
|
void SetMainLR(u32 src_addr);
|
||||||
void OutputSamples(u32 out_addr, u32 surround_addr);
|
void OutputSamples(u32 out_addr, u32 surround_addr);
|
||||||
void MixAUXBLR(u32 ul_addr, u32 dl_addr);
|
void MixAUXBLR(u32 ul_addr, u32 dl_addr);
|
||||||
void SendAUXAndMix(u32 main_auxa_up, u32 auxb_s_up, u32 main_l_dl,
|
void SendAUXAndMix(u32 main_auxa_up, u32 auxb_s_up, u32 main_l_dl,
|
||||||
|
@ -149,7 +150,7 @@ private:
|
||||||
CMD_MIX_AUXA = 0x04,
|
CMD_MIX_AUXA = 0x04,
|
||||||
CMD_MIX_AUXB = 0x05,
|
CMD_MIX_AUXB = 0x05,
|
||||||
CMD_UPLOAD_LRS = 0x06,
|
CMD_UPLOAD_LRS = 0x06,
|
||||||
CMD_SBUFFER_ADDR = 0x07,
|
CMD_SET_LR = 0x07,
|
||||||
CMD_UNK_08 = 0x08,
|
CMD_UNK_08 = 0x08,
|
||||||
CMD_MIX_AUXB_NOWRITE = 0x09,
|
CMD_MIX_AUXB_NOWRITE = 0x09,
|
||||||
CMD_COMPRESSOR_TABLE_ADDR = 0x0A,
|
CMD_COMPRESSOR_TABLE_ADDR = 0x0A,
|
||||||
|
|
Loading…
Reference in New Issue