B-68
DSP96002 USER’S MANUAL
MOTOROLA
3-D Graphics Illumination
Program
ICycles
Words
move #vec,r0 2 2
move #ktbl,r4 2 2
move x:(r0)+,d6.s y:,d7.s 1 1
fmpy.s d6,d7,d0 x:(r0)+,d6.s y:,d7.s 1 1
fmpy.s d6,d7,d1 x:(r0)+,d6.s y:,d7.s 1 1
fmpy d6,d7,d1 fadd.s d1,d0 x:(r0)+,d6.s y:,d7.s 1 1
fmpy d6,d7,d1 fadd.s d1,d0 x:(r4)+,d2.s 1 1
fmpy.s d2,d0,d0 x:(r4)+,n1 1 1
intrz d0 x:(r0)+,d6.s y:,d7.s 1 1
fmpy.s d6,d7,d0 d0.l,r1 1 1
move x:(r0)+,d6.s y:,d7.s 1 1
fmpy d6,d7,d0 fadd.s d0,d1 x:(r1+n1),d2.s 1 2
fadd.s d0,d1 x:(r4)+,d0.s 1 1
fmpy.s d0,d1,d1 x:(r4)+,d0.s 1 1
fadd.s d1,d2 x:(r4)+,d1.s 1 1
fmpy.s d2,d0 x:(r4),d2.s 1 1
fmpy.s d1,d2,d1 1 1
fadd.s d1,d0 1 1
--- ---
Totals: 20 21
The illumination value I is in d0.
Reference: "Fundamentals of Interactive Computer Graphics",
James D. Foley, Andries Van Dam
Addison-Wesley 1982
B.1.36
Pseudorandom Number Generation
This pseudorandom number generator requires a 32 bit seed and returns an unsigned 32 bit random num-
ber. There are no restrictions on the value of the seed. The equation for the seed is:
seed = (69069*seed + 1) mod 2**32
Pseudorandom Number Generation
Program
ICycles
Words
move x:seed,d0.l ;get seed 2 2
move #69069,d1.l ;get constant 2 2
mpyu d0,d1,d0 ;multiply 1 1
inc d0 ; +1 1 1
move d0.l,x:seed ;mod 2**32, new seed 2 2
--- ---
Totals: 8 8
Summary of Contents for DSP96002
Page 3: ...1 2 DSP96002 USER S MANUAL MOTOROLA ...
Page 38: ...MOTOROLA DSP96002 USER S MANUAL 3 15 Figure 3 4 Modulo Arithmetic Unit Block Diagram ...
Page 39: ...3 16 DSP96002 USER S MANUAL MOTOROLA ...
Page 53: ...4 14 DSP96002 USER S MANUAL MOTOROLA ...
Page 76: ...MOTOROLA DSP96002 USER S MANUAL 5 23 Figure 5 8 Address Modifier Summary ...
Page 86: ...6 10 DSP96002 USER S MANUAL MOTOROLA ...
Page 101: ...MOTOROLA DSP96002 USER S MANUAL 7 15 Figure 7 9 HI Block Diagram One Port ...
Page 140: ...7 54 DSP96002 USER S MANUAL MOTOROLA ...
Page 166: ...9 10 DSP96002 USER S MANUAL MOTOROLA ...
Page 181: ...MOTOROLA DSP96002 USER S MANUAL 10 15 Figure 10 8 Program Address Bus FIFO ...
Page 337: ...MOTOROLA DSP96002 USER S MANUAL A 149 ...
Page 404: ...A 216 DSP96002 USER S MANUAL MOTOROLA PC xxxx D ...
Page 460: ...A 272 DSP96002 USER S MANUAL MOTOROLA SIOP Not affected ...
Page 484: ...A 296 DSP96002 USER S MANUAL MOTOROLA SSH PC SSL SR SP 1 SP ...
Page 519: ...MOTOROLA DSP96002 USER S MANUAL A 331 ...
Page 718: ...MOTOROLA DSP96002 USER S MANUAL B 199 ...
Page 871: ... MOTOROLA INC 1994 MOTOROLA TECHNICAL DATA SEMICONDUCTOR M Addendum ...
Page 888: ...MOTOROLA INDEX 1 INDEX ...
Page 889: ......