Below is the specification of ghost disks in future version of Steem.This is not to impose it on the world, there's no reason that all emulators use the same way to do this, but this is to clarify the purposes of "STG" and "STW" files.STG is for ghost disks, STW is for a full disk.

Each sector / ID field should have the physical side and physical head position at the time of the write, else you will get problems : some games are using side=0 in the ID field of 2nd side for example, or are putting different value in the track part of the ID field.Without that, you could have several sectors with similar ID fields in the same file (and conflict), while they were supposed to be on different physical track.