News · HDD Patch Classic & VDTCreator

03/12/2019 at 14:43 in Software

There were a quite interesting movements on MB-02+ scene as the new MB-03+ Ultimate appeared a few weeks ago. I also bought one, but I still do have the good old MB-02+, where I'm using quite old Dron's HDD patch. I would like to use it also on MB-03+ as I never got used to EasyHDD. I like some of its features, but I'm a little conservative, so as a whole with its supporting utilities it's a bit complicated to me. So, I decided to modernize the HDD patch a bit, which is pretty straight forward and easy to use for me.

And here it is - HDD Patch Classic. It is based on old Dron's HDD patch v1.62, but I enhanced it (see paragraph below). The purpose is to keep the patch alive for people who are not familiar with EasyHDD.

HDD Patch Classic key features:

  • supports master & slave devices
  • support CHS & LBA access
  • DMA transfers (Zilog DMA compatible)
  • disk image capacity: 2MB (2,097,152 bytes)
  • disk image format: up to 16 sectors per track, up to 255 tracks, max 2048 sectors

The pain in the ass with older versions of HDD patch was Virtual Disk Table, which had to be made manually, by putting LBA addresses of exact CF or HDD sectors together. This is also history now, because i made new semi automatic VDTCreator, which creates VDTs automatically on the base of answers to a few questions.

Key features of VDTCreator:

  • automatic device detection
  • automatic partition search
  • automatic CHS/LBA mode selection

 

Quick start instructions:

With linux fdisk or cfdisk create partition type 47h on your CF card or HDD. It should be not bigger than ~530MB, as the BSDOS can not handle bigger space. You can use also zxfdisk for this operation.

Then run VDTCreator, and follow onscreen instructions. The VDT will be created automatically, and then it will be saved on disk. After that you can quit VDTCreator.

Now you have two options. First one is to fill CF/HDD with content on ZX Spectrum. Simply run HDPclassic, which installs HDD patch automatically. Safe option is to make .KILL command and reset the computer with NMI+E. If you need to start it automatically, put the HDPclassic to autoexe

You will get plenty of new virtual drives after that. The new virtual drives have to be formatted. Use the new ff17 (F02-V34) formatter tool, as the old ff17 (F02-V30) is not compatible with hdd patch. You can combine trk and sec parameters freely, but the result of geometry must be 2048 sectors in maximum. The widely used old standard is 127x8, but you can use other formats, e.g. 93x11, 64x16, 128x8, 113x9 etc. The recommended formats are 93x11 or 127x8. Standard floppy formats 82x11 are supported too, but the unformatted space will be not used. Now take all your floppy disks and copy them to newly formatted virtual drives.

The second option is to create new mbd images using mbdnew and tap2mbd tools (from zxspectrum-utils). Now watch out! HDPC works internally with fixed size virtual disks. It's always 2097152 bytes! Although the internal geometry of the virtual disks is free, but if it does not have 2048 sectors, the resulting image created with mbdnew will be smaller and therefore needs to be complemented with a correspondingly large tail! Mbdnew does not directly support 128x8 or 64x16 formats, so let's take an example. The closest largest geometry is 93×11, so the image created with it will have 2095104 bytes, which is 2048 bytes less. And this 2kB tail must be attached to each such image.

You can create this tail in Linux using dd, like this: dd bs=1024 seek=2048 count=0 if=/dev/zero of=games01.mbd. The command will join the tail and whatever the input mbd file is, it will always result in mbd of 2097152 bytes. Windows users have it a lot easier, as the MBD plugin for Total Commander allows you to create mbd files 2097152 bytes large, but internally they can have a geometry of 127×8, 93×11, or 82×11.

When you have such images, you have to join them into one large mbh file, using cat command in Linux (cat *.mbd > my-cfcard-img.mbh), or type command in Windows, or Total Commander in Windows. The mbh image must not be larger than your partition. Now you have to write the mbh file to your CF/HDD, to the 47h partition you created earlier, without filesystem! You can do that in Linux with dd command (e.g. dd if=my-cfcard-img.mbh of=/dev/sdX, where sdX is your 47h partition), or you can use Win32 Disk Imager in Windows.

And that's it. Insert the CF/HDD to your MB-02+, turn it on and run HDPClassic or put it to autoexe, if you want to start it automatically at boot.

The more skilled of you can build the new FlashBoot and put it to 32k boot ROM in your MB02+. You will not need the floppy for boot anymore then. Everything is prepared here, simply replace vdt.hru with your hrust compressed VDT, and then compile flashboot.a80 with sjasmplus. You will get flashboot.bin file, which can be burned to 32k EPROM, or flashed with flash tool, to 28c256 or 29c256 (if you have that modification in your MB-02+). If you are unsure what to do, you can contact me via email, I'll try to help you.

And here are all the files you will need: https://github.com/z00m128/mb-02plus/releases. I don't have versions for MB-03+ ready yet, but I'm on it and they should be available soon.

Or you can always find everything mentioned here also on MB-02+ subpage.

<<< back