Board index » delphi » about GraphiX 4.02

about GraphiX 4.02

Hello. I still got a problem - runtime #215 (yeah, i know - mathematic
overflow - almost rap ;-)))

This program:

program    Surfaces;
uses
              GraphiX;
begin
 InitGraphiX(ig_detect,ig_bank);
 SetModeGraphiX(800,600,ig_col32);
end.

Causes this:

Runtime error 215 at 0x00013ACB
  0x00013ACB  ROUNDPOWER2,  line 294 of gxcrtext.pp
  0x00027E12  SETMODEGRAPHIX,  line 1168 of gxgo32v2.ppi
  0x00035D4C  main,  line 6 of surfaces.pas
  0x0000206D

Why?
And another problem (some little bug) with documentation. I read about
TestModeGraphiX. But there is no function! (I thin it is IsModeAvailable or
something like that)

greets
Luke

BTW: Big thanks to Ruud Baltissen for sending me a GraphiX :-))) and other
stuff.

PS: sorry for my english :-(((

 

Re:about GraphiX 4.02


Quote
> Runtime error 215 at 0x00013ACB
>   0x00013ACB  ROUNDPOWER2,  line 294 of gxcrtext.pp
>   0x00027E12  SETMODEGRAPHIX,  line 1168 of gxgo32v2.ppi
>   0x00035D4C  main,  line 6 of surfaces.pas
>   0x0000206D

Might it be an idea to do an investigation on your own before asking your
question so you can try adding your own findings? Just go to line 294 of
gxcrtext.pp and line 1168 of gxgo32v2.ppi for example.

line 294 of gxcrtext.pp:
  dec(w);

w must be 0 to cause RE #215 (w is a dword)

line 1168 of gxgo32v2.ppi:
          hwascanline:=roundpower2(hwascanline);

OK, there is probably a bug in GX. Glad you reported it.
Can we tell anything more about it? hwascanline means hwa scanline, and hwa
stands for HardWare Acceleration (just read GX' docs). ig_detect causes GX
to search for a supported videocard. When found one it uses it, and else it
uses VESA etc. line 1168 of gxgo32v2.ppi is only executed when you not use
LFB (see the surrounding code). I guess you have a supported videocard (S3
maybe), but there is a bug in GX with respect to this videocard or hwa in
general in conjunction with the bank memory. Using ig_vesa instead of
ig_detect or ig_lfb instead of ig_bank could take away your problem, until
Michael has fixed the bug, and meanwhile you can continue your exploration
of GX.

KuifWare

Re:about GraphiX 4.02


Quote
> PS: sorry for my english :-(((

Your English is much much better the my Polish :)

Groetjes, Ruud

http://Ruud.C64.org

Re:about GraphiX 4.02


U?ytkownik "Ruud Baltissen" <Ruud.Baltis...@abp.nl> napisa3 w wiadomo?ci
news:987sjg$sbn2@sunsv007...

Quote
> > PS: sorry for my english :-(((
> Your English is much much better the my Polish :)

I don't think so... Your Polish is quite right :-)))

greets
Luke

Re:about GraphiX 4.02


Quote
> OK, there is probably a bug in GX. Glad you reported it.

That's why i posted it. I run the unit.

Quote
> Using ig_vesa instead of ig_detect or ig_lfb instead of ig_bank could take

away your problem,

Yes, I did it.

Thanks to all for help :-)

greetings
Luke

Re:about GraphiX 4.02


U?ytkownik "Kuifware" <kuifw...@hotmail.com> napisa3 w wiadomo?ci
Quote
> Might it be an idea to do an investigation on your own before asking your

question so you can try adding your

Quote
> own findings?

And by the way (my english are really poor - i can't read documentation as
well as i want to) - how to show surface onto screen?

greets
Luke

Re:about GraphiX 4.02


Quote
"ukasz Nowicki" wrote:

> U?ytkownik "Kuifware" <kuifw...@hotmail.com> napisa3 w wiadomo?ci
> > Might it be an idea to do an investigation on your own before asking your
> question so you can try adding your
> > own findings?

> And by the way (my english are really poor - i can't read documentation as
> well as i want to) - how to show surface onto screen?

To enable double buffering with gx/fp 4.0:

VAR GXSPrimary,GXSBack:PSurface;

  CreateSurface(GXSPrimary,gxsf_primary);  { create a primary surface -
it's the currently visible screen }
  EnableSurfaceFlipping(GXSBack,gxsf_videomem); { create another surface
in video memory }
  REPEAT
    {... do something ...}
    FlipSurface(TRUE); { flip surfaces,  TRUE = wait for vertical
retrace }
  UNTIL keypressed;
  DisableSurfaceFlipping(GXSBack);

Michael

--
    // Michael A. Knapp * Mauerbach-Nieder?sterreich-Austria-Europe //
   // E-Mail: mkn...@gmx.at                          ICQ: 36542787 //
  // G r a p h i X for Freepascal   http://graphix4pascal.cjb.net //
 // The Graphics Library for     http://www.graphix4pascal.de.vu //  
// DOS, Win32, Linux   http://programmierer.freepage.de/graphix //

Re:about GraphiX 4.02


Quote
"ukasz Nowicki" wrote:

> Hello. I still got a problem - runtime #215 (yeah, i know - mathematic
> overflow - almost rap ;-)))

> This program:

> program    Surfaces;
> uses
>               GraphiX;
> begin
>  InitGraphiX(ig_detect,ig_bank);
>  SetModeGraphiX(800,600,ig_col32);
> end.

> Causes this:

> Runtime error 215 at 0x00013ACB
>   0x00013ACB  ROUNDPOWER2,  line 294 of gxcrtext.pp
>   0x00027E12  SETMODEGRAPHIX,  line 1168 of gxgo32v2.ppi
>   0x00035D4C  main,  line 6 of surfaces.pas
>   0x0000206D

add {$R-} to gxglobal.cfg

{$IFDEF FPC}
  {$MODE OBJFPC}

  {$IFDEF GO32V2}
    {$DEFINE GO32V2LINUX}
  {$ENDIF}

  {$IFDEF LINUX}
    {$DEFINE GO32V2LINUX}
  {$ENDIF}

  {$ASMMODE intel}
  {$PACKRECORDS 1}
  {$I-}
  {$R-}   <<< put the {$R-} here
{$ENDIF}

Quote

> Why?
> And another problem (some little bug) with documentation. I read about
> TestModeGraphiX. But there is no function! (I thin it is IsModeAvailable or
> something like that)

the document source is 3000 lines long
so sometimes it happens that I over see something
yes it's now called "IsModeAvailable"

Michael

--
    // Michael A. Knapp * Mauerbach-Nieder?sterreich-Austria-Europe //
   // E-Mail: mkn...@gmx.at                          ICQ: 36542787 //
  // G r a p h i X for Freepascal   http://graphix4pascal.cjb.net //
 // The Graphics Library for     http://www.graphix4pascal.de.vu //  
// DOS, Win32, Linux   http://programmierer.freepage.de/graphix //

Other Threads