git-svn-id: https://localhost/svn/Project64/trunk@51 111125ac-702d-7242-af9c-5ba8ae61c1ef
This commit is contained in:
parent
d4c874abca
commit
e815584b59
|
@ -111,6 +111,7 @@ void CTraceLog::WriteTrace ( TraceType Type, LPCTSTR Message)
|
|||
else if ((Type & TraceRSP )!= 0) { nPos += _stprintf(pBuffer+nPos,_T("%s"),_T("RSP : ")); }
|
||||
else if ((Type & TraceTLB )!= 0) { nPos += _stprintf(pBuffer+nPos,_T("%s"),_T("TLB : ")); }
|
||||
else if ((Type & TraceValidate )!= 0) { nPos += _stprintf(pBuffer+nPos,_T("%s"),_T("Valid : ")); }
|
||||
else if ((Type & TraceAudio )!= 0) { nPos += _stprintf(pBuffer+nPos,_T("%s"),_T("Audio : ")); }
|
||||
else { nPos += _stprintf(pBuffer+nPos,_T("%s"),_T("Unknown: ")); }
|
||||
|
||||
for (int i = 0; i < (int)m_Modules.size(); i++ )
|
||||
|
|
|
@ -12,6 +12,7 @@ enum TraceType
|
|||
TraceRSP = 0x00000040,
|
||||
TraceTLB = 0x00000080,
|
||||
TraceValidate = 0x00000100,
|
||||
TraceAudio = 0x00000200,
|
||||
TraceNoHeader = 0x80000000,
|
||||
};
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@ CAudio::~CAudio (void)
|
|||
|
||||
void CAudio::Reset ( void )
|
||||
{
|
||||
m_CurrentLength = 0;
|
||||
m_SecondBuff = 0;
|
||||
m_Status = 0;
|
||||
m_BytesPerSecond = 0;
|
||||
|
@ -36,18 +35,20 @@ DWORD CAudio::GetStatus ( void )
|
|||
|
||||
void CAudio::LenChanged ( void )
|
||||
{
|
||||
WriteTraceF(TraceAudio,__FUNCTION__ ": _Reg->AI_LEN_REG = %d",_Reg->AI_LEN_REG);
|
||||
if (_Reg->AI_LEN_REG != 0)
|
||||
{
|
||||
if (m_CurrentLength == 0) {
|
||||
DWORD NewLength = GetLength() + _Reg->AI_LEN_REG;
|
||||
_SystemTimer->SetTimer(CSystemTimer::AiTimer,NewLength * m_CountsPerByte,false);
|
||||
WriteTraceF(TraceAudio,__FUNCTION__ ": NewLength = %d",NewLength);
|
||||
/*if (m_CurrentLength == 0) {
|
||||
m_CurrentLength = _Reg->AI_LEN_REG;
|
||||
_SystemTimer->SetTimer(CSystemTimer::AiTimer,m_CurrentLength * m_CountsPerByte,false);
|
||||
} else {
|
||||
m_SecondBuff = _Reg->AI_LEN_REG;
|
||||
m_Status |= 0x80000000;
|
||||
}
|
||||
//m_Status |= 0x80000000;
|
||||
}*/
|
||||
} else {
|
||||
_SystemTimer->StopTimer(CSystemTimer::AiTimer);
|
||||
m_CurrentLength = 0;
|
||||
m_SecondBuff = 0;
|
||||
m_Status = 0;
|
||||
}
|
||||
|
@ -60,7 +61,7 @@ void CAudio::LenChanged ( void )
|
|||
|
||||
void CAudio::TimerDone ( void )
|
||||
{
|
||||
_Reg->MI_INTR_REG |= MI_INTR_AI;
|
||||
/*_Reg->MI_INTR_REG |= MI_INTR_AI;
|
||||
_Reg->CheckInterrupts();
|
||||
|
||||
if (m_SecondBuff != 0) {
|
||||
|
@ -69,6 +70,8 @@ void CAudio::TimerDone ( void )
|
|||
m_CurrentLength = m_SecondBuff;
|
||||
m_SecondBuff = 0;
|
||||
m_Status &= 0x7FFFFFFF;
|
||||
*/
|
||||
m_SecondBuff = 0;
|
||||
}
|
||||
|
||||
void CAudio::SetViIntr ( DWORD VI_INTR_TIME )
|
||||
|
@ -83,6 +86,7 @@ void CAudio::SetViIntr ( DWORD VI_INTR_TIME )
|
|||
|
||||
void CAudio::SetFrequency (DWORD Dacrate, DWORD System)
|
||||
{
|
||||
WriteTraceF(TraceAudio,__FUNCTION__ "(Dacrate: %X System: %d): AI_BITRATE_REG = %X",Dacrate,System,_Reg->AI_BITRATE_REG);
|
||||
DWORD Frequency;
|
||||
|
||||
switch (System) {
|
||||
|
@ -93,6 +97,8 @@ void CAudio::SetFrequency (DWORD Dacrate, DWORD System)
|
|||
|
||||
//nBlockAlign = 16 / 8 * 2;
|
||||
m_BytesPerSecond = Frequency * 4;
|
||||
m_BytesPerSecond = 194532;
|
||||
m_BytesPerSecond = 128024;
|
||||
|
||||
if (System == SYSTEM_PAL) {
|
||||
m_FramesPerSecond = 50;
|
||||
|
|
|
@ -12,20 +12,10 @@ public:
|
|||
void SetViIntr ( DWORD VI_INTR_TIME );
|
||||
void SetFrequency ( DWORD Dacrate, DWORD System );
|
||||
|
||||
/* void AiCallBack ( void );
|
||||
void UpdateAudioTimer ( DWORD CountsPerFrame );
|
||||
*/
|
||||
private:
|
||||
DWORD m_CurrentLength;
|
||||
DWORD m_SecondBuff;
|
||||
DWORD m_Status;
|
||||
DWORD m_BytesPerSecond;
|
||||
int m_CountsPerByte;
|
||||
int m_FramesPerSecond;
|
||||
|
||||
/* float m_VSyncTiming;
|
||||
double m_FramesPerSecond;
|
||||
DWORD m_Length;
|
||||
DWORD m_CurrentCount;
|
||||
DWORD m_IntScheduled;*/
|
||||
};
|
||||
|
|
|
@ -875,7 +875,7 @@ void CMipsMemoryVM::Compile_SW_Const ( DWORD Value, DWORD VAddr ) {
|
|||
case 0x0450000C:
|
||||
/* Clear Interrupt */;
|
||||
AndConstToVariable(~MI_INTR_AI,&_Reg->MI_INTR_REG,"MI_INTR_REG");
|
||||
if (bFixedAudio())
|
||||
if (!bFixedAudio())
|
||||
{
|
||||
AndConstToVariable(~MI_INTR_AI,&_Reg->m_AudioIntrReg,"m_AudioIntrReg");
|
||||
}
|
||||
|
@ -1141,7 +1141,10 @@ void CMipsMemoryVM::Compile_SW_Register (x86Reg Reg, DWORD VAddr )
|
|||
case 0x0450000C:
|
||||
/* Clear Interrupt */;
|
||||
AndConstToVariable(~MI_INTR_AI,&_Reg->MI_INTR_REG,"MI_INTR_REG");
|
||||
AndConstToVariable(~MI_INTR_AI,&_Reg->m_AudioIntrReg,"m_AudioIntrReg");
|
||||
if (!bFixedAudio())
|
||||
{
|
||||
AndConstToVariable(~MI_INTR_AI,&_Reg->m_AudioIntrReg,"m_AudioIntrReg");
|
||||
}
|
||||
BeforeCallDirect(m_RegWorkingSet);
|
||||
MoveConstToX86reg((DWORD)_Reg,x86_ECX);
|
||||
Call_Direct(AddressOf(&CRegisters::CheckInterrupts),"CRegisters::CheckInterrupts");
|
||||
|
|
|
@ -449,6 +449,10 @@ void CN64System::DisplayRomInfo ( WND_HANDLE hParent ) {
|
|||
|
||||
void CN64System::Pause(void)
|
||||
{
|
||||
if (m_EndEmulation)
|
||||
{
|
||||
return;
|
||||
}
|
||||
ResetEvent(m_hPauseEvent);
|
||||
_Settings->SaveBool(GameRunning_CPU_Paused,true);
|
||||
_Notify->RefreshMenu();
|
||||
|
|
|
@ -816,7 +816,7 @@ CCompiledFunc * CRecompiler::CompilerCode ( void )
|
|||
|
||||
|
||||
void CRecompiler::ClearRecompCode_Phys(DWORD Address, int length, REMOVE_REASON Reason ) {
|
||||
WriteTraceF(TraceError,"CRecompiler::ClearRecompCode_Phys Not Implemented (Address: %X, Length: %d Reason: %d)",Address,length,Reason);
|
||||
//WriteTraceF(TraceError,"CRecompiler::ClearRecompCode_Phys Not Implemented (Address: %X, Length: %d Reason: %d)",Address,length,Reason);
|
||||
|
||||
if (LookUpMode() == FuncFind_VirtualLookup)
|
||||
{
|
||||
|
|
|
@ -242,7 +242,9 @@ bool CAudioPlugin::ValidPluginVersion(PLUGIN_INFO * PluginInfo) {
|
|||
|
||||
|
||||
void CAudioPlugin::UnloadPlugin(void) {
|
||||
if (m_hAudioThread) {
|
||||
if (m_hAudioThread)
|
||||
{
|
||||
WriteTraceF(TraceAudio,__FUNCTION__ ": Terminate Audio Thread");
|
||||
TerminateThread(m_hAudioThread,0);
|
||||
m_hAudioThread = NULL;
|
||||
}
|
||||
|
@ -264,6 +266,8 @@ void CAudioPlugin::UnloadPlugin(void) {
|
|||
void CAudioPlugin::DacrateChanged (SystemType Type)
|
||||
{
|
||||
if (!Initilized()) { return; }
|
||||
WriteTraceF(TraceAudio,__FUNCTION__ ": SystemType: %s", Type == SYSTEM_NTSC ? "SYSTEM_NTSC" : "SYSTEM_PAL");
|
||||
|
||||
DWORD Frequency = _Reg->AI_DACRATE_REG * 30;
|
||||
DWORD CountsPerSecond = (_Reg->VI_V_SYNC_REG != 0 ? (_Reg->VI_V_SYNC_REG + 1) * _Settings->LoadDword(Game_ViRefreshRate) : 500000) * 60;
|
||||
m_DacrateChanged(Type);
|
||||
|
@ -271,7 +275,8 @@ void CAudioPlugin::DacrateChanged (SystemType Type)
|
|||
|
||||
void CAudioPlugin::AudioThread (CAudioPlugin * _this) {
|
||||
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL );
|
||||
for (;;) {
|
||||
for (;;)
|
||||
{
|
||||
_this->Update(true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -430,6 +430,19 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD FromAccelerator, DWORD Men
|
|||
_Settings->SaveDword(Debugger_AppLogLevel, LogLevel );
|
||||
}
|
||||
break;
|
||||
case ID_DEBUGGER_APPLOG_AUDIO_EMU:
|
||||
{
|
||||
DWORD LogLevel = _Settings->LoadDword(Debugger_AppLogLevel);
|
||||
if ((LogLevel & TraceAudio) != 0)
|
||||
{
|
||||
LogLevel &= ~TraceAudio;
|
||||
} else {
|
||||
|
||||
LogLevel |= TraceAudio;
|
||||
}
|
||||
_Settings->SaveDword(Debugger_AppLogLevel, LogLevel );
|
||||
}
|
||||
break;
|
||||
case ID_DEBUGGER_APPLOG_FLUSH:
|
||||
_Settings->SaveBool(Debugger_AppLogFlush,!_Settings->LoadBool(Debugger_AppLogFlush));
|
||||
break;
|
||||
|
@ -1004,6 +1017,10 @@ void CMainMenu::FillOutMenu ( MENU_HANDLE hMenu ) {
|
|||
if ((LogLevel & TraceGfxPlugin) != 0) { Item.ItemTicked = true; }
|
||||
DebugAppLoggingMenu.push_back(Item);
|
||||
|
||||
Item.Reset(ID_DEBUGGER_APPLOG_AUDIO_EMU,EMPTY_STRING,EMPTY_STDSTR,NULL,"Audio Emulation" );
|
||||
if ((LogLevel & TraceAudio) != 0) { Item.ItemTicked = true; }
|
||||
DebugAppLoggingMenu.push_back(Item);
|
||||
|
||||
Item.Reset(ID_DEBUGGER_APPLOG_DEBUG,EMPTY_STRING,EMPTY_STDSTR,NULL,"Debug Messages" );
|
||||
if ((LogLevel & TraceDebug) != 0) { Item.ItemTicked = true; }
|
||||
DebugAppLoggingMenu.push_back(Item);
|
||||
|
|
|
@ -40,7 +40,7 @@ enum MainMenuID {
|
|||
// App logging
|
||||
ID_DEBUGGER_APPLOG_ERRORS, ID_DEBUGGER_APPLOG_SETTINGS, ID_DEBUGGER_APPLOG_GFX_PLUGIN,
|
||||
ID_DEBUGGER_APPLOG_DEBUG, ID_DEBUGGER_APPLOG_FLUSH, ID_DEBUGGER_APPLOG_RECOMPILER,
|
||||
ID_DEBUGGER_APPLOG_RSP, ID_DEBUGGER_APPLOG_TLB,
|
||||
ID_DEBUGGER_APPLOG_RSP, ID_DEBUGGER_APPLOG_TLB, ID_DEBUGGER_APPLOG_AUDIO_EMU,
|
||||
|
||||
//Profile Menu
|
||||
ID_PROFILE_PROFILE, ID_PROFILE_RESETCOUNTER, ID_PROFILE_GENERATELOG,
|
||||
|
|
Binary file not shown.
|
@ -925,8 +925,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,7,51,50
|
||||
PRODUCTVERSION 1,7,51,50
|
||||
FILEVERSION 1,7,51,51
|
||||
PRODUCTVERSION 1,7,51,51
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -943,12 +943,12 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", " "
|
||||
VALUE "FileDescription", "Project64"
|
||||
VALUE "FileVersion", "1, 7, 51, 50"
|
||||
VALUE "FileVersion", "1, 7, 51, 51"
|
||||
VALUE "InternalName", "Project64"
|
||||
VALUE "LegalCopyright", "Copyright © 2010"
|
||||
VALUE "OriginalFilename", "Project64.exe"
|
||||
VALUE "ProductName", " Project64"
|
||||
VALUE "ProductVersion", "1, 7, 51, 50"
|
||||
VALUE "ProductVersion", "1, 7, 51, 51"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
Loading…
Reference in New Issue