git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1104 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2008-11-09 19:54:51 +00:00
parent 35e8951f99
commit ee3dae4952
3 changed files with 32 additions and 51 deletions

View File

@ -162,6 +162,14 @@ struct PBLpf
u16 b0; u16 b0;
}; };
struct PBHpf
{
u16 enabled;
u16 yn1;
u16 a0;
u16 b0;
};
struct AXParamBlockWii struct AXParamBlockWii
{ {
u16 next_pb_hi; u16 next_pb_hi;
@ -172,9 +180,9 @@ struct AXParamBlockWii
u16 src_type; // Type of sample rate converter (none, ?, linear) u16 src_type; // Type of sample rate converter (none, ?, linear)
u16 coef_select; u16 coef_select;
u32 mixer_control;
u16 mixer_control; u16 running; // 1=RUN 0=STOP
u16 running; // 1=RUN 0=STOP
u16 is_stream; // 1 = stream, 0 = one shot u16 is_stream; // 1 = stream, 0 = one shot
PBMixerWii mixer; PBMixerWii mixer;
@ -188,6 +196,7 @@ struct AXParamBlockWii
PBSampleRateConverter src; PBSampleRateConverter src;
PBADPCMLoopInfo adpcm_loop_info; PBADPCMLoopInfo adpcm_loop_info;
PBLpf lpf; PBLpf lpf;
PBHpf hpf;
u16 pad[22]; u16 pad[22];
}; };

View File

@ -206,10 +206,6 @@ bool CUCode_AXWii::AXTask(u32& _uMail)
u32 Addr__AXOutSBuffer_2; u32 Addr__AXOutSBuffer_2;
u32 Addr__A; u32 Addr__A;
u32 Addr__12; u32 Addr__12;
u32 Addr__4_1;
u32 Addr__4_2;
u32 Addr__4_3;
u32 Addr__4_4;
u32 Addr__5_1; u32 Addr__5_1;
u32 Addr__5_2; u32 Addr__5_2;
u32 Addr__6; u32 Addr__6;
@ -250,40 +246,30 @@ bool CUCode_AXWii::AXTask(u32& _uMail)
break; break;
case 0x0001: case 0x0001:
{ {
u32 address = Memory_Read_U32(uAddress); u32 address = Memory_Read_U32(uAddress);
uAddress += 4; uAddress += 4;
DebugLog("AXLIST 1: %08x", address); DebugLog("AXLIST 1: %08x", address);
} }
break; break;
// case 0x0003:
// Somewhere we should be getting a bitmask of AX_SYNC values
// that tells us what has been updated
// Dunno if important
//
case 0x0002: //02
{ {
m_addressPBs = Memory_Read_U32(uAddress); u32 address = Memory_Read_U32(uAddress);
uAddress += 4; uAddress += 4;
DebugLog("AXLIST 3: %08x", address);
}
break;
case 0x0004: // PBs are here now
m_addressPBs = Memory_Read_U32(uAddress);
mixer_HLEready = true; mixer_HLEready = true;
DebugLog("AXLIST PB address: %08x", m_addressPBs); DebugLog("AXLIST PB address: %08x", m_addressPBs);
#ifdef _WIN32 #ifdef _WIN32
DebugLog("Update the SoundThread to be in sync"); DebugLog("Update the SoundThread to be in sync");
DSound::DSound_UpdateSound(); //do it in this thread to avoid sync problems DSound::DSound_UpdateSound(); //do it in this thread to avoid sync problems
#endif #endif
}
break;
case 0x0003:
DebugLog("AXLIST command 0x0003 ????");
break;
case 0x0004: // AUX?
Addr__4_1 = Memory_Read_U32(uAddress);
uAddress += 4; uAddress += 4;
DebugLog("AXLIST 4 address: %08x", Addr__4_1);
break; break;
case 0x0005: case 0x0005:
@ -300,20 +286,20 @@ bool CUCode_AXWii::AXTask(u32& _uMail)
Addr__6 = Memory_Read_U32(uAddress); Addr__6 = Memory_Read_U32(uAddress);
uAddress += 10; uAddress += 10;
DebugLog("AXLIST 6 address: %08x", Addr__6); DebugLog("AXLIST 6 address: %08x", Addr__6);
break; break;
case 0x0007: // AXLIST_SBUFFER /* case 0x0007: // AXLIST_SBUFFER
Addr__AXOutSBuffer = Memory_Read_U32(uAddress); Addr__AXOutSBuffer = Memory_Read_U32(uAddress);
uAddress += 4; uAddress += 4;
// uAddress += 12; // uAddress += 12;
DebugLog("AXLIST OutSBuffer address: %08x", Addr__AXOutSBuffer); DebugLog("AXLIST OutSBuffer address: %08x", Addr__AXOutSBuffer);
break; break;*/
case 0x0009: /* case 0x0009:
Addr__9 = Memory_Read_U32(uAddress); Addr__9 = Memory_Read_U32(uAddress);
uAddress += 4; uAddress += 4;
DebugLog("AXLIST 6 address: %08x", Addr__9); DebugLog("AXLIST 6 address: %08x", Addr__9);
break; break;*/
case 0x000a: // AXLIST_COMPRESSORTABLE case 0x000a: // AXLIST_COMPRESSORTABLE
Addr__A = Memory_Read_U32(uAddress); Addr__A = Memory_Read_U32(uAddress);
@ -328,6 +314,11 @@ bool CUCode_AXWii::AXTask(u32& _uMail)
uAddress += 4 * 2; // then two RAM addressses uAddress += 4 * 2; // then two RAM addressses
break; break;
case 0x000c:
uAddress += 2; // one 0x8000 in rabbids
uAddress += 4 * 2; // then two RAM addressses
break;
case 0x000d: case 0x000d:
uAddress += 4 * 4; uAddress += 4 * 4;
break; break;
@ -338,26 +329,6 @@ bool CUCode_AXWii::AXTask(u32& _uMail)
DebugLog("AXLIST end, wii stylee."); DebugLog("AXLIST end, wii stylee.");
break; break;
case 0x0010: //Super Monkey Ball 2
DebugLog("AXLIST unknown");
//should probably read/skip stuff here
uAddress += 8;
break;
case 0x0011:
uAddress += 4;
break;
case 0x0012:
Addr__12 = Memory_Read_U16(uAddress);
uAddress += 2;
break;
case 0x0013:
uAddress += 6 * 4; // 6 Addresses.
break;
default: default:
{ {
static bool bFirst = true; static bool bFirst = true;

View File

@ -72,8 +72,9 @@ IUCode* UCodeFactory(u32 _CRC, CMailHandler& _rMailHandler)
DebugLog("Zelda Wii ucode chosen"); DebugLog("Zelda Wii ucode chosen");
return new CUCode_Zelda(_rMailHandler); return new CUCode_Zelda(_rMailHandler);
case 0x5ef56da3: // AX demo
case 0x347112ba: // raving rabbits case 0x347112ba: // raving rabbits
DebugLog("Wii - AXWii chosen"); DebugLog("Wii - AXWii chosen");
return new CUCode_AXWii(_rMailHandler); return new CUCode_AXWii(_rMailHandler);
default: default: