Mail Archives: djgpp/1999/09/09/14:48:04
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 -