Clone wiki

UniPCemu / Disk images

Currently, various disk images are supported. Disk images are placed in the "disks" folder.

The formats supported are DSK(Floppy disk only), IMG, ISO(CDROM drives only), CUE(CDROM drives only, only "binary" file backend supported), IMA(Floppy disk only) and SFDIMG(Hard disks only).

Created disk images

When a disk image is created it's completely empty. Initialization of the disk (including the boot sector) has to be done by the user (partitioning and formatting).

Hard disk images from other emulators an applications can also be used (using a flat IMG disk image). UniPCemu uses text file metadata files to identify it's geometry in that case, using the following priorities (the first file found is effective):

    1. <filename>.chs.txt : Contains a single line of text, in the format "C,H,S" (without quotes) to specify the used geometry. Only the first line is counted as valid. If the contents are invalid, the file is counted as not existing.
    1. <filename>.bochs.txt : A Bochs-formatted disk image, assuming 16 heads and 63 sectors per track.
    1. <filename>.unipcemu.txt : A disk image formatted with old UniPCemu builds before the newer optimal geometry was implemented.
    1. No metadata file : automatically determine the optimal geometry that can be used and use that geometry.

The default format selected in the BIOS menu (using the system's confirm button or touch action on the option) when generating a disk image is the Bochs-formatted geometry. Using the PSP-style square input generates a optimal geometry instead. Custom CHS disk images will need changing their metadata text filename (for a static disk image only) and entering the custom C,H,S geometry inside said text file (using any text editor) to that geometry to be used.

All other disk image formats have their geometry specified inside the file itself.

SFDIMG files

SFDIMG(Superfury Dynamic disk Image) disk images is a sparse harddisk image format used by UniPCEMU. It currently supports drives up to 2TB in size, any multiple of 4096 sectors. At the moment only 512 byte sectors are used. Any other sector size is currently ignored.

The disk image can be converted to/from img disk images using the options in the disks menu.

SFDIMG Defragmentation

As the image gets written to, the disk image will get it's data in non-linear order. Also, once a sector has been filled (that means, it's not filled with zero values anymore) it will be allocated in the disk image. The defragment option takes the sfdimg file and rewrites it with all sectors filled in ascending order. Any useless data (Sectors that have been set to zeroes after initial allocation and lookup tables only pointing to empty sectors or empty lookup tables) is removed during defragmenting. This makes the resulting disk image all cleaned up for transport, compression into an archive and increases read speeds (since unallocated sectors aren't read from the disk image, as they're always filled with zeroes). It also cleans any existant redundant data at the end of the file (failed allocations of sector or lookup table data, due to the host disk being full or unwritable for any reason).

XT-IDE Universal BIOS Configurator

Most of the configuration can be done by loading the ROM to use(XT or AT ROM) and using the auto-detection to detect the drives. Currently, the CD-ROM drives are also detected, so the number of IDE controllers needs to be decreased by one after auto-detecting.

Flashing can be done by selecting the base address(Size of video ROM and any lower-numbered ROM(each ROM rounded up to 2KB units), divide by 16(10 hex) using a hex calculator and finally add C000(hex) for the base segment to use. Don't forget to set the SDP command to Disable for the flashing to work!

An empty 8KB ROM can be created by either using the BIOS ROM from the page(which autodetected base address in the configurator), or by generating a 8KB static disk image, renaming it to the Option ROM filename and moving it to the ROM directory. The official configurator for the XT-IDE BIOS can then be used for configuration and flashing of said flash ROM from a bootable floppy disk image.

Settings not mentioned above(except autodetect) can be left alone(except the required flash parameters for flashing when not autodetected(SDP set to Disabled and number of IDE Controllers)).

The configuration method on the AT and XT are the same (minus other base ROMs used(the AT one instead of the XT one). The Compaq Deskpro 386 and up with 80386 CPU and higher can use the 80386 base ROM instead for improved performance (required to run 32-bit windows 95 and up without issues).

The Compaq arvhitectures require that the motherboard BIOS itaelf is setup to use no hard drives for the ZT-IDE BIOS to function properly.

CD-ROM booting

For CD-ROM booting, the Plop boot ROM can be used( An easy way to create it is: 1. Running it's configuration tool for your operating system, adjusting the plpbtrom.bin to use it's default settings it's supplied with, changing the default boot device to CD-ROM, then clicking the 'configure plpbt.bin' button to save any changes. Leave all other settings unmodified. 2. Create the boot ROM from the plpbtrom.bin by running(assuming the first ROM is already made for the XT-IDE Universal BIOS, which is required for it's F8 key to load the Plop BIOS instead):

plpbtrom -INT18 plpbtrom.bin OPTROM.32.<ROMnumber>.BIN

Replace <ROMnumber> with the ROM number to use(with XT-IDE combined as mentioned below, it's 2 for making it the ROM that's loaded after it(this is required for pressing F8 on the XT-IDE menu to load the Plop BIOS menu instead, to allow both to be used combined with each other)). That will create a ROM for UniPCemu to use and boot CD-ROM disk images with. It has to be loaded at a higher ROM number(numerically) for the F8 key in the XT-IDE Universal BIOS to work properly. For combining it in a simple way with the XT-IDE Universal BIOS, use the 1 for the XT-IDE Universal BIOS and 2 for the Plop BIOS ROM. This will only run on 32-bit CPUs, not on older CPUs(requires a 80386 CPU or higher).