annotate src/tft.inc @ 623:c40025d8e750

3.03 beta released
author heinrichsweikamp
date Mon, 03 Jun 2019 14:01:48 +0200
parents ca4556fb60b9
children cd58f7fc86db
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
heinrichsweikamp
parents:
diff changeset
1 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
2 ;
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
3 ; File tft.inc combined next generation V3.03.2
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
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
54 extern TFT_box_16bit_win_left ; with column in PRODL:PRODH
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
55 extern TFT_DataWrite_PROD
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
56 extern TFT_set_color
434
a001f170a1f7 hunting a bug in the logbook (Day 3)
heinrichsweikamp
parents: 371
diff changeset
57 ; extern init_pixel_write
0
heinrichsweikamp
parents:
diff changeset
58 extern pixel_write
heinrichsweikamp
parents:
diff changeset
59 extern pixel_write_col320
heinrichsweikamp
parents:
diff changeset
60 extern half_vertical_line
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
61 extern half_horizontal_line
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
62
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
63 IFDEF _screendump
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
64 extern TFT_dump_screen
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
65 extern TFT_dump_screen_check
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
66 ENDIF
0
heinrichsweikamp
parents:
diff changeset
67
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
68
0
heinrichsweikamp
parents:
diff changeset
69 ;=============================================================================
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
70 ; Low level macros (for aa_wordprocessor and color_processor)
0
heinrichsweikamp
parents:
diff changeset
71 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
72 extern TFT_CmdWrite
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
73 Index_out macro low_b
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
74 movlw low_b
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
75 call TFT_CmdWrite
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
76 endm
0
heinrichsweikamp
parents:
diff changeset
77
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
78
0
heinrichsweikamp
parents:
diff changeset
79 ;=============================================================================
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
80 ; shortcuts for TFT_box and TFT_frame call sequences
0
heinrichsweikamp
parents:
diff changeset
81 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
82 extern box_frame_std, box_frame_common, box_frame_color, box_frame_color16
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
83 extern box_std_block, box_black_block, box_color_block
0
heinrichsweikamp
parents:
diff changeset
84
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
85 ; Erase a given screen area
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
86 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
87 WIN_BOX_BLACK macro top, bottom, left, right
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
88 call box_black_block
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
89 db top, (bottom)-(top)+1, left, (right)-(left)+1
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
90 endm
0
heinrichsweikamp
parents:
diff changeset
91
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
92
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
93 ; Fill a given screen area with standard color (white)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
94 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
95 WIN_BOX_STD macro top, bottom, left, right
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
96 call box_std_block
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
97 db top, (bottom)-(top)+1, left, (right)-(left)+1
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
98 endm
0
heinrichsweikamp
parents:
diff changeset
99
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
100
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
101 ; Fill a given screen area with color from WREG (8 bits rrrgggbb)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
102 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
103 WIN_BOX_COLOR macro top, bottom, left, right
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
104 call box_color_block
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
105 db top, (bottom)-(top)+1, left, (right)-(left)+1
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
106 endm
0
heinrichsweikamp
parents:
diff changeset
107
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
108 ; Draw a frame in standard color (white)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
109 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
110 WIN_FRAME_STD macro top, bottom, left, right
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
111 call box_frame_std
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
112 db top, (bottom)-(top)+1, left, (right)-(left)+1
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
113 endm
0
heinrichsweikamp
parents:
diff changeset
114
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
115
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
116 ; Draw a frame with color from WREG (8 bits rrrgggbb)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
117 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
118 WIN_FRAME_COLOR macro top, bottom, left, right
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
119 call box_frame_color
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
120 db top, (bottom)-(top)+1, left, (right)-(left)+1
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
121 endm
0
heinrichsweikamp
parents:
diff changeset
122
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
123
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
124 ; Draw a frame with color from win_color (16 bits in TFT format)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
125 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
126 WIN_FRAME_COLOR16 macro top, bottom, left, right
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
127 call box_frame_color16
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
128 db top, (bottom)-(top)+1, left, (right)-(left)+1
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
129 endm
0
heinrichsweikamp
parents:
diff changeset
130
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
131
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
132 WIN_FONT macro win_font_input
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
133 movlw win_font_input
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
134 movff WREG,win_font
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
135 endm
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
136
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
137
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
138 WIN_TOP macro win_top_input
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
139 movlw win_top_input
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
140 movff WREG,win_top
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
141 endm
0
heinrichsweikamp
parents:
diff changeset
142
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
143
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
144 WIN_HEIGHT macro win_hight_input
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
145 movlw win_hight_input
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
146 movff WREG,win_height
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
147 endm
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
148
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
149
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
150 WIN_LEFT macro win_left_input
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
151 movlw win_left_input
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
152 movff WREG,win_leftx2
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
153 endm
0
heinrichsweikamp
parents:
diff changeset
154
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
155
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
156 WIN_WIDTH macro win_width_input
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
157 movlw win_width_input
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
158 movff WREG,win_width
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
159 endm
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
160
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
161
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
162 WIN_COLOR macro win_color_input
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
163 movlw win_color_input
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
164 call TFT_set_color
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
165 endm
0
heinrichsweikamp
parents:
diff changeset
166
heinrichsweikamp
parents:
diff changeset
167 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
168 ; TFT_write_prom_image
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
169 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
170
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
171 ; image referenced by a label
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
172 TFT_WRITE_PROM_IMAGE_BY_LABEL macro image_label
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
173 extern image_label
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
174 movlw LOW (image_label)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
175 movwf TBLPTRL
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
176 movlw HIGH (image_label)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
177 movwf TBLPTRH
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
178 movlw UPPER (image_label)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
179 movwf TBLPTRU
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
180 extern color_image
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
181 call color_image
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
182 endm
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
183
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
184 ; image referenced by an address
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
185 TFT_WRITE_PROM_IMAGE_BY_ADDR macro image_address
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
186 movlw LOW (image_address)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
187 movwf TBLPTRL
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
188 movlw HIGH (image_address & 0xFFFF)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
189 movwf TBLPTRH
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
190 movlw UPPER (image_address)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
191 movwf TBLPTRU
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
192 extern color_image
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
193 call color_image
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
194 endm
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
195
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
196 ; custom colors referenced by label
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
197 TFT_WRITE_PROM_IMAGE_CUST_COLOR macro colors_label
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
198 movlw LOW (colors_label)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
199 movwf TBLPTRL
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
200 movlw HIGH (colors_label)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
201 movwf TBLPTRH
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
202 movlw UPPER (colors_label)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
203 movwf TBLPTRU
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
204 extern get_colors
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
205 call get_colors
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
206 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
207 endm
0
heinrichsweikamp
parents:
diff changeset
208
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
209
0
heinrichsweikamp
parents:
diff changeset
210 ;=============================================================================
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
211 ; Macros to provide our own interface code
0
heinrichsweikamp
parents:
diff changeset
212 ;
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
213
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
214 PIXEL_WRITE macro colRegister, rowRegister
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
215 movff colRegister,win_leftx2
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
216 movff rowRegister,win_top
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
217 call pixel_write
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
218 endm
0
heinrichsweikamp
parents:
diff changeset
219
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
220
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
221 ;INIT_PIXEL_WRITE macro colRegister
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
222 ; movff colRegister,win_leftx2
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
223 ; call init_pixel_write
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
224 ; endm
0
heinrichsweikamp
parents:
diff changeset
225
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 604
diff changeset
226
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
227 HALF_PIXEL_WRITE macro rowRegister
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
228 movff rowRegister,win_top
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
229 call half_pixel_write
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
230 endm