Lines Matching refs:raw
779 static unsigned long scan_sync(unsigned long raw, unsigned long end) in scan_sync() argument
781 ushort *ptr = (ushort *)raw, *endp = (ushort *)end; in scan_sync()
805 static unsigned long decode (unsigned long *data, unsigned long *raw, in decode() argument
812 odd = raw; in decode()
816 raw += len * 2; in decode()
822 return (ulong)raw; in decode()
837 unsigned long raw; in amiga_read() local
844 raw = (long) raw_buf; in amiga_read()
845 end = raw + unit[drive].type->read_size; in amiga_read()
848 if (!(raw = scan_sync(raw, end))) { in amiga_read()
853 raw = decode ((ulong *)&hdr.magic, (ulong *)raw, 4); in amiga_read()
854 raw = decode ((ulong *)&hdr.labels, (ulong *)raw, 16); in amiga_read()
855 raw = decode ((ulong *)&hdr.hdrchk, (ulong *)raw, 4); in amiga_read()
856 raw = decode ((ulong *)&hdr.datachk, (ulong *)raw, 4); in amiga_read()
879 raw = decode ((ulong *)(unit[drive].trackbuf + hdr.sect*512), in amiga_read()
880 (ulong *)raw, 512); in amiga_read()
931 static unsigned long *putsec(int disk, unsigned long *raw, int cnt) in putsec() argument
937 *raw = (raw[-1]&1) ? 0x2AAAAAAA : 0xAAAAAAAA; in putsec()
938 raw++; in putsec()
939 *raw++ = 0x44894489; in putsec()
951 encode_block(raw, (ulong *)&hdr.magic, 4); in putsec()
952 raw += 2; in putsec()
953 encode_block(raw, (ulong *)&hdr.labels, 16); in putsec()
954 raw += 8; in putsec()
955 encode_block(raw, (ulong *)&hdr.hdrchk, 4); in putsec()
956 raw += 2; in putsec()
957 encode_block(raw, (ulong *)&hdr.datachk, 4); in putsec()
958 raw += 2; in putsec()
959 encode_block(raw, (ulong *)(unit[disk].trackbuf+cnt*512), 512); in putsec()
960 raw += 256; in putsec()
962 return raw; in putsec()
1132 static unsigned long dos_decode(unsigned char *data, unsigned short *raw, int len) in dos_decode() argument
1137 *data++=dos_decode_byte(*raw++); in dos_decode()
1138 return ((ulong)raw); in dos_decode()
1153 unsigned long raw; in dos_read() local
1159 raw = (long) raw_buf; in dos_read()
1160 end = raw + unit[drive].type->read_size; in dos_read()
1164 if (!(raw = scan_sync (raw, end))) { in dos_read()
1171 dbg(raw); in dos_read()
1173 } while (*((ushort *)raw)!=0x5554); /* loop usually only once done */ in dos_read()
1174 raw+=2; /* skip over headermark */ in dos_read()
1175 raw = dos_decode((unsigned char *)&hdr,(ushort *) raw,8); in dos_read()
1210 if (!(raw = scan_sync (raw, end))) { in dos_read()
1217 dbg(raw); in dos_read()
1220 if (*((ushort *)raw)!=0x5545) { in dos_read()
1227 raw+=2; /* skip data mark (included in checksum) */ in dos_read()
1228 …raw = dos_decode((unsigned char *)(unit[drive].trackbuf + (hdr.sec - 1) * 512), (ushort *) raw, 51… in dos_read()
1229 raw = dos_decode((unsigned char *)data_crc,(ushort *) raw,4); in dos_read()
1271 static unsigned long *ms_putsec(int drive, unsigned long *raw, int cnt) in ms_putsec() argument
1282 *raw++=0xaaaaaaaa; in ms_putsec()
1284 *raw++=0x44894489; in ms_putsec()
1285 *raw++=0x44895554; in ms_putsec()
1294 dos_encode_block((ushort *)raw,(unsigned char *) &hdr.track,28); in ms_putsec()
1295 raw+=14; in ms_putsec()
1299 *raw++=0xaaaaaaaa; in ms_putsec()
1302 *raw++=0x44894489; in ms_putsec()
1303 *raw++=0x44895545; in ms_putsec()
1306 dos_encode_block((ushort *)raw, in ms_putsec()
1308 raw+=256; in ms_putsec()
1312 dos_encode_block((ushort *) raw,(unsigned char *)crc,4); in ms_putsec()
1313 raw+=2; in ms_putsec()
1317 *raw++=0x92549254; in ms_putsec()
1319 return raw; /* wrote 652 MFM words */ in ms_putsec()
1325 unsigned long raw = (unsigned long) raw_buf; in dos_write() local
1326 unsigned long *ptr=(unsigned long *)raw; in dos_write()