Vintage 1991.
To stop it from clearing the screen upon exit in dual-screen mode:
------------------------------------------------------------------
In the stock version, Shell works OK, but QUIT switches to text on CGA,
and when you hit 0 it returns to Mono.

This driver is apparantly reloaded every time ACAD starts.
It is packet mode, at INT 7Ah.  PE-PO works in ACAD, but shows INT 7Ah=0
(INT 7Ah is at 0:1E8h).
Routines are requested by ACAD in packets; see the vector tables.
7D0-7DDh are for rendering only.

Packet 1st word  1	PINIT		Packet mode init after Int mode init
					 At 3690 the fields are filled in.
		 2	PTERM		exit graphics
		14d	PTPROMPT	dual-screen, move crsr to prompt line
		17d	PGOTEXT		1-screen, flip to Text screen & CLS
		18d	PGOTEXTU	1-screen, flip to Text scrn & show text
		20d	PWRSPLIT	displ char in text scrolling area
		35d	PBSHELL		begin SHELL command
		36d	PASHELL		SHELL complete
There should be no single-screen functions.


The guilty screen-clearing is called in routines at

 380B (383D Call, 5 bytes)	Func 2, PTERM (Exit Graphics)
	NOP'ed, QUIT stays on Mono but hi-res is mode 3 garbage, and
	Shell makes hi-res garbage in mode 3, cannot redraw.

 3D21 (3D26 Call, 5 bytes)	Func 17 & 18, PGOTEXT/U (flip to & CLS/show)
	NOP's make no change whatsoever, but:
	Both above NOP'ed, WORKS !


 4A96 (sets mode 12h, 640 X 480)
 4C2E (sets mode 3 then 12h then from mem)
 5744 (sets 12h)
 57D3 (sets Mono w/o CLS; NOP'ed puts all text on hi-res)
 (Re-Sourc addr's; in FileMod, will be 200h higher)

Another mode set is at 7591, called at 4ACD, 4C52, 5761
It sets mode from mem locn, presumably as set by user.


INT 10h calls at:			If NOP'ed out:
-----------------			--------------
7588h	get mode
7599	set mode, from [EBP+8]		Text OK on Mono, graphics on SVGA but
					garbage.  QUIT still puts text on VGA.
75B4	get mode

>>75C0	set mode, from [EBP+8]		graphics on Mono as garbage,
This is __GuiltyModeChange__		opening text shows on SVGA in hi-res.
(called 7 times)

Just patching it to always go to mode 62h puts the text on the SVGA screen,
in random places, and caused a disk error w/clunk !
Proves this is NOT where mode 62h is set.

783F	CLS, and
7849	move crsr to upper left
8660	set palette
8691	Set mode 70h (32K color)			no effect
86AA	Set mode 5Dh = 640 X 480, 256 color		no effect
8771	Set mode 74h = 640 X 480, 32K colors
878A	Set mode 5Dh					no effect
8822	Set mode 76h = 800 X 600, 32K colors
883B	Set mode 5Dh					no effect

--------------------------------------
10/10 To make it work on the Trident Blade 3D 9880 AGP card 9 years later:
The Setup/Config routine reported the card was an 8900 with 256K and so
only allowed 800 X 600.
It picks up settings from ACAD.CFG so it was possible to fudge ACAD.CFG so
it works in single-screen mode at 1K X 768.  But menus are 4 lines too long!
If you use no Command Prompt area, there is no feedback when you enter
numbers.
Found 755C GetRAMsizeToAL returns lo bits 00 instead of 11 !
Patched to Mov AL,00000011b = 3; byte at 7568h was 24h, now B0h - FIXED
Remember in Filemod, 755C is at 775C.
Byte pattern is now BA D4 03 B0 1F EE 66 42 EC B0 03


Single screen modes are OK.
But in dual-screen nothing shows on the Mono and text appears as small garbage
on SVGA screen and chunks of the Menu appear in random places when you draw,
after the text screen has filled 25 lines (?).

***Later discovered it's the damn AMI BIOS, probably the card is just fine!!

In ACAD when you shell to PMS it DOES show on the Mono screen and exits back
to ACAD fine.
But SHELL shows as garbage on the Color screen, like the command prompt text.
With the older v1.1 RCPTVGA, after doing a SHELL the top half of the screen
scrolls up when you REGEN.
It's not QEMM or PMS or previous changes.

With the MS memory manager, Int 10h vectors to 0001 1E38
With QEMM, Int 10 is at D372:2CB8 = 000D 63D8

SetNewMode3C5_0E is at 754B, called at 2BD1 and 2C61; reads from 3C5.B.
The Init routine is at 334F
Entry point is RealStart at 88DA
The ACAD Config stuff is around 2A00
At GetHdwInfo 752E it sets 3CF.06 for 64K mode but does NOT set lo 2 bits
 (see p 70 in Trident booklet)

pmodes bit 2 (value 4) is 0 for dual screen and 1 for single screen

Register diff's from the 8900 to the 9880 chip:
3CF.0E, bank select
3C5.0E bit 5 (now 3C5.0C selects 2 or 1)

Could be ACAD is writing to the wrong screen, maybe due to NFG video
BIOS Int 10h that ignores Mono, if ACAD switches to Mode 7 to write.
Note NOPing the Mode 7 set at 57D3 puts text on the graphics screen, but
NOPs at 57D3 to force set mode 7, no effect.

Our Func 20d could be failing to remain 'silent', but it seems to do nothing
in dual-screen mode.


---------	 PWRSPLIT (20)	First word is 20d=14h	---------
instructs the driver to write the character pchar to the
text scrolling area of the graphics screen at the current position and move
one character to the right.  The driver should maintain a text
scrolling area position distinct from the text position used by other requests.

  struct pkwrsplit
	short	pfunc;		['short' means word]
	short	pchar;

Our hidden screen is maintained by ACAD (nonzero phidlines and phidcols in
response to PINIT (Func 1)); the driver only draws the character
on the graphics screen.  The Autodesk product will take care of saving it,
and presumably of displaying it on the Mono screen.
----------------------			-----------------------
Func 35d = 23h = Pbshell, start of SHELL command.  Driver does nothing.

Func 20d is at 3D61, DisplTextChar
It calls 5A30 CharToTextScrn with the character pushed.
5A30 calls 5A44 ShowTheChar with the char (?) pushed.
NOPing out the call or putting RET (C3h) at 5A30 are NFG.

DualScreenFlag is set in H034EB; read in H03584, H03625, etc

-----------

===>>>see MONOTEST.COM, the fucking AMI BIOS doesn't do Mono at all!
Resident intercept at boot for Int 10h func 0Ah, etc ?

Other Mono problems with the AGP card even after Mono initialized at boot:
Turbo Debugger is NFG in Other mode, just dead blank;
Switchmo and PostSVGA are NFG going from Mono to Color.
