🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.msdos.programmer
Article #4

Re: Direct SVGA memory access

#4
From: Stefan Hartmann
Date: Thu, 20 Aug 1992 20:02
97 lines
3237 bytes
In <1992Aug20.141357.20611@alw.nih.gov> gregh@alw.nih.gov (Gregory Humphreys) writes:

>Okay.  I want to write to SVGA memory without using BIOS calls on my 486.  I can do it great with int 10, but it's slow as all hell.  What is happening is after I calculate the address for the VRAM, everything is getting modded into the top 64k of VRAM (one display pages worth, I guess).  Imagine the 1024x768x256 screen sectioned into 12 horizontal bars, and anything that you write is put into the TOP one.  ANyhow, I think this is because I'm not changing display pages.  So I tried Three things:

>1)

>void Plot(x,y,Color)
>int x,y,Color
>{

>	int Page
>	long offset;
>	char far *address;

>	Page = y/64;
>	outport(0x3CD,Page);

>	offset = 1024*y + x;
>	address = (0xA0000000L + offset);
>	*address = Color;
>}


>2) 


>void Plot(x,y,Color)
>int x,y,Color
>{

>	int Page
>	long offset;
>	char far *address;
>	char far *PageAddress;

>	Page = y/64;
>	PageAddress = MK_FP(0000,0x462); /* The Low Memory address of the current
>						Page Number */

>	*PageAddress = Page;	

>	offset = 1024*y + x;
>	address = (0xA0000000L + offset);
>	*address = Color;
>}

>3)

>void Plot(x,y,Color)
>int x,y,Color
>{

>	int Page
>	long offset;
>	char far *address;
>	
>	Page = y/64;
>	
>	_AH = 5;
>	_AL = Page;

>	geninterrupt(0x10);

>	offset = 1024*y + x;
>	address = (0xA0000000L + offset);
>	*address = Color;
>}
>	
>The Third one at least gave me some results - everything I had drawn got moved to the bottom half of the screen and above it was about 300 horizontal blue bars that flickered a lot.  Any ideas?  This is a Trident 8900 card w/ 1 meg VRAM on a 486/33 using Borland C++ 3.0.  HELP ME DAMMIT!  Can you tell I'm frustrated? YES!!!!


>-- 
>Greg Humphreys    |  "Playing not to win is like sleeping with your 
>gregh@alw.nih.gov |  sister - sure, she's a great piece of tail, 
>                  |  and she's got a bag full of goodies, but it's 
>(301) 402-1817    |  just plain illegal."  -Charlie Sheen, "Hotshots"

Hi,
get yourself VGAKIT41.ZIP  ! it is a driver library for all SVGA cards
in 256 color modes.
So if you includes these drivers into your program, it will work on
the most standard SVGA cards..

It is available on some FTP-servers. Just ask archie. It is ASM and
C-Source-code. Also there is VESAVGA.ZIP a vesa driver library.

Best regards Stefan Hartmann.
email to: leo@zelator.in-berlin.de


-- 
 
*************************************************************
*  Stefan Hartmann       This is how to contact me:         *
*  EMAIL: leo@zelator.in-berlin.de                          *
*  Phone : ++ 49 30 344 23 66      FAX : ++ 49 30 344 92 79 *
*************************************************************
Technical Details
Message-ID: <FU952LI@zelator.in-berlin.de>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!Germany.EU.net!news.netmbx.de!zelator!leo
References: <1992Aug20.141357.20611@alw.nih.gov>

Show Full Headers
Complete Article Headers
Newsgroups: comp.msdos.programmer,comp.graphics,comp.sys.ibm.pc.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!Germany.EU.net!news.netmbx.de!zelator!leo
From: leo@zelator.in-berlin.de (Stefan Hartmann)
Subject: Re: Direct SVGA memory access
Organization: Puplic-Access-Xenix-System
Date: Thu, 20 Aug 92 20:02:29 GMT
Message-ID: <FU952LI@zelator.in-berlin.de>
References: <1992Aug20.141357.20611@alw.nih.gov>
Lines: 97