view vu1code/MPG.dsm @ 12:b405fe1a6920

*** empty log message ***
author gongo
date Sat, 04 Nov 2006 08:55:26 +0000
parents 0fae5658fb0b
children
line wrap: on
line source

/* 
 *  MPG(Micro Program) for VU1
 *  MPG is added to packet's head in chain mode DMA
 */

.data
.DmaPackVif 0

.include "vumacros.h"

.global Mpg_start
.global Dma_start
.global Screen_matrix
.global Rot_trans_matrix
.global Light_color_matrix
.global Light_matrix

Mpg_start:
.align 0
DMAcnt *
MPG 0, *
.include "basic.vsm"
.EndMPG
.EndDmaData

Dma_start:
DMAnext *, Mpg_start
unpack 4, 4, V4_32, 0, *; Screen Matrix
Screen_matrix:
fwzyx 0.000000, 0.000000, 0.000000, 35.752483
fwzyx 0.000000, 0.000000, -14.765776, 0.000000
fwzyx 0.050000, 4995000.000000, 102.400002, 102.400002
fwzyx 1.000000, 100000000.000000, 2048.000000, 2048.000000
.EndUnpack

unpack 4, 4, V4_32, 4, *      ; ROTATION & TRANSLATION MATRIX
Rot_trans_matrix:
fwzyx 0.0, -0.000000, -0.000000, 1.000000
fwzyx 0.0, -0.000000, 1.000000, 0.000000
fwzyx 0.0, 1.000000, 0.000000, 0.000000
fwzyx 1.0, 0.000000, 0.000000, 0.000000
.EndUnpack

unpack 4, 4, V4_32, 8, *      ; LIGHT COLOR MATRIX
Light_color_matrix:
fxyzw 0.2, 0.7, 0.0, 0.0
fxyzw 0.0, 0.0, 0.0, 0.0
fxyzw 0.0, 0.0, 0.0, 0.0
fxyzw 1.0, 1.0, 1.0, 1.0
.EndUnpack

unpack 4, 4, V4_32, 12, *      ; LIGHT VECTOR MATRIX
Light_matrix:
fxyzw 0.0, 0.0, 0.0, 0.000000
fxyzw 1.0, 0.0, 1.0, 0.000000
fxyzw 0.0, 1.0, 0.0, 0.000000
fxyzw 0.0, 0.0, 0.0, 1.000000
.EndUnpack

MSCAL 0         ;
BASE 0          ; sets the vif1 base register
OFFSET 512      ; sets the vif1 offset register
.EndDmaData