• Please review our updated Terms and Rules here

ISA USB board

An easily obtainable metal bracket is a must have, More power at the USB port would be nice, These laptop hard drives can be power hungry buggers, Some requiring 1 amp or more at spin up :) Better support for the USB port on the PCB, The USB ports can be replaced with headers for attaching panel mount USB ports if required. Can't think of anything else at the mo.

Thanks for this. The USB spec allows devices to draw max. 100mA from the host when connected. The CH375/6 reference schematic, which the Lo-tech board follows, simply includes a series 2R resistor to allow for this with minimal drop whilst limiting contact current on connection. The connected device can subsequently draw up to 500mA, but only after negotiation with the host. In other words, a device cannot assume 500mA is available.

I think it should be possible to provide 500mA support, which should enable any bus-powered USB2 device to work since that is the limit outside of the battery charging standards. However, it seems to me that the way this would be done is by putting a USB hub in front of the CH375 along with the associated power distribution switches. At a quick count, this adds about 15 components to the board.

We'd need to test if the CH375/6 will work with a mass storage device attached through a USB hub in the first instance (I can't say I've ever owned a USB hub!).

On the other hand, if it does work, perhaps it might be possible to support more than one attached storage device on a single CH375/6? Possibly ISSUE_TOKEN @FreddyV might be of use?
 
Last edited:
what i mean is a decent bare PCB for around $10 that i can build myself, Parts are cheap enough and they are easy to build. I wouldn't buy one of those Chinese things.
why? because it's Chinese? (I'm genuinely curious) I've built a lot of boards lately and still have to build a bunch of lotech 1MB cards (for umb)..
 
This is interesting, I booted up using a Free Dos floppy and Free Dos complained that the partition on the CF card was 'Suspicious' and recommended CHS parameters of 979-7-32, I've been using the manufactures CHS parameters in the data sheet for my CF card, So i obeyed, I set the CHS in the Bios to 979-7-32 I booted up again using the floppy and ran FDISK, Deleting the old partition and created a new one rebooted Format C: and installed the FREE DOS system files, and now Free Dos is happy :) Still can't boot from the CF but i can now access the CF using FREE DOS or MS DOS 6.22 boot floppy's.

I booted up again via floppy and installed 'DiskTest' on the CF, I Ran DiskTest and MediaTest on the CF:

View attachment 1243470
View attachment 1243471
I'm going to try a different system bios from an XT clone just to rule out the stock IBM bios.
Out of curiousity, did have to you change the CH376S_WR_USB_DATA define to 0x2B, as mentioned in posts 228 and 235, or did you leave it as 0x2C?

If we can get to a common set of commands that will work on both devices for read/write/initialize/setup, that might make it possible to support both chips with a single firmware, which is the big dream for me-- work done for the ISA-card people will benefit the people using the CH376S-on-the-mainboard people and vice versa.

I've done another trivial change at https://gitlab.com/hakfoo1/v40-bios/-/blob/CH375-Workarounds/disc.asm

In the past, this BIOS never set "number of hard discs" in the BIOS data area, address 0x475. Maybe that confuses the "official" XT BIOS that expects it to be set.

I noticed the XT-IDE Universal BIOS docs mention that their BIOS paid attention to that value, and indeed with it set, I was able to boot with both BIOSes working together-- the CH376S was the first drive, and the XT-IDE was identified as second. Usual disclaimer of who-knows-what-subtle-horrors-lurk, but that does seem to make a real-world difference. Maybe it's what the XT BIOS needs to actually try to boot.

(There's also some tweaks to the delays used during the bring-up process; there's been a never-ending game of trying to optimize them to be quick, but not accidentally outrun the device's ability to respond. I figure this is something that people might want to tune themselves for their specific needs)

My build uses the Anonymous BIOS with some hardware-specific tweaks (loading an alternative to ROM BASIC, initializing V40-specific peripherals and a weird keyboard controller). The vanilla version at https://www.phatcode.net/downloads.php?id=101 might be worth experimenting with on a real 5160. Its boot logic is pretty damn naive: it tries drive A and C whether or not they exist.

If you're running benchmarks, one other thing you might want to play with-- the ALLOW_INTS option, if set to 1, should add a "STI" at the top of the INT13 handler. This should hopefully allow other interrupts (like serial devices and the timer) to work normally. This obviously increases the risk something will go wrong-- either a break at the wrong point in the loop, or some Rube Goldberg series of events that causes another disc operation to trigger while we're in the middle of one-- so I've left it off for now, but the intent was to prevent "time distortion" during benchmarks-- where it assumes everything was super-fast because the timer tick didn't fire while doing disc accesses. I'd realistically expect to see lower benchmark scores with it in place.

why? because it's Chinese? (I'm genuinely curious) I've built a lot of boards lately and still have to build a bunch of lotech 1MB cards (for umb)..
IMO, it's sort of a mediocre value proposition. It's like $25 inclusive of shipping typically, while the CH375/6 on little breakout boards are between $3 and 8 or so, and it's like three pieces of 74LS logic that probably add another two bucks. So you're paying $10+ for a tiny scrap of PCB, and not even a slot cover or EPROM.

