Creating IDE disk images to use with Hatari

General Discussion, STOS.

Moderator: troed

Post Reply
User avatar
rubber_jonnie
Site Admin
Site Admin
Posts: 10462
Joined: Thu Aug 17, 2017 7:40 pm
Location: Essex
Contact:

Creating IDE disk images to use with Hatari

Post by rubber_jonnie »

As a regular user of Hatari, I've used GEMDOS drives for a long time to give me hard disk like capabilities and the ability to easily exchange files with my PC.

Whilst this is extremely useful, I discovered that when I tried to install Freemint that GEMDOS drives were not supported, and I spent a lot of time messing around not knowing this.

I have since been able to install on a live system, but I thought it would be interesting to go back to Hatari and try again, but this time with a 'real' hard drive.

For this I'd need a hard drive image to replace my GEMDOS drive, so a quick trawl of the internet and I found a way.

It should be noted that for this process, you are creating an IDE drive and not an ACSI image and the two, as far as my testing has found, are not interchangeable.

The commands used for this image file creation are Linux based, however if you are a Windows user, as I am, all is not lost.

Follow the guide here: https://www.howtogeek.com/249966/how-to ... indows-10/ and you'll be able to install the Windows Linux Subsystem (WSL), which is what I'll be using here, specifically the Ubuntu shell.

Creating a drive image

The steps to create a drive are as follows:

1. On the C:\ drive of your windows machine, create a directory called "images".
2. Start your WSL command prompt.
3. In your WSL command prompt, change directory using the following command: cd /mnt/c/images. This will take us to the c:\images directory created in step 1.
4. Execute the command: dd if=/dev/zero of=1GBIDE bs=1024k count=1024. This will create a 1GB IDE image file called 1GBIDE.

The following shows all the above as I ran the commands.
WSL.JPG
WSL.JPG (21.78 KiB) Viewed 3417 times
Of course, if you happen to be using Linux, then you can skip the WSL steps above and do straight to step 4 in a directory of your choosing.

You can now add this image as an IDE drive in Hatari and partition as you would on a live machine. I personally use HDDRIVER as it gives me all the tools I need.

Be aware that you may run into problems if you still need to use a GEMDOS drive as the Hatari support for adding GEMDOS drives after 'real' drives is experimental.

As of writing this, I haven't tried a drive bigger than 1GB, but I will try and update here once I do.

That's it, have fun!

Other information can be found here: https://www.atari-forum.com/viewtopic.php?t=26093
Collector of many retro things!
800XL and 65XE both with Ultimate1MB,VBXL/XE & PokeyMax, SIDE3, SDrive Max, 2x 1010 cassette, 2x 1050 one with Happy mod, 3x 2600 Jr, 7800 and Lynx II
Approx 20 STs, including a 520 STM, 520 STFMs, 3x Mega ST, MSTE & 2x 32 Mhz boosted STEs
Plus the rest, totalling around 50 machines including a QL, 3x BBC Model B, Electron, Spectrums, ZX81 etc...
User avatar
thorsten.otto
Posts: 148
Joined: Mon Nov 04, 2019 2:20 am

Re: Creating IDE disk images to use with Hatari

Post by thorsten.otto »

I'm not entirely sure whether Hatari supports that too, but in Aranym, you can also create an image which just contains the filesystem. Aranym will then emulate a fake root sector for a single partition. In my automated builds for magicmac, i use this to prepare an hdd image with the sources, and the tools to compile it (Pure-C, Gemini etc.). The commands are then as follows:

Code: Select all

image=some_file_name
dd if=/dev/zero of=$image count=488280
mformat -T 61035 -h 64 -s 32 -H 0 -S 5 -i $image ::
After that, you can also populate the image with files:

Code: Select all

for file in <files-to-copy>; do
	mcopy -D s -bso $file -i $image ::/
done
Advantage: all that can be done from linux/wsl without having do boot into the Atari first.
you are creating an IDE drive and not an ACSI image and the two, as far as my testing has found, are not interchangeable.
They are, as long as you using the correct byteswap options.
As of writing this, I haven't tried a drive bigger than 1GB, but I will try and update here once I do.
The script above creates a 256 MB partition. The actual restriction mostly depends on the TOS version you are using; with EmuTOS up to (almost) 2GB should be possible.
czietz
Posts: 547
Joined: Sun Jan 14, 2018 1:02 pm

Re: Creating IDE disk images to use with Hatari

Post by czietz »

Hm, I simply tend to use the "one-stop" atari-hd-image script that is included with Hatari:
https://git.tuxfamily.org/hatari/hatari.git/tree/tools
User avatar
rubber_jonnie
Site Admin
Site Admin
Posts: 10462
Joined: Thu Aug 17, 2017 7:40 pm
Location: Essex
Contact:

Re: Creating IDE disk images to use with Hatari

Post by rubber_jonnie »

