Cloned from: https://16bitdust.wordpress.com/2015/10/13/partitioning-16-gb-compact-flash-card-with-winuae-and-pfs3/
See also: How to Setup an Amiga Compact Flash Drive using WinUAE [everythingamiga.com]
This article was cloned for archival purposes from the now defunct site 16bitdust.wordpress.com. The directions worked up to recently when WinUAE 4.x was released. Read through the helpful comments at the end on how to make this work for version 4.
Index, or quick links to the sections
Use these quick links if you know how to do some of the steps.
- Preparing the CF card, remove all partitions (diskpart, clean)
- Tools to use on the Amiga for preparing the CF card
- WinUAE settings
- Preparing the card
Partitioning 16 GB Compact Flash card with WinUAE and PFS3
(cloned content starts here)
Lately I’ve noticed a lot of questions on how to partition and prepare Compact Flash card (or HDD) for use with Amiga, so I’ve decided to write this tutorial on how to do it and format them as PFS3 partitions.
At least this is how I do it :). Using PC with WinUAE to prepare everything and just pop finished card in Amiga, ready to go.
Preparing Compact Flash card
Regardless if you’re going to do it with real Amiga or with WinUAE, first step is to prepare CF card. For Amiga to be able to use it we need to “clean” any file and partition structures that are present on the card. Luckily, there’s a tool included with windows to do just that, it’s called “diskpart”.
First thing first, connect your CF card to PC, it doesn’t matter how you do it. Integrated card reader, USB card reader, whatever you usually use.
Now we need to start Command Prompt with elevated permissions, aka “as Administrator”. If you have Windows 7 and UAC turned off applications start “as Administrator” by default, but I guess most people use default settings. Anyway, press Start key on keyboard (or click Start icon on taskbar), type “cmd” (without quotes of course, every command I have written with quotes is supposed to go without them, unless explicitly state otherwise). It should find either Command Prompt or cmd.exe, in my case (Windows 10) it was Command Prompt, but if I remember correctly on Windows 7 it says only cmd.exe. Regardless, right click it and choose “Run as administrator”.
Now type “diskpart” and press enter key
This will load diskpart. Now lets see what drives we have available, type “list disk” and press enter, this will list all disk drives that are present in your computer. Find the one representing your CF card. In my case it was 16 GB CF card so it’s the last one, where is says 14 GB. Note that it’s “Disk 5”.
To select it type “select disk #” where # is number your CF/HDD got, followed by enter of course. In my case it was “select disk 5”
You should get message that Disk # is now the selected disk. To make sure type “detail disk” and press enter
It will output details of currently selected disk. Double check you’ve selected the correct one. If you clean wrong disk it’s bye, bye data. After you’re sure you’re sure 🙂 type “clean” and press enter. You should get a message saying it’s been successfully cleaned. If there was some kind of error make sure you’ve started Command Prompt as administrator.
And that’s it for preparing your CF/HDD. You can check with “detail disk” and/or “list disk” (selected disk will get * sign in front of it) commands to see if it’s been cleaned.
Tools and preparation
To make it a bit easier I’ve prepared small pack of tools and file systems. Simply unzip them in folder and assign the folder as hard drive in WinUAE, we’ll get into more details a bit later. Inside the archive is
Diskmaster – Norton Commnder like file manager
HDInstTools
HDToolBox
loadmodule – command line tool, used for loading modules, we use it to load updated scsi.device that enables large hdd usage
Reboot – command line soft reset tool
CLI – Shell
scsi.device – doobrey’s pacthed scsi.device v44.20, I use it without problems with all my A600/A1200
FS folder – I’ve included few filesystems in this folder, few versions of FFS and latest (at the moment v18.5) PFS3 AIO, you can get newest version from aminet
scsi folder – Here I’ve included two scsi.device files I used so far. scsi.device.44.20 is the same one as above, scsi.device.43.45 is patched version of scsi.device 43.43 from WB3.9 BB2 update, reason I included it was because I had problems with 44.20 when used on regular A500 with KS3.1, for some reason it was crashing when it tried to load it, but this version, 43.45, worked fine. I guess it might be something to do with 68000 CPU, when I connected ACA500 with ACA1220 (68020 CPU) to this same A500 it worked fine with v44.20. So just in case, here are both versions.
PrepTools_v02.zip
Dropbox download (from article author)
Alternative download location (shared from my online storage)
WinUAE settings
We’re almost ready for actual work, almost :). First, run WinUAE as administrator, same as with command prompt. Find it’s shortcut (or WinUAE.exe), right click it and choose “Run as administrator”. This will allow WinUAE to access CF card, otherwise OS will block direct access to it.
To make it a bit faster I set WinUAE to emulate a bit beefier then standard Amiga. These are setting that I use for prepping CF cards, WB installations, file copying and so on. I saved it as config so I don’t have to set it up every time.
For ROM settings use Kickstart 3.0 or 3.1, whatever you usually use, for floppy settings mount either Workbench or WorkBench Install floppy (again, either 3.0 or 3.1, whatever you usually use) and set it to turbo speed (slider to maximum left), to speed up WorkBench load.
If you use Workbench floppy instead of Workbench install floppy you’ll get one warning from HDToolBox later on, nothing important, we’ll get to that later, doesn’t really matter.
Now go to HDD settings (CD & Hard drives) and click “Add Directory or Archive…” button
Browse to the folder you unpacked archive from previous chapter. For “Device name” and “Volume label” enter whatever you like. I simply enter “f” in those fields and I’ll use “f” throughout this tutorial. No special reason, that simply means that within workbench you’ll be able to find those files in drive “f”.
Now we need to add CF card to our virtual Amiga. Click “Add Hard Drive…” button, in new window click on the drop down menu and choose your drive.
Also, from drop down menu that says “UAE” choose “A600/A1200/A4000” and click “Add hard drive” button.
Finally, all preparation is done. All that’s left is to click “Start” button and load Workbench. You haven’t forgot to assign WB3.x floppy to floppy drive, have you?
Preparing the card
After it finishes loading you should get something like this
First thing we need to do is load patched scsi.device, original one is limited to 4GB and since our card is 16 GB we need to do something about it. If you’ll use 4 GB card you can skip this scsi.device thing, or if you use direct scsi enabled filesystem you can use up to 8 GB HDDs, like PFS3DS, but I prefer to use scsi.device approach even with 8 GB cards.
To load it we need to get to Shell. Since there’s no Shell on Workbench Install floppy I’ve included it in tools archive. Open drive “f” and you’ll find Shell there
Alternatively, if you used Workbench floppy to boot you can also find Shell in Workbench floppy, System drawer.
Switch to drive “f” by typing “f:”, followed by enter key, and finally type “loadmodule scsi.device” and press enter. This will load new scsi.device to memory and reboot our virtual Amiga. After it boots again, we can go back to shell and type “version scsi.device”, output should say version 44.20.
If you reboot from WinUAE (F12 and then “Reset” button) or stop/start emulation again, you’ll have to repeat this “loadmodule scsi.device” procedure, loadmodule survives only soft reset (ctrl + amiga + amiga, or reboot from command line, remember that Reboot file from zip archive?).
Now that we’ve loaded patched/updated scsi.device we can proceed. Open F drive, HDToolBox drawer and finally run HDToolBox.
HDToolBox should load and show one unknown drive. So let’s introduce them, click “Change Drive Type” button.
Click “Define New…”
And Finally “Read Configuration”, to get drive geometry information.
You’ll get one info dialog so just click Continue and you’ll get correct geometry values. Don’t mind Size negative size. That’s only visual, HDToolBox wasn’t meant for drives so big so they never bothered to use big variables, this is simple programming variable overflow, drive will be formatted correctly.
If you want to precisely set partition sizes you can use calculator I made, at bottom left there’s link to PDF on how to use it. You just need Cylinders, Heads and Block per Track values from this HDToolBox window.
Now just click “Ok” on this and next window.
If you used Workbench floppy to boot you’ll probably get warning complaining how it can’t find L:FastFileSystem, just click continue. Reason for this is that Workbench floppy doesn’t have FFS driver on it. It’s on Install floppy, where HDToolBox usually is so it can find it automatically. If you used Workbench install floppy to boot you’ll simply be back to starting HDToolBox window.
Now that we’re back at starting window, you’ll notice that all buttons have unlocked and that drive is no longer “unknown”. Click “Partition Drive” button
Add checkmark on “Advanced Options” checkbox
Edit “Partition Device Name” from UDH0 to DH0 (I guess it doesn’t matter, but traditionally HDD partitions are named DH0, DH1 and so on), and click on “Add/Update…” button.
Again, if you used Workbench floppy to boot, you wont’ have anything in the list. If you used Workbench install floppy you’ll have Fast File System loaded. If you don’t intend to use it, simply select it and click “Delete File System” button.
To add new file system click on “Add New File System…” button
And type path to file containing desired file system. In that zip file from beginning I’ve put them in FS folder and file name is pfs3_aio-handler, so in this case I typed “f:fs/pfs3_aio-handler”, and click “Ok” button.
Now we need to enter DosType for PFS3, for PFS3 it’s
0x50465303
For PFS3DS aka PDS3 DosType would be 0x50445303 (pfs3_aio-handler supports PDS3, you just need to type this instead of PFS3 one, everything else is the same) and FFS would use 0x444F5301, just for info.
You can leave “Version” and “Revision” fields at default values, sometimes I edit “Revision” to 5 since this is PFS3 v18.5 but it’s not like it really matters. Again, click “Ok” button.
Now we have PFS3 loaded. We can load more filesystems, I’ve included few FFS versions in FS folder. When I started with Amigas few years ago I usually used FFS for DH0 and PFS3 for DH1, but actually there’s not much point to it, PFS3 is better (more modern) than FFS, and OS had to load two drivers so that resulted in a bit more memory used.
Now to set the partition up. I’ve resized it to 500 MB. You can do this via partition slider, which is unprecise, or by directly entering Start Cyl and End Cyl values. Which is what I did. To get those values you can use calculator I mentioned earlier. Finally, click on “Change…” button.
First click on “File System:” block thingy until it says “PFS\03” and then edit MaxTransfer value to 0x1fe00 (these are zeroes, not “O”s) AND PRESS ENTER TO CONFIRM THE VALUE. This is a “feature” on this window, if you enter the value and click “Ok” it will not apply but revert to original value. You have to press enter and then click “Ok” button.
Now set second partition to size you want. I usually use all of the rest of space for it, you can simply stretch it, no need to be precise for that. And repeat last step on it (Change…, File System, MaxTransfer). After you’re done with both (or more) partitions click “Ok” button to return to main HDToolBox window. All that’s left is to click “Save Changes to Drive” button. Only visible difference will be drive status, it will change from “Changed” to “Not Changed”.
Exit HDToolBox and reboot. In some rare occasions new partitions appeared immediately after I saved changes in HDToolBox, but in 90% of cases they didn’t. After reboot they appeared.
Easiest way is to double click Reboot icon that should be in “F” folder so do it. Or open shell again, go to drive “F” and type “reboot” followed by enter. But double clicking Reboot icon is faster/easier.
If you reboot from WinUAE control panel, you’ll have to do that “loadmodule scsi.device” thingy again. Alternative is to reboot via keyboard shortcut (Ctrl + Amiga + Amiga).
After reboot you may have to wait few seconds (3-5) for partitions to appear. But they should appear.
Select first one (DH0), press right mouse button and go to toolbar at the top, choose “Icons” and “Format Disk…”
Enter name you want your drive to have, like System, Main, Workbench… whatever, uncheck “Put Trashcan” checkbox if you want (I uncheck it) and click on “Quick Format” button. This is a must when using flash media like CF cards.
You’ll get two warnings asking you if you’re sure you want to format it, click “Format” button on both dialogs.
Lastly you’ll get one more dialog, simply informing you about some PFS3 info, click “Ok” and wait a bit for format to complete.
Repeat for second (and all consecutive ones if you made them) partition, this one might take 30-60 seconds to complete as it’s quite a bit larger. After it’s done you’ll have two partitions, 500 MB and 14+ GB formatted as PFS3.
Now you can install Workbench on it. But remember, if you make hard reset you’ll have to manually load patched scsi.device again, BEFORE you make any change to filesystem. Usually first partition will be accessible since it’s 500 MB, but DH1 will be NDOS again until you load scsi.device.
If you install Classic Workbench you can simply copy this scsi.device to DH0:DEVS folder, it will load it automatically on boot. If you install “plain” Workbench you’ll have to manually add it to startup-sequence. Tutorial on how to do this is here.
Just be sure to use same scsi.device you used to when partitioning the drive. There are more than one, others might work, but they may also result in corrupted data.
Hi there
Thanks for this guide which is very easy to follow. I’m having an issue where after the reboot my partitions do not show up.
There are a couple of things going on my end which you do not refer to in your guide. Firstly, when I launch HD Toolbox I get a dialogue box to tell me that drives have been added to the system. My CF is displayed not as “unknown” but as “changed”. It doesn’t stop me carrying out all the other steps.
Then when I have saved changes and hit “exit” in HD Toolbox it forces me to reboot to save changes. That doesn’t seem to be the case in your guide. When it reboots, my partitions are not there.
Do you think there is an obvious answer?
I am having the same exact problem.
Hi Chris.
I experienced same problems as you, when running on latest up to date version of WinUAE, which is 4.4.0. But then analyzing screens in this tutorial I found out that screen for Adding Hard Drive in WinUAE is somehow different. Like simplified. Then I realized that originally the tutorial was based on older version of emulator. The URL of original article from 16bitdust points to October 2015. Quick research pointed that current at that time WinUAE was 3.1.0, which I downloaded and installed. Then I went successfully through tutorial and final result was as expected.
Another important thing is to run WinUAE as Administrator. Otherwise the emulator will not show any HDD in HDDiskTool.
Hi!
I got the same problem with a Transcend 4GB CF card, and with the latest WinUAE. (With every reboot the CF card partitions have changed/reseted.) For me the solution was to use correct cylinder/head/blockspertrack settings. When You add a physical CF card in WinUAE, click on “Read Identity”, this will set up the correct geometry settings.
You can write it down, and You must see the same geometry settings when doing the “Read Configuration” in HDToolBox.
Thanks for this How-To guide, and extra thanks for the downloadable PrepTools package. 🙂
Congratulations for this great tutorial, I’ve followed it twice -on different occasions- to set up my CF cards prior to its installation on real Amigas.
There are a couple things I consider that should be mentioned, though :
1) When accessing HDToolbox software by double clicking its icon on F:/HDToolbox folder, it should be great to ensure the right tooltype for SCSI_DEVICE_NAME is set (“icons –> information” Workbench menu). In my case -don’t know why- it was set to uaehf.device. If this happens, you’ll get a “Error 33 writing to disk” message when saving changes to disk, so it’s important to ensure SCSI_DEVICE_NAME = scsi.device
2) When setting up the partitions, it is also important to configure the number of buffers because the default value of 30 may be to low. From what I’ve read, recommended settings for “normal” partitions (less than a 1Gb)
should be in the range 100-150 and 250 to 300 for larger partitions.
Kind regards,
Manel (beltrixx)
As I see in your comments, I will have to check the validity (and update) the steps in this guide to make it work with WinUAE 4.x. At the time I cloned and tested it, version 4.x had not been released (other than possibly betas).
/PeO
Hey I am also struggling with 4.4.0,a lso while following another guide. It would be nice if you could figure out the correct settings to get this working on 4.4.0. Last time I tried it was over a year ago, probably also a 4.x version. I was looking to set this up with 4.4.0 and did a google search for a more current guide. Since your post is from late 2019, i gave it another try before reading the comments 🙂 I’m going to try it with Winuae 3.
Since I recently acquired a 1221lc I was hoping to find the best fastest IDE transfers by preparing a new CF to use with it.
Unless you solved it, you will find some hints in the Nov 8 reply on the first comment thread – set the disk geometry correct in HDToolbox (as shown by WinUAE) and you should be ready to go. I have not yet tried this out on version 4.x, but will.. someday..
I’m using WinUAE 4.4 and cannot get the CF card to show up in HDToolBox. Also tested with WinUAE 3.10…no idea where I’m going wrong, following everything to the letter. Tried both scsi.device versions and multiple CF cards and sizes.
run winuae as adimin
I just solved my own problem. It appears the latest version of WinUAE DO have a problem with detecting CF cards properly. See the thread here for details: http://eab.abime.net/showpost.php?p=1441270&postcount=8
Long story short, use WinUAE 3.6.1 64bit otherwise HDToolBox will not properly save your settings to the card.
One other note, be sure to use the a1200 quickstart so and ensure the IDE controller is enabled in the Expansions tab. I tried to set up an a500 and missed that step since it’s not outlined in the walkthru above. If it’s not enabled you wont see the 600/1200/4000 option when creating the hard disk.
This has been a useful article, I just wanted to add a couple of observations just for the record, just in case someone else has the same problems:
– remember in WinUAE to select the correct chipset, I forgot and wondered why I HDtools program won’t see any CF Cards.
– I have an Amiga 4000 and I just couldn’t get any images to run at all no matter what scsi.device I used, the scsi.device provided by this article aren’t for an Amiga 4000, use the ones in the Myfiles folder instead.
– Even with this I couldn’t get the scsi.device to load from most premade images (HSTwb one), I would just get a cannot load scsi.device error on boot on my real Amiga (whilst it works fine in WinUAE). I don’t know why. I solved this problem by swapping out my 3.1 (40.068) ROMs with the 3.x ROM which has native support for large drives.
– Remember that with the 3.x ROM or the 3.1 ROM that I was using, you need to install the workbench.library into the LIB folder as it appears at least my Amiga 4000 ROMs don’t have this library build in. (You also need to make some changes to the startup sequence, but this is well documented on Cloanto’s webpage or the webpage where you got the 3.x ROM from. You made not realize this if you got your Amiga 4000 used with this stuff pre-installed.
– Note that the Cloanto workbench works fine, as that is <4Gb and doesn't requre the scsi.device to load and have the workbench.library build in.
Hope that helps someone, it wasted it a bunch of my time that's for sure. Now to get the damn CD drive working.
“If you want to precisely set partition sizes you can use calculator I made, at bottom left there’s link to PDF on how to use it.”
FYI, I am not able to find link to a calculator PDF.
The link to the calculator was lost when I cloned the article, and the link was not fetched by archive.org either.
That calculator is really nothing important, because how often do you need to set exact partition sizes (the times where 500MB or 510MB matters) ?
If you want to calculate, just use the “Blocks per cylinder” value to set the number of cylinders for the partition, 1008 in the above image (which does not match up with the following images, because that displays 1/2 of the disk to be 3,9-something-GB so the total disk below is 8GB, while the one in the disk type screen is 16GB). With the 1008-value, each cylinder is 516096 bytes (1008×512), or 504k.
Hi,
Just wanted to say a massive thanks for keeping this alive. I’ve just gotten my hands on an Amiga 1200 for the first time in over 20 years. “Back in the day” I literally played a handful of games from floppies, and that was it. I’ve been scrambling around various forums, blog posts, Youtube videos looking for the best tips on this, and this guide was by far the best. All worked well for me. Worth noting that the files you linked to were crucial as I was having problems loading the new file system with what I got from Aminet.
Thanks again!
Excellent guide.
But what an effort. So much easier with my ST’s as they all have HD interface as standard.
Amiga was easy, but expensive, back in the day when I had a GVP 40mb, 8mb RAM external expansion.
Finally got it all working great with my M508 8mb, CF card board.
Only thing more complex was Amiga 1000 with sidecar and clashing addons .. which I also had in mid to late 80s.