• Please review our updated Terms and Rules here

XT-IDE via floppy boot instead of EPROM?

AlexC

Experienced Member
Joined
Jun 26, 2015
Messages
275
Location
Germany
[Edited to add: read http://www.vcfed.org/forum/showthre...ppy-boot-instead-of-EPROM&p=413518#post413518 for the solution]

An odd thought: is it possible to load the XT-IDE BIOS from a bootable floppy instead of an EPROM?

I have a 1.44MB floppy drive running in an XT-class machine courtesy of a 16-bit ISA I/O card and 2M-XBIOS.EXE, and I've heard that DR-DOS will even allow bootable 1.44MB floppies with similar cards.

So is there a way to load the XT-IDE BIOS in a similar way, either via the floppy boot sector or CONFIG.SYS? The boot floppy would load the XT-IDE BIOS which would then take over and find any suitable IDE drive in the system. A bit like a DDO but stored on the floppy instead of the hard drive.

I guess you'd lose a bit of low RAM but it would be a simple solution for those who don't have an EPROM burner. The hard drive wouldn't be bootable, but it would still be useful for mass storage.
 
Last edited:
I guess you'd lose a bit of low RAM but it would be a simple solution for those who don't have an EPROM burner. The hard drive wouldn't be bootable, but it would still be useful for mass storage.

The XT-IDE (all revs) can use an EEPROM and is capable of self-programming. There are several utilities for the various BIOSes for doing the programming. No EPROM burner required :)
 
But if I don't have the XT-IDE card yet I do have an old 16-bit ISA IDE controller lying around, can I get the same effect through software?
 
But if I don't have the XT-IDE card yet I do have an old 16-bit ISA IDE controller lying around, can I get the same effect through software?

With the 16-bit IDE hardware? The short answer is, "probably no." While a lot of 16-bit multi-IO controllers will mostly work in an 8-bit slot (floppy, parallel, serial are usually OK), the 16-bit portion is required for standard IDE. The XT-IDE gets around this by latching the upper bits and doing them as a separate bus transfer.

Now, if you had XT-IDE compatible hardware in the system, you could probably port the XT-IDE BIOS into a DOS TSR and load it from CONFIG.SYS or something, just like a SCSI or CD-ROM driver. I haven't really worked in-depth with any of the XT-IDE BIOSes so I can't really comment on how difficult that would be. I'm thinking about writing a Linux and/or OpenBSD driver for it though, which would basically be what you're talking about, but on Linux or OpenBSD.
 
Does your 16-bit IDE card work in an 8-bit slot? None of mine do. :)

Yes in that it'll allow me to load 2M-XBIOS.EXE and have a working 1.44MB floppy, which the original XT controller doesn't. It won't let me plug in an IDE hard drive, but it should if I have the XT-IDE BIOS on a separate ROM somewhere (e.g. a NIC). So I was wondering about that latter point: instead of a NIC, can I load the ROM image via floppy boot?
 
Hah! After lots of tangential thinking about using DEBUG to write ROM to RAM, loading ide_xt.bin via syslinux and using a makerom tool to temporarily write the image to E000, I found this, which is exactly what I was trying to achieve: http://www.vogons.org/viewtopic.php?f=46&t=45244

It's non-trivial but that's half the fun.
 
This is definitely possible. You need code in the floppy boot sector that;
1. Loads the BIOS binary to the top of conventional memory.
2. Adjusts the memory counter at 0:413h accordingly.
3. Calls the initialization code at offset 3 in the XUB segment.
4. Does an INT 19h call.

That's all there is to it as far as I can see.
 
Yes, it's now working, thanks to that VOGONS poster.

In exchange for 3 seconds of floppy activity and 12KB of RAM, I have a working CF-IDE in my XT-class machine using a floppy boot sector instead of an (E)EPROM. The OS loads from the CF card, not the floppy, so it doesn't take long. A few pointers for anyone else trying this:

