  We use the Dijkgraaf-Vafa technique to study massive vacua of 6D SU(N) SYM
theories on tori with R-symmetry twists. One finds a matrix model living on the
compactification torus with a genus 2 spectral curve. The Jacobian of this
curve is closely related to a twisted four torus T in which the Seiberg-Witten
curves of the theory are embedded. We also analyze R-symmetry twists in a
bundle with nontrivial first Chern class which yields intrinsically 6D SUSY
breaking and a novel matrix integral whose eigenvalues float in a sea of
background charge. Next we analyze the underlying integrable system of the
theory, whose phase space we show to be a system of N-1 points on $T$. We write
down an explicit set of Poisson commuting Hamiltonians for this system for
arbitrary N and use them to prove that equilibrium configurations with respect
to all Hamiltonians correspond to points in moduli space where the
Seiberg-Witten curve maximally degenerates to genus 2, thereby recovering the
matrix model spectral curve. We also write down a conjecture for a dual set of
Poisson commuting variables which could shed light on a particle-like
interpretation of the system.