I wonder what the costs would look like for doing a pre-assembled SMD version using something like JLCPCB's assembly service. I suspect if you did a group order of 20 boards, you could get them down below $15 per unit assembled. I'm not sure if they'll assemble everything (the USB connector might not be offered, I think they only do SMD assembly) though.
 
Last edited:
In my experience the volumes need to be a lot higher to achieve pricing anywhere near that. And then you need to consider that any finished PCB offered for sale by anyone in the UK or EU needs to be radiated emissions tested, the distributor registered for WEEE, and the product CE (or equivalent) marked and hence RoHS, 94V-0 etc. It’s just not possible to produce these boards in that way, in this part of the world.
 
Last edited:
Out of curiousity, did have to you change the CH376S_WR_USB_DATA define to 0x2B, as mentioned in posts 228 and 235, or did you leave it as 0x2C?

If we can get to a common set of commands that will work on both devices for read/write/initialize/setup, that might make it possible to support both chips with a single firmware, which is the big dream for me-- work done for the ISA-card people will benefit the people using the CH376S-on-the-mainboard people and vice versa.

I've done another trivial change at https://gitlab.com/hakfoo1/v40-bios/-/blob/CH375-Workarounds/disc.asm

In the past, this BIOS never set "number of hard discs" in the BIOS data area, address 0x475. Maybe that confuses the "official" XT BIOS that expects it to be set.

I noticed the XT-IDE Universal BIOS docs mention that their BIOS paid attention to that value, and indeed with it set, I was able to boot with both BIOSes working together-- the CH376S was the first drive, and the XT-IDE was identified as second. Usual disclaimer of who-knows-what-subtle-horrors-lurk, but that does seem to make a real-world difference. Maybe it's what the XT BIOS needs to actually try to boot.

