AutostarETX's patch kits for the 497 Autostar.  

8-Oct-2005  Meade firmware v40Eb  edition.
Revised 20-Oct-2005 for Simple patch improvements
(c) 2005   Richard Seymour   rseymour@wolfenet.com

Introduction:
This kit modifies the Meade firmware for the 497 Autostar.

How to Install (very short... see 'Method' below for the long version):
(a) fetch Meade's Build40Eb.zip file from
    http://www.meade.com/support/auto/Build.zip
(b) unzip that to produce Build40Eb.rom
(c) put this patch kit's ClickMe.bat, StarMod.exe and patch40bb2.txt
   into that same folder.
(d) double-click on 'ClickMe' ... a DOS/Command window will momentarily appear
(e) A new file should appear: Build40bb.rom  (if it didn't, something broke)
   (if you already have a 40bb from the previous edition of this patch,
    you'll be asked if you wish to overwrite it... say 'y')
(f) copy/move that file to the appropriate folder for your Updater:
 ASU:  \Program Files\Meade\AutostarSuite\Updater\Ephemerides
 StarPatch: \Program Files\Pixsoft\StarPatch
(g) use the 'Local' file option in ASU (or StarPatch) to Update your Autostar.

--------------------------

The kits usually add features, and sometimes correct bugs.
The current list of feature and fixes is under "Features", below.
The kit works by modifying a copy of Meade's firmware ROM file on your PC, and
then you update the Autostar with that modified copy to have the patches take effect.

You do not need to pre-load your Autostar with the unpatched version.
You can revert to "normal Meade" code by simply re-updating with the 
unpatched version (which is left intact on your PC).
As with any Meade release, you can update any version of existing 
497 Firmware directly to this version, no intermediate steps required.

Each patch kit is -specific- for one version of Meade's firmware.
Kit 40Eb will not work with 34Ea's firmware, and vice-versa.

Suggestions or requests for additional features are invited.
Some may be difficult or impossible to implement with the tools i use,
but others may be surprisingly easy (and useful).

have fun
--dick
---------------

Kit Contents:  Four files.
(a) this ReadMe file
(b) StarMod.exe, an executable supplied by Chris Carson, creator of
  the StarGPS accessory for ETX/DS/LXD/LX90 and LX200 telescopes.
  This is the program which actually modifies the ROM files.
(c) ClickMe.bat , the file you double-click to perform the patch
(d) patch40bb.txt,  the file containing the patch list. (Not written for
  normal human consumption.)(kits with the 4504 option pre-selected have
   patch40b4.txt as the patch file)

------------------

Method: 
(a) fetch the v40Eb firmware from Meade's support site, and unzip that file.
(b) put the Build40Eb.rom  file into your Updater's Ephemerides folder
  (that will be \Program Files\Meade\ASU\Ephemerides\
   or \Program Files\Meade\AutostarSuite\Updater\Ephemerides\
    if you have the Autostar Suite package)
(c) unzip this kit into that same folder
(d) double-click the "ClickMe" file
(e) a "Command Prompt" window will appear, and should show the progress of
 the patching.  If you see "PATCH SUCCEEDED", it's happy.
   (if you already have a 40bb from the previous edition of this patch,
    you'll be asked if you wish to overwrite it... say 'y')

(f) If error messages appear, see "TroubleShooting", below.
(g) If it succeeded, it will have created Build40bb.rom (or Build40b4.rom) 
(h) now use either Meade's Updater, or StarPatch (twice as fast)
   from http://www.stargps.ca/StarPatch.htm
  to Update the Autostar with Build40bb.rom   (40bb in ASU's Local list)
  Meade's Updater takes 19 minutes, StarPatch takes 9 (unregistered) to two.
   (if you are using the 40b4 patchkit, 40b4 will be seen by ASU)

You can skip steps (c) through (g) by using StarPatch to handle both
fetching the patch kit and updating the Autostar in one step.
See "StarPatch" below.


Using Meade's Updater is covered in "Meade's Autostar Updater", below.

------------------------

Features:
The patch40bb.txt  patch files contain:
(a)  Display and Editing of Drive Training Values
(b)  Optional Automatic Satellite Track starting at down-count=zero
(c)  *Optional CordWrap control for all scopes
(d)  Optional LPI Autoguiding of Alt/Az mounted scopes (enabled)
(e)  Version number change from 40Eb  to 40bb (so Initialization shows 40b)
(f)  *Optional (but disabled) SkipDate patch (see below)
(g)  Adds "peek" and "poke" functions for use with Andrew Johansen's PEC editors.
(h)  *Adds the Meade 4504 and 114EQ-DH4 to the Known Telescope Models list.
      (Removes the DS-70 model (to provide space for the above)*.
(i)  *Provides PEC Timing data for customized final drive gearing.
(j)  *Fool DSI to Autoguide an Alt/Az mounted scope.
(k)  Ability to avoid the  "0 for Tour" prompt
(l)  Ability to avoid the  "0 for Align" prompt
(m)  *Ability to save and recover Custom Tracking Rate across power cycles.

Features with the asterisk (*) are NOT enabled by default.  See "Options", below.

Detailed descriptions:
(a)  Display and Editing of Drive Training Values: (default:enabled)
 My original reason for writing a patch kit:
  when doing a Setup > Telescope > Train Drives   operation, what was happening?
 This feature adds two menu items, scrolled from RA Train and DEC Train:
  Setup > Telescope > Train Drives > Edit Az Train
  and  Setup > Telescope > Train Drives > Edit Alt Train
    Menuing to either of those shows the results of your Drive Training,
    and lets you edit them from the numeric keypad.
   This lets you monitor the quality/repeatability of your Training,
    and may warn you of backlash changes.
 
(b)  Optional Automatic Satellite Track starting at down-count=zero
  When using the Object > Satellite  feature to "chase" satellites,
  this feature automatically starts the tracking when the timer countdown
  reaches zero.  This helps avoid forgetting to push the [enter] key.
  (default:enabled)

(c)  *Optional CordWrap control for all scopes (default:disabled)
  This feature allows the Utility > CordWrap on/off command to be used with
  all telescopes.  Without the patch, models such as the ETX90 do not allow
  you to turn off the Cord Wrap protections.

(d)  Optional LPI Autoguiding of Alt/Az mounted scopes (enabled)
  Unpatched, the  LPI will only Autoguide Polar-mounted scopes.
  This patch allows it to autoguide Alt/Az-mounted scopes as well.

(e)  Version number change from 40Eb  to 40b4 (so Initialization shows 40b)
  This change just makes your current version visible (the "c" is important,
   the "E" just means "English"), and helps identify that the "fix is in".
   If you are using the 40bb version of this kit, that is what you'll see.

(f)  *Optional (but disabled) SkipDate patch 
   This change allows total remote control of the scope with classic LX200
   serial commands.  The scope will not ask for the time and date at power-up.

(g)  Adds "peek" and "poke" functions for use with Andrew Johansen's PEC editors.
  This patch adds two new serial commands:  :EPaddress# and :ENconstruct#
  :EP  will return the contents of the 16 bit "word" at "address" 
  :EN  will write a byte at an address in the parameter EPROM.
  "construct", "address" and the returned data are in decimal ascii.
  "construct" is created by  (address * 256) + data, with "data" being the byte
   you wish to write, and address being the 0->511 offset in the parameter EPROM.
  
  Andrew Johansen's live PEC editor uses these commands to read and write adjusted
  PEC tables on-the-fly, removing the need to go to Download mode that the ASU requires.
   http://members.optusnet.com.au/johansea/

(h)  *Adds the Meade 4504 and 114EQ-DH4 to the Known Telescope Models list.
     For folks with Meade 4504's, this adds their scope to the "known models"
     list, by removing the DS-70 model to make room.
    (default:disabled, unless the kit has 40b4 as its name)
     For PEC to be fully functional, you must power-cycle the Autostar -after-
     selecting the 4504 as the telescope model.
     Choosing this patch changes the final character of the firmware version
     to a "4".. so "40bb" becomes "40b4"

(i)  *Provides PEC Timing data for customized final drive gearing.
     For folks who have used the Meade DS, LXD and EQ motor units to 
     "Autostar" their own non-Meade mounts and non-Meade telescopes,
     this set of optional patches provides PEC gear and timing data for 
     final drives of 100, 130, 144, 180, 359 and 360 teeth. (default:disabled). 
     If your final drive is 144 teeth, do -not- select this patch, just use
     a normal LXD model.
     Due to the complexity of turning the pieces on and off and selecting the
     gear ratios, i recommend using StarPatch for this set of features, and 
     tick BOTH the "LXD N-tooth" choice and ONE of the gear tooth-count choices.
     This will change -all- LXD models in that autostar to the chosen tooth count.
    ; How to set up PEC for different gearing:
    ; Make the line following "[LXD N-tooth PEC]"  be    "S=Checked"
    ;  There are 5 sections of code between labels like "[----- 130 tooth]"
    ;  stating their tooth-count, and "end of XXX" for that count.
    ; In order to activate your tooth-count section, make the next line
    ;  following ONLY -your- tooth count label also be:    S=Checked   
    ;   Then apply the patch kit.
    ; When operating your telescope, select -any- LXD model,
    ;  enter your Ratios directly into the Setup/Telescope/Ratio
    ; (both RA and DEC) fields from the keypad, and PEC should
    ; become operational.

(j)  *Fool Meade's DSI to Autoguide an Alt/Az mounted scope.
     The DSI will only Autoguide a telescope which reports that it's Polar mounted.
      This patch changes the Autostar's response to the [ACK] request to -always-
      return "P" (for Polar).  That convinces the DSI program to send guiding commands.

(k)  Ability to avoid the  "0 for Tour/Mode for menu" prompt after an Easy Align 
   ... it just drops into the menu stream (restores old behaviour)

(l)  Ability to avoid the  "0 for Align" prompt after time/date entry 
   ... it just drops into the menu stream (restores old behaviour)

(m)  *Ability to save and recover Custom Tracking Rate across power cycles.
     If you set a Custom Tracking Rate, that value will be restored at power-up.
     NOTE: To -prevent- this, you must set a Custom Tracking Rate of zero,
      simply choosing Sidereal will be forgotten at the next power-up, and the
      Custom rate will be reinstated.

----------------------------
Options:

There are two ways to select/deselect the optional portions of the patch kit.
The easiest is to use StarPatch to perform the patching/updating.
It provides a "tick list" of the features, and you can just choose the ones you want.

The less-easy way is to edit the patch file itself.
Each subsection is identified by a [name in brackets], followed by a line of:
S=Checked   or   S=Unchecked.
Sections with "S=Checked" -will- be included,  the "Unchecked" won't.

Here is the feature list (again), with the corresponding [section labels]:
(a) Display and Editing of Drive Training Values  [Editing of Training Values]
(b) Optional Automatic Satellite Track starting at down-count=zero [Satellite AutoTrack]
(c) *Optional CordWrap control for all scopes  [Cord Wrap]
(d) Optional LPI Autoguiding of Alt/Az mounted scopes (enabled) [LPI Autoguiding for Alt/Az]
(e) Version number change from 40Eb  to 40b4 (so Initialization shows 40b) [Version 40bb]
(f) *Optional (but disabled) SkipDate patch (see below)  [Skip Date/Time/Daylight]
(g) Adds "peek" and "poke" functions for use with Andrew Johansen's PEC editors.[PEC Editor Hook]
(h) *Adds the Meade 4504 and 114EQ-DH4 to the Known Telescope Models list. [4504/114eq vs DS-70]
(i) *Provides PEC Timing data for customized final drive gearing. [LXD N-tooth PEC]and[---tooth]
(j) *Fool DSI to Autoguide an Alt/Az mounted scope. [DSI Autoguiding for Alt/Az]
(k)  Avoid the "0 for Tour" prompts.  [Skip Simple Tour]
(l)  Avoid the "0 for Align" prompts.  [Skip Simple Align]
(m)  *Save and recover Custom Tracking Rate across power cycles.[Custom Tracking Rate]

-----------------------------

Meade's Autostar Updater:

  Meade's "preferred" method of putting new firmware into the Autostar is to use
their "Autostar Update (ASU) Client Application", available from their website:
http://www.meade.com/support/auto.html
Full instructions for using it to update an Autostar are posted at:
http://www.weasner.com/etx/autostar/guide-asu3x.html
The Meade updater operates at 9600 baud (about 1000 bytes per second), and takes
18 minutes (35 with Option/Verify chosen) to transfer a firmware load to the Autostar.
It is relatively "fragile", and frequently cannot connect to the Autostar if other 
processes in your PC are competing for the serial ports (such as a PalmPilot Sync program).

------------------------------
StarPatch:
StarPatch is a combination patcher/updater developed to support the StarGPS accessory.
It is available for free download from http://www.stargps.ca , follow the links to
StarPatch.  It is much more "robust" than the ASU (above), and can operate about 10
times faster than ASU.  In its free (unregistered) mode, it will load half of an
Autostar in one minute.  Then it slows down to "normal Meade speed" and loads the
second half in another 8 minutes.  If you register StarPatch, or buy a StarGPS unit,
it will operate at full speed for the entire load, and complete in two minutes or less.
StarPatch can load patch kits and firmware directly from the Web.
When using StarPatch on the web or with an ".spf" file, each feature of the patch kit
becomes "optional", and you can use a tick-list to choose which ones you want in your
Autostar.

In short, to update an Autostar you connect the cables (COM port to second socket on
the base of the Autostar itself, near the "Scroll Up" key), then start StarPatch and do:

1) click on the "Options" menu and select your "Handset type" and "Language"
2) click on the "File" menu and select "Get Updates..." to download the latest files
3) make sure the Autostar is connected to a serial port on this PC
4) turn the telescope on and wait until the Autostar is ready (it will beep)
5) click on the "Update Autostar" button and follow the instructions

