Image Map Image Map
Page 2 of 5 FirstFirst 12345 LastLast
Results 11 to 20 of 45

Thread: How does a DOS SYS driver enable a file system / drive?

  1. #11
    Join Date
    May 2011
    Location
    Outer Mongolia
    Posts
    2,562

    Default

    I don't know if it'd be helpful at all, but on the AVR end maybe there might be some value in looking at the code for the "plipbox", an Arduino-based dingus that interfaces with a parallel port to emulate a network device.

    https://lallafa.de/blog/amiga-projects/plipbox/

    I saw the code for etherdfs was mentioned above; EtherDFS runs over a network but it uses a really simple layer2 protocol, it might not take that much to strip out the packet driver code and bolt on a simple parallel port driver, and the server-side code might give you a lot of clues how to implement the AVR end if your plan is to have it do the FAT filesystem handling itself instead of doing a block device.
    My Retro-computing YouTube Channel (updates... eventually?): Paleozoic PCs

  2. #12

    Default

    I picked up a laplink cable and I noticed that in addition to the 5 bits going in each direction (d0/d1/d2/d3/d4 connected to error/selin/oopaper/ack/busy), it also has strobe/linefd/reset/selprt directly connected. Can these 4 pins (strobe/linefd/reset/selprt) be used for 4 more data bits to send more than 1 nibble at a time? I found a page talking about how they are open collector so either side can release or drive them low. I was able to get around 82+ KB/s between my Compaq 486 desktop and a P3 Compaq notebook using Norton Commander link, but I am assuming it just uses 4 bits at a time. Between the P3 notebook and my 5170 AT, around 27 KB/s.

  3. #13
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    34,614
    Blog Entries
    18

    Default

    Take a close look at the PC XT printer adapter in the IBM techref. There are 5 lines that can be used as input. No matter what your own reference says, all output lines are driven with totem-pole drivers, but for the status lines--which are the same 5 ones used for input. The idea is that the printer adapter can self-test.

    Clones and later systems can have much reduced circuitry. A common hack is to modify the adapter so that bit 5 in the control register (LS174) controls the OE/ pin on the 374, so that 8 bit bidirectional function can be realized. I wrote about it in the 1980s and actually had it mentioned in Nuts'n'Volts when I used it to hack a cheap clone printer adapter to function as a GPIB interface.

  4. #14

    Default

    I did a search for the IBM techref, but didn't see much I could make sense of. I'm really asking about the 4 lines (strobe/linefd/reset/selprt) that say they are bidirectional/open collector. The page I was looking at suggested that if you write "xxxx0100" to the control port that this causes the 4 lowest bits to allow these 4 lines to be released/hiz/high. Then the other side could control them by either leaving them hiz or driving them low. These 4 lines are directly connected in the laplink cable I bought - is it safe for either side to drive them? I'm assuming it is since they are connected. Thanks for your help!!

  5. #15
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    34,614
    Blog Entries
    18

    Default

    Yes, they're open collector, at least on the IBM gear (usually driven by 7405 inverters). But what would be the point of using them in output mode, aside from implementing some sort of multi-drop network? If you want to try it, remember to use some pullups on the lines.

    You've already got 8+strobe output lines.

  6. #16

    Default

    Unless my thinking is off (and it could be), my thought was I could use them for another 4 bits in addition to the 5 bits in one direction and 5 bits in the other direction of the laplink cable. I have to think that that is the reason they implemented them in the cable, so you could do either 4 bit transfer, or 8 bit transfers.

  7. #17

    Default

    Okay, so I made up a test program and sure enough the 4 bits (3selprinter, 2initprinter, 1autolf, 0strobe) in the control port can also be used to send data to the other side. One of them is inverted compared to the other 3, but xoring with 0x04 can easily correct that where I can write "0000" to one of them and "0000" to the other and reading will result in "0000". If any side has a bit set, it will read set on both sides (OR operation between them). So, I could use these bits to double the transfer speed by one nibble at a time to one byte at a time even using old spp type ports. I tested this between a P3/700 compaq notebook and a 5170.

  8. #18

    Default

    SO essentially I have 5 lines in each direction plus 4 shared lines. Does it matter what bit I use for the strobe? Especially given that I am not going to use any interrupt features, can I bit any bit of the 5 in each direction? I plan on doing something like this:

    set 4 shared bits to high nibble
    set 4 non shared bits to low nibble + 1 bit as strobe "high"
    other side will see the strobe high and sample the 8 bits to reconstruct a byte.
    it will take its strobe high to tell the other side it has received the byte.
    then the original side could send another byte, except this time taking strobe "low".

    This would require bytes to be sent in pairs to leave the strobe low at the end.

    If the master side wants to receive a byte, it wouldn't drive the 4 shared bits, but instead sample them along with the dedicated 4 bits to receive a byte.

  9. #19
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    34,614
    Blog Entries
    18

    Default

    SO essentially I have 5 lines in each direction plus 4 shared lines.
    No, essentially, you have 5 lines in each direction.

    Here's what some code that I wrote 30 years ago as part of a larger product. I don't expect that you'll copy this verbatim, so I've left out the "include" files. It should give you a good idea of how this workd. Made to work on anything from an 8088 to whatever with parallel port. Timing and checking are essential to reliable operation. Block-oriented protocol using a LL parallel cable.
    Attached Files Attached Files

  10. #20

    Default

    Quote Originally Posted by Chuck(G) View Post
    No, essentially, you have 5 lines in each direction.
    I must be missing something. I've got:

    D0-D4 going to error/selin/oopaper/ack/busy IN BOTH DIRECTIONS (full duplex).

    Then I've additionally got:

    3selprinter, 2initprinter, 1autolf, 0strobe that are essentially half duplex.

    My thinking was use the 5 as a 4+1(strobe) and the additional 4 to make 8. You can't do full duplex 8 bits in each direction, but you can do half duplex 8 bits in one direction or the other.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •