Well, it happened again...



If you're impatient, it's in the MAME source now, otherwise wait for MAME 0.163 (coming very soon).
To use, add -exp hd20 to the commandline, which will also allow you to add -hard <filename>.
mame cpc6128 -exp hd20 -hard1 disk.chd
Only MAME CHDs are supported, you can create a blank hard disk image using chdman. Geometry is 615/4/17.
chdman createhd -o disk.chd -c none -chs 615,4,17
(-c none means no compression, but this is required for MAME to write directly to the CHD image. If you use compression, then data writes will be written to a separate file)
You can use X-DDOS 2.00 or 2.10 by using -exp hd20,bios=xddos200 or -exp hd20,bios=xddos210. v2.10 is the default.
EDIT:
http://mahlemiut.marpirc.net/cpc_hd20.avi -- just a quick demo loading a game from HD.