Board index » delphi » Does egavga.bgi not work on FAT32?

Does egavga.bgi not work on FAT32?

I have an old Turbo Pascal 4.0 program that runs fine off of an old CD that
I made when I archived my Win 3.1 computer in 1997. It fails, however, when
I try to copy the files to my hard disk and run. I tried fussing with the
memory settings and whatnot, to no avail. Burning the files to a new CD also
fails; but duplicating the original CD works (as expected).

The error I get is "Graphics Error. Hit Any Key To Continue." I'm pretty
sure that this message is coming from the EGAVGA.BGI file.

Can anybody suggest what I might do to get this thing to work from my hard
disk? Are there new improved .BGI files that I can get that might fix it?

Thanks,
Paul

P.S. Can anybody recommend a Pascal to C (or C++) converter?

 

Re:Does egavga.bgi not work on FAT32?


Quote
Paul Bolten wrote in message...
> I have an old Turbo Pascal 4.0 program that runs fine off of an old
CD that
> I made when I archived my Win 3.1 computer in 1997. It fails,
however, when
> I try to copy the files to my hard disk and run. I tried fussing
with the
> memory settings and whatnot, to no avail. Burning the files to a new
CD also
> fails; but duplicating the original CD works (as expected).

> The error I get is "Graphics Error. Hit Any Key To Continue." I'm
pretty
> sure that this message is coming from the EGAVGA.BGI file.

> Can anybody suggest what I might do to get this thing to work from
my hard
> disk? Are there new improved .BGI files that I can get that might

fix it?

Hi Paul,

Did you try the program copying the program to a floppy disk to see if
that would work?

I've done some with Turbo Pascal 5.5 which seem to work on a FAT file
system no worries & like Version 4 that too pre-dates FAT 32 (I
think!).

From what I know (which ain't much) the '.BGI' file would be like a
'.TPU' in which I would of thought of as a Binary file that is unique
to the Turbo Pascal compiler.

Reguards,
Ross.

Re:Does egavga.bgi not work on FAT32?


What path does your programm assume, when calling INITGRAPH? You didn't
set one there, did you?

Greetings

Markus

Re:Does egavga.bgi not work on FAT32?


Quote
"Markus Humm" <markus.h...@freenet.de> wrote in message...
> What path does your programm assume, when calling INITGRAPH? You
didn't
> set one there, did you?

In my case? (or Paul's).

In my case I found if I've kept the path clear & put the '.BGI' file
in the same directory then there shouldn't be any hassles. However any
of the Turbo Pascal compilers would of been written prior to FAT32 so
any of the programs compiled using it & addressing other files
(particularly in other directorys) may cause some problems (I should
imagine).

Floppy disks on the other hand would probably work since the 1.44 /
1.2 / 720 / 360 etc have been around longer especally if all the files
are kept together. If a program is too large (which I'm assuming it's
not) for a disk then I suppose there's no way of telling if it would
work. Another suggestion would be to get out of Windoze by simply
booting DOS or (shut down to DOS) & do all the copying there.

Reguards,

Ross.

Re:Does egavga.bgi not work on FAT32?


Markus,

Thanks for taking the time to even think about my problem. Here is the code
that initializes the graphics. At this point this code is entirely foreign
to me (I wrote the program 15 years ago and have been coding in C/C++ ever
since).

Graphresult is not returning grok. It works fine from my old CD but fails
from my HD and from Floppy. Basically I can't copy it anywhere and have it
run.

Thanks,
Paul
---------------------------------------------------------------------
  errcode:=0;
  gd:=detect;  { init graph will now detect what graphics driver }
  initgraph(gd,gm,'');
  errcode:=graphresult;
  if errcode=grok then begin
    setbkcolor(black);
    case gd of
      cga,mcga,att400:begin
            setgraphmode(1);
            grfileextension:='.cga';
          end;
      ega,vga:begin
            setgraphmode(0);
            grfileextension:='.ega';
          end;
      else begin { unsupported graphics type }
        textmode(bw80);
        writeln('Graphics Type Not Supported.  Hit Any Key To Continue.');
        rdkey;
        halt;
      end;
    end; {case}
  end else begin
    textmode(bw80);
    writeln('Graphics Error.  Hit Any Key To Continue.');
    rdkey;
    halt;
  end;
---------------------------------------------------------------------------

Re:Does egavga.bgi not work on FAT32?


Quote
Paul Bolten wrote:
> Markus,

> Thanks for taking the time to even think about my problem. Here is the code
> that initializes the graphics. At this point this code is entirely foreign
> to me (I wrote the program 15 years ago and have been coding in C/C++ ever
> since).

> Graphresult is not returning grok. It works fine from my old CD but fails
> from my HD and from Floppy. Basically I can't copy it anywhere and have it
> run.

> Thanks,
> Paul
> ---------------------------------------------------------------------
>   errcode:=0;
>   gd:=detect;  { init graph will now detect what graphics driver }
>   initgraph(gd,gm,'');
>   errcode:=graphresult;
>   if errcode=grok then begin
>     setbkcolor(black);
>     case gd of
>       cga,mcga,att400:begin
>             setgraphmode(1);
>             grfileextension:='.cga';

I don't know the meaning of the line above...
Why not simply
gd:=detect;
initgraph(gd,gm,'');
errorcode:=graphresult;
if errorcode <> grOk then
begin
   writeln('error...');
   exit;
end;

and then just do your graphics?

Why setgraphmode and grfileextension which is totally unclear to me...

Greetings

Markus

Other Threads