If you are planning to use the Retry and VWF patches in your SA-1 hack, look at retry_table.asm and find !max_custom_midway_num. Next, set !vwf_var_ram_sa1 in vwfconfig.cfg to $40C0CD + (4 * !max_custom_midway_num), and you should be good to go! If you want to change !max_custom_midway_num later on, you'll have to change !vwf_var_ram_sa1 too. You'll also need to change that value for every sprite and block using the VWF patch.
I have tried it, and so far, there seems to be no problems.