delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/16/19:16:23

From: Fabrice ILPONSE <fabrice AT trash DOT lip6 DOT fr>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: VESA 1.2 Problem
Date: Tue, 16 Dec 1997 09:56:42 +0100
Organization: Universites Paris VI/Paris VII - France
Lines: 52
Message-ID: <3496424A.66D4@trash.lip6.fr>
References: <3492C4EC DOT AD434EF0 AT juno DOT com>
NNTP-Posting-Host: asim.lip6.fr
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Dean Kusler wrote:
> 
> I'll get to the point. I'm programming a game using VESA 1.2. I write
> all of my graphics to a memory buffer, and copy them to the screen when
> it's ready. My problem is, I can't afford to check every single pixel
> for a change in bank. I need some kind of routine that will copy the
> memory buffer to the screen as fast as possible, without having to do as
> many tests for changing banks. Any help would be appriciated.
> 
> Fellow programmer,
> Dean Kusler
Hi!
	this question has already been asked if the buffer represents all the
screen! :|
	it's very simple.

	L is the bank size in bytes.
	X,Y is screen size

	b=0
	t=X*Y;
	index=0
	while (t>=L)
	{
		set bank(b)	
		for (i=0;i<L;i++)
			screen[i]=buffer[index++]
		b++;
		t-=L;
	}
	set bank(b)
	for (i=0;i<t;i++)
		screen[i]=buffer[index++]

	it's very easy to code in asm.

	if the buffer is a part of the screen, i've done it but i don't at it
at now and i even don't remenber how i do it!! :)

	In fact, i think, each line are plot in two step. for the first step i
calculate the number of points to plot before changing bank and the
second is the rest of points to plot. Most of the cases, the second part
do not plot any point. (if your in this case, say it and i will explain
it more deeper) 	
-- 
	^ ^ ^
	| | |
	+-+-+	Fabrice ILPONSE
	  |	<fabrice AT asim DOT lip6 DOT fr>
	  |
	  |
	  -

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019