Confused about creating hard drive images and sizes

Support and general discussion.
Post Reply
walterg74
Posts: 20
Joined: Sat 18 Jul, 2020 7:26 pm

Confused about creating hard drive images and sizes

Post by walterg74 »

Hi folks, PCem noob here, I more or less got the hand of the general workings and how to put together a machine.

The only thing I am confused about (for now), is regarding the creation of HDD images.

I have found several tutorials and general info sites, with tables with the CHS parameters for different sizes, however, some of them have values that do not seem to be allowed in PCem.

- Within the emulator, there seems to be a fixed arbitrary limit of 16 for heads and 63 for sectors. Is this correct?
- If the above is correct, does that mean that the largest possible sizes would be with those two at 16 and 63 respectively, and we can only play with the cylinders number?
- What is the effective largest size we can configure with the emulator?

For now I am wanting to build a 4886 machine and a Pentium 233MMX one.

Thanks!

EDIT: Was just re-reading the changelog and notice that for v14 even it says:

Can use IDE hard drives up to 127 GB

How exactly can I achieve this with the limitations above?
User avatar
omarsis81
Posts: 945
Joined: Thu 17 Dec, 2015 6:20 pm

Re: Confused about creating hard drive images and sizes

Post by omarsis81 »

Heads are NOT fixed, that's for sure. If you click in the dropdown list of fixed HDDs you will notice there are many preconfigured HDDs with different sectors.

I didn't test it myself, but I bet that to achieve 127 GB you will need a LBA BIOS or an external HDD controller (I think PCem emulates SCSI), you can also look at XT-IDE or other controllers
shermanp
Posts: 175
Joined: Sat 18 Feb, 2017 2:09 am

Re: Confused about creating hard drive images and sizes

Post by shermanp »

The largest heads and sectors-per-track supported by PCem is 16 and 63 respectively, so for large hard disks, you have to use the cylinders to get the final size.

This is an issue I've run into with VHD support, as it only supports up to 65535 cylinders, so for large hard disks, you are supposed to set heads to 255. This can make mapping between pcem's CHS geometry and VHD's geometry rather annoying, as ideally one has to find a disk size that matches both 63*16*x AND 63*255*x

I think the latest machines that PCem emulates support 255 heads, but I don't think any of the older (pre 430VX) BIOS's do.
walterg74
Posts: 20
Joined: Sat 18 Jul, 2020 7:26 pm

Re: Confused about creating hard drive images and sizes

Post by walterg74 »

shermanp wrote: Fri 31 Jul, 2020 11:25 pm The largest heads and sectors-per-track supported by PCem is 16 and 63 respectively, so for large hard disks, you have to use the cylinders to get the final size.

This is an issue I've run into with VHD support, as it only supports up to 65535 cylinders, so for large hard disks, you are supposed to set heads to 255. This can make mapping between pcem's CHS geometry and VHD's geometry rather annoying, as ideally one has to find a disk size that matches both 63*16*x AND 63*255*x

I think the latest machines that PCem emulates support 255 heads, but I don't think any of the older (pre 430VX) BIOS's do.
Do you have any exmaple to try? Cause all the ones I tested so far scream at me when I go over 16 :)
shermanp
Posts: 175
Joined: Sat 18 Feb, 2017 2:09 am

Re: Confused about creating hard drive images and sizes

Post by shermanp »

walterg74 wrote: Sat 01 Aug, 2020 12:47 am
shermanp wrote: Fri 31 Jul, 2020 11:25 pm The largest heads and sectors-per-track supported by PCem is 16 and 63 respectively, so for large hard disks, you have to use the cylinders to get the final size.

This is an issue I've run into with VHD support, as it only supports up to 65535 cylinders, so for large hard disks, you are supposed to set heads to 255. This can make mapping between pcem's CHS geometry and VHD's geometry rather annoying, as ideally one has to find a disk size that matches both 63*16*x AND 63*255*x

I think the latest machines that PCem emulates support 255 heads, but I don't think any of the older (pre 430VX) BIOS's do.
Do you have any exmaple to try? Cause all the ones I tested so far scream at me when I go over 16 :)
Arrghh, sorry, it's been a while, I misspoke. The limit for heads that's 16, it's SPT that is increased to 255 in VHD.

It's hard-coded in the settings code to scream at you when you try over 63 SPT.

Although, as far as I can tell, and I know very little about this sort of thing, but I don't think there's any inherent limitation in the emulation itself. It is simply gated in the settings at creation time.