-------------------------------

Troubleshooting:
As with any computer operation, things can go wrong.
Each stage of the process can have problems, this section will try to cover
the ones i can think of.

There are five major stages of the patching process:
(a) getting the files
(b) unpacking the files
(c) patching the files
(d) updating the Autostar
(e) post-patch: running the telescope

(a) Getting the files:   There are many ways to get the files you need.
Perhaps the simplest is to get StarPatch, and let it do the rest of the work.
Download it from http://www.stargps.ca  (as noted above), install it, and start it.
Then follow the steps listed above in the "StarPatch" section.

Another way to get the files is from the web.  The current Meade firmware file is
posted on their website at: http://www.meade.com/support/auto.html
You will require both the ROM file for the 497 Autostar, and the ASU (see Meade Updater,
 above).  Install the Updater, then use your browser to fetch the firmware file from
the same webpage, and unzip it into the Ephemerides folder found under the Updater.
If you have Autostar Suite, that will be at:
 \Program Files\Meade\AutostarSuite\Updater\Ephemerides
If you do NOT have Autostar Suite, it will be at:
\Program Files\Meade\ASU\Ephemerides\

A third way is to have the Autostar Updater fetch the firmware file for you.
This is a little arcane (it's easier to just use your browser, as above).
The by-ASU method is described in: http://www.weasner.com/etx/autostar/guide-asu3x.html
In short, start the Update process -without- having your Autostar attached to your PC.
The Updater will complain, and then tell you that all you can do is save the file to
 your PC's disk.  Which is what we want, for patching purposes.

The patch kits, and older firmware ROM files, are archived in many Yahoo Groups' Files
area, and all are available from Mike Weasner's Mighty ETX site, under the Autostar Info page.
http://www.weasner.com/etx

(b) unpacking the files
The patch kits and firmware files (unless fetched by the ASU) are compressed for
faster downloading by a process/program called "WinZip" or "zipping".  You can 
un-compress them to usable form with a number of programs.  WinZip (www.winzip.com),
StuffIt, some versions of WindowsXP, PKUnzip are but a few of the programs capable
of unpacking them.   By using compression, you gain additional assurance that the
files arrive complete... there are "checksums" used in the zipping/unzipping which
verify the contents.  You'll be told by the "unzipper" if the file is corrupted.

(c) patching the files
The usual problems folks have with the patching process are:
(1) the wrong files ... if you don't have Build40Eb.rom on your PC, the 40Eb kit can't patch it.
(2) the wrong places... the patch kit's files and the Build40Eb.rom file have to be in
  the same folder on your PC.   Then the patched ROM file has to be where the Updater
  or StarPatch can find it.
(3) bad files (rare)... sometimes i will publish a kit with a typo in it... the 
 patching process has cross-checks (the patch kit lists both the -old- (existing)
 data -and- the new data... if the "old" data doesn't match what's in Meade's ROM
 file, the patching program will complain, and not create a patched file.

 Error Messages:  If the specified output file already exists, you will be asked
  if you wish to replace it with the new one.
  If the patch file's cross-check detects problems, you'll see messages like:
      Error: R 44564  ff  c0  d1   [40Eb: c0bb (source=0xC0)
      Error: R 44565  ff  b6 bb  82   [40Eb: c0bb (source=0xB6)
      PATCH FAILED, 2 Errors
   That is usually due to file naming errors, such as an output file becoming 
    renamed to the original Meade ROM file's name.
   If you can't identify the error, please note the last couple of "Error:" lines
    and email them to me at  rseymour@wolfenet.com

(d) updating the Autostar
The usual patch-related problem with Updating the Autostar is usually that the patched
ROM file is not where the Updater or StarPatch (if you're working from a local copy)
can find it.  My kits modify the version number shown in the (*) Local   drop-down
list presented by the Autostar Updater after you click the big [update autostar] button.
If you don't see the expected modified number (40Eb becoming 40bb or 40b4), then you
don't have the patched file in that Updater's Ephemerides folder.

Once you've identified the patched ROM file to the Updater, the next battle is getting
the connection to the Autostar working, and keeping it alive (and unbothered) during
the update.  See http://www.weasner.com/etx/autostar/guide-asu3x.html  for tips.
If your PC does not have a hardware 9-pin serial (COM) port, then you will probably
need to buy a USB to serial adapter to be able to attach Meade's 505 cable set 
between the scope and your PC.

Once the Update starts: do NOT do other things with your PC.  Don't do Email, don't browse.
Just let it perc away updating the Autostar.  The timing for the transfers is fairly 
critical (or "picky"), and a fraction of a second's interruption can abort the transfer.
As a precaution, read the Autostar Updater's HELP page on "Damaged Handbox" *now*,
rather than after it is sitting there for an hour saying "Downloading... do not turn off",
with the interconnecting cable wrapped around the cat.  (oh, yes: ban all pets and small
children from the area during the download, too).
My advice is to simply walk away from the area during the expected download time
(19 minutes for ASU, 9 minutes for free StarPatch, 2 minutes for registered StarPatch)

To recover from a mangled update, cure the root cause (throw the cat out),
and then perform a Safe Load procedure:  connect the cables.  Turn on the 
telescope/Autostar, while simultaneously pressing the [enter] and [scroll down]
keys.  The Autostar should come up and display:  FLASH LOAD
Now start the Autostar Updater or StarPatch on your PC.  
Restart the update (click [update autostar] on the either program).
They should notice the FLASH LOAD state of the Autostar and will ask you to verify
that's what's going on.  Answer the questions and the Update will be re-tried.

(e) post-update issues:
If you have completed the update, and the Autostar reboots properly, you're done.
Enjoy.
However, there are times when (among other things) the patch kits introduce bugs.
This usually shows up as blatantly bad operation: blank screens, or "Proc Trap 2" 
messages.  I apologize in advance.
If that happens, simply revert to the original Meade firmware with the Updater
or StarPatch, and let me know of the problem.  
Reloading Meade's firmware (or an earlier patched version) completely removes this kit.
Read the websites (Mike Weasner's and the Yahoo Groups) for other folks' reports,
or my posting of patched patch kits.

----------------------------
Glossary:
Firmware or ROM files: the files provided by Meade to load the Autostar with new programming.

Patch: changing a few bytes of the ROM file to change how it operates once loaded into
 the Autostar.  My patches do not -add- bytes to the ROM files, they merely modify some
 of its existing ones.

StarGPS: a plug-in GPS receiver for the 497 Autostar and the telescopes it operates.
 Available in two flavors: the original StarGPS (includes a registered copy of StarPatch)
 requires a patched firmware in the Autostar for operation.. this gives you signal strength
 and as-it-happens acquisition information on the Autostar's screen during the power-up
 cycle.
StarGPS-LX: a plug-in GPS receiver for the Classic LX200 and other LX200-command-set
 telescopes (including the 497 and 495 Autostar models).  Does NOT require a firmware change.

StarMod: a program which accepts the patch list as commands to modify the Build.Rom file.
 It accepts three arguments: the Build file name, the Patch file name, and (optional)
  the output file name.  The original Build file is opened read-only, and is unchanged
 by the procedure.  Written by Chris Carson, developer of StarGPS (www.stargps.ca)

StarPatch: a Windows program that can fetch the latest patch and ROM file
and use these (or older versions) to update the Autostar firmware.  A
registered copy of StarPatch is over 10x faster than the Meade ASU and adds
GPS Setup capability to the Autostar.
