Whats a frame? CIRC encoding? How does ECC work?
EFM encoding is applied to a series of bytes called a “frame”. Some people refer to a CD sector as a “frame”, but that’s incorrect. A frame holds 24 bytes of user data, 1 byte of subcode data, and 8 bytes of parity (error correction), for a total of 33 bytes. When read from the disc, each frame is preceded by a 24-bit synchronization pattern and 3 merging bits. The sync data has a unique pattern not found elsewhere on the disc, and it ensures the read head correctly finds the start of the frame. (The pattern is 100000000001000000000010, three transitions separated by 11T, which can’t occur otherwise because the merging bits are specifically chosen to prevent it.) If you don’t understand why having a sync field is important, remember that every time the read head seeks to a new part of the disc or is confused by a scratch, it has to start reading in the middle of a stream of 1s and 0s and try to make sense of what it’s reading.