Again, I'm no expert but from my reading around, I THINK for large disks, SPT is supposed to be 255 (and not any value in-between 63 and 255). At least, this is what VHD does, but I find it all a bit murky.
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: Confused about creating hard drive images and sizes

Post by JosepMa »

PCem pretends to emulate what real hardware was supposed to do, and the use of real BIOSes of those machines also imposes some of these limitations.

But first:

The list of predefined HDDs is not something that PCem invented, but the default table of compatible disks on the initial PC BIOS. Those disks sizes are good for anything up to 286 or at much 386. Newer machines used to come with bigger disks, and then you configure it manually with the new values.

AS shermanp has mentioned, you should not target very big disks, for many reasons:
- HDDs with PCem are not compressed. If you create a 32GB disk, it will take 32GB on your physical disk. (shermanp tried to add VHD support, but its dynamically allocated version is not on PCem).
- You can have multiple HDDs configured. You can have multiple System disks ( linux, windows 95, DOS, whatever), and then have additional disks with data that you would like to have on several of them. Up to 486, you would need additional SCSI controllers for more than 2 disks. Since some 486 and Pentium, you have up to 4 disks without SCSI. (But probably you will want to have a CDROM on one of these slots)
- Really think about what you are emulating. 286 came with no disk, or ~10MB disks, 386 used to come with ~40 or ~80MB disks, 486 used to come with ~400 or ~500BM disks (800 on newest). earlier Pentium used to come with 1 to 2GB disks. Pentium MMX would be around 4GB, at most 10GB. (My Pentium II had a 40GB of disk)
- For anything bigger than 512MB, you will be better served configuring it as LBA. (I might not be correct on this one.. Can't remember now the exact constraints)
- For anything bigger than 1024 cylinders, you will be prompted to use FAT32 if you format it on Windows.
- If you use FAT32, you will experience some slowdowns in certain circumstances, as found in this thread: https://pcem-emulator.co.uk/phpBB3/view ... ?f=3&t=739
walterg74
Posts: 20
Joined: Sat 18 Jul, 2020 7:26 pm

Re: Confused about creating hard drive images and sizes

Post by walterg74 »

JosepMa wrote: Sat 01 Aug, 2020 10:32 am PCem pretends to emulate what real hardware was supposed to do, and the use of real BIOSes of those machines also imposes some of these limitations.

But first:

The list of predefined HDDs is not something that PCem invented, but the default table of compatible disks on the initial PC BIOS. Those disks sizes are good for anything up to 286 or at much 386. Newer machines used to come with bigger disks, and then you configure it manually with the new values.

AS shermanp has mentioned, you should not target very big disks, for many reasons:
- HDDs with PCem are not compressed. If you create a 32GB disk, it will take 32GB on your physical disk. (shermanp tried to add VHD support, but its dynamically allocated version is not on PCem).
- You can have multiple HDDs configured. You can have multiple System disks ( linux, windows 95, DOS, whatever), and then have additional disks with data that you would like to have on several of them. Up to 486, you would need additional SCSI controllers for more than 2 disks. Since some 486 and Pentium, you have up to 4 disks without SCSI. (But probably you will want to have a CDROM on one of these slots)
- Really think about what you are emulating. 286 came with no disk, or ~10MB disks, 386 used to come with ~40 or ~80MB disks, 486 used to come with ~400 or ~500BM disks (800 on newest). earlier Pentium used to come with 1 to 2GB disks. Pentium MMX would be around 4GB, at most 10GB. (My Pentium II had a 40GB of disk)
- For anything bigger than 512MB, you will be better served configuring it as LBA. (I might not be correct on this one.. Can't remember now the exact constraints)
- For anything bigger than 1024 cylinders, you will be prompted to use FAT32 if you format it on Windows.
- If you use FAT32, you will experience some slowdowns in certain circumstances, as found in this thread: https://pcem-emulator.co.uk/phpBB3/view ... ?f=3&t=739
Ok, sure, but without going into "ridiculously large" territory, if I create a 2GB disk, for a SiS 486 machine, and boot and go into setup, autodetect is reporting it as 67/65 MB...
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: Confused about creating hard drive images and sizes

Post by JosepMa »

If you want a 2GB disc, simply try 63 sectors, 16 heads, 4096 cylinders.
Autodetect might still fail, but you can setup these parameters manually in the BIOS.


My Pentium II had a 40GB of disk

Maybe it was 10GB or was it 6GB?... Can't remember any longer. We built a rather good one ( slot 1, 350Mhz with the 100MHz bus one, 128MB of RAM when most setups were of 64 and the creative labs voodoo 2. There I added my older AWE32 aside of the soundblaster/ensoniq PCI . I didn't like the SB Live at that time)
Last edited by JosepMa on Sat 01 Aug, 2020 12:57 pm, edited 1 time in total.
shermanp
Posts: 175
Joined: Sat 18 Feb, 2017 2:09 am

Re: Confused about creating hard drive images and sizes

Post by shermanp »

Or, just type in the desired size of disk (in MB) and let the GUI do the calculations for you :p
walterg74
Posts: 20
Joined: Sat 18 Jul, 2020 7:26 pm

Re: Confused about creating hard drive images and sizes

Post by walterg74 »

shermanp wrote: Sat 01 Aug, 2020 12:50 pm Or, just type in the desired size of disk (in MB) and let the GUI do the calculations for you :p

Right, except that also gets you an incorrect size in BIOS for that machine :p
walterg74
Posts: 20
Joined: Sat 18 Jul, 2020 7:26 pm

Re: Confused about creating hard drive images and sizes

Post by walterg74 »

JosepMa wrote: Sat 01 Aug, 2020 12:44 pm If you want a 2GB disc, simply try 63 sectors, 16 heads, 4096 cylinders.
Autodetect might still fail, but you can setup these parameters manually in the BIOS.


My Pentium II had a 40GB of disk

Maybe it was 10GB or was it 6GB?... Can't remember any longer. We built a rather good one ( slot 1, 350Mhz with the 100MHz bus one, 128MB of RAM when most setups were of 64 and the creative labs voodoo 2. There I added my older AWE32 aside of the soundblaster/ensoniq PCI . I didn't like the SB Live at that time)

