Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!zephyr.ens.tek.com!gvgpsa!gold.gvg.tek.com!grege From: grege@gold.gvg.tek.com (Greg Ebert) Newsgroups: comp.sys.ibm.pc.hardware Subject: GATEA20, RESTART, and related nightmares (3/3) Message-ID: <1834@gold.gvg.tek.com> Date: 4 Jan 91 21:36:23 GMT Organization: Grass Valley Group, Grass Valley, CA Lines: 35 Fast GATEA20 can be emulated with a PAL sitting next to the keyboard controller. Here are the essentials. The GA20 function is performed by a two-byte instruction to the keyboard controller. The first byte is (I think) a D1h written to port 64h. The next byte is the value. Currently, there are only 2 bits defined: GA20 and Restart. Writing the Restart bit is ridiculous because if written low, the CPU is locked into reset until power is removed (or if you have a hardware reset switch). What you need to do is 'block' all incoming 'D1' commands to the keyboard controller, AND emulate them externally. To block the D1 command, you need to decode data of D1h being written to port 64h, and disable -XIOW to the 8742 controller. You must ALSO block the next -XIOW *only* if it is to port 60h; a subsequent write to 64h is an 'abort' and MUST be issued. Secondly, after you detect the D1h@64h, you need to latch data bit 1; this is the GATEA20 signal. Finally, you need to connect this signal to the 8742 (pin 21 I think) so it can be queried by software. While you are at it, you might want to implement 'FAST RESTART' by intercepting 1111xxx0 (binary) being written to port 64h. Whenever you see this condition, yank the RESTART line for a few microseconds. That's it !!!! ----- Boycott redwood products ---------------------------- Recycle ----- "Thou shalt abide by The GNU Manifesto" ##### {uunet!tektronix!gold!grege} Register to vote, then ## | ## grege@gold.gvg.tek.com vote responsibly # | # # /|\ # Support high oil prices, waste tax $$ on war, evade domestic #/ | \# problems, and die young on foreign soil- Just say YES to Bush #######