  We consider the reduction along two compact directions of a twisted N=4 gauge
theory on a 4-dimensional orientable manifold which is not a global product of
two surfaces but contains a non-orientable surface. The low energy theory is a
sigma-model on a 2-dimensional worldsheet with a boundary which lives on branes
constructed from the Hitchin moduli space of the non-orientable surface. We
modify 't Hooft's notion of discrete electric and magnetic fluxes in gauge
theory due to the breaking of discrete symmetry and we match these fluxes with
the homotopy classes of maps in sigma-model. We verify the mirror symmetry of
branes as predicted by S-duality in gauge theory.
