annotate src/tft.inc @ 629:237931377539

3.07 stable release
author heinrichsweikamp
date Fri, 29 Nov 2019 18:48:11 +0100
parents cd58f7fc86db
children 4050675965ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
heinrichsweikamp
parents:
diff changeset
1 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
2 ;
628
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 623
diff changeset
3 ; File tft.inc combined next generation V3.03.7
0
heinrichsweikamp
parents:
diff changeset
4 ;
heinrichsweikamp
parents:
diff changeset
5 ; Declaring interfaces to the TFT screen and its Oxxx controler
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 ; 2011-05-24 : [jDG] Cleanups from initial Matthias code.
heinrichsweikamp
parents:
diff changeset
11
heinrichsweikamp
parents:
diff changeset
12 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
13 ; TFT public subroutines
heinrichsweikamp
parents:
diff changeset
14 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
15
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
16 ;-----------------------------------------------------------------------------
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
17 ; Write two half-pixels at position (win_top,win_leftx2)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
18 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
19 ; Inputs : win_leftx2, win_top, win_color:2
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
20 ; Outputs: (none)
0
heinrichsweikamp
parents:
diff changeset
21 ; Trashed: WREG, PROD
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
22
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
23 extern pixel_write
0
heinrichsweikamp
parents:
diff changeset
24
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
25
0
heinrichsweikamp
parents:
diff changeset
26 ;-----------------------------------------------------------------------------
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
27 ; Write one half-pixel at position (win_top,win_leftx2)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
28 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
29 ; Inputs : win_leftx2, win_top, win_color:2
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
30 ; Outputs: (none)
0
heinrichsweikamp
parents:
diff changeset
31 ; Trashed: WREG, PROD
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
32
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
33 extern half_pixel_write
0
heinrichsweikamp
parents:
diff changeset
34
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
35
0
heinrichsweikamp
parents:
diff changeset
36 ;-----------------------------------------------------------------------------
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
37 ; Draw a frame around current box with current color
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
38 ; Inputs : win_top, win_leftx2, win_height, win_width, win_color1, win_color2
0
heinrichsweikamp
parents:
diff changeset
39 ; Outputs: (none)
heinrichsweikamp
parents:
diff changeset
40 ; Trashed: WREG, PROD, aa_start:2, aa_end:2, win_leftx2, win_width:1
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
41
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
42 extern TFT_frame
0
heinrichsweikamp
parents:
diff changeset
43
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
44
0
heinrichsweikamp
parents:
diff changeset
45 ;-----------------------------------------------------------------------------
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
46 extern TFT_DisplayOff ; power-off everything (needs a boot thereafter)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
47 extern TFT_boot ; initialize screen hardware
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
48 extern TFT_Display_FadeIn ; smooth lighting up
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
49 extern TFT_Display_FadeOut ; smooth darkening down
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
50 extern TFT_ClearScreen
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
51 extern TFT_box_write
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
52 extern TFT_box_write_16bit_win_left ; with column in PRODL:PRODH
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
53 extern TFT_box
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
54 extern TFT_DataWrite_PROD
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
55 extern TFT_set_color
434
a001f170a1f7 hunting a bug in the logbook (Day 3)
heinrichsweikamp
parents: 371
diff changeset
56 ; extern init_pixel_write
0
heinrichsweikamp
parents:
diff changeset
57 extern pixel_write
heinrichsweikamp
parents:
diff changeset
58 extern pixel_write_col320
heinrichsweikamp
parents:
diff changeset
59 extern half_vertical_line
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
60 extern half_horizontal_line
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
61
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
62 IFDEF _screendump
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
63 extern TFT_dump_screen
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
64 extern TFT_dump_screen_check
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
65 ENDIF
0
heinrichsweikamp
parents:
diff changeset
66
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
67
0
heinrichsweikamp
parents:
diff changeset
68 ;=============================================================================
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
69 ; Low level macros (for aa_wordprocessor and color_processor)
0
heinrichsweikamp
parents:
diff changeset
70 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
71 extern TFT_CmdWrite
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
72 Index_out macro low_b
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
73 movlw low_b
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
74 call TFT_CmdWrite
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
75 endm
0
heinrichsweikamp
parents:
diff changeset
76
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
77
0
heinrichsweikamp
parents:
diff changeset
78 ;=============================================================================
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
79 ; shortcuts for TFT_box and TFT_frame call sequences
0
heinrichsweikamp
parents:
diff changeset
80 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
81 extern box_frame_std, box_frame_common, box_frame_color, box_frame_color16
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
82 extern box_std_block, box_black_block, box_color_block
0
heinrichsweikamp
parents:
diff changeset
83
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
84 ; Erase a given screen area
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
85 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
86 WIN_BOX_BLACK macro top, bottom, left, right
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
87 call box_black_block
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
88 db top, (bottom)-(top)+1, left, (right)-(left)+1
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
89 endm
0
heinrichsweikamp
parents:
diff changeset
90
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
91
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
92 ; Fill a given screen area with standard color (white)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
93 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
94 WIN_BOX_STD macro top, bottom, left, right
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
95 call box_std_block
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
96 db top, (bottom)-(top)+1, left, (right)-(left)+1
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
97 endm
0
heinrichsweikamp
parents:
diff changeset
98
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
99
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
100 ; Fill a given screen area with color from WREG (8 bits rrrgggbb)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
101 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
102 WIN_BOX_COLOR macro top, bottom, left, right
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
103 call box_color_block
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
104 db top, (bottom)-(top)+1, left, (right)-(left)+1
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
105 endm
0
heinrichsweikamp
parents:
diff changeset
106
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
107 ; Draw a frame in standard color (white)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
108 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
109 WIN_FRAME_STD macro top, bottom, left, right
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
110 call box_frame_std
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
111 db top, (bottom)-(top)+1, left, (right)-(left)+1
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
112 endm
0
heinrichsweikamp
parents:
diff changeset
113
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
114
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
115 ; Draw a frame with color from WREG (8 bits rrrgggbb)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
116 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
117 WIN_FRAME_COLOR macro top, bottom, left, right
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
118 call box_frame_color
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
119 db top, (bottom)-(top)+1, left, (right)-(left)+1
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
120 endm
0
heinrichsweikamp
parents:
diff changeset
121
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
122
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
123 ; Draw a frame with color from win_color (16 bits in TFT format)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
124 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
125 WIN_FRAME_COLOR16 macro top, bottom, left, right
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
126 call box_frame_color16
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
127 db top, (bottom)-(top)+1, left, (right)-(left)+1
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
128 endm
0
heinrichsweikamp
parents:
diff changeset
129
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
130
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
131 WIN_FONT macro win_font_input
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
132 movlw win_font_input
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
133 movff WREG,win_font
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
134 endm
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
135
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
136
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
137 WIN_TOP macro win_top_input
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
138 movlw win_top_input
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
139 movff WREG,win_top
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
140 endm
0
heinrichsweikamp
parents:
diff changeset
141
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
142
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
143 WIN_HEIGHT macro win_hight_input
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
144 movlw win_hight_input
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
145 movff WREG,win_height
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
146 endm
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
147
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
148
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
149 WIN_LEFT macro win_left_input
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
150 movlw win_left_input
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
151 movff WREG,win_leftx2
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
152 endm
0
heinrichsweikamp
parents:
diff changeset
153
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
154
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
155 WIN_WIDTH macro win_width_input
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
156 movlw win_width_input
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
157 movff WREG,win_width
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
158 endm
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
159
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
160
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
161 WIN_COLOR macro win_color_input
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
162 movlw win_color_input
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
163 call TFT_set_color
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
164 endm
0
heinrichsweikamp
parents:
diff changeset
165
heinrichsweikamp
parents:
diff changeset
166 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
167 ; TFT_write_prom_image
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
168 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
169
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
170 ; image referenced by a label
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
171 TFT_WRITE_PROM_IMAGE_BY_LABEL macro image_label
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
172 extern image_label
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
173 movlw LOW (image_label)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
174 movwf TBLPTRL
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
175 movlw HIGH (image_label)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
176 movwf TBLPTRH
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
177 movlw UPPER (image_label)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
178 movwf TBLPTRU
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
179 extern color_image
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
180 call color_image
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
181 endm
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
182
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
183 ; image referenced by an address
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
184 TFT_WRITE_PROM_IMAGE_BY_ADDR macro image_address
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
185 movlw LOW (image_address)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
186 movwf TBLPTRL
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
187 movlw HIGH (image_address & 0xFFFF)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
188 movwf TBLPTRH
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
189 movlw UPPER (image_address)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
190 movwf TBLPTRU
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
191 extern color_image
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
192 call color_image
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
193 endm
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
194
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
195 ; custom colors referenced by label
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
196 TFT_WRITE_PROM_IMAGE_CUST_COLOR macro colors_label
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
197 movlw LOW (colors_label)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
198 movwf TBLPTRL
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
199 movlw HIGH (colors_label)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
200 movwf TBLPTRH
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
201 movlw UPPER (colors_label)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
202 movwf TBLPTRU
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
203 extern get_colors
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
204 call get_colors
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
205 bsf use_custom_colors ; will suppress reading the colors that come with the image
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
206 endm
0
heinrichsweikamp
parents:
diff changeset
207
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
208
0
heinrichsweikamp
parents:
diff changeset
209 ;=============================================================================
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
210 ; Macros to provide our own interface code
0
heinrichsweikamp
parents:
diff changeset
211 ;
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
212
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
213 PIXEL_WRITE macro colRegister, rowRegister
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
214 movff colRegister,win_leftx2
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
215 movff rowRegister,win_top
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
216 call pixel_write
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
217 endm
0
heinrichsweikamp
parents:
diff changeset
218
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
219
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
220 ;INIT_PIXEL_WRITE macro colRegister
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
221 ; movff colRegister,win_leftx2
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
222 ; call init_pixel_write
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
223 ; endm
0
heinrichsweikamp
parents:
diff changeset
224
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
225
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
226 HALF_PIXEL_WRITE macro rowRegister
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
227 movff rowRegister,win_top
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
228 call half_pixel_write
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
229 endm