So, in the PCem GUI I enter the size, and it automatically sets the cylinders. Now when you go into the BIOS, regardless of using autodetect or entering the parameters manually, the size is incorrectly shown as 65/67MB...
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: Confused about creating hard drive images and sizes

Post by leilei »

JosepMa wrote: Sat 01 Aug, 2020 10:32 am - If you use FAT32, you will experience some slowdowns in certain circumstances, as found in this thread:
To be clear, those slowdowns are more related to SmartDrv not being loaded from within DOS and Duke3D not knowing how to cache on a FAT32 drive without that or VFAT


As for large hard disks, I've no problem using 60GB disks on FIC VA-503 and HOT-433 at least. I do have an issue with an older 40GB image halting the VA-503 on detection...
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: Confused about creating hard drive images and sizes

Post by JosepMa »

Mmm... So.. indeed, that BIOS (SIS 496/497) seems to have limitations with some configurations.

63/16/4096 fails but 63/16/4095 works. (it shows 2113 instead of 2015 because it shows it in million bytes, not in megabytes. This is quite the norm with disks)

As I said, use autodetection but select manually the correct one, (i.e. the one with 16 sectors, not the one with 64 that is selected by default).

Note: A real disk size for 2GB of that time was 63/16/4092 (I had this one: https://www.seagate.com/staticfiles/max ... asheet.pdf )
Last edited by JosepMa on Sat 01 Aug, 2020 3:13 pm, edited 1 time in total.
walterg74
Posts: 20
Joined: Sat 18 Jul, 2020 7:26 pm

Re: Confused about creating hard drive images and sizes

Post by walterg74 »

JosepMa wrote: Sat 01 Aug, 2020 3:02 pm Mmm... So.. indeed, that BIOS (SIS 496/497) seems to have limitations with some configurations.

63/16/4096 fails but 63/16/4095 works. (it shows 2113 instead of 2015 because it shows it in million bytes, not in megabytes. This is quite the norm with disks)

As I said, use autodetection but select manually the correct one, (i.e. the one with 16 sectors, not the one with 64 that is selected by default).
I will try the one you mentioned of 4095 and see. In the test I had done, I entered "2048" for the size in PCem's GUI, and the autodetect did not like it, as what I said for 65/67MB was showing for all 3 options...

I did forget that disk sizes are in round numbers and not 1024 multiples...

Having said that though, despite BIOS reporting it incorrectly, it was seen fine by fdisk and DOS.... Not sure what type of issues (if any) that could bring about.
Post Reply