# HG changeset patch # User JeanDo # Date 1296702561 -3600 # Node ID 53b16a746166f42bb4a8cc67f97bbc9a8fcd0237 # Parent 4a7a778d9e495f94c8277f5858353ed86d0a4c4e Multi-lang + Move texts to single compact table. + Place at address 0x15000, reserved up to 0x17AFF (10kB) + Generate the english_test.asm reference (4kB) + Move altimeter texts into the table. diff -r 4a7a778d9e49 -r 53b16a746166 code_part1/OSTC_code_asm_part1/18f4685_ostc_mkII.lkr --- a/code_part1/OSTC_code_asm_part1/18f4685_ostc_mkII.lkr Wed Feb 02 11:09:39 2011 +0100 +++ b/code_part1/OSTC_code_asm_part1/18f4685_ostc_mkII.lkr Thu Feb 03 04:09:21 2011 +0100 @@ -7,11 +7,18 @@ FILES "clib.lib" FILES "p18f4685.lib" -CODEPAGE NAME=page START=0x0 END=0x17EFF -CODEPAGE NAME=idlocs START=0x200000 END=0x200007 PROTECTED -CODEPAGE NAME=config START=0x300000 END=0x30000D PROTECTED -CODEPAGE NAME=devid START=0x3FFFFE END=0x3FFFFF PROTECTED -CODEPAGE NAME=eedata START=0xF00000 END=0xF003FF PROTECTED +// General PROM code area +CODEPAGE NAME=page START=0x0 END=0x14FFF + +// Special area reserved for tables. Just to make sure the linker won't +// relocate something at the end of the multi-lang text table... +CODEPAGE NAME=tables START=0x15000 END=0x17EFF PROTECTED + +// Hardware specific areas: +CODEPAGE NAME=idlocs START=0x200000 END=0x200007 PROTECTED +CODEPAGE NAME=config START=0x300000 END=0x30000D PROTECTED +CODEPAGE NAME=devid START=0x3FFFFE END=0x3FFFFF PROTECTED +CODEPAGE NAME=eedata START=0xF00000 END=0xF003FF PROTECTED ACCESSBANK NAME=accessram START=0x0 END=0x5F DATABANK NAME=gpr0 START=0x60 END=0xFF diff -r 4a7a778d9e49 -r 53b16a746166 code_part1/OSTC_code_asm_part1/MAIN.ASM --- a/code_part1/OSTC_code_asm_part1/MAIN.ASM Wed Feb 02 11:09:39 2011 +0100 +++ b/code_part1/OSTC_code_asm_part1/MAIN.ASM Thu Feb 03 04:09:21 2011 +0100 @@ -79,7 +79,7 @@ retfie ;============================================================================= -#include text_table.asm ; includes textmacros +#include multilang_text.asm ; includes textmacros ;============================================================================= osct_asm code diff -r 4a7a778d9e49 -r 53b16a746166 code_part1/OSTC_code_asm_part1/altimeter.asm --- a/code_part1/OSTC_code_asm_part1/altimeter.asm Wed Feb 02 11:09:39 2011 +0100 +++ b/code_part1/OSTC_code_asm_part1/altimeter.asm Thu Feb 03 04:09:21 2011 +0100 @@ -227,20 +227,18 @@ call PLED_standard_color call PLED_topline_box WIN_INVERT .1 ; Init new Wordprocessor - WIN_FONT .0 - WIN_LEFT .80-7*7 - WIN_TOP .1 - STRCPY_PRINT "Set Altimeter:" + DISPLAYTEXTH .288 ; Title bar movlw 2 ; Start menu on line 2. movwf menupos altimeter_menu_2: - WIN_FONT .0 ; Reset, because compute erase that... - WIN_INVERT .0 + WIN_INVERT 0 + WIN_FONT 0 WIN_LEFT .20 ; First line: WIN_TOP .35 - STRCPY "Sea ref: " + lfsr FSR2,letter + OUTPUTTEXTH .289 ; Sea ref: movff pressureRef+0, lo movff pressureRef+1, hi @@ -253,20 +251,11 @@ bsf leftbind output_16 -; PUTC '.' -; movff pressureRef+0, hi ; Decimal part is constructed -; clrf WREG ; from the 2 lower bits. -; btfsc hi,0 -; addlw .25 -; btfsc hi,1 -; addlw .50 -; movwf lo -; output_99x - STRCAT_PRINT " mbar " WIN_TOP .65 ; Action enable - STRCPY "Enabled: " + lfsr FSR2, letter + OUTPUTTEXTH .290 GETCUSTOM8 .49 btfss WREG,0 bra alt_menu_1 @@ -276,17 +265,15 @@ STRCAT_PRINT "OFF" alt_menu_2: - WIN_TOP .95 ; Action reset - STRCPY_PRINT "Default: 1013 mbar" - WIN_TOP .125 ; Action add - STRCPY_PRINT "+1 mbar" - WIN_TOP .155 ; Action sub - STRCPY_PRINT "-1 mbar" - WIN_TOP .185 ; Action exit - STRCPY_PRINT "Exit" + DISPLAYTEXTH .291 ; Action reset + DISPLAYTEXTH .292 ; Action add + DISPLAYTEXTH .293 ; Action sub + DISPLAYTEXT .011 ; Action exit - WIN_LEFT .85 ; Bottom right. - STRCPY "Alt: " + WIN_LEFT .85 ; Bottom right. + lfsr FSR2, letter + OUTPUTTEXTH .294 ; "Alt: " + movff altitude+0, lo movff altitude+1, hi btfss hi,7 ; Is altitude negativ ? diff -r 4a7a778d9e49 -r 53b16a746166 code_part1/OSTC_code_asm_part1/definitions.asm --- a/code_part1/OSTC_code_asm_part1/definitions.asm Wed Feb 02 11:09:39 2011 +0100 +++ b/code_part1/OSTC_code_asm_part1/definitions.asm Thu Feb 03 04:09:21 2011 +0100 @@ -132,8 +132,7 @@ wait_temp res 1 ; " + used to copy data to c code + used for temp/testing ; never use wait_temp in interrupt routines (isr) and never call any wait routine in interrupts -textnumber res 1 ;for textdisplay and textlookup -textlength res 1 +textnumber res 1 ; for textdisplay textaddress res 2 average_depth_hold res 4 ; Holds Sum of depths (Resettable) diff -r 4a7a778d9e49 -r 53b16a746166 code_part1/OSTC_code_asm_part1/displaytext.asm --- a/code_part1/OSTC_code_asm_part1/displaytext.asm Wed Feb 02 11:09:39 2011 +0100 +++ b/code_part1/OSTC_code_asm_part1/displaytext.asm Thu Feb 03 04:09:21 2011 +0100 @@ -24,140 +24,105 @@ ; These macros output to POSTINC only -OUTPUTTEXT macro textnumber ; For Texts 1-254 - movlw textnumber - call displaytext0 +OUTPUTTEXT macro n ; For Texts 1-255 + If n>.255 + Error "Bad low text number", n + Endif + movlw n + call displaytext0_low endm -OUTPUTTEXTH macro textnumber ; For Texts 255-511 - movlw LOW textnumber ; Use only Lower 8 Bit - call displaytext0_h +OUTPUTTEXTH macro n ; For Texts 256-511 + If n<.256 + Error "Bad low text number", n + Endif + movlw n-.256 ; Use only Lower 8 Bit + call displaytext0_high endm -displaytext0_h: - bsf displaytext_high ; Highbit set - rcall displaytext0 - return +displaytext0_high: + bsf displaytext_high ; Highbit set + bra displaytext0 +displaytext0_low: + bcf displaytext_high ; Highbit clear displaytext0: - bsf output_to_postinc_only - rcall displaytext1 - bcf output_to_postinc_only - return + bsf output_to_postinc_only + bra displaytext -; These macros output to POSTINC and call the wordprocessor -DISPLAYTEXT macro textnumber - movlw textnumber - call displaytext1 +; These macros output to letter[], and call the wordprocessor +DISPLAYTEXT macro n + movlw n + call displaytext_1_low endm -DISPLAYTEXTH macro textnumber - movlw LOW textnumber ; Use only Lower 8 Bit - call displaytext1h +DISPLAYTEXTH macro n + movlw LOW n ; Use only Lower 8 Bit + call displaytext_1_high endm -displaytext1h: - bsf displaytext_high ; Highbit set - rcall displaytext1 - return +displaytext_1_high: + bsf displaytext_high ; Highbit set + bra displaytext -displaytext1: - movwf textnumber - movlw b'10000000' - movwf EECON1 - - clrf TBLPTRU - movlw HIGH (textpos_pointer-4) - movwf TBLPTRH - movlw LOW (textpos_pointer-4) ; base address -4 for position table - movwf TBLPTRL +displaytext_1_low: + bcf displaytext_high - movff textnumber,xA+0 - movlw d'0' - btfsc displaytext_high ; Highbit set? - movlw d'1' ; Yes! - movwf xA+1 ; Set High Bit - - bcf STATUS,C - rlcf xA+0,F - rlcf xA+1,F ; times 2 for adress +displaytext: + movwf textnumber + movlw LOW(text_pointer-4) + movwf TBLPTRL + movlw HIGH(text_pointer-4) + movwf TBLPTRH + movlw UPPER(text_pointer-4) + movwf TBLPTRU - movlw d'2' - addwf xA+0,F - movlw d'0' - addwfc xA+1,F ; + 2 + movlw 4 ; textnumber * 4 --> PROD + mulwf textnumber + + btfsc displaytext_high ; If high text, add 4*256 to PROD + addwf PRODH - movf xA+0,W - addwf TBLPTRL,F ; set adress, data can be read - movf xA+1,W - addwfc TBLPTRH,F ; High byte, if required + movf PRODL,W ; Add PROD to TBLPTR + addwf TBLPTRL,F + movf PRODH,W + addwfc TBLPTRH,F + movlw 0 + addwfc TBLPTRU TBLRD*+ - btfss output_to_postinc_only ; output to postinc only? + movff TABLAT,textaddress+0 ; textaddress:2 holds address for first character + TBLRD*+ + movff TABLAT,textaddress+1 + + btfsc output_to_postinc_only ; output to postinc only? + bra displaytext2 + + TBLRD*+ movff TABLAT,win_leftx2 ; No, write coordinates TBLRD*+ - btfss output_to_postinc_only ; output to postinc only? - movff TABLAT,win_top ; No, write coordinates - - movlw d'0' - movff WREG,win_font ; Bank0 Variable... - - clrf textaddress+0 - clrf textaddress+1 - clrf TBLPTRH ; Set Pointer for textlength table - clrf TBLPTRU - movlw LOW textlength_pointer - movwf TBLPTRL - bra displaytext1b + movff TABLAT,win_top ; No, write coordinates -displaytext1a: - bcf displaytext_high ; Clear flag - ; Get textadress from textlength table -displaytext1b: - TBLRD*+ ; Read from textlength_pointer - movf TABLAT,W - addwf textaddress+0,F - movlw d'0' - addwfc textaddress+1,F ; textaddress:2 holds address for first character - decfsz textnumber,F - bra displaytext1b - - btfsc displaytext_high ; Highbit set? - bra displaytext1a ; Yes, add 256 loops +displaytext2: + clrf WREG ; Reset to small font + movff WREG,win_font ; (BANK 0) -displaytext2: ; copies text to wordprocessor - clrf TBLPTRU - movlw LOW text_pointer - addwf textaddress+0,W - movwf TBLPTRL - movlw HIGH text_pointer ; Base address Texts - addwfc textaddress+1,W - movwf TBLPTRH - + movff textaddress+0,TBLPTRL + movff textaddress+1,TBLPTRH btfss output_to_postinc_only ; output to postinc2 only? lfsr FSR2,letter ; no! -displaytext2a: +displaytext3: TBLRD*+ - movlw '}' ; Text finished? - cpfseq TABLAT - bra displaytext3 - bra display_text_exit - -displaytext3: - movff TABLAT,POSTINC2 - - TBLRD*+ - movlw '}' ; Text finished? - cpfseq TABLAT - bra displaytext4 - bra display_text_exit -displaytext4: - movff TABLAT,POSTINC2 - bra displaytext2a + movf TABLAT,W + bz display_text_exit ; Text finished? + movwf POSTINC2 + bra displaytext3 display_text_exit: btfss output_to_postinc_only ; output to postinc only? - call word_processor + goto word_processor + + bcf output_to_postinc_only return diff -r 4a7a778d9e49 -r 53b16a746166 code_part1/OSTC_code_asm_part1/english_text.asm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code_part1/OSTC_code_asm_part1/english_text.asm Thu Feb 03 04:09:21 2011 +0100 @@ -0,0 +1,336 @@ +; OSTC - diving computer code +; Copyright (C) 2008 HeinrichsWeikamp GbR +; +; This program is free software: you can redistribute it and/or modify +; it under the terms of the GNU General Public License as published by +; the Free Software Foundation, either version 3 of the License, or +; (at your option) any later version. +; +; This program is distributed in the hope that it will be useful, +; but WITHOUT ANY WARRANTY; without even the implied warranty of +; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with this program. If not, see . +; +; hold texts and parameters for the texts +; written by: Matthias Heinrichs, info@heinrichsweikamp.com +; written: 10/13/07 +; last updated: 05/24/08 +; known bugs: +; ToDo: +; macro X Y "translation" ; English original + TCODE .0, .0, "Building MD2 Hash" ;001 Building MD2 Hash + TCODE .0, .25, "Please Wait..." ;002 Please Wait... + TCODE .0, .2, "HeinrichsWeikamp OSTC2" ;003 HeinrichsWeikamp OSTC2 + TCODE .65, .2, "Menu?" ;004 Menu? + TCODE .65, .2, "Menu:" ;005 Menu: + TCODE .20, .35, "Logbook" ;006 Logbook + TCODE .20, .65, "Gas Setup" ;007 Gas Setup + TCODE .20, .35, "Set Time" ;008 Set Time + TCODE .20, .95, "Reset Menu" ;009 Reset Menu + TCODE .20, .125, "Setup" ;010 Setup + TCODE .20, .185, "Exit" ;011 Exit + TCODE .115, .2, "Wait.." ;012 Wait.. + TCODE .0, .24, "MD2 Hash:" ;013 MD2 Hash: + TCODE .0, .0, "Desat" ;014 Desat + TCODE .50, .2, "Interface" ;015 Interface + TCODE .10, .30, "Start" ;016 Start + TCODE .10, .55, "Data" ;017 Data + TCODE .10, .80, "Header" ;018 Header + TCODE .10, .105, "Profile" ;019 Profile + TCODE .10, .130, "Done." ;020 Done. + TCODE .20, .35, "Cancel Reset" ;021 Cancel Reset + TCODE .32, .65, "Time:" ;022 Time: + TCODE .32, .95, "Date:" ;023 Date: + TCODE .32, .155, "Set Hours" ;024 Set Hours + TCODE .6, .0, "Reset..." ;025 Reset... + TCODE .55, .2, "Logbook" ;026 Logbook + TCODE .14, .2, "Custom Functions I" ;027 Custom Functions I + TCODE .40, .2, "Reset Menu" ;028 Reset Menu + TCODE .50, .2, "Set Time:" ;029 Set Time: + TCODE .100, .50, "SetMarker" ;030 SetMarker + TCODE .100, .25, "Decoplan" ;031 Decoplan + TCODE .100, .0, "Gaslist" ;032 Gaslist + TCODE .100, .50, "ResetAvr" ;033 ResetAvr + TCODE .100, .100, "Exit" ;034 Exit + TCODE .0, .0, "NoFly" ;035 NoFly +; 32 custom function descriptors I + TCODE .40, .35, "Start Dive [m]" ;036 Start Dive [m] + TCODE .40, .35, "End Dive [m]" ;037 End Dive [m] + TCODE .40, .35, "End Delay [min]" ;038 End Delay [min] + TCODE .40, .35, "Power Off [min]" ;039 Power Off [min] + TCODE .40, .35, "Pre-menu [min]" ;040 Pre-menu [min] + TCODE .40, .35, "velocity[m/min]" ;041 velocity[m/min] + TCODE .40, .35, "Wake-up [mBar]" ;042 Wake-up [mBar] + TCODE .40, .35, "max.Surf.[mBar]" ;043 max.Surf.[mBar] + TCODE .40, .35, "GF display [%]" ;044 GF display [%] + TCODE .40, .35, "min. O2 Dis.[%]" ;045 min. O2 Dis.[%] + TCODE .40, .35, "Dive menus[min]" ;046 Dive menus[min] + TCODE .40, .35, "Saturate x [%]" ;047 Saturate x [%] + TCODE .40, .35, "Desaturate x[%]" ;048 Desaturate x[%] + TCODE .40, .35, "NoFly Ratio [%]" ;049 NoFly Ratio [%] + TCODE .40, .35, "GF alarm 1 [%]" ;050 GF alarm 1 [%] + TCODE .40, .35, "CNSshow surf[%]" ;051 CNSshow surf[%] + TCODE .40, .35, "Deco Offset [m]" ;052 Deco Offset [m] + TCODE .40, .35, "ppO2 low [Bar]" ;053 ppO2 low [Bar] + TCODE .40, .35, "ppO2 high [Bar]" ;054 ppO2 high [Bar] + TCODE .40, .35, "ppO2 show [Bar]" ;055 ppO2 show [Bar] + TCODE .40, .35, "sampling rate " ;056 sampling rate + TCODE .40, .35, "Divisor Temp " ;057 Divisor Temp + TCODE .40, .35, "Divisor Decodat" ;058 Divisor Decodat + TCODE .40, .35, "Divisor NotUse1" ;059 Divisor NotUse1 + TCODE .40, .35, "Divisor ppO2 " ;060 Divisor ppO2 + TCODE .40, .35, "Divisor Debug " ;061 Divisor Debug + TCODE .40, .35, "Divisor NotUse2" ;062 Divisor NotUse2 + TCODE .40, .35, "CNSshow dive[%]" ;063 CNSshow dive[%] + TCODE .40, .35, "Logbook offset " ;064 Logbook offset + TCODE .40, .35, "Last Deco at[m]" ;065 Last Deco at[m] + TCODE .40, .35, "End Apnoe [h]" ;066 End Apnoe [h] + TCODE .40, .35, "Show Batt.Volts" ;067 Show Batt.Volts +;licence: + TCODE .0, .35, "This program is" ;068 This program is + TCODE .0, .65, "distributed in the" ;069 distributed in the + TCODE .0, .95, "hope that it will be" ;070 hope that it will be + TCODE .0, .125, "useful, but WITHOUT" ;071 useful, but WITHOUT + TCODE .0, .155, "ANY WARRANTY; without" ;072 ANY WARRANTY + TCODE .0, .185, "even the implied" ;073 even the implied + TCODE .0, .215, "warranty of" ;074 warranty of + TCODE .0, .35, "MERCHANTABILITY or" ;075 MERCHANTABILITY or + TCODE .0, .65, "FITNESS FOR A" ;076 FITNESS FOR A + TCODE .0, .95, "PARTICULAR PURPOSE." ;077 PARTICULAR PURPOSE. + TCODE .0, .125, "See the GNU General" ;078 See the GNU General + TCODE .0, .155, "Public License for" ;079 Public License for + TCODE .0, .185, "more details:" ;080 more details: + TCODE .0, .215, "www.heinrichsweikamp.de" ;081 www.heinrichsweikamp.de +; end of licence POS + TCODE .102, .54, "Decostop" ;082 Decostop + TCODE .0, .0, "m/min" ;083 m/min + TCODE .108, .113, "No Stop" ;084 No Stop + TCODE .135, .113, "TTS" ;085 TTS + TCODE .100, .0, "Divetime" ;086 Divetime + TCODE .0, .0, "Depth" ;087 Depth + TCODE .0, .0, "First Gas?" ;088 First Gas? + TCODE .0, .0, "Default:" ;089 Default: + TCODE .0, .0, "Minutes" ;090 Minutes + TCODE .0, .0, "Month " ;091 Month + TCODE .0, .0, "Day " ;092 Day + TCODE .0, .0, "Year " ;093 Year + TCODE .0, .0, "Set " ;094 Set + TCODE .0, .0, "Gas# " ;095 Gas# + TCODE .0, .0, "Yes" ;096 Yes + TCODE .0, .0, "Current:" ;097 Current: + TCODE .40, .2, "Setup Menu:" ;098 Setup Menu: + TCODE .20, .35, "Custom FunctionsI" ;099 Custom FunctionsI + TCODE .20, .125, "Decotype:" ;100 Decotype: + TCODE .85, .125, "ZH-L16 OC" ;101 ZH-L16 OC + TCODE .85, .125, "Gauge " ;102 Gauge + TCODE .85, .125, "Gauge" ;103 Gauge + TCODE .85, .125, "ZH-L16 CC" ;104 ZH-L16 CC + TCODE .0, .0, "Active Gas? " ;105 Active Gas? + TCODE .10, .2, "Gas Setup - Gaslist" ;106 Gas Setup - Gaslist + TCODE .0, .0, "Depth +" ;107 Depth + + TCODE .0, .0, "Depth -" ;108 Depth - + TCODE .20, .35, "Back" ;109 Back + TCODE .20, .65, "CCR SetPoint Menu" ;110 CCR SetPoint Menu + TCODE .20, .2, "CCR SetPoint Menu" ;111 CCR SetPoint Menu + TCODE .0, .0, "SP#" ;112 SP# + TCODE .20, .95, "Battery Info" ;113 Battery Info + TCODE .10, .2, "Battery Information" ;114 Battery Information + TCODE .0, .9, "Cycles:" ;115 Cycles: + TCODE .85, .125, "Apnoe" ;116 Apnoe + TCODE .0, .18, "Last Complete:" ;117 Last Complete: + TCODE .0, .27, "Lowest Vbatt:" ;118 Lowest Vbatt: + TCODE .0, .36, "Lowest at:" ;119 Lowest at: + TCODE .0, .45, "Tmin:" ;120 Tmin: + TCODE .0, .54, "Tmax:" ;121 Tmax: + TCODE .100, .125, "Gas 6.." ;122 Gas 6.. + TCODE .100, .25, "O2 +" ;123 O2 + + TCODE .100, .50, "O2 -" ;124 O2 - + TCODE .100, .75, "He +" ;125 He + + TCODE .100, .100, "He -" ;126 He - + TCODE .100, .0, "Exit" ;127 Exit + TCODE .100, .25, "Delete" ;128 Delete + TCODE .20, .65, "Debug:" ;129 Debug: + TCODE .65, .65, "ON " ;130 ON + TCODE .65, .65, "OFF" ;131 OFF + TCODE .100, .50, "Del. all" ;132 Del. all + TCODE .10, .0, "Unexpected reset from" ;133 Unexpected reset from + TCODE .10, .25, "Divemode! Please help" ;134 Divemode! Please help + TCODE .10, .50, "and report the Debug " ;135 and report the Debug + TCODE .10, .75, "Information below!" ;136 Information below! + TCODE .100, .75, "Bailout" ;137 Bailout + TCODE .85, .125, "Apnoe " ;138 Apnoe + TCODE .105, .120, "Descent" ;139 Descent + TCODE .105, .60, "Surface" ;140 Surface + TCODE .65, .2, "Quit?" ;141 Quit? + TCODE .20, .155, "More" ;142 More + TCODE .42, .72, "Confirm:" ;143 Confirm: + TCODE .60, .2, "Menu 2:" ;144 Menu 2: + TCODE .52, .96, "Cancel" ;145 Cancel + TCODE .52, .120, "OK!" ;146 OK! + TCODE .20, .35, "More" ;147 More + TCODE .0, .0, ":.........:" ;148 :.........: + TCODE .0, .8, "(ppO2:" ;149 (ppO2: + TCODE .2, .39, "Bar) " ;150 Bar) + TCODE .108, .216, "Marker?" ;151 Marker? + TCODE .85, .125, "L16-GF OC" ;152 L16-GF OC + TCODE .20, .65, "Custom FunctionsII" ;153 Custom FunctionsII +; 32 Custom funtion descriptot II + TCODE .40, .35, "GF Low [%]" ;154 GF Low [%] + TCODE .40, .35, "GF High [%]" ;155 GF High [%] + TCODE .40, .35, "Color# Battery " ;156 Color# Battery + TCODE .40, .35, "Color# Standard" ;157 Color# Standard + TCODE .40, .35, "Color# Divemask" ;158 Color# Divemask + TCODE .40, .35, "Color# Warnings" ;159 Color# Warnings + TCODE .40, .35, "Divemode secs. " ;160 Divemode secs. + TCODE .40, .35, "Adjust fixed SP" ;161 Adjust fixed SP + TCODE .40, .35, "Warn Ceiling " ;162 Warn Ceiling + TCODE .40, .35, "Mix type icons " ;163 Mix type icons + TCODE .40, .35, "Blink BetterGas" ;164 Blink BetterGas + TCODE .40, .35, "DepthWarn[mBar]" ;165 DepthWarn[mBar] + TCODE .40, .35, "CNS warning [%]" ;166 CNS warning [%] + TCODE .40, .35, "GF warning [%]" ;167 GF warning [%] + TCODE .40, .35, "ppO2 warn [Bar]" ;168 ppO2 warn [Bar] + TCODE .40, .35, "Vel.warn[m/min]" ;169 Vel.warn[m/min] + TCODE .40, .35, "Time offset/day" ;170 Time offset/day + TCODE .40, .35, "Show altimeter " ;171 Show altimeter + TCODE .40, .35, "Show Log-Marker" ;172 Show Log-Marker + TCODE .40, .35, "Show Stopwatch " ;173 Show Stopwatch + TCODE .40, .35, "ShowTissueGraph" ;174 ShowTissueGraph + TCODE .40, .35, "Show Lead.Tiss." ;175 Show Lead.Tiss. + TCODE .40, .35, "Shalow stop 1st" ;176 Shalow stop 1st + TCODE .40, .35, "not used " ;177 not used + TCODE .40, .35, "not used " ;178 not used + TCODE .40, .35, "not used " ;179 not used + TCODE .40, .35, "not used " ;180 not used + TCODE .40, .35, "not used " ;181 not used + TCODE .40, .35, "not used " ;182 not used + TCODE .40, .35, "not used " ;183 not used + TCODE .40, .35, "not used " ;184 not used + TCODE .40, .35, "not used " ;185 not used +; + TCODE .13, .2, "Custom Functions II" ;186 Custom Functions II + TCODE .20, .95, "Show License" ;187 Show License + TCODE .0, .2, "Sim. Results:" ;188 Sim. Results: + TCODE .90, .25, "Surface" ;189 Surface + TCODE .0, .0, "ppO2 +" ;190 ppO2 + + TCODE .0, .0, "ppO2 -" ;191 ppO2 - + TCODE .0, .0, "Dil." ;192 Dil. +; ZH-L16 mode description + TCODE .0, .35, "Decotype: ZH-L16 OC" ;193 Decotype: ZH-L16 OC + TCODE .0, .65, "For Open Circuit " ;194 For Open Circuit + TCODE .0, .95, "Divers. Supports 5 " ;195 Divers. Supports 5 + TCODE .0, .125, "Trimix Gases. " ;196 Trimix Gases. + TCODE .0, .155, "Configure your gas " ;197 Configure your gas + TCODE .0, .185, "in Gassetup menu. " ;198 in Gassetup menu. + TCODE .0, .215, "Check CF11 & CF12 !" ;199 Check CF11 & CF12 ! +; Gaugemode description + TCODE .0, .35, "Decotype: Gauge " ;200 Decotype: Gauge + TCODE .0, .65, "Divetime will be in" ;201 Divetime will be in + TCODE .0, .95, "Minutes:Seconds. " ;202 Minutes:Seconds. + TCODE .0, .125, "OSTC2 will not " ;203 OSTC2 will not + TCODE .0, .155, "compute Deco, NoFly" ;204 compute Deco, NoFly + TCODE .0, .185, "time and Desat. " ;205 time and Desat. + TCODE .0, .215, "time at all! " ;206 time at all! +; Const.ppO2 description + TCODE .0, .35, "Decotype: ZH-L16 CC" ;207 Decotype: ZH-L16 CC + TCODE .0, .65, "For (Semi-)Closed " ;208 For (Semi-)Closed + TCODE .0, .95, "Circuit rebreathers" ;209 Circuit rebreathers + TCODE .0, .125, "Configure the 3 " ;210 Configure the 3 + TCODE .0, .155, "SetPoints in CCR - " ;211 SetPoints in CCR - + TCODE .0, .185, "Setup menu. 5 bail-" ;212 Setup menu. 5 bail- + TCODE .0, .215, "outs are available." ;213 outs are available. +; Apnoemode description + TCODE .0, .35, "Decotype: Apnoe " ;214 Decotype: Apnoe + TCODE .0, .65, "OSTC2 will display " ;215 OSTC2 will display + TCODE .0, .95, "each descent separ-" ;216 each descent separ- + TCODE .0, .125, "ately in Min:Sec. " ;217 ately in Min:Sec. + TCODE .0, .155, "Will temporally set" ;218 Will temporally set + TCODE .0, .185, "samplerate to 1 sec" ;219 samplerate to 1 sec + TCODE .0, .215, "No Deco calculation" ;220 No Deco calculation +; Multi GF OC mode description + TCODE .0, .35, "Decotype: L16-GF OC" ;221 Decotype: L16-GF OC + TCODE .0, .65, "Decompression cal- " ;222 Decompression cal- + TCODE .0, .95, "culations with the " ;223 culations with the + TCODE .0, .125, "GF-Method (GF_lo/GF" ;224 GF-Method (GF_lo/GF + TCODE .0, .155, "_hi). Check CF32 & " ;225 _hi). Check CF32 & + TCODE .0, .185, "CF33! Open Circuit " ;226 CF33! Open Circuit + TCODE .0, .215, "with Deep Stops. " ;227 with Deep Stops. +; Multi GF CC mode description + TCODE .0, .35, "Decotype: L16-GF CC" ;228 Decotype: L16-GF CC + TCODE .0, .65, "Decompression cal- " ;229 Decompression cal- + TCODE .0, .95, "culations with the " ;230 culations with the + TCODE .0, .125, "GF-Method (GF_lo/GF" ;231 GF-Method (GF_lo/GF + TCODE .0, .155, "_hi). Check CF32 & " ;232 _hi). Check CF32 & + TCODE .0, .185, "CF33!Closed Circuit" ;233 CF33!Closed Circuit + TCODE .0, .215, "with Deep Stops. " ;234 with Deep Stops. +; + TCODE .10, .2, "Decomode changed! " ;235 Decomode changed! + TCODE .85, .125, "L16-GF CC" ;236 L16-GF CC + TCODE .2, .12, "Not found" ;237 Not found + TCODE .100, .0, "SetPoint" ;238 SetPoint + TCODE .100, .0, "No Deco" ;239 No Deco + TCODE .90, .50, "Interval:" ;240 Interval: + TCODE .100, .75, "Display" ;241 Display + TCODE .100, .0, "No deco" ;242 No deco + TCODE .132, .0, "beta" ;243 beta + TCODE .100, .100, "unuse" ;244 unuse + TCODE .20, .65, "Reset CF,Gas & Deco" ;245 Reset CF,Gas & Deco + TCODE .50, .145, "LowBatt!" ;246 LowBatt! + TCODE .20, .125, "Simulator" ;247 Simulator + TCODE .30, .2, "OSTC Simulator" ;248 OSTC Simulator + TCODE .20, .35, "Start Dive" ;249 Start Dive + TCODE .100, .25, "+ 1m" ;250 + 1m + TCODE .100, .50, "- 1m" ;251 - 1m + TCODE .100, .75, "+10m" ;252 +10m + TCODE .100, .100, "-10m" ;253 -10m + TCODE .100, .0, "Close" ;254 Close + TCODE .131, .170, "Time" ;255 Time + +; Text Bank2 (Texts 256-511) + TCODE .0, .0, "x" ;256 x + TCODE .20, .35, "Date format:" ;257 Date format: + TCODE .40, .2, "Setup Menu 2:" ;258 Setup Menu 2: + TCODE .105, .35, "MMDDYY" ;259 MMDDYY + TCODE .105, .35, "DDMMYY" ;260 DDMMYY + TCODE .105, .35, "YYMMDD" ;261 YYMMDD + TCODE .1, .1, "OSTC " ;262 OSTC + TCODE .65, .168, "Bail" ;263 Bail + TCODE .7, .48, "Air " ;264 Air + TCODE .120, .135, "Air " ;265 Air + TCODE .2, .39, "Calibrate" ;266 Calibrate + TCODE .0, .216, "Max." ;267 Max. + TCODE .10, .8, "not" ;268 not + TCODE .10, .16, "found!" ;269 found! + TCODE .0, .0, "mV:" ;270 mV: +; New CFs Warning + TCODE .24, .2, "New CF added!" ;271 New CF added! + TCODE .0, .35, "New CustomFunctions" ;272 New CustomFunctions + TCODE .0, .65, "were added! Check" ;273 were added! Check + TCODE .0, .95, "CF I and CF II Menu" ;274 CF I and CF II Menu + TCODE .0, .125, "for Details!" ;275 for Details! + TCODE .20, .95, "Salinity: " ;276 Salinity: + + TCODE .20, .65, "Bottom Time:" ;277 Bottom Time: + TCODE .20, .95, "Max. Depth:" ;278 Max. Depth: + TCODE .20, .125, "Calculate Deco" ;279 Calculate Deco + TCODE .20, .155, "Show Decoplan" ;280 Show Decoplan + + TCODE .93, .170, "Avr.Depth" ;281 Avr.Depth + TCODE .90, .170, "Lead Tiss." ;282 Lead Tiss. + TCODE .93, .170, "Stopwatch" ;283 Stopwatch + TCODE .20, .95, "Reset Logbook" ;284 Reset Logbook + TCODE .20, .125, "Reboot OSTC" ;285 Reboot OSTC + TCODE .20, .155, "Reset Decodata" ;286 Reset Decodata +; + TCODE .20, .155, "Altimeter" ;287 Altimeter + TCODE .38, .1, "Set Altimeter" ;288 Set Altimeter + TCODE .20, .35, "Sea ref: " ;289 Sea ref: + TCODE .0, .0, "Enabled: " ;290 Enabled: + TCODE .20, .95, "Default: 1013 mbar" ;291 Default: 1013 mbar + TCODE .20, .125, "+1 mbar" ;292 +1 mbar + TCODE .20, .155, "-1 mbar" ;293 -1 mbar + TCODE .85, .185, "Alt: " ;294 Alt: + diff -r 4a7a778d9e49 -r 53b16a746166 code_part1/OSTC_code_asm_part1/menu.asm --- a/code_part1/OSTC_code_asm_part1/menu.asm Wed Feb 02 11:09:39 2011 +0100 +++ b/code_part1/OSTC_code_asm_part1/menu.asm Thu Feb 03 04:09:21 2011 +0100 @@ -326,7 +326,7 @@ menu0: movf menupos,W - call displaytext1 ; Display text! + call displaytext_1_low ; Display text! incf menupos,F decfsz temp1,F diff -r 4a7a778d9e49 -r 53b16a746166 code_part1/OSTC_code_asm_part1/menu_custom.asm --- a/code_part1/OSTC_code_asm_part1/menu_custom.asm Wed Feb 02 11:09:39 2011 +0100 +++ b/code_part1/OSTC_code_asm_part1/menu_custom.asm Thu Feb 03 04:09:21 2011 +0100 @@ -204,7 +204,7 @@ movf customfunction_temp1,W ; start of custom function descriptors addwf decodata+0,W ; add # of current custom function, place result in wreg - call displaytext1 ; shows descriptor + call displaytext_1_low ; shows descriptor ; Read default, type and min/max from reset table. rcall cf_read_default diff -r 4a7a778d9e49 -r 53b16a746166 code_part1/OSTC_code_asm_part1/multilang_text.asm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code_part1/OSTC_code_asm_part1/multilang_text.asm Thu Feb 03 04:09:21 2011 +0100 @@ -0,0 +1,77 @@ + +; OSTC - diving computer code +; Copyright (C) 2008 HeinrichsWeikamp GbR + +; This program is free software: you can redistribute it and/or modify +; it under the terms of the GNU General Public License as published by +; the Free Software Foundation, either version 3 of the License, or +; (at your option) any later version. + +; This program is distributed in the hope that it will be useful, +; but WITHOUT ANY WARRANTY; without even the implied warranty of +; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. + +; You should have received a copy of the GNU General Public License +; along with this program. If not, see . + + +; hold texts and parameters for the texts +; written by: Matthias Heinrichs, info@heinrichsweikamp.com +; History: +; 2007/10/13: written +; 2008/05/24: Last update Matthias +; 2011/02/02: moving texts to english_text.asm to prepare multilingual. +; known bugs: +; ToDo: + +texts code_pack 0x15000 + +TCODE_1 macro x, y, text + ; Compile-time checking on provided parameters: + If x<0 || x>.159 + Error "Bad X coordinate ", #v(tcode_idx), x + Endif + If y<0 || y>.239 + Error "Bad Y coordinate ", y + Endif + dw tcode_ptr_#v(tcode_idx) + db 0+x, 0+y +tcode_idx set tcode_idx+1 + endm + +TCODE_2 macro x, y, text +tcode_ptr_#v(tcode_idx): + db text, 0 +tcode_idx set tcode_idx+1 + endm + +;---- Manage language ------------------------------------------------------- +; Compile with ASM macro definition GERMAN=1 to use another +; file... +#ifdef GERMAN +#define LANGUAGE_FILE "german_text.asm" +#endif +#ifdef FRENCH +#define LANGUAGE_FILE "french_text.asm" +#endif +#ifndef LANGUAGE_FILE +#define LANGUAGE_FILE "english_text.asm" +#endif + +;---- PASS 1 : generate description block ------------------------------------ +text_pointer: + +tcode_idx set 1 +#define TCODE TCODE_1 +#include LANGUAGE_FILE +#undefine TCODE + +;---- PASS 2 : generate text contens ----------------------------------------- +tcode_idx set 1 +#define TCODE TCODE_2 +#include LANGUAGE_FILE +#undefine TCODE + + code + diff -r 4a7a778d9e49 -r 53b16a746166 code_part1/OSTC_code_c_part2/p2_deco.o Binary file code_part1/OSTC_code_c_part2/p2_deco.o has changed