delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/09/14:48:04

Message-ID: <37D7963D.34570B30@swipnet.se>
From: Anders David Skarin <hobbit AT swipnet DOT se>
X-Mailer: Mozilla 4.5 [en] (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Does Allegro BLIT really convert between colordepths
References: <37D6C6F0 DOT 682D33AA AT swipnet DOT se> <37D6CDAB DOT E3DB7091 AT swipnet DOT se> <kGJB3.14194$ei1 DOT 28204 AT newsfeeds DOT bigpond DOT com>
Lines: 116
NNTP-Posting-Host: 130.244.210.174
X-Complaints-To: news-abuse AT swip DOT net
X-Trace: nntpserver.swip.net 936875772 130.244.210.174 (Thu, 09 Sep 1999 13:16:12 MET DST)
NNTP-Posting-Date: Thu, 09 Sep 1999 13:16:12 MET DST
Organization: A Customer of Tele2
X-Sender: s-437261 AT dialup210-3-46 DOT swipnet DOT se
Date: Thu, 09 Sep 1999 13:13:01 +0200
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Sorry for being rude to about every person
I have spoken to the last few days. I've been in
a really bad mood.

Actually I did expect something like 150-250fps.
Thats what my code achieves, but the problem 
with my code is that it only works/worked correctly
on one of my machines. So the code was fast, but
sadly buggy.

I don't think this is to much to ask for on a 
pII400. All other VESA code on other compilers
will do 200fps on my machine. I'm not sayin that
Shawn Hargreaves has done a bad job. He stuck to 
the rules and the code is probably stable.

But I must get more that 50fps out of the flip. 
So I tried doing it in ASM with nearptrs, here
is a code that won't work.

C PART:

__djgpp_nearptr_enable();		// The code that once worked didn't do this

VBE_PTR = (long)(VIDEO_PTR + djgpp_conventional_base);

_flip( (long)(screen),320*240);			// screen is just pointer to a struct
containing 32bit ARGB 
						// and width/height
__djgpp_nearptr_disable();


ASM PART:

// I don't use the following code, it's just to show the problem.
// I'll be happy to share the code if I get it to work.

_flip__Fll:		
												
	push 	ebp
	mov	ebp,esp

	push	eax
	push	ecx
	push	edx

	push 	edi
	push	esi

	mov	esi,[ebp + 8]			; 32 bit Screen, this is correct (I can do
clearscreens)
	mov	ecx,[ebp + 12]			; Nr of pixels
	mov 	edi,[_VBE_PTR]			; SCREEN Ptr	(this is really messed up)
	add	esi,4				; This is to skip width/height in the struct


LOOP1:

	mov		eax,[esi]
	ror		eax,8
	stosb
	ror		eax,16
	stosb
	rol		eax,8
	stosb
	add 	esi,4
	stosb
	loop	LBL_f24bppBGR

	pop		esi
	pop		edi
	pop		edx
	pop		ecx
	pop		eax

	mov		esp,ebp
	pop		ebp
	ret






Johan Venter wrote:
> 
> Anders David Skarin <hobbit AT swipnet DOT se> wrote in message
> news:37D6CDAB DOT E3DB7091 AT swipnet DOT se...
> > Woops... ..just found out that Allegro flips
> > a 320*240 24bpp virtscreen to the screen at
> > 50fps... .which is about 1/6 of what I expected..
> > ..so I'll drop allegro and keep on bombing this
> > newsgroup with nearptr questions.
> >
> > Sorry if this message seems rude to Allegro..
> > ..I'm sure it will do great with all the
> > hardware blits and stuff supported.
> 
> What? 1/6 of what you expected? How do you expect Allegro to blit at 300fps?
> Your nearptr code will not do any better than 50fps (if even that). If you
> can do better, I'd be surprised.
> 
> And regarding your other posts, you won't (don't want to?) post your
> assembly code that you say keeps crashing. How do you expect us to help if
> you if you won't post the code?
> 
> BTW, VESA programming in DJGPP is not difficult at all. Look at the DJGPP
> User's Guide on the homepage (http://www.delorie.com/djgpp/) for a couple
> great articles written by Shawn Hargreaves about VESA programming.
> 
> Cheers,
> 
> --
> Johan Venter
> ICQ 3643877
> surf.to/djgppig

- Raw text -


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