Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!bloom-beacon!usc!elroy!ames!amdcad!diablo!phil From: phil@diablo.amd.com (Phil Ngai) Newsgroups: comp.sys.ibm.pc Subject: Re: Protected mode and PC/XT cards Message-ID: <25937@amdcad.AMD.COM> Date: 12 Jun 89 18:48:44 GMT References: <158322@neabbs.UUCP> <111700101@uxa.cso.uiuc.edu> Sender: news@amdcad.AMD.COM Reply-To: phil@diablo.AMD.COM (Phil Ngai) Organization: Advanced Micro Devices, Inc. Sunnyvale CA Lines: 54 In article <111700101@uxa.cso.uiuc.edu> mms00786@uxa.cso.uiuc.edu writes: |I am a summer intern designing an I/O card for the AT. In other words, I am |supposed to respond to the -IOW and -IOR signals. In looking through the |IBM AT Hardware Tech. manual, I noticed that in their Prototype board, they |decode only A0 through A9 (for a total of 1K io channels). But I am under the |impression that the '286 (and the 8086, 8088 etc) all have a possible 64K of |IO space. This is true, the iAPX family have a possible 64K of IO space. However, on the PC bus this space is not available in a straightforward way. |their bus controller generates IOW and IOR only for the bottom |1K. No, this is not the case. The motherboard has IO devices on it and they are only decoded within a 1 Kbyte range. (think about the implications of this) If you happen to need a big chunk of address space, then you can get it by decoding the address lines above 1Kbyte and making addresses that appear "aliased" to the motherboard actually unique. Here's an example. Assume you need 256 bytes or so of IO registers. You can't get a chunk of 256 contiguous bytes between 0 and 0x3ff. Pick a range of 256/(64K/1K) = four bytes within that range, say from 300 to 303. Build your logic to respond to 300-303*(n*400). This will give you 256 bytes in a weird way, but this is how you have to do it on the PC bus. I'll list the first few addresses assuming a base of 300: 300 301 302 303 700 701 702 703 a00 a01 a02 a03 ... Why this works, the implications, and how to write software for it are left up to the reader. Here's a important hint to hardware hackers: the amount of delay through your ready logic is VERY important in some clones, if you need wait states. I have found some clones that only worked with ONE PAL delay and failed with just TWO! -- Phil Ngai, phil@diablo.amd.com {uunet,decwrl,ucbvax}!amdcad!phil "The government is not your mother."