(There's also some tweaks to the delays used during the bring-up process; there's been a never-ending game of trying to optimize them to be quick, but not accidentally outrun the device's ability to respond. I figure this is something that people might want to tune themselves for their specific needs)

My build uses the Anonymous BIOS with some hardware-specific tweaks (loading an alternative to ROM BASIC, initializing V40-specific peripherals and a weird keyboard controller). The vanilla version at https://www.phatcode.net/downloads.php?id=101 might be worth experimenting with on a real 5160. Its boot logic is pretty damn naive: it tries drive A and C whether or not they exist.

If you're running benchmarks, one other thing you might want to play with-- the ALLOW_INTS option, if set to 1, should add a "STI" at the top of the INT13 handler. This should hopefully allow other interrupts (like serial devices and the timer) to work normally. This obviously increases the risk something will go wrong-- either a break at the wrong point in the loop, or some Rube Goldberg series of events that causes another disc operation to trigger while we're in the middle of one-- so I've left it off for now, but the intent was to prevent "time distortion" during benchmarks-- where it assumes everything was super-fast because the timer tick didn't fire while doing disc accesses. I'd realistically expect to see lower benchmark scores with it in place.


IMO, it's sort of a mediocre value proposition. It's like $25 inclusive of shipping typically, while the CH375/6 on little breakout boards are between $3 and 8 or so, and it's like three pieces of 74LS logic that probably add another two bucks. So you're paying $10+ for a tiny scrap of PCB, and not even a slot cover or EPROM.

I wonder what the costs would look like for doing a pre-assembled SMD version using something like JLCPCB's assembly service. I suspect if you did a group order of 20 boards, you could get them down below $15 per unit assembled. I'm not sure if they'll assemble everything (the USB connector might not be offered, I think they only do SMD assembly) though.
I was actually asking Malc's reason... I buy them because I don't feel like sourcing the parts and doing the design work as I said prior I've done plenty of design work as it is and as James points out in his post Right Above This all that extra necessary stuff to legitimately sell something in Europe it's not something I would want anything to do with. Whatever floats your boat but I'll stick with the $21 boards but I'm getting that work just fine. Oh and I'm not sure where you're coming up with the tiny scrap of PCB because these are regular size 8-bit ISA cards. XTIDE boards are selling for a lot more than $21 and have the same amount of parts or less.
 
Are you sure about the regulations ? Many XTIDE and other boards are sold, but none with the CE marking
What is nice with the USB board vs XTIDE is that the CF are less and less simple to find, more and more expensive and they are not all compatible.
We don't need a USB-CF adapter to plug on the PC as well :)

Also, with more SW, this board can be used to plug a mouse. More applications are possible.
 
Before going too deep here it would probably be worthwhile to actually benchmark how well random access within a file actually works with this thing. I assume what you’re envisioning here is the BIOS/Int13 oriented driver on the PC will treat a file opened by the MCU as a linear block of sectors (IE, like it was an LBA addressed disk device), and you’re going to leave it up to the microcontroller to handle the housekeeping of actually updating this one file. Maybe my concern is completely misplaced, but this at least “feels” to me at a gut level like this might be significantly more expensive than raw block access for this thing to keep track of, especially if there is any file system fragmentation.

I mean, I guess it might be fine, the Gotek’s pretty anemic STM ARM chip pulls it off, but the performance expectation there is only, what, around 50K/s?

… to expand on that gut feeling, the reason I’m suspicious is I assume the raw block access calls are pretty much passed straight through the USB layer for the controller on the USB device to handle, LBA block access is a native essential part of generic USB disk access. This file system feature, however, is going to be living inside whatever compute resources are embedded in this chip, right?
We can't know without trying.
I suppose that the performance can be close, as ISA Bus is a bottelneck. Before doing this, there is work to have a correct/Stable BIOS.
 
Out of curiousity, did have to you change the CH376S_WR_USB_DATA define to 0x2B, as mentioned in posts 228 and 235, or did you leave it as 0x2C?
Tried both and doesn't seem to make any difference either way.
It's slower than the previous commit, but still can't boot from anything.

I have tried a couple of XT clone BIOS's and made no difference, Fitted the stock 8088 back in and stock IBM BIOS.

I set up a 4Gb flash drive with a 504Mb partition and installed DOS 6.22, @ device ID i see activity on the flash drive LED, @ boot time i see no activity at all on the LED. It's like it's not even trying to boot from the flash drive it just wants to boot from the floppy drive.
 
Hi,

Happy to see that the interrest in this solution increased thanks to my driver :)

What if we build a project/task force around this ?

Any idea about how to progress, like à discord server or something else ?
 
Tried both and doesn't seem to make any difference either way.
That's valuable insight. If we can use the same "read" and "write" commands for the 375 and 376, that's a huge obstacle for cross compatibility gone.

I will say though that if the "write" command is funky, it can mess up stuff in subtle ways-- i. e. FAT corruption which might hinder booting. Just as a sanity check, is the drive still readable on another PC? I know after I used the write command that wasn't supported on a CH376, I ended up with a drive still partitioned correctly, but it listed two identically named files with zero sizes, instead of the full disc of stuff I expected, because I had managed to corrupt data.

I set up a 4Gb flash drive with a 504Mb partition and installed DOS 6.22, @ device ID i see activity on the flash drive LED, @ boot time i see no activity at all on the LED. It's like it's not even trying to boot from the flash drive it just wants to boot from the floppy drive.

