/[projet1]/public/oric/routines/rasterization/CircleBench/display.s
Defence Force logotype

Contents of /public/oric/routines/rasterization/CircleBench/display.s

Parent Directory Parent Directory | Revision Log Revision Log


Revision 225 - (show annotations)
Tue Feb 2 20:25:29 2010 UTC (9 years, 7 months ago) by Chema
File size: 1639 byte(s)
Circle routine. Performs clipping and handles 16-bit coordinates for center and radius.
1
2
3 .dsb 256-(*&255)
4
5 _HiresAddrLow .dsb 201
6
7 .dsb 256-(*&255)
8
9 _HiresAddrHigh .dsb 201
10
11 .dsb 256-(*&255)
12
13 _TableDiv6 .dsb 256
14
15 _TableBit6Reverse
16 .byt 32,16,8,4,2,1
17 .byt 32,16,8,4,2,1
18 .byt 32,16,8,4,2,1
19 .byt 32,16,8,4,2,1
20 .byt 32,16,8,4,2,1
21 .byt 32,16,8,4,2,1
22 .byt 32,16,8,4,2,1
23 .byt 32,16,8,4,2,1
24 .byt 32,16,8,4,2,1
25 .byt 32,16,8,4,2,1
26
27 .byt 32,16,8,4,2,1
28 .byt 32,16,8,4,2,1
29 .byt 32,16,8,4,2,1
30 .byt 32,16,8,4,2,1
31 .byt 32,16,8,4,2,1
32 .byt 32,16,8,4,2,1
33 .byt 32,16,8,4,2,1
34 .byt 32,16,8,4,2,1
35 .byt 32,16,8,4,2,1
36 .byt 32,16,8,4,2,1
37
38 .byt 32,16,8,4,2,1
39 .byt 32,16,8,4,2,1
40 .byt 32,16,8,4,2,1
41 .byt 32,16,8,4,2,1
42 .byt 32,16,8,4,2,1
43 .byt 32,16,8,4,2,1
44 .byt 32,16,8,4,2,1
45 .byt 32,16,8,4,2,1
46 .byt 32,16,8,4,2,1
47 .byt 32,16,8,4,2,1
48
49 .byt 32,16,8,4,2,1
50 .byt 32,16,8,4,2,1
51 .byt 32,16,8,4,2,1
52 .byt 32,16,8,4,2,1
53 .byt 32,16,8,4,2,1
54 .byt 32,16,8,4,2,1
55 .byt 32,16,8,4,2,1
56 .byt 32,16,8,4,2,1
57 .byt 32,16,8,4,2,1
58 .byt 32,16,8,4,2,1
59
60
61 _GenerateTables
62 .(
63
64 ; Generate screen offset data
65 .(
66 lda #<$a000
67 sta tmp0+0
68 lda #>$a000
69 sta tmp0+1
70
71 ldx #0
72 loop
73 ; generate two bytes screen adress
74 clc
75 lda tmp0+0
76 sta _HiresAddrLow,x
77 adc #40
78 sta tmp0+0
79 lda tmp0+1
80 sta _HiresAddrHigh,x
81 adc #0
82 sta tmp0+1
83
84 inx
85 cpx #201
86 bne loop
87 .)
88
89
90 ; Generate multiple of 6 data table
91 .(
92 lda #0
93 sta tmp0+1 ; cur div
94 sta tmp0+2 ; cur mod
95
96 ldx #0
97 loop
98 lda tmp0+1
99 sta _TableDiv6,x
100
101 ldy tmp0+2
102 iny
103 cpy #6
104 bne skip_mod
105 ldy #0
106 inc tmp0+1
107 skip_mod
108 sty tmp0+2
109
110 inx
111 bne loop
112 .)
113
114 .)
115 rts
116
117
118
119
120
121
122

  ViewVC Help
Powered by ViewVC 1.1.26