Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!mordor!lll-tis!ames!ucbcad!pasteur!ucbvax!cbosgd!ihnp4!homxb!largo From: largo@homxb.UUCP (J.BAKER) Newsgroups: comp.sys.att Subject: Re: 6300 graphics and EGA cards Message-ID: <1392@homxb.UUCP> Date: 20 Jan 88 16:19:32 GMT References: <1037@bakerst.UUCP> <9300048@bradley> <835@ur-tut.UUCP> <2870@homxc.UUCP> Organization: AT&T Bell Laboratories, Holmdel Lines: 54 In article <2870@homxc.UUCP>, rps@homxc.UUCP (R.SHARPLES) writes: > > The new card is essentially a multifrequency graphics card > that supports CGA, EGA and AT&T's 640 x 400 modes. Installing > it in a 6300 is just as problematic as installing any other > EGA card - you still have the 16bit word order problem (when > transmitting a 16 graphics instruction to the card on the 8 > bit bus, it must be sent as two 8 bit words. Problem is > which to send first? We send the 8 high bits then the 8 > low bits, IBM sends the the low bits then the high bits. For > some reason, fixing this on the 6300 was "not possible". > The 6300 Plus uses the same word order as the IBM standard.) > On the IBM, byte order is determined by the INTEL 8088 which does the muxing for you. It writes all 16-bit words (1 byte at a time) in double write cycles because of the 8-bit bus. The 6300, of course, uses a 8086 which can take advantage of its 16-bit bus when writing a word to an even address--it uses one write cycle. Now, in this case we've got to get our 16-bit word onto the bus converter's 8-bit bus so we can be compatible with the wealth of IBM XT standard expansion boards. The problem, which byte to send first, is answered by *looking* at the 8088 bus timing. Strangely enough, the pc6300 bus converter does it in descending address order. First the high byte goes to the word address + 1, then the low byte follows to the word address. I believe the design is Olivetti's as is the decision to fix or not to fix. The reason EGA loves this is because of its 'hybrid' register design. EGA has pairs of 'ports' (select, value) which allows the software to write to a number of EGA registers through the same port pair. First, write a number to 'select' to select the desired register, then write the desired number to 'value'. Software wizards (I guess there are a lot of them at Microsoft) noticed that a few ASM instruction could be saved by loading AL with 'select' and AH with 'value' and using a 16-bit OUT instruction. Of course they are assuming, and rightly so, that the low byte is sent during the first cycle (as 8088). Since the EGA port pairs start at even addresses, when the 16-bit OUT instruction is executed on the 6300, the bus converter sends the 'value' byte during the first cycle and the 'select' byte follows. Guess what, it doesn't work. For now software with this problem can be patched by replacing OUTW with INT 3 and writing an interrupt handler to output the bytes in the correct order. If all software developers would stop using OUTW in EGA S/W then life would be bliss. j baker All technical corrections are appreciated.