Did you try the suggestion where you add a few lines after .START_INT13 (now about line 497, or 553 if you're on an Intel CPU)? Did it print any call numbers?

The idea that multiple BIOSes don't work is surprising; I could see if one of them had a weird way to probe the hard disc, but that doesn't mean they'd all fail in the same way. Did you try specifically the one I mentioned? I figure that's "known working" in my situation.

The fact you can read after booting from a floppy suggests that the INT13 handler is successfully installed. I wonder if something is hijacking the INT19 (boot) handler with its own vision on how to proceed, and it doesn't fall back to booting the hard disc. What are all the cards in there-- anything with an option ROM at all? (i. e. a high-density floppy controller, something trying to netboot?)

I've found I get good results when you partition and format the card with the machine using the BIOS-- as that ensures that the geometry is as consistent as possible. This may not be a problem if you're staying below 500Mb, but I'm just grasping at straws now-- if it was looking for something during boot located on the other side of the universe, it would still at least blink the activity light.
 
That's valuable insight. If we can use the same "read" and "write" commands for the 375 and 376, that's a huge obstacle for cross compatibility gone.
I haven't noticed any difference, But then i can't actually boot from any hard drive. Only the Floppy.
I will say though that if the "write" command is funky, it can mess up stuff in subtle ways-- i. e. FAT corruption which might hinder booting. Just as a sanity check, is the drive still readable on another PC? I know after I used the write command that wasn't supported on a CH376, I ended up with a drive still partitioned correctly, but it listed two identically named files with zero sizes, instead of the full disc of stuff I expected, because I had managed to corrupt data.
Yes the flash drive is still readable in another PC, I have seen no corruption.
Did you try the suggestion where you add a few lines after .START_INT13 (now about line 497, or 553 if you're on an Intel CPU)? Did it print any call numbers?
Yes and it printed Sh$t loads of call numbers, But i didn't understand a bit of it.
The idea that multiple BIOSes don't work is surprising; I could see if one of them had a weird way to probe the hard disc, but that doesn't mean they'd all fail in the same way. Did you try specifically the one I mentioned? I figure that's "known working" in my situation.
No didn't try that one.
The fact you can read after booting from a floppy suggests that the INT13 handler is successfully installed. I wonder if something is hijacking the INT19 (boot) handler with its own vision on how to proceed, and it doesn't fall back to booting the hard disc. What are all the cards in there-- anything with an option ROM at all? (i. e. a high-density floppy controller, something trying to netboot?)
Just VGA card / Stock IBM floppy controller and the ISA - USB card

I've found I get good results when you partition and format the card with the machine using the BIOS-- as that ensures that the geometry is as consistent as possible. This may not be a problem if you're staying below 500Mb, but I'm just grasping at straws now-- if it was looking for something during boot located on the other side of the universe, it would still at least blink the activity light.
That's what i'm doing, Letting it boot from floppy and partition / format / Install DOS, I can access the flash drive / Read / Write when booted from floppy but NO way will it boot from the flash drive.
Even If the drive geometry was screwed i would expect to get an error but i'm getting nothing, No activity from the flash drive LED at boot time, It's like it's not even trying to boot from the flash drive.

I will try my IBM 5150 later and turn OFF floppy drives, I'm curious to see what happens.
 
Interesting. So it's at least making INT13 calls. The most useful thing would be the last two digits before it stalled out. That's the last INT13 call that was attempted-- maybe it's asking for a function that isn't implemented, or one that's returning unexpected data, or calling something unexpected (i. e. trying to load past the end of the disc). It's possible it's only active briefly.

With the mainboard BIOS I use, when the CH376 had "a buffer full of garbage", it detected this and asked to insert a new boot disc. But the fact you're getting a lot of calls makes me think it's doing a lot more than reading the single boot sector,
 
Could this be the boot sector? Try my wipedisk urility on it then repartition and format in the machine.
 
The idea that multiple BIOSes don't work is surprising; I could see if one of them had a weird way to probe the hard disc, but that doesn't mean they'd all fail in the same way. Did you try specifically the one I mentioned? I figure that's "known working" in my situation.
Success, i think :) I installed the 'Anonymous' bios and my XT booted from the Flash drive, I dunno why it won't boot with the stock IBM BIOS or the 2 Clone XT bios's i tried.
Out of curiousity, did have to you change the CH376S_WR_USB_DATA define to 0x2B, as mentioned in posts 228 and 235, or did you leave it as 0x2C?
Yes i changed the define to 0x2B because with 0x2C i had MAJOR corruption issues with this 'Anonymous' bios, I had to Zap the flash drive in another PC and start again.

More testing required but it seem's to be working quite well at the mo.
 
That's great. What does the performance look like? And - sorry to ask still more! - do you have a hub that you could test?
 
That's great. What does the performance look like? And - sorry to ask still more! - do you have a hub that you could test?
Performance wise hard to tell exactly, It boots fast enough, I ran disktest twice with ALLOW_INTS 0 in the BIOS.

IO_0.jpg

And ALLOW_INTS 1 in the bios
IO_1.jpg
MediaTest = PASS.

USB HUB does not work, The Flash drive must be the first / Only thing plugged in.
 
Thanks Malc. So unfortunately that rules out having increased USB power with these chips then, unless we are able to somehow get access to the firmware itself.
 
Hi,
Here is the V0.22 and the 286 Driver :)
change Log:
30/06/22 V0.22
- BUG Fix : IRQ and Speed parameters were reversed, so the Speed was 3 by Default
- 286 Version tested on 286 8MHz
- Some Useless code removed
- Added some display : DOS Version, Chip Version, Partition number
I tested the driver on my 286@10Mhz. Made a short video. Thanks for the fast driver. USB ISA Card *New driver*
 
Back
Top