;  patch kit for 30Ee  Autostar 497
; This 7 Nov 2003  patch30e5.txt patch file contains:

;  Editing of Training Values (an EDIT menu item under Setup>Train Drives)
;  Adds 4504/114eq to Known Models (replaces DS-70)(a GEM scope!)
; this also allows DS motors to be used on a GEM mount.

;  Automatic Satellite Track starting at down-count=zero  (optional, see below)
;  CordWrap control (optional, see below)
;  Version number change from 30Ee  to 30e5 (so Initialization shows 30e )

; corrected to work with Autostar Suite

; rseymour@wolfenet.com 7-Nov-2003

; Here are the Three optional patches:
;   Cord Wrap control, Automatic Satellite Tracking, Skip Time/date

; ADD semicolons (;) in front of the next three ";R" lines to BLOCK permitting of
; Cord Wrap ON/OFF in hard-stopped scopes (ETX90/105/125,LXD55)
; This only -allows- turning Cord Wrap OFF, it does not change its current setting.

R      1fa8f   27      20      cordwrap [ 3d/e:3-Ea8f 
R      1fb6f   26      21      cordwrap [ 3d/e: 3-eb6f
R      1fa93   17      23      chksum   cordwrap [ 3d/e: 3-ea93

; ADD semicolons to the following three "R" lines to -prevent- Automatic
;  Start-of-tracking during a Satellite pass.  
;            Satellite  AutoTrack

R       45e17   bd      20      (-9d)      AutoTrack  [ 3/e:8-ce17
R       45e18   1d      21      (+04)=-99  AutoTrack  [ 3d/e:8-ce18
R       45e1a   05      9e      (chksum) 99+5  AutoStart  [ 3d/e:8-ce1a

;  there are NO further "optional" patches in this file.
;  changing any further "R" lines will cause the Updater to refuse to load the file.

;=== make no changes below this line ====

; Autostar Menu items added by this patch:
;
;  Training results Display and Edit:

; Under Setup > Telescope > Train Drive 
; are now (scroll up or down from the "Az/RA Train" or "Alt/Dec Train")
;  Edit: > Az/RA Train
;    and
;  Edit: > Alt/Dec Train
; press [enter] to allow direct display and manipulation of the results of training.
;    a power cycle (without using Park Scope) is needed for 
;     the  new values to be fully implemented.
; =======

;  4504/114eq replaces DS-70  (use the DS-60 for -70 if you need to)
;   The upper lower travel limits are 4800/-600 arcmin (+60 deg, - 10 deg)
;   ... values taken from the LXD55 series.  Please inform me if they're
;  too restrictive (too many Check Mount messages) or too loose (hits tripod)
;

;  For installation instructions, see:
;   README30e5.txt  which should have come with this kit.
;  the last line of -this- file says "; end of patch 30e4"
;  "Have fun" (tm) -- Dick Seymour   5-Nov-2003

;  there are NO further "optional" patches in this file.
;  changing any further lines will cause the Updater to refuse to load the file.

; 30Ed/e patch region:  a-b55d to b5ff 

;
R       0004    41      fa       chksum
R       0005    0d      b6       chksum
R       0006    ba      b9      ;chksum
;R      0007    07      07 

R       000A    45      65      (E->e) [30Ee] version
R       0142FE  45      65      (32fe) [30Ee] version
R       000b    65      35      (e->5) [30Ee] version 30e5
R       0142Ff  65      35      (32ff) [30Ee] version

;  menu manipulations 
; automatic menu patches v30ee
; R      12808    18    00     Owner>Addr Enter surpress
; R      12809    0E    00     Owner>Addr Enter surpress

; R      1280B    04    04        Street Action pg
; R      1280C    DA    BB      Street Action addr
; R      1280D    6F    26      Street Action addr

R      1283B    04    04      Zip->City Action pg
R      1283C    BC    BB      Zip->City Action addr
R      1283D    41    b3      Zip->City Action addr

R      1280E    02    02     Addr->Edit msg (Aendern)==>Train Drive (02a9)
R      1280F    BF    a9     Addr->Edit msg
R      12810    02    01     Street->AzTrnMsg (Azimut Training)==>Zip(0179)[Edit Az:]
R      12811    C0    79     Street->AzTrnMsg
R      12814    18    16     up to AltTrn
R      12815    2E    CE     up to AltTrn
R      12816    17    16     Mode to TrnDrvs
R      12817    FE    9E     Mode to TrnDrvs
R      1281B    04    a      action page to Patch page
R      1281C    BB    b5     action adr to Patch adr
R      1281D    26    5d     action adr to Patch adr

R      126D2    16    18     AltTrnDwn to AzEd
R      126D3    BE    0E     AltTrnDwn

R      1281E    02    02     Addr->Edit msg==>Train Drive (02a9)
R      1281F    BF    a9     Addr->Edit msg
R      12820    02    01     City->AltTrnMsg===>Date of Birth (017a)[Edit Alt:]
R      12821    C1    7a     City->AltTrnMsg
R      12822    18    16     Dwn to AltTrn
R      12823    3E    BE     Dwn to AltTrn
R      12826    17    16     Mode to TrnDrvs
R      12827    FE    9E     Mode to TrnDrvs
R      1282B    04    a      action page to Patch page
R      1282C    BB    b5     action adr to Patch adr
R      1282D    B3    89     action adr to Patch adr

R      126C4    16    18      AzTrnUp to AltEdit
R      126C5    CE    1E      AzTrnUp to AltEdit
;
; 1809: 0e->2e; 1831: c3->c1 ; 1833: 0e->3e ; 1845: 1e->2e
;
R  12809  0e  2e   Addr->City (was zip)
R  12831  c3  c1   Zip->City message
R  12833  0e  3e   City->state
R  12845  1e  2e   state->City
;
;  messages:  Postal/Zip Code=>Edit Az Train::  ;  Date of Birth=>Edit Alt Train:
R 097873  50  45
R 097874  6f  64
R 097875 73  69
R 097876 74  74
R 097877 61  20
R 097878 6C  41
R 097879 2F  5A
R 09787a 5A  3A
R 09787b 69  20
R 09787c 70  54
R 09787d 20  72
R 09787e 43  61
R 09787f 6F  69
R 097880 64  6e 
R 097881 65  3a
;
R 097883  44 45    Date of Birth=>Edit Alt Trn:
R 097884  61  64
R 097885  74  69
R 097886  65  74
R 097887  20  20
R 097888  6f  41
R 097889  66  6c
R 09788a  20  74
R 09788b  42  20
R 09788c  69  54
R 09788d  72  72
R 09788e  74  6e
R 09788f  68  3a
;
; Az: a-b55d Alt: a-b589
;       [Ab55d]   AZ   Train display [30eb](a-b4a5)  x67 bytes [30Ed/e:a-b55d
R       05455d  FF      3C      pshx
R       05455e  FF      BD      jsr
R       05455f  FF      25      clrscrn [30ed:259a 30ee:25b0
R       054560  FF      b0      clrscrn [30ed:259a 30ee:25b0
R       054561  FF      FC      ldd
R       054562  FF      B6      azTrain  
R       054563  FF      0B      azTrain  [26gc: b60b) 30ed/e:b60b
R       054564  FF      30      tsx
R       054565  FF      ED      std
R       054566  FF      00      0.x
R       054567  FF      CC      ldd
R       054568  FF      02      msgNum
R       054569  FF      aa      az [26gc]  (:02a3  "Az/RA Number")(g:029d)  3b/d/e: 02aa
R       05456a  FF      BD      jsr
R       05456b  FF      1d      dispatch
R       05456c  FF      fd      dispatch [26gc:1e89 3b/d/e: 1dfd
R       05456d  FF      09      page
R       05456e  FF      ca      d->msg [26gc] (26gc: cc8d 30b/d/e: 9-cab6
R       05456f  FF      b6      d->msg [26gc]
R       054570  FF      BD      jsr
R       054571  FF      25      msg->scrn [26gc:263f 3b: 25ba 3d:25ca 30ee:25e0
R       054572  FF      e0      msg->scrn [26gc:263f 30ee:25e0
R       054573  FF      C6      lda#01
R       054574  FF      01      #01
R       054575  FF      37      pshb
R       054576  FF      5C      incb
R       054577  FF      BD      jsr
R       054578  FF      25      cursor [26gc:25c3 3b:253e 3d:254e 30ee:2564
R       054579  FF      64      cursor [26gc:25c3  3d:254e 30ee:2564
R       05457a  FF      31      ins
R       05457b  FF      30      tsx
R       05457c  FF      8F      xgdx
R       05457d  FF      BD      jsr
R       05457e  FF      1d      dispatch
R       05457f  FF      fd      dispatch [26gc:1e89 3b/d/e: 1dfd
R       054580  FF      05      page
R       054581  FF      a5      IntegerInput [26gc:5-adf0] 3b: 5-A682 3d/e:5-xA5C7
R       054582  FF      c7      IntegerInput [26gc:5-adf0 3d/e:5-xA5C7
R       054583  FF      CE      ldx#
R       054584  FF      B6      azTrain
R       054585  FF      0B      azTrain [26gc]
; variation: jump to common exit code. (could branch, jump's easier)
R       054586  ff    7e   jmp
R       054587  ff    b5   [30Ed: common: b5b2 ]
R       054588  ff    b2   [30Ed: common: b5b2 ]

;              ALT Train display [a-b589]
R       054589  FF      3C      pshx
R       05458A  FF      BD      jsr
R       05458B  FF      25      clrscrn [26gc:260f 258A 30ed:259a 30ee:25b0
R       05458C  FF      b0      clrscrn [30ed:259a 30ee:25b0
R       05458D  FF      FC      ldd
R       05458E  FF      B6      altTrain
R       05458F  FF      09      altTrain [26gc,30Ed
R       054590  FF      30      tsx
R       054591  FF      ED      std
R       054592  FF      00      0,x
R       054593  FF      CC      ldd#
R       054594  FF      02      msg:Alt
R       054595  FF      ab      Alt [26ec: 02a4 "Alt/Dec number")(g:029e) b/d/e:02ab
R       054596  FF      BD      jsr
R       054597  FF      1d      dispatch
R       054598  FF      fd      dispatch [26gc:1e89 3b/d: 1dfd
R       054599  FF      09      page
R       05459A  FF      ca      d->msg [26gc]   (26gc: cc8d 3b/d/e: 9-cab6
R       05459B  FF      b6      msg [26ec]
R       05459C  FF      BD      jsr
R       05459D  FF      25      d->scrn [26gc g:263f 3b: 25ba 3d:25ca 30ee:25e0
R       05459E  FF      e0      scr [26gc:263f 30ee:25e0
R       05459F  FF      C6      ldb#
R       0545a0  FF      01      #01
R       0545a1  FF      37      pshb
R       0545a2  FF      5C      incb
R       0545a3  FF      BD      jsr
R       0545a4  FF      25      cursor [ 3d:254e 30ee:2564
R       0545a5  FF      64      curs  [26gc:25c3 3b:253e  3d:254e 30ee:2564
R       0545a6  FF      31      ins
R       0545a7  FF      30      tsx
R       0545a8  FF      8F      xgdx
R       0545a9  FF      BD      jsr
R       0545aA  FF      1d      dispatch
R       0545aB  FF      fd      dispatch [26gc:1e89 3b: 1dfd
R       0545aC  FF      05      page
R       0545aD  FF      a5      IntInput [26gc:5-adf0  3b: 5-A682 3d/e:5-xA5C7
R       0545aE  FF      c7      IntIn [26gc] 30ee:5-xA5C7
R       0545aF  FF      CE      ldx#
R       0545b0  FF      B6      altTrain
R       0545b1  FF      09      altTrain [26gc]
R       0545b2  FF      3C      pshx   <-- common  [30ed/e: b5b2
R       0545b3  FF      30      tsx
R       0545b4  FF      EC      ldd
R       0545b5  FF      02      2,x
R       0545b6  FF      BD      jsr
R       0545b7  FF      22      burnWd
R       0545b8  FF      94      burn [26gc:22f8  3bL 226b  30ed:227d 30ee:2294
R       0545b9  FF      38      pulx
R       0545bA  FF      38      pulx
R       0545bB  FF      39      rts
; a-b5bc next free byte
;                  Barrel elevLim:  now provided by Meade
;    Satellite  AOSaltitude Input:  now provided by Meade

; 4504
; 4504/114eq replacing DS-70  20xxx=3-f000 [30ed] 30ee:

R       208a6   98      f4    DS-70->4504msg [30b:3-f8a2 b:0198->01f4 d/e:3-f8a6

R       97dc0   72      34      "4504/114EQ"  
R       97dc1   65      35    (was breakmask) [26g:92cde  b:97dc0 3d/e:97dc0
R       97dc2   61      30 
R       97dc3   6b      34
R       97dc4   6d      2f
R       97dc5   61      31
R       97dc6   73      31
R       97dc7   6b      34
R       97dc8   20      45
R       97dc9   5b      51

R       202b0   02      03     900 FL [30b:3-f2b0 30d/e:3-f2b0
R       202b1   bc      84   [26gc]
R       202bb   0f      12      4800_max_elev [26gc] (4-8841/2)
R       202bc   78      c0   [26gc]
R       202c6   fe      fd     -600_min_elev [26gc]  (4-884c/d)
R       202c7   5c      a8   [26gc]
R       202cf   03      0A     5-ff06_branch   [30ed]  (4-8855/6/7)
R       202d0   f0     B5    5-ff06_branch   [30ed] 0a-b5bc [30d/e: 0a-b5bc
R       202d1   5a     bc    5-ff06_branch   [30ed]  (26) 0a-b5-26 [30d/e: 0a-b5bc

; patch requires x4f bytes  ..from (30ed)a-b5bc..
R       0545bc   ff      3c     at a-b526  [26gc:a-b526 [30ed/e: a-b5bc
R       0545bd   ff      3c   pshx,pshx
R       0545be   ff      cc   ldd_03ca 4504 ratio  4.562963
R       0545bf   ff      03
R       0545c0   ff      CA
R       0545c1   ff      30   tsx
R       0545c2   ff      ed   std_2,x
R       0545c3   ff      02
R       0545c4   ff      cc   ldd_4092
R       0545c5   ff      40
R       0545c6   ff      92
R       0545c7   ff      ed   std_0,x
R       0545c8   ff      00
R       0545c9   ff      bd   dispatch [26gc:1e89 3b: 1dfd  3d/e:1dfd
R       0545ca   ff      1d
R       0545cb   ff      fd   [26gc]
R       0545cc   ff      09  setAzratio [26c:dc19) 3b/d/e:9-d9c2
R       0545cd   ff      d9   [26gc]
R       0545ce   ff      c2   [26gc]
R       0545cf   ff      cc   ldd_0194 4504 ratio=4.562693
R       0545d0   ff      01
R       0545d1   ff      94
R       0545d2   ff      30   tsx
R       0545d3   ff      ed   std_2,x
R       0545d4   ff      02
R       0545d5   ff      cc   ldd_4092
R       0545d6   ff      40
R       0545d7   ff      92
R       0545d8   ff      ed   std_0,x
R       0545d9   ff      00
R       0545da   ff      bd   dispatch  (26c:1e89 3b/d/e: 1dfd
R       0545db   ff      1d
R       0545dc   ff      fd   [26gc]
R       0545dd   ff      09   setALTratio [26gc:09-dc4e) 3b/d/e: 9-D9F7
R       0545de   ff      d9    [26gc]
R       0545df   ff      f7    [26gc]
R       0545e0   ff      cc   ldd_B73E_(status_bits)[26gc]
R       0545e1   ff      b7
R       0545e2   ff      3e
R       0545e3   ff      30   tsx
R       0545e4   ff      ed   std_0,x
R       0545e5   ff      00
R       0545e6   ff      f6   ldab_B73e [30Ed]
R       0545e7   ff      b7
R       0545e8   ff      3e
R       0545e9   ff      ca   orab_x18_(GEM,Polar)
R       0545ea   ff      18
R       0545eb   ff      bd   jst_burn_Byte   ( 3d:228f 30ee:
R       0545ec   ff      22   [30Ed] 30ee:22a8
R       0545ed   ff      a8   [30Ed] 30ee:22a8
R       0545ee   ff      cc   ldd_B73d_(more_status)
R       0545ef   ff      b7
R       0545f0   ff      3d   [30Ed]
R       0545f1   ff      30   tsx
R       0545f2   ff      ed   std_0,x
R       0545f3   ff      00
R       0545f4   ff      f6   ldab_b73d [30Ed]
R       0545f5   ff      b7
R       0545f6   ff      3d
R       0545f7   ff      ca    orab_x08_(cord_wrap)
R       0545f8   ff      08
R       0545f9   ff      bd   jsr burnByte (26g:230c  3b: 227f 3d:228f
R       0545fa   ff      22   [30Ed] 30ee:22a8
R       0545fb   ff      a8   [30Ed] 30ee:22a8
R       0545fc   ff      38   pulx
R       0545fd   ff      38   pulx
R       0545fe   ff      39   rts
; end of patch 30e5