MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / mfmdecode

Function mfmdecode

src/diskutil.cpp:143–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141 return (mbuf[0] << shift) | (mbuf[1] >> (16 - shift));
142}
143static uae_u8 mfmdecode (uae_u16 **mfmp, int shift)
144{
145 uae_u16 mfm = getmfmword (*mfmp, shift);
146 uae_u8 out = 0;
147 int i;
148
149 (*mfmp)++;
150 mfm &= 0x5555;
151 for (i = 0; i < 8; i++) {
152 out >>= 1;
153 if (mfm & 1)
154 out |= 0x80;
155 mfm >>= 2;
156 }
157 return out;
158}
159
160static int drive_write_adf_pc (uae_u16 *mbuf, uae_u16 *mend, uae_u8 *writebuffer, uae_u8 *writebuffer_ok, int track, int *outsecs)
161{

Callers 1

drive_write_adf_pcFunction · 0.70

Calls 1

getmfmwordFunction · 0.70

Tested by

no test coverage detected