View Single Post
Old 01-27-2013   #94
zecoxao
Member
 
zecoxao's Avatar
 
Join Date: Oct 2011
Posts: 741
Likes: 425
Liked 744 Times in 290 Posts
Mentioned: 118 Post(s)
Tagged: 0 Thread(s)
if i'm not mistaken, the type of byteswap used is byteswap 16 (16 bytes) in that case, naehrwert has published his ps3_hdd POC tool which includes the function in a clean and tidy way of his

lemme see if i can fetch it.

https://dl.dropbox.com/u/35197530/types.h

Code:
#include "types.h"

/*! Swap u16 endianness. */
static void _es16_buffer(u8 *buf, u32 length)
{
	u16 *ptr = (u16 *)buf;
	u32 i;

	for(i = 0; i < length/2; i++)
		ptr[i] = _ES16(ptr[i]);
}
__________________
"Whoever has ears, let them hear."

Last edited by zecoxao; 01-27-2013 at 08:59 PM.
zecoxao is offline   Reply With Quote
Likes: (2)