annotate vu1code/basic.vsm @ 58:1cccf6d964b7

*** empty log message ***
author gongo
date Thu, 09 Nov 2006 01:43:07 +0000
parents 0fae5658fb0b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
1 ; ---------------------------------------------------------------------
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
2 ;
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
3 ;
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
4 ; vu1 micro code for basic sample
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
5 ;
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
6 ;
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
7 ; VF01 - VF04 : perspective + transformation matrix
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
8 ; VF05 - VF08 : light color matrix
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
9 ; VF09 - VF12 : X light vector matrix(3 lighting vector + 1 ambient)
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
10 ; VF15 : gif tag
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
11 ; VF20 : source vertex
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
12 ; VF21 : source normal
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
13 ; VF22 : source st
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
14 ; VF23 : source color
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
15 ;
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
16 ;
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
17 ; VI00 : 0 (定数レジスタ)
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
18 ; VI01 : ポインタ
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
19 ; VI02 : pointer for gif tag / for XGKICK
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
20 ; VI03 : pointer for vertex
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
21 ; VI04 : pointer for normal
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
22 ; VI05 : pointer for st
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
23 ; VI06 : pointer for color
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
24 ; VI07 : store pointer for RGBAQ
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
25 ; VI08 : store pointer for ST
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
26 ; VI09 : store pointer for XYZF2
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
27 ; VI10 : counter for vertices
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
28 ;
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
29 ; クリッピングの処理に使用します
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
30 ; -----------------------------------
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
31 ; VI14 : vertex counter
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
32 ;
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
33 ; VI15 : リンクレジスタ
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
34 ;
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
35 ; ---------------------------------------------------------------------
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
36 NOP IADDIU VI01, VI00, 0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
37 NOP IADDIU VI02, VI00, 4
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
38 NOP IADDIU VI03, VI00, 16 ; screen matrix X object matrix
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
39 NOP BAL VI15, MulMatrix
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
40 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
41
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
42 NOP LOI 255.0 ; iレジスタ即値ロード
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
43 MULi.w VF16, VF00, I NOP; vf00 (0.0, 0.0, 0.0, 1.0)
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
44
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
45 ; ------------------------------------------------------------
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
46 ; クリッピング用の初期値を設定
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
47 ; ------------------------------------------------------------
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
48 NOP LOI -2048.0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
49 ADDi.xy VF29,VF00, I NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
50 NOP LOI -8388608.0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
51 ADDi.z VF29,VF00, I NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
52 ADDw.xy VF30,VF00, VF00 NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
53 NOP LOI 0.00012207
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
54 ADDi.z VF30,VF00,I NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
55 NOP LOI 1024.0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
56 MULi.w VF30,VF00,I NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
57 ;------------------------------------------------------------------
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
58
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
59 NOP IADDIU VI01, VI00, 8
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
60 NOP LQI VF09, (VI01++) ; (8) load light color matrix
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
61 NOP LQI VF10, (VI01++)
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
62 NOP LQI VF11, (VI01++)
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
63 NOP LQI VF12, (VI01++)
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
64 NOP LQI VF05, (VI01++) ; (12) load light vector matrix
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
65 NOP LQI VF06, (VI01++)
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
66 NOP LQI VF07, (VI01++)
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
67 NOP LQI VF08, (VI01++)
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
68 NOP LQI VF01, (VI01++) ; (16) load screen x transformation matrix
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
69 NOP LQI VF02, (VI01++)
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
70 NOP LQI VF03, (VI01++)
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
71 NOP LQI VF04, (VI01++)
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
72
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
73 NOP IADDIU VI12,VI00,0x7fff ; VI12: 0x7fff
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
74 NOP IADDIU VI13,VI12,0x0001 ; VI13: 0x8000
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
75
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
76 NOP[E] NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
77 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
78
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
79 START0:
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
80 NOP XTOP VI01 ; VI01にVIFのTOPレジスタ値をロード
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
81 NOP ILWR.x VI10, (VI01)x ; copy to VI10
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
82 NOP IADDIU VI11, VI00, 0x7fff ; set mask
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
83 NOP IAND VI10, VI11, VI10 ; mask. VI10 is counter for vertices.
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
84 NOP LQ VF19, 0(VI01) ; load gif tag
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
85 NOP IADDIU VI03, VI01, 1 ; pointer for vertices
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
86 NOP IADD VI04, VI03, VI10 ; pointer for normal
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
87 NOP IADD VI05, VI04, VI10 ; pointer for color
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
88 NOP IADD VI06, VI05, VI10 ; pointer for st
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
89 NOP IADD VI02, VI06, VI10 ; set XGKICK pointer
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
90 NOP SQ VF19, 0(VI02) ; store gif tag
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
91 NOP IADDIU VI07, VI02, 2 ; set store pointer for RGBAQ
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
92 NOP IADDIU VI08, VI02, 1 ; set store pointer for ST
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
93 NOP IADDIU VI09, VI02, 3 ; set store pointer for XYZF2
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
94 NOP IAND VI14, VI14, VI00 ;
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
95 NOP IADDIU VI14, VI00, 3 ; VI14(counter)に3をセット
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
96 NOP FCSET 0x000000 ; クリッピングフラグ初期化
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
97 LOOP:
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
98 NOP LQI VF20, (VI03++) ; load vertex
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
99 NOP LQI VF21, (VI04++) ; load normal
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
100 NOP LQI VF22, (VI05++) ; load color
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
101 NOP LQI VF23, (VI06++) ; load st
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
102 ; ------------------------------------------------------------------
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
103 ; counter--;
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
104 ; if (counter==0) goto CLEAR2 // counter(VI14) は頂点数のカウンタ
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
105 ; else goto CLEAR1
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
106 ; ------------------------------------------------------------------
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
107 NOP IADDI VI14, VI14, -1 ; VI14(counter)をデクリメント
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
108 NOP IBEQ VI14, VI00, CLEAR2 ; VI14==0ならCLEAR2:へジャンプ
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
109 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
110 NOP B CLEAR1 ;
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
111 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
112 CLEAR2:
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
113 NOP IADDIU VI14, VI00, 2 ; VI14(counter)を初期化
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
114 NOP FCSET 0x000000 ; クリッピングフラグをクリア
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
115 ;------------------------------------------------------------------
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
116 CLEAR1:
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
117
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
118 ; --- rotation/translation/perspective transform ---
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
119 MULAx.xyzw ACC, VF01, VF20x NOP ; rot/trans/pers
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
120 MADDAy.xyzw ACC, VF02, VF20y NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
121 MADDAz.xyzw ACC, VF03, VF20z NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
122 MADDw.xyzw VF25, VF04, VF20w NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
123 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
124 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
125 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
126 NOP DIV Q, VF00w, VF25w
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
127
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
128 ; --- light matrix X normal ---
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
129 MULAx.xyzw ACC, VF05, VF21x NOP ; dot products
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
130 MADDAy.xyzw ACC, VF06, VF21y NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
131 MADDAz.xyzw ACC, VF07, VF21z NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
132 MADDw.xyzw VF13, VF08, VF21w NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
133 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
134 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
135 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
136 MAXx.xyzw VF13, VF13, VF00x NOP ; cut under 0.0f
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
137
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
138 ; --- calc transformed position and store it ---
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
139 MULq VF28, VF25, Q NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
140 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
141 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
142 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
143 FTOI4 VF27, VF28 NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
144
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
145 ADD VF31,VF28,VF29 NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
146 MUL VF31,VF31,VF30 NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
147
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
148 ; ------------------------------------------------------------------
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
149 ; Triangleは3頂点ごとに描画キックするので、3頂点カウンタを設けたい
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
150 ; 3頂点の内、どれか1つにでもFCが立てばそれを保持したい
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
151 ; ------------------------------------------------------------------
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
152 NOP FCAND VI01, 0x03fff ; FCの2回前までの結果をVI01に
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
153 NOP IBEQ VI01, VI00, CLIP1 ; (FC==0)ではみ出し無し
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
154 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
155 NOP B CLIP0 ;
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
156 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
157 CLIP1:
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
158 CLIPw VF31,VF30w NOP ; クリッピング検査
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
159 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
160 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
161 ; ------------------------------------------------------------------
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
162 CLIP0:
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
163 ; --- store XYZF2 ---
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
164 NOP SQ VF27, 0(VI09)
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
165 NOP FCAND VI01,0x03fff
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
166 NOP IADDIU VI11,VI01,0x7fff
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
167 ; NOP IADDIU VI01, VI00, 0x8000
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
168 ; NOP IAND VI11,VI11,VI01
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
169 NOP IAND VI11,VI11,VI13
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
170 NOP ISW.w VI11,0(VI09)
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
171 NOP IADDIU VI09, VI09, 3
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
172
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
173 ; --- load st and store it ---
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
174 MULq.xyz VF27, VF23, Q NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
175 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
176 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
177 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
178 NOP SQ VF27, 0(VI08)
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
179 NOP IADDIU VI08, VI08, 3
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
180 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
181 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
182
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
183 ; --- color * dot-product ---
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
184 MULAx.xyzw ACC, VF09, VF13x NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
185 MADDAy.xyzw ACC, VF10, VF13y NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
186 MADDAz.xyzw ACC, VF11, VF13z NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
187 MADDw.xyzw VF14, VF12, VF13w NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
188 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
189 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
190 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
191 MUL.xyzw VF27, VF22, VF14 NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
192 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
193 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
194 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
195 MINI.w VF27, VF27, VF16w NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
196 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
197 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
198 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
199 FTOI0 VF26, VF27 NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
200 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
201 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
202 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
203 NOP SQ VF26, 0(VI07)
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
204 NOP IADDIU VI07, VI07, 3
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
205
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
206 ; --- decrement loop ---
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
207 NOP IADDI VI10, VI10, -1
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
208 NOP IBNE VI10, VI00, LOOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
209
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
210 ; --- send result to GIF and stop ---
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
211 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
212 NOP XGKICK VI02
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
213 NOP[E] NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
214 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
215 NOP B START0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
216 NOP NOP ;Take care!! Don't forget.
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
217
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
218
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
219 ; -------------------------------------------------------------------
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
220 ; MulMatrix
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
221 ; VI01 : address of source matrix
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
222 ; VI02 : address of source matrix
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
223 ; VI03 : address of destination matrix
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
224 ;
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
225
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
226 MulMatrix:
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
227 NOP LQI.xyzw VF08, (VI02++)
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
228 NOP LQI.xyzw VF04, (VI01++)
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
229 NOP LQI.xyzw VF05, (VI01++)
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
230 NOP LQI.xyzw VF06, (VI01++)
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
231 NOP LQI.xyzw VF07, (VI01++)
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
232 MULAx.xyzw ACC, VF04, VF08x LQI.xyzw VF09, (VI02++)
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
233 MADDAy.xyzw ACC, VF05, VF08y NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
234 MADDAz.xyzw ACC, VF06, VF08z NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
235 MADDw.xyzw VF12, VF07, VF08w NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
236 MULAx.xyzw ACC, VF04, VF09x LQI.xyzw VF10, (VI02++)
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
237 MADDAy.xyzw ACC, VF05, VF09y NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
238 MADDAz.xyzw ACC, VF06, VF09z NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
239 MADDw.xyzw VF13, VF07, VF09w SQI.xyzw VF12, (VI03++)
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
240 MULAx.xyzw ACC, VF04, VF10x LQI.xyzw VF11, (VI02++)
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
241 MADDAy.xyzw ACC, VF05, VF10y NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
242 MADDAz.xyzw ACC, VF06, VF10z NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
243 MADDw.xyzw VF14, VF07, VF10w SQI.xyzw VF13, (VI03++)
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
244 MULAx.xyzw ACC, VF04, VF11x NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
245 MADDAy.xyzw ACC, VF05, VF11y NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
246 MADDAz.xyzw ACC, VF06, VF11z NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
247 MADDw.xyzw VF15, VF07, VF11w SQI.xyzw VF14, (VI03++)
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
248 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
249 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
250 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
251 NOP SQI.xyzw VF15, (VI03++)
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
252 NOP NOP
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
253 NOP JR VI15
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
254 NOP NOP