Thanks for the additional information. One thing may be a showstopper for my bramper script: I need to set the length of the long exposure to arbitrary lengths. Say, 45.3 seconds or 1243.5 seconds. I recently read when the camera won't respond unless the exposure is one of the common pre-sets: 2, 4, 8, 16, 32, 64 seconds are okay, but 63 seconds won't do anything.
It does not have to be on a standard canon firmware value if you use set_tv96_direct.
The maximum exposure depends on the camera. All CHDK cameras should go up to at least 64 seconds. If the extended Tv feature is implemented in CHDK, it can go up to 2048 seconds, although some cameras may fail before this limit is reached.
In general, you are likely to get better results stacking shorter exposures rather than going to these extremes.
The canon firmware will take a dark frame by default if the exposure is longer than about 3 seconds. This means each shot will take double the expected exposure time. You can force this off in CHDK, but then you'll get even more noise unless you do dark frame subtraction later yourself.
Note if you are working in low light, the Bv value will become unreliable at some point. In this case, you can use the shot_histogram function. It gives you histogram values the raw buffer of the previous shot. If you search the forum, you should find some information about using this for night timelapses.