3bool HDD_Write(
void *data, dword length, TYPE_File *f)
7 static byte block[512];
8 static byte *b = block;
17 success = (TAP_Hdd_Fwrite(block,
sizeof(block), 1, f) == 1);
22 else if(length >
sizeof(block)) success = (TAP_Hdd_Fwrite(data, length, 1, f) == 1);
25 blen =
sizeof(block) - (b - block);
31 memcpy(b, data, blen);
32 success = (TAP_Hdd_Fwrite(block,
sizeof(block), 1, f) == 1);
35 data = (
byte*)data + blen;
42 if(b == block) memset(block, 0,
sizeof(block));
45 memcpy(b, data, length);
bool HDD_Write(void *data, dword length, TYPE_File *f)