Editing a MDF or IMG file Manually

As the title states, I am trying to edit a CD image file with a hex editor. Please correct me if I am wrong, if I add a few sectors to a MDF/IMG file I don’t need to edit the MDS/CCD file.

Now, you’re probably curious what I am adding because normally a CD image has all sectors sequentially and there isn’t really anything to add. I would like to add 20 twin sectors to the image file. So from what I understand the MDS/CCD just contains TOC information and since I didn’t add “additional” sectors there isn’t anything to change.

The file emulates perfectly, however when I burn to a disk as RAW DAO I get a error (with both alcohol and clonecd) about error writing LBA address xxxx. When I burn RAW SAO it appears to write fine but the disk doesn’t work – it appears to have tracking issues finding any sector.

Is there some magic in the TOC files I over looked?