🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #2753

Re: How to detect in which mode a Hercules card is.

#2753
From: Bob Davis
Date: Mon, 22 Oct 1990 23:04
42 lines
2617 bytes
In article <2306@wn1.sci.kun.nl> ose21@sci.kun.nl writes:
>Hi there,
>
>Can someone tell me how to determine whether a Hercules Graphics Card is
>in text mode or in graphics mode? (not looking at the screen :-) ).
>

Hello, John:

	There is a technique used by Alan Groupe in his Hercules
Print Screen (HPRTSC) program. He attributes the technique to a
program given him by Hercules.
	The technique exploits the fact that Hercules (and true compatibles)
cards have a Light Pen Port on them. And that when Vertical Retrace occurs,
the offset into Video memory differs for Text and Graphics Modes. The
program thus watches for Vertical Retrace to occur and then immediately,
through software, artificially "Triggers" the (usually-nonexistent) Light 
Pen whose circuitry grabs and stores the Video memory offset at the faked 
"Trigger" time. One then has only to read the offset at which the "Trigger"
occurred to know whether the mode is Text or Graphics.
	For assembly language details of this technique, fetch from 
Simtel [26.2.0.74] by anonymous ftp, Alan Groupe's program to print Herc
graphics screens:

	PD1:<MSDOS.SCREEN>HPRTSC.ARC

	
(There was a bug in this program, BTW, that made it double space
 instead of single spacing during graphics screen dumps to my
 Epson printer. If you have the same problem, I could tell you what I
 had to do to make it work. THIS PROBLEM WAS NOT IN THE CODE TO
 DETERMINE WHETHER THE CARD IS IN GRAPHICS OR TEXT MODE, THOUGH).

	Good luck,
	Bob.

______________________________________________________________________________
Bob Davis, UofALA'66   \\ INTERNET : sonny@trantor.harris-atd.com  |  _   _  |
Harris Corporation, ESS \\    UUCP : ...!uunet!x102a!trantor!sonny |_| |_| | |
Advanced Technology Dept.\\ AETHER : K4VNO          |==============|_/\/\/\|_|
PO Box 37, MS 3A/1912     \\ VOICE : (407) 727-5886 | I SPEAK ONLY | |_| |_| |
Melbourne, FL 32902        \\  FAX : (407) 729-2537 | FOR MYSELF.  |_________|
Technical Details
Message-ID: <4626@trantor.harris-atd.com>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!wuarchive!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!trantor.harris-atd.com!charybdis!sonny
References: <2306@wn1.sci.kun.nl>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!wuarchive!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!trantor.harris-atd.com!charybdis!sonny
From: sonny@charybdis.harris-atd.com (Bob Davis)
Newsgroups: comp.os.msdos.programmer
Subject: Re: How to detect in which mode a Hercules card is.
Keywords: hgc hercules graphics text mode
Message-ID: <4626@trantor.harris-atd.com>
Date: 22 Oct 90 23:04:32 GMT
References: <2306@wn1.sci.kun.nl>
Sender: news@trantor.harris-atd.com
Reply-To: sonny@trantor.harris-atd.com (Bob Davis)
Distribution: comp
Organization: Advanced Technology Dept., Harris ESS, Melbourne, FL
Lines: 42