Announcement

Collapse

Forum Rules and Etiquette

Our mission ...

This forum is part of our mission to promote the preservation of vintage computers through education and outreach. (In real life we also run events and have a museum.) We encourage you to join us, participate, share your knowledge, and enjoy.

This forum has been around in this format for over 15 years. These rules and guidelines help us maintain a healthy and active community, and we moderate the forum to keep things on track. Please familiarize yourself with these rules and guidelines.


Rule 1: Remain civil and respectful

There are several hundred people who actively participate here. People come from all different backgrounds and will have different ways of seeing things. You will not agree with everything you read here. Back-and-forth discussions are fine but do not cross the line into rude or disrespectful behavior.

Conduct yourself as you would at any other place where people come together in person to discuss their hobby. If you wouldn't say something to somebody in person, then you probably should not be writing it here.

This should be obvious but, just in case: profanity, threats, slurs against any group (sexual, racial, gender, etc.) will not be tolerated.


Rule 2: Stay close to the original topic being discussed
  • If you are starting a new thread choose a reasonable sub-forum to start your thread. (If you choose incorrectly don't worry, we can fix that.)
  • If you are responding to a thread, stay on topic - the original poster was trying to achieve something. You can always start a new thread instead of potentially "hijacking" an existing thread.



Rule 3: Contribute something meaningful

To put things in engineering terms, we value a high signal to noise ratio. Coming here should not be a waste of time.
  • This is not a chat room. If you are taking less than 30 seconds to make a post then you are probably doing something wrong. A post should be on topic, clear, and contribute something meaningful to the discussion. If people read your posts and feel that their time as been wasted, they will stop reading your posts. Worse yet, they will stop visiting and we'll lose their experience and contributions.
  • Do not bump threads.
  • Do not "necro-post" unless you are following up to a specific person on a specific thread. And even then, that person may have moved on. Just start a new thread for your related topic.
  • Use the Private Message system for posts that are targeted at a specific person.


Rule 4: "PM Sent!" messages (or, how to use the Private Message system)

This forum has a private message feature that we want people to use for messages that are not of general interest to other members.

In short, if you are going to reply to a thread and that reply is targeted to a specific individual and not of interest to anybody else (either now or in the future) then send a private message instead.

Here are some obvious examples of when you should not reply to a thread and use the PM system instead:
  • "PM Sent!": Do not tell the rest of us that you sent a PM ... the forum software will tell the other person that they have a PM waiting.
  • "How much is shipping to ....": This is a very specific and directed question that is not of interest to anybody else.


Why do we have this policy? Sending a "PM Sent!" type message basically wastes everybody else's time by making them having to scroll past a post in a thread that looks to be updated, when the update is not meaningful. And the person you are sending the PM to will be notified by the forum software that they have a message waiting for them. Look up at the top near the right edge where it says 'Notifications' ... if you have a PM waiting, it will tell you there.

Rule 5: Copyright and other legal issues

We are here to discuss vintage computing, so discussing software, books, and other intellectual property that is on-topic is fine. We don't want people using these forums to discuss or enable copyright violations or other things that are against the law; whether you agree with the law or not is irrelevant. Do not use our resources for something that is legally or morally questionable.

Our discussions here generally fall under "fair use." Telling people how to pirate a software title is an example of something that is not allowable here.


Reporting problematic posts

If you see spam, a wildly off-topic post, or something abusive or illegal please report the thread by clicking on the "Report Post" icon. (It looks like an exclamation point in a triangle and it is available under every post.) This send a notification to all of the moderators, so somebody will see it and deal with it.

If you are unsure you may consider sending a private message to a moderator instead.


New user moderation

New users are directly moderated so that we can weed spammers out early. This means that for your first 10 posts you will have some delay before they are seen. We understand this can be disruptive to the flow of conversation and we try to keep up with our new user moderation duties to avoid undue inconvenience. Please do not make duplicate posts, extra posts to bump your post count, or ask the moderators to expedite this process; 10 moderated posts will go by quickly.

New users also have a smaller personal message inbox limit and are rate limited when sending PMs to other users.


Other suggestions
  • Use Google, books, or other definitive sources. There is a lot of information out there.
  • Don't make people guess at what you are trying to say; we are not mind readers. Be clear and concise.
  • Spelling and grammar are not rated, but they do make a post easier to read.
See more
See less

PC ISA I/O Address Space : 10-bits or 16-bits

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    PC ISA I/O Address Space : 10-bits or 16-bits

    The Intel 8086 and 8088 CPUs support 20-bit memory addressing (with segmentation) and 16-bit I/O bus addressing. Yet IBM limited the I/O bus in the PC to 10-bits. Was this an arbitrary limitation from IBM or does the ISA bus enforce a wrap-around effect if bits 10-15 (A-F) are used in an ISA adapter. Even some of IBM's adapters use 16-bit addresses.
    My Retro Computing and Vintage Gaming Blog : http://nerdlypleasures.blogspot.com/

    #2
    Completely arbitrary on IBM's part (another screwball decision). Some official IBM cards, such as the cluster adapter, use the remainder of the 16 bit address as selects for more than one card. Any "new" ISA card should fully decode all 16 bits of the I/O address--it could save grief in the future when you're running out of ports in the 10 bit space.

    Not having a standard design requirement for cards to share IRQ lines is another big fumble by IBM. Some are completely graceful about it (such as the async comm card and the floppy controller); others assume that sharing is impossible.
    Reach me: vcfblackhole _at_ protonmail dot com.

    Comment


      #3
      It's a matter of how many address bits the IO devices decode. The port address space itself is 16-bit, but many IO devices on the 5150/5160 (including all the on-board devices like DMA, PIC, PIT and PPI) only decoded 10 bits of address, so can be reached by 64 (or more) different port addresses.

      The same address bits are used for memory addresses as for port addresses (the only difference is the use of the -IOR/-IOW lines instead of the -MEMR/-MEMW lines) and there's nothing that masks out A10-A15 for IO port accesses.

      Comment


        #4
        So, between the I/O devices on the system board and the ISA cards that only decoded 10 address bits, a board designer needs to be really careful about which ports he is using if he is going to use I/O addresses above 3FF.
        My Retro Computing and Vintage Gaming Blog : http://nerdlypleasures.blogspot.com/

        Comment


          #5
          That's pretty much the story, yes. For example, if you decide to use port 7F2, you're likely to run into your floppy controller.

          If you restrict yourself to a certain subset of I/O instructions on the Z80, you can realize a 16-bit I/O address space. Were there any 8-bit systems that attempted to extend the I/O address space with a bankswitching scheme?
          Reach me: vcfblackhole _at_ protonmail dot com.

          Comment


            #6
            Originally posted by Great Hierophant View Post
            So, between the I/O devices on the system board and the ISA cards that only decoded 10 address bits, a board designer needs to be really careful about which ports he is using if he is going to use I/O addresses above 3FF.
            I remember this particular type of conflict being described as a possibility in the technical manuals of some PS/2 microchannel cards.

            Comment


              #7
              Originally posted by Great Hierophant View Post
              So, between the I/O devices on the system board and the ISA cards that only decoded 10 address bits, a board designer needs to be really careful about which ports he is using if he is going to use I/O addresses above 3FF.
              The motherboard itself (at least IBM PC/XT, but probably other clones too) will only decode address lines A0-A9 for on board I/O devices (such as 8253 PIT, 8237 DMAC, 8259 PIC, 8255 PPI...). The motherboard doesn't do any address decoding for extension cards, so their address decoding will depend on decode circuit on the card itself. Many cards decode just A0-A9 lines, but some (e.g. VGA cards) will decode the entire 16-bit I/O address.

              Also some cards use addresses higher than 3FFh by using an address in 0h-3FFh range together with a higher address that equals the address in 0h - 3FFh modulo 400h. This basically ensures that it will be no address conflict due to partial address decode. For example SB32 uses ports in 220h-22Fh range (SB16/SB Pro compatible), and also 620h-623h, 0A20h-0A23h and 0E20h-0E23h addresses for EMU8000. Another similar example is ECP parallel port. It uses 378h-37Fh ports (or 278h-27Fh for LPT2) for standard parallel port compatibility, and also 778h and 77Ah ports for ECP functionality (678h and 67Ah for LPT2).

              Many SVGA chips implement various ports at X*400h + 2E8h addresses. For example 4AE8h... Apparently this is for compatibility with IBM 8514/A (which was designed for Micro Channel, and probably didn't have this lower 10-bit address decode problem). Such cards do conflict with COM4 I/O addresses.
              Last edited by sergey; January 2, 2013, 03:42 PM.

              Comment


                #8
                Originally posted by Chuck(G) View Post
                Completely arbitrary on IBM's part (another screwball decision). Some official IBM cards, such as the cluster adapter, use the remainder of the 16 bit address as selects for more than one card. Any "new" ISA card should fully decode all 16 bits of the I/O address--it could save grief in the future when you're running out of ports in the 10 bit space.

                Not having a standard design requirement for cards to share IRQ lines is another big fumble by IBM. Some are completely graceful about it (such as the async comm card and the floppy controller); others assume that sharing is impossible.
                Something to add while I was reading:

                Obviously my knowledge is limited, but I was under the impression that IRQ sharing is NOT possible at all using the ISA bus except for serial and parallel ports (as defined by the PC architecture)- and even then, only by having an appropriately-written ISR which detects which I/O ports needs attention.

                But this made me think:

                Suppose I'm developing a custom ISA card which supports IRQ sharing and configurable I/O port... if I choose the wrong port above 3FF (7F2- an 'alias' for the floppy port in your example), isn't my ISR going to get garbage when I try to read two values put on the bus simultaneously, with no workaround except choosing a different address? Is the only solution to "not use those ports"?
                Looking for: Needham's Electronics PB-10 Microcontroller Adapter (looking for one since early 2012!).

                Comment


                  #9
                  It depends on the peripherals and whether or not:
                  • The interrupts from one card can be masked; or
                  • If it's possible to identify the source of an interrupt


                  For example, it's certainly possible to share IRQ 6 among several floppy controllers. Similarly, async comm adapters can share an interrupt. Both adapters can "float" their IRQ pins, so that more than one card can share an interrupt (but not at the same time).
                  Reach me: vcfblackhole _at_ protonmail dot com.

                  Comment


                    #10
                    I'll add a bit more... The PS/2 uses the upper 6 bits to specify multiple instances of the same device. So, on a PS/2, the first async port is at 03f8h, the second at 02F8h, the third at 3220h, the fourth at 3228h; the fifth at 4220h; the sixth at 4228h; the seventh at 5220h and the eighth at 5228h. All but the first use IRQ3.

                    On the PC system of interrupts: Remember that the original 5150 used two onboard interrupts for the timer and keyboard and so had 6 to spare--and there were 5 ISA slots, so it was a pretty conservative design. That is, until multifunction boards came along and then the whole scheme fell apart. On-the-motherboard peripherals didn't help either. The 5170 added a second interrupt controller as a slave, adding 7 more interrupts, but those extra interrupts are only available to 16-bit cards.

                    Had the designers of the PC had a bit more vision, they might have implemented a different interrupt structure. For example, peripherals could assert an interrupt using open-collector drivers, so that as many of them as desired could pull on an IRQ line. If a standard for chaining ISRs had been implemented in software, then an ISR could check to see if its device needed servicing and pass control to the next ISR. The tail of each ISR chain would be the EOI for the interrupt along with an IRET.

                    Note that it's still possible for something such as a multiport COM board to use its own 8259 PIC and use it to drive a single bus IRQ line as a slave.
                    Reach me: vcfblackhole _at_ protonmail dot com.

                    Comment


                      #11
                      Many of the shortcomings were eventually fixed.... with EISA. It supported level triggered (shared) interrupts along with proper bus mastering. Too bad it was so expensive it never really caught on. The only thing it had going for it over Microchannel was backwards compatibility with ISA cards.

                      Comment

                      Working...
                      X