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

Function ps

src/ide.cpp:328–351  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

326}
327
328static void ps (struct ide_hdf *ide, int offset, const TCHAR *src, int max)
329{
330 int i, len;
331 char *s;
332
333 s = ua(src);
334 len = uaestrlen(s);
335 for (i = 0; i < max; i += 2) {
336 char c1 = ' ';
337 if (i < len)
338 c1 = s[i];
339 char c2 = ' ';
340 if (i + 1 < len)
341 c2 = s[i + 1];
342 uae_u16 w = (c1 << 0) | (c2 << 8);
343 if (ide->byteswap) {
344 w = (w >> 8) | (w << 8);
345 }
346 ide->secbuf[offset * 2 + 0] = w >> 8;
347 ide->secbuf[offset * 2 + 1] = w >> 0;
348 offset++;
349 }
350 xfree (s);
351}
352
353bool ide_isdrive (struct ide_hdf *ide)
354{

Callers 1

ide_identity_bufferFunction · 0.85

Calls 1

uaFunction · 0.85

Tested by

no test coverage detected