WARNING: This is a "possible reconstruction" of a Hafsid flag of the 15th century (unreferenced).
There are some depictions of Hafsid flags in 15th century manuscripts. They appear to show a crescent, or a double crescent, on a yellow flag.  

The upward-pointing crescent (without the star) can be traced to the Catalan Atlas collected by Charles V le Sage c. 1370, where it is attributed to the port city of Gabes.
self-made (based on http://www.hukam.net/family.php?fam=44 and http://www.allstates-flag.com/fotw/flags/tn-hist.html#14th)
DrFO.Jr.Tn