Welcome, Guest. Please login or register.

Author Topic: Help needed with DiskImage  (Read 3157 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Thomas

Re: Help needed with DiskImage
« Reply #14 from previous page: August 28, 2006, 04:52:25 PM »

If you only want to create an empty file for use as an image with DiskImage, you can as well use a simple Rexx program like this:

Code: [Select]

/* rexx */


size = 10 * 1024 * 1024   /* size in bytes (10 mb) */
file = "ram:hdf"          /* file name (will be overwritten if it exists */


buffsize = 32768
buffer = left("",buffsize,'00'x)

if Open(out,file,write) then do

do while (size >= buffsize)
call WriteCh(out,buffer)
size = size - buffsize
end
if size > 0 then
call WriteCh(out,left(buffer,size))

call Close(out)
end


Bye,
Thomas

Offline motorollinTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
Re: Help needed with DiskImage
« Reply #15 on: August 28, 2006, 05:33:35 PM »
I just opened a fresh WinUAE hardfile in a hex editor and it was full of zeroes anyway. I downloaded the empty file handler from Aminet which was effective for creating an empty file of {size in MB}*1024*1024 bytes, which worked with DiskImage once formatted. I'll give your Arexx method a try later.

Thanks

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10