X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Pico%2FMisc.c;h=5bb58145c0cd6d188e16621340cf92e9cc0c39bb;hb=7336a99a49268970e0df89d15210b98dd7798f1e;hp=12fe7c4d6a3f72fdbc18e4751093d93efcd2e9fd;hpb=cea6590346640236914eeff840401c55db8a77ce;p=picodrive.git diff --git a/Pico/Misc.c b/Pico/Misc.c index 12fe7c4..5bb5814 100644 --- a/Pico/Misc.c +++ b/Pico/Misc.c @@ -313,6 +313,15 @@ void memcpy16(unsigned short *dest, unsigned short *src, int count) } +void memcpy16bswap(unsigned short *dest, void *src, int count) +{ + unsigned char *src_ = src; + + for (; count; count--, src_ += 2) + *dest++ = (src_[0] << 8) | src_[1]; +} + + void memcpy32(int *dest, int *src, int count) { while (count--)