comparison code_part1/OSTC_code_asm_part1/simulator.asm @ 169:e26f49674956

Merge decoplan display for both GF and Buhlmann models. + Add CF(54) to reverse deco plan display order. + Clean state machine to faster redisplay in divemode. Fix don't flip screen for soft emulation.
author JeanDo
date Wed, 26 Jan 2011 19:19:02 +0100
parents 494587193f5d
children 016c45a0caaf
comparison
equal deleted inserted replaced
168:494587193f5d 169:e26f49674956
168 WIN_LEFT .0 168 WIN_LEFT .0
169 WIN_TOP .160 169 WIN_TOP .160
170 call PLED_standard_color 170 call PLED_standard_color
171 171
172 STRCPY "TTS: " 172 STRCPY "TTS: "
173 bsf leftbind
174 output_16
173 bcf leftbind 175 bcf leftbind
174 output_16
175 STRCAT_PRINT "'" 176 STRCAT_PRINT "'"
176 simulator_decoplan_notts: 177 simulator_decoplan_notts:
177 178
178 WIN_INVERT .1 ; Init new Wordprocessor 179 WIN_INVERT .1 ; Init new Wordprocessor
179 DISPLAYTEXT .188 ; Sim. Results: 180 DISPLAYTEXT .188 ; Sim. Results:
207 goto restart ; exit menu, restart and enter divemode 208 goto restart ; exit menu, restart and enter divemode
208 209
209 bra simulator_show_decoplan2 210 bra simulator_show_decoplan2
210 211
211 simulator_show_decoplan5: 212 simulator_show_decoplan5:
212 btfsc multi_gf_display ; Next Page in Multi-GF Screen?
213 bra simulator_show_decoplan5_1 ; Yes!
214 simulator_show_decoplan5_0:
215
216 bcf display_see_deco ; clear flag
217 bra simulator_show_decoplan4 ; Quit
218
219 simulator_show_decoplan5_1:
220 incf decoplan_page,F 213 incf decoplan_page,F
221 btfsc last_ceiling_gf_shown ; last ceiling shown? 214 btfsc last_ceiling_gf_shown ; last ceiling shown?
222 bra simulator_show_decoplan5_0 ; All done, clear and return 215 bra simulator_show_decoplan5_0 ; All done, clear and return
223 216
224 call PLED_decoplan_gf ; Re-Draw Current page of GF Decoplan 217 call PLED_decoplan ; Re-Draw Current page of GF Decoplan
225 bra simulator_show_decoplan1 218 bra simulator_show_decoplan1
219
220 simulator_show_decoplan5_0:
221 bcf display_see_deco ; clear flag
222 bra simulator_show_decoplan4 ; Quit
226 223
227 simulator_show_decoplan4: 224 simulator_show_decoplan4:
228 movlw d'5' 225 movlw d'5'
229 movwf menupos 226 movwf menupos
230 bra menu_simulator1 227 bra menu_simulator1
262 WIN_INVERT .1 259 WIN_INVERT .1
263 DISPLAYTEXT .12 ;" Wait.." 260 DISPLAYTEXT .12 ;" Wait.."
264 WIN_INVERT .0 261 WIN_INVERT .0
265 262
266 simulator_calc_deco_loop1: 263 simulator_calc_deco_loop1:
267 call divemode_check_decogases ; Checks for decogases and sets the gases 264 call divemode_check_decogases ; Checks for decogases and sets the gases
268 call divemode_prepare_flags_for_deco 265 call divemode_prepare_flags_for_deco
269 266
270 call deco_calc_hauptroutine ; calc_tissue 267 call deco_calc_hauptroutine ; calc_tissue
271 movlb b'00000001' ; rambank 1 selected 268 movlb b'00000001' ; rambank 1 selected
272 269
275 bra simulator_calc_deco_loop1 ; Not finished 272 bra simulator_calc_deco_loop1 ; Not finished
276 273
277 movlw d'1' 274 movlw d'1'
278 movff WREG,char_I_step_is_1min ; 1 minute mode 275 movff WREG,char_I_step_is_1min ; 1 minute mode
279 276
280 movlw d'255' 277 movlw d'2'
281 movff WREG,char_O_deco_status ; Reset Deco module 278 movff WREG,char_O_deco_status ; Reset Deco module
282 279
283 simulator_calc_deco_loop2: 280 simulator_calc_deco_loop2:
284 281
285 call PLED_simulator_data 282 call PLED_simulator_data
297 bra simulator_calc_deco_loop2 294 bra simulator_calc_deco_loop2
298 295
299 movlw d'0' 296 movlw d'0'
300 movff WREG,char_I_step_is_1min ; 2 second deco mode 297 movff WREG,char_I_step_is_1min ; 2 second deco mode
301 298
302 movlw d'255' 299 movlw d'2'
303 movff WREG,char_O_deco_status ; Reset Deco module 300 movff WREG,char_O_deco_status ; Reset Deco module
304 301
305 bra simulator_calc_deco2 ; Not finished 302 bra simulator_calc_deco2 ; Not finished
306 303
307 simulator_calc_deco3: 304 simulator_calc_deco3: