VOGONS


Working XTA (IDE on XT) setup on GLaBIOS

Topic actions

Reply 20 of 61, by 640KB

User metadata
Rank Newbie
Rank
Newbie

BTW, I might suggest a target memory segment a little further out under memory-hungry DOS 5.0. When I ran DEBUG the CS was already 145D, so that didn't end well. Maybe make it 3000 just to be safe!

debug
n px-hdc.bin
M C800:0 2000 3000:0
W 3000:0
q

Reply 21 of 61, by myne

User metadata
Rank Member
Rank
Member

I see 3 jumpers on the card. What do they do?
Could this be a similar sort of situation to the jumpers which would restrict larger IDE drives to ~8gb?
A 20mb "compatibility mode" of sorts

Things I built:
Mechwarrior 2 installer for Windows 10/11 Re: A comprehensive guide to install and play MechWarrior 2 on new versions on Windows.
Dos+Windows 3.11 auto-install iso template (for vmware)

Reply 22 of 61, by weedeewee

User metadata
Rank l33t
Rank
l33t
myne wrote on 2024-04-26, 01:39:

I see 3 jumpers on the card. What do they do?
Could this be a similar sort of situation to the jumpers which would restrict larger IDE drives to ~8gb?
A 20mb "compatibility mode" of sorts

already been answered
Re: Working XTA (IDE on XT) setup on GLaBIOS
Re: Working XTA (IDE on XT) setup on GLaBIOS

Right to repair is fundamental. You own it, you're allowed to fix it.
How To Ask Questions The Smart Way
Do not ask Why !
https://www.vogonswiki.com/index.php/Serial_port

Reply 23 of 61, by highvoltage

User metadata
Rank Newbie
Rank
Newbie

I was so hopeful with this trip to the garage! I tried a typoless version (I think!?) of weeedeewee's suggestion, but the computer freezes after the M command.

I tried 640k's debug command, which seemed to work! But... produced another file full of FF (huh!?)

I'm also distracted by work atm so I'll do some more trial and error. At least we got to a point where the ROM was read, now just to get debug to write it properly (I'll also try one from freedos and DOS 6 fwiw)

Attachments

  • more0.jpg
    Filename
    more0.jpg
    File size
    337.55 KiB
    Views
    351 views
    File license
    Public domain
  • freeze.jpg
    Filename
    freeze.jpg
    File size
    87.73 KiB
    Views
    351 views
    File license
    Public domain

Reply 24 of 61, by weedeewee

User metadata
Rank l33t
Rank
l33t
highvoltage wrote on 2024-04-26, 08:12:

I was so hopeful with this trip to the garage! I tried a typoless version (I think!?) of weeedeewee's suggestion, but the computer freezes after the M command.

I tried 640k's debug command, which seemed to work! But... produced another file full of FF (huh!?)

I'm also distracted by work atm so I'll do some more trial and error. At least we got to a point where the ROM was read, now just to get debug to write it properly (I'll also try one from freedos and DOS 6 fwiw)

yeah the freezing is likely due to the 1000:0
Change it to 3000:0 like 640KB said.

It is pretty weird though, displaying it works, yet writing to file doesn't. I admit I don't know too much about the workings of debug.
I guess doing a display dump of the bios at c800 would also be usable 😀
[code]D C800:0 2000[/code] nevermind that will require a little more command redirection to get it into a usable file for upload.

copy con dump.txt
D C800:0 2000
Q
^Z <- this means press Control & Z

debug <dump.txt >dump.bin

Right to repair is fundamental. You own it, you're allowed to fix it.
How To Ask Questions The Smart Way
Do not ask Why !
https://www.vogonswiki.com/index.php/Serial_port

Reply 25 of 61, by highvoltage

User metadata
Rank Newbie
Rank
Newbie
weedeewee wrote on 2024-04-26, 08:36:
[…]
Show full quote
copy con dump.txt
D C800:0 2000
Q
^Z <- this means press Control & Z

debug <dump.txt >dump.bin

That didn't quite work, it seemed to have also copied the debug commands into the file and generated a 40k file (perhaps a loop?)

Anyway! I tried your original suggestion on FreeDOS, and it just worked first time! So perhaps there's some bug on DOS 5's debug.com command? Troubleshooting that is an adventure for another day, for now, here's the ROM!

https://jonathancarter.org/files/temp/xt/PX-HDC.BIN

It does seem to be aware of some 40MB disks (perhaps it can only detect miniscribe capacities, haven't looked to closely into it) and it seems to contain a whole low level format utility!

Reply 26 of 61, by weedeewee

User metadata
Rank l33t
Rank
l33t
highvoltage wrote on 2024-04-26, 10:05:
That didn't quite work, it seemed to have also copied the debug commands into the file and generated a 40k file (perhaps a loop? […]
Show full quote
weedeewee wrote on 2024-04-26, 08:36:
[…]
Show full quote
copy con dump.txt
D C800:0 2000
Q
^Z <- this means press Control & Z

debug <dump.txt >dump.bin

That didn't quite work, it seemed to have also copied the debug commands into the file and generated a 40k file (perhaps a loop?)

Anyway! I tried your original suggestion on FreeDOS, and it just worked first time! So perhaps there's some bug on DOS 5's debug.com command? Troubleshooting that is an adventure for another day, for now, here's the ROM!

https://jonathancarter.org/files/temp/xt/PX-HDC.BIN

It does seem to be aware of some 40MB disks (perhaps it can only detect miniscribe capacities, haven't looked to closely into it) and it seems to contain a whole low level format utility!

No that is actually a text file hexdump of the bios.
you verify it by doing

type dump.bin

Given some copy/paste block selection magic it would've been easy enough to enter into a hexeditor and create the actual file.

Right to repair is fundamental. You own it, you're allowed to fix it.
How To Ask Questions The Smart Way
Do not ask Why !
https://www.vogonswiki.com/index.php/Serial_port

Reply 27 of 61, by weedeewee

User metadata
Rank l33t
Rank
l33t

I doubt you want to try a low level format, but if you want to see it I guess you could

debug
g c800:5

Right to repair is fundamental. You own it, you're allowed to fix it.
How To Ask Questions The Smart Way
Do not ask Why !
https://www.vogonswiki.com/index.php/Serial_port

Reply 28 of 61, by highvoltage

User metadata
Rank Newbie
Rank
Newbie
weedeewee wrote on 2024-04-26, 11:16:
I doubt you want to try a low level format, but if you want to see it I guess you could […]
Show full quote

I doubt you want to try a low level format, but if you want to see it I guess you could

debug
g c800:5

It's so tempting, although from what I understand from other docs, once I format a disk in XTA mode it can't be read on an ATA host (which might be useful for this disk). This disks were extremely cheap (and extremely common) in my country in the early 90's, so I'm going to try to get some more of these and then I can low level format one of them (because I am very curious to see what this low level format tool looks like in action!)

Reply 29 of 61, by 640KB

User metadata
Rank Newbie
Rank
Newbie

If you look in the ROM at file offset 025B you can see what would appear to be drive type tables with five built in drive types.

                                                              ; #  Cyl  H  RWC  WPC  EC  Step  SPT  Size  FMT
0000025b 67 02 04 67 02 67 02 0b 05 00 00 00 00 00 11 00 ; 0: 615 4 615 615 11 5 ... 17 20MB MFM
0000026b 25 03 02 25 03 25 03 0b 05 00 00 00 00 00 1a 00 ; 1: 805 2 805 805 11 5 ... 26 20MB RLL
0000027b 25 03 04 25 03 25 03 0b 05 00 00 00 00 00 1a 00 ; 2: 805 4 805 805 11 5 ... 26 40MB RLL
0000028b 25 03 04 25 03 25 03 0b 05 00 00 00 00 00 11 00 ; 3: 805 4 805 805 11 5 ... 17 28MB MFM
0000029b 34 01 04 34 01 34 01 0b 05 00 00 00 00 00 11 00 ; 4: 308 4 308 308 11 5 ... 17 10MB MFM

So yours would appear to be none of those, in theory you could replace one of the built-in types with this:

0000025b    34 03 06 34 03 34 03 0b 05 00 00 00 00 00 11 00   ; 0: 820  6  820  820  11  5 ... 17   40MB  MFM

The controller appears to determine the drive type from this table by reading I/O port 322, which on XTA would be determined by settings on the drive so probably a combination of the drive id and the capacity jumpers. Regardless your drive is selecting type 0 the way it is set now.

Here's the ROM modded as above, with updated checksum: PX-HDC40.BIN

Of course, usual disclaimer - this is totally untested so no promises it will work or not corrupt data. 😀

Good luck!

Reply 30 of 61, by highvoltage

User metadata
Rank Newbie
Rank
Newbie
640KB wrote on 2024-04-26, 15:16:
If you look in the ROM at file offset 025B you can see what would appear to be drive type tables with five built in drive types. […]
Show full quote

If you look in the ROM at file offset 025B you can see what would appear to be drive type tables with five built in drive types.

                                                              ; #  Cyl  H  RWC  WPC  EC  Step  SPT  Size  FMT
0000025b 67 02 04 67 02 67 02 0b 05 00 00 00 00 00 11 00 ; 0: 615 4 615 615 11 5 ... 17 20MB MFM
0000026b 25 03 02 25 03 25 03 0b 05 00 00 00 00 00 1a 00 ; 1: 805 2 805 805 11 5 ... 26 20MB RLL
0000027b 25 03 04 25 03 25 03 0b 05 00 00 00 00 00 1a 00 ; 2: 805 4 805 805 11 5 ... 26 40MB RLL
0000028b 25 03 04 25 03 25 03 0b 05 00 00 00 00 00 11 00 ; 3: 805 4 805 805 11 5 ... 17 28MB MFM
0000029b 34 01 04 34 01 34 01 0b 05 00 00 00 00 00 11 00 ; 4: 308 4 308 308 11 5 ... 17 10MB MFM

So yours would appear to be none of those, in theory you could replace one of the built-in types with this:

0000025b    34 03 06 34 03 34 03 0b 05 00 00 00 00 00 11 00   ; 0: 820  6  820  820  11  5 ... 17   40MB  MFM

The controller appears to determine the drive type from this table by reading I/O port 322, which on XTA would be determined by settings on the drive so probably a combination of the drive id and the capacity jumpers. Regardless your drive is selecting type 0 the way it is set now.

Here's the ROM modded as above, with updated checksum: PX-HDC40.BIN

Of course, usual disclaimer - this is totally untested so no promises it will work or not corrupt data. 😀

Good luck!

Wow, amazing, thanks! I was reading this and thinking I have to hack this and there's already a whole BIOS extention already to download and burn!

Not sure if it would make a difference, but the ST351A/X is an RLL drive though?

https://stason.org/TULARC/pc/hard-drives-hdd/ … -SL-IDE-AT.html

Reply 31 of 61, by 640KB

User metadata
Rank Newbie
Rank
Newbie
highvoltage wrote on 2024-04-26, 15:29:
Wow, amazing, thanks! I was reading this and thinking I have to hack this and there's already a whole BIOS extention already to […]
Show full quote
640KB wrote on 2024-04-26, 15:16:

Here's the ROM modded as above, with updated checksum: PX-HDC40.BIN

Wow, amazing, thanks! I was reading this and thinking I have to hack this and there's already a whole BIOS extention already to download and burn!

Not sure if it would make a difference, but the ST351A/X is an RLL drive though?

https://stason.org/TULARC/pc/hard-drives-hdd/ … -SL-IDE-AT.html

I was just going by the translated geometry that's in that sheet: 820 c , 6 h, 17 spt. That does come out to 43M so it seems to make sense.

highvoltage wrote on 2024-04-26, 14:49:

It's so tempting, although from what I understand from other docs, once I format a disk in XTA mode it can't be read on an ATA host (which might be useful for this disk). This disks were extremely cheap (and extremely common) in my country in the early 90's, so I'm going to try to get some more of these and then I can low level format one of them (because I am very curious to see what this low level format tool looks like in action!)

I'm not really familar with this drive, but the docs say that once you low-level format it on an XTA controller it can never ever be used again on an ATA controller? If so, that's concerning.

Being optimistic, the fact that it read the partition table from the drive when the wrong type was set implies there's at least a chance that the drive will work with the existing format and partition if the drive parameters match the previous format. Otherwise, as LLF'ing an IDE drive is generally considered to be perilous, if the modified ROM doesn't work I'm not sure I'd try the XTA ROM formatter. You've already got a different drive than the Miniscribes that this controller was intended to support, and so no guarantees that it wouldn't be somehow destructive.

640KB

Last edited by 640KB on 2024-04-26, 22:24. Edited 2 times in total.

Reply 32 of 61, by weedeewee

User metadata
Rank l33t
Rank
l33t

it's an early IDE drive. does it matter if it uses mfm or rll encoding in this case since it's connected as an XTA drive and not via an old MFM or RLL controller.

I'm wondering if changing the drive geometry after booting could work, though that would likely mean the drive itself is no longer bootable due to CHS differences in pre boot vs post boot
Would the XT-IDE bios work for XTA drives ?

Do these old drives even have some sort of Device Identify command that could be implemented and used in the current bios ?

Right to repair is fundamental. You own it, you're allowed to fix it.
How To Ask Questions The Smart Way
Do not ask Why !
https://www.vogonswiki.com/index.php/Serial_port

Reply 33 of 61, by 640KB

User metadata
Rank Newbie
Rank
Newbie
weedeewee wrote on 2024-04-26, 15:36:

I'm wondering if changing the drive geometry after booting could work, though that would likely mean the drive itself is no longer bootable due to CHS differences in pre boot vs post boot
Would the XT-IDE bios work for XTA drives ?

I came across this post that touched on that, and also other compatibility issues with these drive types. It was from 2010, so no idea if XT-IDE has since added support or not.

weedeewee wrote on 2024-04-26, 15:36:

Do these old drives even have some sort of Device Identify command that could be implemented and used in the current bios ?

Yeah, see my earlier post. I found this post that clued me in that reading IO port 322 gives a simple (and somewhat model/vendor dependent) drive type. That's what this code at C800:0622 is doing:

                         DRIVE_TYPE_OFFSET:              ; drive type to HDP offset table (8 bytes)
C800:0616 DB 20h, 20h, 10h, 00h ; if bit 4 is 0
DB 00h, 00h, 00h, 00h ; if bit 4 is 1
...
C800:0622 BA 0322 MOV DX, 0322h ; XTA "drive size bits" port
C800:0625 A0 0077 MOV AL, [0077h] ; get port offset to current fixed disk adapter
C800:0628 02 D0 ADD DL, AL ; DX = current port
C800:062A EC IN AL, DX ; read drive size bits
C800:062B 80 E2 FC AND DL, 11111100b ; reset to base I/O port
C800:062E 8A E0 MOV AH, AL ; save result
C800:0630 24 03 AND AL, 0011b ; isolate disk type bits
C800:0632 F6 C4 10 TEST AH, 00010000b ; flag in bit 4 set?
C800:0635 74 02 JZ NO_BIT_4 ; jump if not
C800:0637 0C 04 OR AL, 0100b ; add 4 to drive type
NO_BIT_4:
C800:0639 32 E4 XOR AH, AH ; zero extend drive type to AX
C800:063B 8B F8 MOV DI, AX ; move to index
C800:063D 2E 8A 85 0616 MOV AL, BYTE PTR CS:DRIVE_TYPE_OFFSET[DI] ; get drive type/HDP offset from table
C800:0642 26 C4 3E 0104 LES DI, WORD PTR ES:[0104h] ; ES:DI = current Hard Disk Parameter table (INT 41h)
C800:0647 03 C7 ADD AX, DI ; add type offset for new HDP

Haven't really looked for any docs about the other bits, but assume they represent the jumpers on the drive in one way or another. Bit 4 changes the drive type maps, though if it's on then they all just map to the default 20MB. Also, with this table it seems it will never use drive types 3 or 4 so who knows. More study would be required here!

Reply 34 of 61, by weedeewee

User metadata
Rank l33t
Rank
l33t

Sorry for being a bit vague with the drive identifier.
I was more alluding to the command in the newer drives that reports the drive geometry and or amount of sectors as for LBA, and is not some lookup from a BIOS table.
Without such a command XT-IDE would need a preconfigured CHS value.

But Yes, more documentation would easily satisfy that inquiry.

Right to repair is fundamental. You own it, you're allowed to fix it.
How To Ask Questions The Smart Way
Do not ask Why !
https://www.vogonswiki.com/index.php/Serial_port

Reply 35 of 61, by 640KB

User metadata
Rank Newbie
Rank
Newbie
weedeewee wrote on 2024-04-26, 17:24:
Sorry for being a bit vague with the drive identifier. I was more alluding to the command in the newer drives that reports the d […]
Show full quote

Sorry for being a bit vague with the drive identifier.
I was more alluding to the command in the newer drives that reports the drive geometry and or amount of sectors as for LBA, and is not some lookup from a BIOS table.
Without such a command XT-IDE would need a preconfigured CHS value.

But Yes, more documentation would easily satisfy that inquiry.

Yeah, based on that quick peek at the source I'd guess the identify drive command is not available on XTA, or they'd have used it. Would imagine quality documentation would be a bit harder to come by too, and it sounded like there were non-trivial differences between manufacturers too.

Who can say how many working original XTA drives are in existence today, but I'd think you're very lucky to have one @highvoltage!

Reply 36 of 61, by weedeewee

User metadata
Rank l33t
Rank
l33t
640KB wrote on 2024-04-26, 18:03:
weedeewee wrote on 2024-04-26, 17:24:
Sorry for being a bit vague with the drive identifier. I was more alluding to the command in the newer drives that reports the d […]
Show full quote

Sorry for being a bit vague with the drive identifier.
I was more alluding to the command in the newer drives that reports the drive geometry and or amount of sectors as for LBA, and is not some lookup from a BIOS table.
Without such a command XT-IDE would need a preconfigured CHS value.

But Yes, more documentation would easily satisfy that inquiry.

Yeah, based on that quick peek at the source I'd guess the identify drive command is not available on XTA, or they'd have used it. Would imagine quality documentation would be a bit harder to come by too, and it sounded like there were non-trivial differences between manufacturers too.

Who can say how many working original XTA drives are in existence today, but I'd think you're very lucky to have one @highvoltage!

Agreed, very lucky to have one, and looking for more of the same.
I have four different machines which could use an XTA drive but I have no XTA drives and never had one.
A simple emulator would be great. Wouldn't be surprised if a pi pico could be turned into one. likely already overkill.

Right to repair is fundamental. You own it, you're allowed to fix it.
How To Ask Questions The Smart Way
Do not ask Why !
https://www.vogonswiki.com/index.php/Serial_port

Reply 37 of 61, by highvoltage

User metadata
Rank Newbie
Rank
Newbie

@640K and @weedeewee: I'll look out for drives for you. The ST351A/X was really popular in low end 386's in my country, so there's likely more of them popping up soon.

Cards seem a little more rare, but I have a sharp eye for things that look weird so I'll keep an eye out for those too. Will flash the new rom tomorrow, I'm very curious to try it out!

Reply 38 of 61, by weedeewee

User metadata
Rank l33t
Rank
l33t

FYI, off the top of my head, the computers that I have which support an XTA drive are...
ie they have a 40 pin connector where a hard drive normally would get connected eventhough many of these machines were shipped with an MFM or RLL drive&controller
- Commodore PC10-III
- Philips NMS 9100
- Amstrad PC-1640
- ? can't remember, maybe it was only three.

Enjoy !

Right to repair is fundamental. You own it, you're allowed to fix it.
How To Ask Questions The Smart Way
Do not ask Why !
https://www.vogonswiki.com/index.php/Serial_port

Reply 39 of 61, by 640KB

User metadata
Rank Newbie
Rank
Newbie
weedeewee wrote on 2024-04-26, 20:51:
FYI, off the top of my head, the computers that I have which support an XTA drive are... ie they have a 40 pin connector where […]
Show full quote

FYI, off the top of my head, the computers that I have which support an XTA drive are...
ie they have a 40 pin connector where a hard drive normally would get connected eventhough many of these machines were shipped with an MFM or RLL drive&controller
- Commodore PC10-III
- Philips NMS 9100
- Amstrad PC-1640
- ? can't remember, maybe it was only three.

Enjoy !

I can remember the CompuAdd V20 line used them also (manual) and several in the Tandy line did as well as the PS/2 model 25 and 30.

Of course, I don't have any of these. Always wanted one of those CompuAdd pizza boxes tho.