1. I'm using a Goldstar 16-bit IDE/floppy controller which seems quite well-behaved. Some other 16-bit cards may not work in 8-bit slots.
2. I had to use v. 2.x of the universal BIOS as 1.x got the wrong geometry for any of my CF cards, even when I manually entered CHS values.
3. NASM needs a 386 to compile BOOT12.ASM. I had to use different CWS*.* files on my 386, otherwise NASM exited with no errors but no BOOT12.BIN file either.
4. For PARTCOPY I had to use "-aA" instead of "-f0" to identify the floppy drive (read the docs).
5. I modified BOOT12.ASM slightly to remove the keypress at start-up (easy enough to see in the code) and changed the waitmsg to something more relevant.

I think that's all, but if anyone needs any more info, just post here and I'll respond.

I'm also loading 2M-XBIOS.EXE so I get a 1.44MB 3.5-inch drive as drive B: on the same controller. So drive 360KB A: is only ever going to be used at boot time, which saves swapping floppies.
 
It would be great if you could put together some type of software 'kit' so that someone like me who knows nothing about adjusting internal functions you have tinkered with would be able to use this process as well. Is something like this feasible? (Just the IDE part, not the floppy.)
 
In exchange for 3 seconds of floppy activity and 12KB of RAM

So you're using a large build. The BIOS is actually less than 10 KB so you can save 2 KB of conventional memory by truncating the BIOS file size to 10 KB. Just remember to move the checksum byte and update the block count byte at offset 2.

Then again, if this is just a temporary thing for testing the BIOS then it might not be worth the effort.
 
I don't want to distribute other people's software, but this should get you going.

1. Get BOOT12.TXT from here and rename to BOOT12.ASM: http://www.vogons.org/viewtopic.php?f=46&t=45244
2. Get PARTCOPY from here (PCOPY02.ZIP): http://geezer.osdevbrasil.net/johnfine/index.htm#zero
3. Get NASM from here: http://www.nasm.us/pub/nasm/releasebuilds/2.12.01/dos/nasm-2.12.01-dos.zip
4. Get XT IDE Universal BIOS from here (I used 2.0.0 beta 3): https://code.google.com/archive/p/xtideuniversalbios/downloads or (newer) here: http://www.mb1.co.uk/temp/XUB_r588.zip
5. Extract the NASM tools and PARTCOPY.EXE into a directory on a 386 or later running DOS 5 or later.
6. Put BOOT12.ASM in the same directory.
(For bonus points, you can also remove the "int 16h ;Wait for a key" line in BOOT12.ASM to skip the keypress requirement, and change the text of waitmsg to whatever you like.)
7. Do "NASM BOOT12.ASM -o BOOT12.BIN"
8. Extract IBM_XT.BIN and XTIDECFG.COM and BIOSDRVRS.COM from the XTIDE Universal BIOS package into the same directory.
9. Create a batch file called MAKEBOOT.BAT in the same directory, containing the following:
Code:
@echo off
echo.
echo Put a disk in drive A: - it will be formatted and prepared with XT-IDE.
pause
format a: /u
echo Working...
partcopy boot12.bin 0 3 -aA
partcopy boot12.bin 3e 1c2 -aA 3e
copy ide_xt.bin a:>nul
copy xtidecfg.* a:>nul
copy biosdrvs.* a:>nul
echo Finished. You can now reboot with the disk in drive A:
echo.
echo NB: You may need to run xtidecfg from drive A: to reconfigure the BIOS.
echo.
(At this point, the only files you actually need in the directory are: BIOSDRVS.COM, IDE_XT.BIN, XTIDECFG.COM, PARTCOPY.EXE, BOOT12.BIN and MAKEBOOT.BAT.)

