Mercurial > audlegacy-plugins
annotate src/psf2/peops2/dma.c @ 2737:62cc6d667119
Import a bunch of stuff for new psf2 plugin.
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Mon, 30 Jun 2008 20:20:53 -0500 |
parents | |
children |
rev | line source |
---|---|
2737
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
1 /*************************************************************************** |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
2 dma.c - description |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
3 ------------------- |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
4 begin : Wed May 15 2002 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
5 copyright : (C) 2002 by Pete Bernert |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
6 email : BlackDove@addcom.de |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
7 ***************************************************************************/ |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
8 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
9 /*************************************************************************** |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
10 * * |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
11 * This program is free software; you can redistribute it and/or modify * |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
12 * it under the terms of the GNU General Public License as published by * |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
13 * the Free Software Foundation; either version 2 of the License, or * |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
14 * (at your option) any later version. See also the license.txt file for * |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
15 * additional informations. * |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
16 * * |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
17 ***************************************************************************/ |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
18 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
19 //*************************************************************************// |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
20 // History of changes: |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
21 // |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
22 // 2004/04/04 - Pete |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
23 // - changed plugin to emulate PS2 spu |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
24 // |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
25 // 2002/05/15 - Pete |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
26 // - generic cleanup for the Peops release |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
27 // |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
28 //*************************************************************************// |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
29 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
30 #include "../peops2/stdafx.h" |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
31 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
32 #define _IN_DMA |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
33 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
34 #include "../peops2/externals.h" |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
35 #include "../peops2/registers.h" |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
36 //#include "debug.h" |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
37 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
38 extern uint32 psx_ram[(2*1024*1024)/4]; |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
39 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
40 //////////////////////////////////////////////////////////////////////// |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
41 // READ DMA (many values) |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
42 //////////////////////////////////////////////////////////////////////// |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
43 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
44 EXPORT_GCC void CALLBACK SPU2readDMA4Mem(u32 usPSXMem,int iSize) |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
45 { |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
46 int i; |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
47 u16 *ram16 = (u16 *)&psx_ram[0]; |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
48 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
49 for(i=0;i<iSize;i++) |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
50 { |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
51 ram16[usPSXMem>>1]=spuMem[spuAddr2[0]]; // spu addr 0 got by writeregister |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
52 usPSXMem+=2; |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
53 spuAddr2[0]++; // inc spu addr |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
54 if(spuAddr2[0]>0xfffff) spuAddr2[0]=0; // wrap |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
55 } |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
56 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
57 spuAddr2[0]+=0x20; //????? |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
58 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
59 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
60 iSpuAsyncWait=0; |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
61 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
62 // got from J.F. and Kanodin... is it needed? |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
63 regArea[(PS2_C0_ADMAS)>>1]=0; // Auto DMA complete |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
64 spuStat2[0]=0x80; // DMA complete |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
65 } |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
66 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
67 EXPORT_GCC void CALLBACK SPU2readDMA7Mem(u32 usPSXMem,int iSize) |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
68 { |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
69 int i; |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
70 u16 *ram16 = (u16 *)&psx_ram[0]; |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
71 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
72 for(i=0;i<iSize;i++) |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
73 { |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
74 ram16[usPSXMem>>1]=spuMem[spuAddr2[1]]; // spu addr 1 got by writeregister |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
75 usPSXMem+=2; |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
76 spuAddr2[1]++; // inc spu addr |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
77 if(spuAddr2[1]>0xfffff) spuAddr2[1]=0; // wrap |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
78 } |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
79 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
80 spuAddr2[1]+=0x20; //????? |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
81 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
82 iSpuAsyncWait=0; |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
83 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
84 // got from J.F. and Kanodin... is it needed? |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
85 regArea[(PS2_C1_ADMAS)>>1]=0; // Auto DMA complete |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
86 spuStat2[1]=0x80; // DMA complete |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
87 } |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
88 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
89 //////////////////////////////////////////////////////////////////////// |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
90 //////////////////////////////////////////////////////////////////////// |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
91 //////////////////////////////////////////////////////////////////////// |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
92 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
93 // to investigate: do sound data updates by writedma affect spu |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
94 // irqs? Will an irq be triggered, if new data is written to |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
95 // the memory irq address? |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
96 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
97 //////////////////////////////////////////////////////////////////////// |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
98 // WRITE DMA (many values) |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
99 //////////////////////////////////////////////////////////////////////// |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
100 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
101 EXPORT_GCC void CALLBACK SPU2writeDMA4Mem(u32 usPSXMem,int iSize) |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
102 { |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
103 int i; |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
104 u16 *ram16 = (u16 *)&psx_ram[0]; |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
105 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
106 for(i=0;i<iSize;i++) |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
107 { |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
108 spuMem[spuAddr2[0]] = ram16[usPSXMem>>1]; // spu addr 0 got by writeregister |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
109 usPSXMem+=2; |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
110 spuAddr2[0]++; // inc spu addr |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
111 if(spuAddr2[0]>0xfffff) spuAddr2[0]=0; // wrap |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
112 } |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
113 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
114 iSpuAsyncWait=0; |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
115 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
116 // got from J.F. and Kanodin... is it needed? |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
117 spuStat2[0]=0x80; // DMA complete |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
118 } |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
119 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
120 EXPORT_GCC void CALLBACK SPU2writeDMA7Mem(u32 usPSXMem,int iSize) |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
121 { |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
122 int i; |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
123 u16 *ram16 = (u16 *)&psx_ram[0]; |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
124 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
125 for(i=0;i<iSize;i++) |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
126 { |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
127 spuMem[spuAddr2[1]] = ram16[usPSXMem>>1]; // spu addr 1 got by writeregister |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
128 spuAddr2[1]++; // inc spu addr |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
129 if(spuAddr2[1]>0xfffff) spuAddr2[1]=0; // wrap |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
130 } |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
131 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
132 iSpuAsyncWait=0; |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
133 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
134 // got from J.F. and Kanodin... is it needed? |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
135 spuStat2[1]=0x80; // DMA complete |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
136 } |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
137 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
138 //////////////////////////////////////////////////////////////////////// |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
139 // INTERRUPTS |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
140 //////////////////////////////////////////////////////////////////////// |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
141 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
142 void InterruptDMA4(void) |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
143 { |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
144 // taken from linuzappz NULL spu2 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
145 // spu2Rs16(CORE0_ATTR)&= ~0x30; |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
146 // spu2Rs16(REG__1B0) = 0; |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
147 // spu2Rs16(SPU2_STATX_WRDY_M)|= 0x80; |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
148 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
149 spuCtrl2[0]&=~0x30; |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
150 regArea[(PS2_C0_ADMAS)>>1]=0; |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
151 spuStat2[0]|=0x80; |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
152 } |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
153 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
154 EXPORT_GCC void CALLBACK SPU2interruptDMA4(void) |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
155 { |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
156 InterruptDMA4(); |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
157 } |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
158 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
159 void InterruptDMA7(void) |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
160 { |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
161 // taken from linuzappz NULL spu2 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
162 // spu2Rs16(CORE1_ATTR)&= ~0x30; |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
163 // spu2Rs16(REG__5B0) = 0; |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
164 // spu2Rs16(SPU2_STATX_DREQ)|= 0x80; |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
165 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
166 spuCtrl2[1]&=~0x30; |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
167 regArea[(PS2_C1_ADMAS)>>1]=0; |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
168 spuStat2[1]|=0x80; |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
169 } |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
170 |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
171 EXPORT_GCC void CALLBACK SPU2interruptDMA7(void) |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
172 { |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
173 InterruptDMA7(); |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
174 } |
62cc6d667119
Import a bunch of stuff for new psf2 plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
175 |