/*
	hdd image creater for EmuZ-2500
	
	Author : Takeda.Toshiya
	Date   : 2004.09.10 -
*/

#include <stdio.h>

// variable scope of 'for' loop (for microsoft visual c++ 6.0)
#define for if(0);else for
// type definition
typedef unsigned char uint8_t;

#define HDD_SIZE (20*1024*1024)

void main()
{
	uint8_t header[0x30] = {
		0x4d,0x5a,0x2d,0x32,0x35,0x30,0x30,0x20,0x48,0x44,0x20,0x73,0x79,0x73,0x74,0x65,
		0x6d,0x20,0x62,0x79,0x20,0x53,0x48,0x41,0x52,0x50,0x20,0x43,0x6f,0x72,0x70,0x2e,
		0x20,0x20,0x56,0x31,0x2e,0x30,0x41,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20
	};
	
	FILE* fp = fopen("HDD1.DAT", "wb");
	fwrite(header, sizeof(header), 1, fp);
	for(int i = 0; i < 0xd0; i++)
		fputc(0x20, fp);
	for(int i = 0; i < 0x100; i++)
		fputc(0xff, fp);
	for(int i = 0; i < HDD_SIZE - 0x200; i++)
		fputc(0, fp);
	fclose(fp);
	
	fp = fopen("HDD2.DAT", "wb");
	fwrite(header, sizeof(header), 1, fp);
	for(int i = 0; i < 0xd0; i++)
		fputc(0x20, fp);
	for(int i = 0; i < 0x100; i++)
		fputc(0xff, fp);
	for(int i = 0; i < HDD_SIZE - 0x200; i++)
		fputc(0, fp);
	fclose(fp);
}