10. Run makeboot.bat whenever you want to make a newly bootable XT-IDE BIOS loading floppy. The boot floppy itself will have just three files on it, plus a modified boot sector: BIOSDRVS.COM, IDE_XT.BIN, XTIDECFG.COM. BIOSDRVRS.COM isn't essential, but it's interesting if you want to see what your CF card is doing.
11. Once the files have been written, run XTIDECFG.COM from the floppy *on the target system* then load the IDE_XT.BIN file and try auto-configure. If that doesn't work you may have to tweak things manually for your controller, but it worked for mine. Remember to save the file before you close.

It's best to run the batch file on the XT you're actually going to be using, if possible. That should eliminate problems caused by drive geometry differences between machines. If you're creating the boot floppy in drive B: of a different machine, change the relevant A: entries to B: in MAKEBOOT.BAT accordingly and use -aB instead of -aA for the partcopy lines. On some machines -f0 will work for drive A: and -f1 for drive B: (instead of -aA and -aB), but that didn't work on any of my XT-class machines, only AT and later.

To reduce memory footprint to less than 12KB, change IMAGE_KB in BOOT12.ASM from 12 to 9 or 8 before compiling it. That allows the 8KB IDE_XT.BIN to fit, so only 8KB or 9KB of RAM is used. It seems to work OK, but I haven't thoroughly tested (8KB seemed too small: it loaded but XTIDECFG locked up). If the BIOS you use is a different size, modify accordingly - and perhaps leave a 1KB overhead just in case.

That should do it, I think. Please take usual precautions (backup first, test on a spare machine, etc.). This works for me but may wipe your data or reboot your universe. With much appreciation to John S. Fine and VOGONS user alexanrs, and of course the XT-IDE people. It's 1am here, so apologies for any errors. Bed time.
 
Last edited:
So you're using a large build. The BIOS is actually less than 10 KB so you can save 2 KB of conventional memory by truncating the BIOS file size to 10 KB. Just remember to move the checksum byte and update the block count byte at offset 2.

Then again, if this is just a temporary thing for testing the BIOS then it might not be worth the effort.

The BIOS file is 8KB. I'm not sure why 12KB is used. Perhaps fiddling with BOOT12.ASM might reduce it?
 
4. Get XT IDE Universal BIOS from here (I used 2.0.0 beta 3): https://code.google.com/archive/p/xtideuniversalbios/downloads
FTLOG, use a newer version of the BIOS, either the latest available from here or, even better, the r588-version someone made a while ago and posted somewhere on this forum.

The BIOS file is 8KB. I'm not sure why 12KB is used. Perhaps fiddling with BOOT12.ASM might reduce it?

Probably yes.

EDIT: Link to r588 made by Malc.
 
Last edited:
FTLOG, use a newer version of the BIOS, either the latest available from here or, even better, the r588-version someone made a while ago and posted somewhere on this forum.



Probably yes.

EDIT: Link to r588 made by Malc.

Thanks, I've updated the post and also answered someone's question about the number of files on the floppy. At some point I'll look at the code and see if I can reduce the overhead to 8KB.
 
AlexC, I made two boot floppies and get the same result with both:

'Invalid Disk!

Press any key to reboot.'

Got any ideas?
 
I think it's worth noting that a "bare" BIOS for this shouldn't be more than 4KB--the WD MFM controllers initially used 32Kbit (2732 type) ROMs.

Yes, ide_tiny.bin is 4KB but that lacks CF support and possibly some other features.

Different BIOS files use different amounts of RAM when loaded this way, so BOOT12.ASM appears to have a fixed overhead of around 4KB. That may or may not be necessary. When I have time I'll investigate it.
 
AlexC, I made two boot floppies and get the same result with both:

'Invalid Disk!

Press any key to reboot.'

Got any ideas?

What system are you running it on? What types of drive? NASM will fail silently but PARTCOPY should throw errors if it can't find the file or the destination device.

Try doing the NASM part on a 386 but then moving the relevant files to an XT to finish the job.

Try putting break points (i.e. 'pause' statements) in the batch file and watching which drive LEDs light up while its running. That'll tell you if it's using the correct drive.
 
Back
Top