/[pcsx2_0.9.7]/trunk/pcsx2/IopIrq.cpp
ViewVC logotype

Annotation of /trunk/pcsx2/IopIrq.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 31 - (hide annotations) (download)
Tue Sep 7 03:24:11 2010 UTC (10 years, 2 months ago) by william
File size: 1428 byte(s)
committing r3113 initial commit again...
1 william 31 /* PCSX2 - PS2 Emulator for PCs
2     * Copyright (C) 2002-2010 PCSX2 Dev Team
3     *
4     * PCSX2 is free software: you can redistribute it and/or modify it under the terms
5     * of the GNU Lesser General Public License as published by the Free Software Found-
6     * ation, either version 3 of the License, or (at your option) any later version.
7     *
8     * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
9     * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10     * PURPOSE. See the GNU General Public License for more details.
11     *
12     * You should have received a copy of the GNU General Public License along with PCSX2.
13     * If not, see <http://www.gnu.org/licenses/>.
14     */
15    
16     #include "PrecompiledHeader.h"
17     #include "IopCommon.h"
18    
19     using namespace R3000A;
20    
21     void dev9Interrupt()
22     {
23     if ((dev9Handler != NULL) && (dev9Handler() != 1)) return;
24    
25     iopIntcIrq(13);
26     hwIntcIrq(INTC_SBUS);
27     }
28    
29     void dev9Irq(int cycles)
30     {
31     PSX_INT(IopEvt_DEV9, cycles);
32     }
33    
34     void usbInterrupt()
35     {
36     if (usbHandler != NULL && (usbHandler() != 1)) return;
37    
38     iopIntcIrq(22);
39     hwIntcIrq(INTC_SBUS);
40     }
41    
42     void usbIrq(int cycles)
43     {
44     PSX_INT(IopEvt_USB, cycles);
45     }
46    
47     void fwIrq()
48     {
49     iopIntcIrq(24);
50     hwIntcIrq(INTC_SBUS);
51     }
52    
53     void spu2Irq()
54     {
55     #ifdef SPU2IRQTEST
56     Console.Warning("spu2Irq");
57     #endif
58     iopIntcIrq(9);
59     hwIntcIrq(INTC_SBUS);
60     }
61    
62     void iopIntcIrq(uint irqType)
63     {
64     psxHu32(0x1070) |= 1 << irqType;
65     iopTestIntc();
66     }

  ViewVC Help
Powered by ViewVC 1.1.22