Aeth Dafydd i fyw i'r gaer, a'i galw yn Ddinas Dafydd. Dyma fe'n adeiladu o'i chwmpas o'r terasau at y palas.