Set to regulate voltage to about 30v. A differential amplifier amplifies the difference (but I found that a gain of 1 works best) between the 1v reference and the feedback voltage. An integrator integrates the error voltage and feeds that to a comparator that generates a pwm signal from a ramp generator. It works ok, and it's prone to overshoots and undershooting. The integrator probably needs to be tuned.
Note: the diode into the integrator is a mostly ideal diode because I'm lazy.