| 161 | } |
| 162 | |
| 163 | static uint8_t encode_side(uint8_t track, uint8_t side) |
| 164 | { |
| 165 | /* Mac disks, being weird, use the side byte to encode both the side (in |
| 166 | * bit 5) and also whether we're above track 0x3f (in bit 0). |
| 167 | */ |
| 168 | |
| 169 | return (side ? 0x20 : 0x00) | ((track > 0x3f) ? 0x01 : 0x00); |
| 170 | } |
| 171 | |
| 172 | static void write_sector(std::vector<bool>& bits, |
| 173 | unsigned& cursor, |