czietz wrote: Sun Jan 31, 2021 4:00 pm Hm, I simply tend to use the "one-stop" atari-hd-image script that is included with Hatari:
https://git.tuxfamily.org/hatari/hatari.git/tree/tools
Weird, I've used Hatari for ages and didn't find that!
Collector of many retro things!
800XL and 65XE both with Ultimate1MB,VBXL/XE & PokeyMax, SIDE3, SDrive Max, 2x 1010 cassette, 2x 1050 one with Happy mod, 3x 2600 Jr, 7800 and Lynx II
Approx 20 STs, including a 520 STM, 520 STFMs, 3x Mega ST, MSTE & 2x 32 Mhz boosted STEs
Plus the rest, totalling around 50 machines including a QL, 3x BBC Model B, Electron, Spectrums, ZX81 etc...
User avatar
rubber_jonnie
Site Admin
Site Admin
Posts: 10462
Joined: Thu Aug 17, 2017 7:40 pm
Location: Essex
Contact:

Re: Creating IDE disk images to use with Hatari

Post by rubber_jonnie »

thorsten.otto wrote: Sun Jan 31, 2021 3:22 pm I'm not entirely sure whether Hatari supports that too, but in Aranym, you can also create an image which just contains the filesystem. Aranym will then emulate a fake root sector for a single partition. In my automated builds for magicmac, i use this to prepare an hdd image with the sources, and the tools to compile it (Pure-C, Gemini etc.). The commands are then as follows:

Code: Select all

image=some_file_name
dd if=/dev/zero of=$image count=488280
mformat -T 61035 -h 64 -s 32 -H 0 -S 5 -i $image ::
After that, you can also populate the image with files:

Code: Select all

for file in <files-to-copy>; do
	mcopy -D s -bso $file -i $image ::/
done
Advantage: all that can be done from linux/wsl without having do boot into the Atari first.
you are creating an IDE drive and not an ACSI image and the two, as far as my testing has found, are not interchangeable.
They are, as long as you using the correct byteswap options.
As of writing this, I haven't tried a drive bigger than 1GB, but I will try and update here once I do.
The script above creates a 256 MB partition. The actual restriction mostly depends on the TOS version you are using; with EmuTOS up to (almost) 2GB should be possible.
Good stuff, I always hope that when I post something it will bring out more information, thanks for all this.
Collector of many retro things!
800XL and 65XE both with Ultimate1MB,VBXL/XE & PokeyMax, SIDE3, SDrive Max, 2x 1010 cassette, 2x 1050 one with Happy mod, 3x 2600 Jr, 7800 and Lynx II
Approx 20 STs, including a 520 STM, 520 STFMs, 3x Mega ST, MSTE & 2x 32 Mhz boosted STEs
Plus the rest, totalling around 50 machines including a QL, 3x BBC Model B, Electron, Spectrums, ZX81 etc...
Reylan
Posts: 3
Joined: Sat May 02, 2020 10:46 am

Re: Creating IDE disk images to use with Hatari

Post by Reylan »

hello,
You don't realy need tu use the linux part.
With windows, you can directly create an empty file with

Code: Select all

fsutil file createnew <filename> <length>
Then, you configure Hatari ide drive to point to that file. Using the gemdos drive you install the driver on the "ide harddrive" and copy file to the newly created partition.
Be carful to the gemdos drive that will override the ide partition. You would have better using a subfolder with a partition letter as decribed here
https://hatari.tuxfamily.org/doc/manual ... _emulation

Cheers
User avatar
rubber_jonnie
Site Admin
Site Admin
Posts: 10462
Joined: Thu Aug 17, 2017 7:40 pm
Location: Essex
Contact:

Re: Creating IDE disk images to use with Hatari

Post by rubber_jonnie »

Reylan wrote: Mon Feb 01, 2021 10:19 am hello,
You don't realy need tu use the linux part.
With windows, you can directly create an empty file with

Code: Select all

fsutil file createnew <filename> <length>
Then, you configure Hatari ide drive to point to that file. Using the gemdos drive you install the driver on the "ide harddrive" and copy file to the newly created partition.
Be carful to the gemdos drive that will override the ide partition. You would have better using a subfolder with a partition letter as decribed here
https://hatari.tuxfamily.org/doc/manual ... _emulation

Cheers
Excellent stuff, it's great when we get a flood of useful info and lots of ways to do things. :)
Collector of many retro things!
800XL and 65XE both with Ultimate1MB,VBXL/XE & PokeyMax, SIDE3, SDrive Max, 2x 1010 cassette, 2x 1050 one with Happy mod, 3x 2600 Jr, 7800 and Lynx II
Approx 20 STs, including a 520 STM, 520 STFMs, 3x Mega ST, MSTE & 2x 32 Mhz boosted STEs
Plus the rest, totalling around 50 machines including a QL, 3x BBC Model B, Electron, Spectrums, ZX81 etc...
Post Reply

Return to “SOFTWARE”