file  = "Derby Stallion 96 (Japan).sfc"

--first 64 banks 2MBytes
bank=0;
while bank<64
do
	crc,data = fd_CpuReadAscii(0x8000+bank*0x10000,0x8000);
	i = fd_WriteFile(file,data,1);
	print(string.format("Write ROM 32K:%.8X(%d/%d)",crc,0x8000+bank*0x8000,3145728));
	bank=bank+1;
end;
	
--next 32 banks 1Mbytes
bank=0;
while bank<32
do
	crc,data = fd_CpuReadAscii(0x808000+bank*0x10000,0x8000);
	i = fd_WriteFile(file,data,1);
	print(string.format("Write ROM 32K:%.8X(%d/%d)",crc,0x8000+(bank+0x40)*0x8000,3145728));
	bank=bank+1;
end;