annotate src/color_processor.asm @ 611:cd7991986ace

undo BOR bit
author heinrichsweikamp
date Wed, 09 Jan 2019 21:28:53 +0100
parents d866684249bd
children c40025d8e750
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
heinrichsweikamp
parents:
diff changeset
1 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
2 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
3 ; File File color_processor.asm ## V2.98c
0
heinrichsweikamp
parents:
diff changeset
4 ;
heinrichsweikamp
parents:
diff changeset
5 ; Decompress and draw an image.
heinrichsweikamp
parents:
diff changeset
6 ;
heinrichsweikamp
parents:
diff changeset
7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved.
heinrichsweikamp
parents:
diff changeset
8 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
9 ; HISTORY
heinrichsweikamp
parents:
diff changeset
10 ; 2010-12-13 : [jDG] Creation.
heinrichsweikamp
parents:
diff changeset
11 ; 2010-12-30 : [jDG] Revised to put temp into ACCESSRAM0
heinrichsweikamp
parents:
diff changeset
12 ;
heinrichsweikamp
parents:
diff changeset
13 ; RATIONALS: The OSTC have a nice color screen, and a std geek attitude impose
heinrichsweikamp
parents:
diff changeset
14 ; to show off ... ;-)
heinrichsweikamp
parents:
diff changeset
15 ;
heinrichsweikamp
parents:
diff changeset
16 ; Inputs: TBLPTR points to the image description block.
heinrichsweikamp
parents:
diff changeset
17 ; win_top, win_leftx2 the Top/Leftx2 corner here to put the image.
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
18 ; Outputs: None.
0
heinrichsweikamp
parents:
diff changeset
19 ; Trashed: TBLPTR, TABLAT, FSR2, PROD, win_width, win_height
heinrichsweikamp
parents:
diff changeset
20 ;
heinrichsweikamp
parents:
diff changeset
21 ; ImageBloc:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
22 ; db widthx2, height
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
23 ; db nbColors, 0 ; 0 = unused yet, should remain 0 to keep packing happy
0
heinrichsweikamp
parents:
diff changeset
24 ; dw color0, color1, color2, color3, ...
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
25 ; db packed pixels...
0
heinrichsweikamp
parents:
diff changeset
26 ;
heinrichsweikamp
parents:
diff changeset
27 ; Limitations:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
28 ; * nbColors <= 127
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
29 ; * image width should be even
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
30 ; * image left border should be on even position, too
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
31 ;
0
heinrichsweikamp
parents:
diff changeset
32 ; Compressed format:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
33 ; - 1-3 bytes pixel count, followed by 1 byte pixel color
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
34 ; - bit 7 = 1: byte holds pixel count in bits 6-0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
35 ; - bit 7 = 0: byte holds pixel color in bits 6-0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
36 ; - all pixel count bytes accumulate:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
37 ; - 1 byte pixel count: 1xxxxxxx -> 7 bit pixel count
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
38 ; - 2 bytes pixel count: 1yyyyyyy 1xxxxxxx -> 14 bit pixel count
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
39 ; - 3 bytes pixel count: 1zzzzzzz 1yyyyyyy 1xxxxxxx -> 21 bit pixel count
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
40 ;
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
41 ; Pixels are written column by column from left to right, with columns down first.
0
heinrichsweikamp
parents:
diff changeset
42 ;
heinrichsweikamp
parents:
diff changeset
43 ;-----------------------------------------------------------------------------
heinrichsweikamp
parents:
diff changeset
44
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
45 #include "hwos.inc"
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
46 #include "tft.inc"
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
47
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
48 color_proc CODE
0
heinrichsweikamp
parents:
diff changeset
49
heinrichsweikamp
parents:
diff changeset
50 ;-----------------------------------------------------------------------------
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
51 ; Note: some variables (win_width, win_height) are in BANK 0 !
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
52
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
53 global color_image
0
heinrichsweikamp
parents:
diff changeset
54 color_image:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
55 banksel common ; Bank 1, just to be sure...
0
heinrichsweikamp
parents:
diff changeset
56
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
57 ;---- Get image size -----------------------------------------------
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
58 tblrd*+
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
59 movff TABLAT,win_width
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
60 tblrd*+
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
61 movff TABLAT,win_height
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
62
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
63 ; Compute width * height * 2 : the number of pixels to write.
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
64 clrf img_pixels+2
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
65 movf win_width,W ; Compute number of pixels to draw
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
66 mulwf win_height ; 0 .. 160x240
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
67 bcf STATUS,C ; BEWARE: mulwf does not reset carry flag!
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
68 rlcf PRODL ; x2 --> 0 .. 320x240, might be > 0xFFFF
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
69 rlcf PRODH
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
70 movff PRODL, img_pixels+0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
71 movff PRODH, img_pixels+1
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
72 rlcf img_pixels+2 ; Get the upper bit in place
0
heinrichsweikamp
parents:
diff changeset
73
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
74 clrf WREG ; Decrement count to ease end detection
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
75 decf img_pixels+0,F
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
76 subwfb img_pixels+1,F
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
77 subwfb img_pixels+2,F
0
heinrichsweikamp
parents:
diff changeset
78
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
79 ;---- Send window command --------------------------------------------
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
80 clrf win_width+1 ; x2 on width, for the true box size
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
81 rlcf win_width+0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
82 rlcf win_width+1
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
83 call TFT_box_write
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
84 Index_out 0x22
0
heinrichsweikamp
parents:
diff changeset
85
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
86 ;---- Read the colors ------------------------------------------------
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
87 rcall get_colors
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
88
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
89 ;---- Decode pixels --------------------------------------------------
0
heinrichsweikamp
parents:
diff changeset
90 color_image_loop_xy:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
91 ; Get pixel count
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
92 clrf img_count+0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
93 clrf img_count+1
0
heinrichsweikamp
parents:
diff changeset
94
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
95 ;---- Decode repetition count
0
heinrichsweikamp
parents:
diff changeset
96 color_image_decode_1:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
97 tblrd*+ ; Get one byte
0
heinrichsweikamp
parents:
diff changeset
98
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
99 btfss TABLAT,7 ; High bit cleared ?
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
100 bra color_image_decode_2 ; YES: this is a color byte
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
101
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
102 rlcf TABLAT,F ; Drop high bit.
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
103 movlw .7 ; Move 7 bits
0
heinrichsweikamp
parents:
diff changeset
104 color_image_decode_3:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
105 rlcf TABLAT,F ; Get bit into carry
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
106 rlcf img_count+0,F ; Push into pixel count
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
107 rlcf img_count+1,F
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
108 decfsz WREG
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
109 bra color_image_decode_3 ; and loop for each 7 bits
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
110 bra color_image_decode_1 ; Decode next byte
0
heinrichsweikamp
parents:
diff changeset
111
heinrichsweikamp
parents:
diff changeset
112 color_image_decode_2:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
113 ;---- Get pixel color into PROD
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
114 movf TABLAT,W ; Get color index
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
115 addwf WREG ; *2
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
116 lfsr FSR2,buffer ; Reinitialize color table
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
117 movff WREG,FSR2L ; LOW(buffer) == 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
118 movff POSTINC2,PRODL
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
119 movff POSTINC2,PRODH
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
120
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
121 ; Subtract count-1 from the number of pixel we should do.
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
122 movf img_count+0,W ; Make a 24bit subtraction
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
123 subwf img_pixels+0,F
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
124 movf img_count+1,W
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
125 subwfb img_pixels+1,F
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
126 movlw 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
127 subwfb img_pixels+2,F
0
heinrichsweikamp
parents:
diff changeset
128
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
129 infsnz img_count+0 ; Increment count
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
130 incf img_count+1
0
heinrichsweikamp
parents:
diff changeset
131
608
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
132 ; Loop sending pixel color
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
133 incf img_count+1 ; Because we decrement first, should add one here !
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
134 bsf tft_rs,0 ; RS_H ; Data
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
135 bcf INTCON,GIE
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
136
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
137 color_image_loop_pixel:
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
138 btfsc screen_type2 ; Display 2?
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
139 bra color_image_display2 ; Yes
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
140
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
141 movff PRODH,PORTA ; Move high byte to PORTA
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
142 movff PRODL,PORTH ; Move low byte to PORTH
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
143 bcf tft_nwr
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
144 bsf tft_nwr
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
145 decfsz img_count+0
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
146 bra color_image_loop_pixel
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
147 decfsz img_count+1
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
148 bra color_image_loop_pixel
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
149 bra color_image_loop_pixel2
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
150
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
151 color_image_display2:
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
152 extern convert_for_display2
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
153 call convert_for_display2 ; Convert 16Bit RGB b'RRRRRGGG GGGBBBBB' into 24Bit RGB b'RRRRRR00 GGGGGG00 BBBBBB00'
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
154 color_image_display2_loop:
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
155 movff win_color5,PORTH ; Move high byte to PORTH (DISPLAY is bigendian)
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
156 bcf tft_nwr
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
157 bsf tft_nwr
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
158 movff win_color4,PORTH ; Move low byte to PORTH
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
159 bcf tft_nwr
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
160 bsf tft_nwr
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
161 movff win_color3,PORTH ; Move low(est) byte to PORTH
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
162 bcf tft_nwr
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
163 bsf tft_nwr
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
164 decfsz img_count+0
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
165 bra color_image_display2_loop
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
166 decfsz img_count+1
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
167 bra color_image_display2_loop
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
168
608
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
169 color_image_loop_pixel2:
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
170 bsf INTCON,GIE
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
171 ; And count (on a 24bit counter)
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
172 clrf WREG ; Make a 24bit decrement.
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
173 decf img_pixels+0
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
174 subwfb img_pixels+1,F
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
175 subwfb img_pixels+2,F
0
heinrichsweikamp
parents:
diff changeset
176
608
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
177 bnn color_image_loop_xy ; Not finished ? loop...
0
heinrichsweikamp
parents:
diff changeset
178
608
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
179 ;---- Closeup --------------------------------------------------------
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
180 ; Index_out 0x00
d866684249bd work on 2.99 stable
heinrichsweikamp
parents: 604
diff changeset
181 return
0
heinrichsweikamp
parents:
diff changeset
182
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
183
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
184 global get_colors
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
185 get_colors:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
186 tblrd*+ ; read number of image colors
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
187 movff TABLAT,lo ; store in lo
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
188 tblrd*+ ; skip one spare byte (future flags ?)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
189 movf lo,W
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
190 lfsr FSR2,buffer ; set up buffer as storage for the colors
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
191 get_colors_loop:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
192 tblrd*+
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
193 btfss use_custom_colors ; shall custom colors be used?
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
194 movff TABLAT,POSTINC2 ; NO
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
195 tblrd*+
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
196 btfss use_custom_colors ; shall custom colors be used?
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
197 movff TABLAT,POSTINC2 ; NO
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
198 decfsz WREG
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
199 bra get_colors_loop
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
200
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
201 bcf use_custom_colors ; clear custom colors request
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
202 return
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 582
diff changeset
203
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 436
diff changeset
204 END