USBqemu: Work around the IRQ double-throw spam by having a min number of cycles between IRQ calls. 100% guaranteed hackyness, but I can still type in MH so it will do until I can look at it without my eyes closing against my will.

Also make the project output into the plugins folder.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4901 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gigaherz 2011-09-04 02:30:40 +00:00
parent 3a4a215926
commit 33b551e73f
2 changed files with 13 additions and 7 deletions

View File

@ -41,7 +41,7 @@
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)bin\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\plugins\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</LinkIncremental>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
@ -50,6 +50,7 @@
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)-dbg</TargetName>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\plugins\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>

View File

@ -31,8 +31,8 @@
#include "vl.h"
#include "../USB.h"
uint32_t bits = 0;
uint32_t need_interrupt = 0;
s64 last_cycle = 0;
#define MIN_IRQ_INTERVAL 64 /* hack */
extern FILE* usbLog;
@ -59,14 +59,15 @@ int dprintf(const char *fmt,...)
#endif
}
/* Update IRQ levels */
static inline void ohci_intr_update(OHCIState *ohci)
{
bits = (ohci->intr_status & ohci->intr) & 0x7fffffff;
uint32_t bits = (ohci->intr_status & ohci->intr) & 0x7fffffff;
if ((ohci->intr & OHCI_INTR_MIE) && (bits!=0)) // && (ohci->ctl & OHCI_CTL_HCFS))
{
/*
static char reasons[1024];
int first=1;
@ -81,10 +82,14 @@ static inline void ohci_intr_update(OHCIState *ohci)
reason_add(OHCI_INTR_FNO,"Frame number overflow");
reason_add(OHCI_INTR_RHSC,"Root hub status change");
reason_add(OHCI_INTR_OC,"Ownership change");
*/
if((ohci->ctl & OHCI_CTL_HCFS)==OHCI_USB_OPERATIONAL)
{
USBirq(1);
if( (get_clock() - last_cycle) > MIN_IRQ_INTERVAL)
{
USBirq(1);
last_cycle = get_clock();
}
//dprintf("usb-ohci: Interrupt Called. Reason(s): %s\n",reasons);
}
}