Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » DJGPP + Older Allegro compile problem!!!

This thread is locked; no one can reply to it. rss feed Print
DJGPP + Older Allegro compile problem!!!
Sparkyboy
Member #6,268
October 2005

Hi guys,
I've recently encountered a very strange thing indeed. I recently found a game that I had written back in about 1998 with djgpp for DOS. I wished to update the graphics in the datafiles so I downloaded and installed DJGPP and allegro 4.03 for MSVC++ v6 under Win XP.

Everything worked lovely and I used the grabber to alter the files.Everything ran with the new graphics, however, ALL the menu texts disappeared in the SVGA version, but not the VGA version.Very odd!!

So I installed DJGPP and various older versions of Allegro from 1999 back, on a seperate partition under win ME.

Now after trying to compile the various versions of allegro, each version bailed out but in different files.

Trying to compile Allegro V 3.12 I got this ( and more):

blit8.s : warning indirect call without '*'
error : junk at end of line first unrecognised character is 'm'
error : suffix or operands invalid for 'movs'

make.exe : **** [obj/djgpp/blit8.o] error 1

For Allegro v 3.0 this (and more):-

Allegro.c : missing initializer

make.exe : **** [obj/djgpp/allegro.o] error 1

Does anyone have any idea why older versions won't compile with the latest versions of DJGPP etc? Are the allegro files possibly broken, or these older files require earlier versions of gcc,gpp and bnutils?

Thanks for any assistance in this matter.

All the best

Mark.

ReyBrujo
Moderator
January 2001
avatar

I could compile 3.12 with Gcc 2.95.3. Any higher breaks the assembler part, so if you need to compile it, try to fetch yourself a 2.95.x version.

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

Matthew Leverton
Supreme Loser
January 1999
avatar

Quote:

Everything worked lovely and I used the grabber to alter the files.Everything ran with the new graphics, however, ALL the menu texts disappeared in the SVGA version, but not the VGA version.Very odd!!

Put simply: Allegro won't work with DJGPP under Windows XP. DJGPP compiles DOS applications that are not compatible with Windows XP, especially when it comes to hi-res graphics.

Quote:

So I installed DJGPP and various older versions of Allegro from 1999 back, on a seperate partition under win ME.

That should work, but you might be better off using an older version of DJGPP too. I don't know any reasons off hand why you would have problems with DJGPP under Windows 95/98/ME. [Edit: as ReyBrujo said above...]

Your best bet is probably just to download MinGW32 and try to get your application to work under that.

Sparkyboy
Member #6,268
October 2005

Thanks guys. The real puzzler though is that after changing both the VGA graphics and the SVGA graphics, it's only the SVGA version of the game that LOSES the menu text. The code is exactly the same (on startup it's just a choice between the 2 versions!), only difference is the fact that allegro initialises VGA at 320x200 or SVGA at 640x480 and of course, different graphic sizes in seperate files.

What I don't understand is that after using the grabber, both versions should LOSE text or neither!!!!!

Anyone got any ideas about that ???

Thanks

Mark.

BAF
Member #2,981
December 2002
avatar

VGA = 640x480
SVGA = 800x600

Other than that, i'd say try mingw.

Kitty Cat
Member #2,815
October 2002
avatar

VGA = 640x480
SVGA = 800x600

Huh? Standard VGA is 320x200x8 (or 640x480x4, but Allegro doesn't support 4-bit color), SuperVGA is just an "updated" VGA that can handle higher resolutions and color depths (but still work with lower). In either case, VESA 2 or higher is typically better than both.

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

Matthew Leverton
Supreme Loser
January 1999
avatar

Quote:

What I don't understand is that after using the grabber, both versions should LOSE text or neither!!!!!

I don't know how else to say it. DJGPP under Windows XP doesn't work. If you want to get your game up and running on Windows XP, you must use a Windows compiler like MinGW.

Sparkyboy
Member #6,268
October 2005

[QUOTE]
I don't know how else to say it. DJGPP under Windows XP doesn't work. If you want to get your game up and running on Windows XP, you must use a Windows compiler like MinGW.
[/QUOTE]

Mat, as I said earlier, I installed DJGPP AND MSVC++ 6 together and successfully compiled ALLEGRO 4.03 under Win XP!!

It was only when I altered the data files with the grabber that was produced, that the problem arose!!

I'm totaly baffled by this I can tell you!!

All the best

Mark.

P.S.
And the game runs fine (on my computer anyway) under Win XP.

ReyBrujo
Moderator
January 2001
avatar

The program will compile correctly with djgpp. However, djgpp tries to use direct access to the video. When you run a program under Windows XP, Windows will create a "shell" where it emulates what you are needing. This emulation may not be perfect, and makes your game run slower and, depending on which features aren't emulated, may not work correctly.

I am believing that, in SVGA mode, Windows XP does not emulate correctly all the functions Allegro needs, and so you lose text/images/data/etc.

Currently, only very few applications support Allegro+djgpp (MAME, in example). So, unless it is absolutely necessary for you to create a DOS executable (in example, you want to give it to someone who can only run DOS), it is fine. If you want maximun optimizations, switch to MinGW (it is exactly the same as DOS, you need to open a command prompt and compile with gcc), but your programs will use Windows drivers which are "safer", "faster" and "better".

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

Matthew Leverton
Supreme Loser
January 1999
avatar

Quote:

I installed DJGPP AND MSVC++ 6 together and successfully compiled ALLEGRO 4.03 under Win XP!!

It was only when I altered the data files with the grabber that was produced, that the problem arose!!

I got the impression that you have been using DJGPP to compile your EXE's. If you are using MSVC, there shouldn't be a problem. The easiest way to help troubleshoot would be if you posted your EXE and source for someone to look at.

Sparkyboy
Member #6,268
October 2005

Man I thought I'd put this in my first post, but it seems I didn't.My apologies Guys. The thing is:-

1) I no longer have the source, just the DOS exe and datafiles.

2) Before I altered the Graphics files with the Grabber produced from compiling with Djgpp,Visual C++ and ALLEGRO 4.03, the game ran with all text, both under win XP and ME. After the alteration, the text gets lost in the SVGA version ??????

This is why I'm trying to get a development environment similar ( if not the same as in 1998), just so I can get a different grabber program.

I will of course be totally rewriting the game in MSVC++ in the future, but at the moment, I don't have the time ( and this bug/problem is really causing me a headache and gotta sort it because it just doesn't make any sense to me.)I mean, how can the datafile created by a grabber program created in 1998 work correctly and yet the new grabber screws up NOT the graphics, but the 'C' code that displays text on the menus, and only in the SVGA version ??? ARRRRRRRRRRGH

All the best

Mark.

BAF
Member #2,981
December 2002
avatar

If you are just updating image files, grabber won't break text in a game. Did you screw up the font or the order of files though?

Sparkyboy
Member #6,268
October 2005

Hi Baf,

What I did was this:-

Made a backup first of each ORIGINAL datafile. Then I loaded each file in turn into the grabber, made a note of the graphics I needed to change. Then I exported each image to disk, after which I modified each image.I then simply ran grabber again, and replaced the old images with the updated images and saved out the datafiles.

Where it gets me completely baffled, is that when the game is run ( even under Win XP), the VGA version runs with the updated graphics AND leaves the menu text alone. The SVGA version though, runs with the updated graphics, BUT screws up the menu text.

Just to test, I switched back to the OLD datafiles, and both the VGA and SVGA versions ran with the old graphics and ALL nenu text intact.

I followed exactly the same steps for the VGA datafile and SVGA datafile, and touched nothing but the individual graphics!!

I have no idea what or why this has happened and am totally bemused ???

I've just done a total re-install of the game and ran the game in various combinations of datafiles, and the VGA version works as it should, where as the SVGA version seems to break my code as soon as I use the updated datafile for SVGA graphics!!!!!

EDIT!!!!

Guys,it HAS to be the GRABBER, I've just ran the SVGA version with the OLD datafile and it ran perfectly. So as a test, I ran the grabber, loaded the file into it and saved it straight back out. I didn't alter a thing......Guess what......YUP the TEXT has disappeared!!!!??????

All the best

Mark.

Matthew Leverton
Supreme Loser
January 1999
avatar

I don't think datafiles are necessarily compatible across all versions of Allegro. You should try using an older version of the grabber and see if that helps.

Another thing is to make sure is that you aren't re-ordering the datafile after saving it, because your EXE will be looking at hard coded locations for the data.

Sparkyboy
Member #6,268
October 2005

Hi Mat,

I'm trying to get an older version of Allegro compiled, but as yet, zippo!!!

To finally put it in a nutshell, as regards to compatabilities or whatever, can anyone explain why the game TEXT for THE VGA version works correctly after loading/saving the datafile with the new Grabber, BUT the game TEXT for the SVGA version DOES NOT!!!!!

I mean it has to be BOTH or NEITHER, not just one of them!!!

The funny thing is, that the GRAPHICS for both files are loaded and displayed correctly.......it's just I think the old 'TEXTOUT' funtion in allegro that screws up and ONLY in the SVGA version,and ONLY once the datafile is saved back out of the grabber.???

There is no re-arrangement,size alteration or whatever, it's merely a simple 'EXPORT IMAGE, ALTER IMAGE, PUT BACK IMAGE TO ITS ORIGINAL POSITION, SAVE FILE'.......Voila!!!!!

All the best

Mark.

Evert
Member #794
November 2000
avatar

Datafiles are backward compatible, but not `forward' compatible.
If you create a datafile with the 3.0 grabber, all versions thereafter will be able to read it (if not, it's probably a bug).
If you create a datafile with 4.0, then 4.1.x and 4.2 will be abel to read it, but 3.0 possibly cannot.

In other words, make sure that the version of Allegro you use to link your programme is the same or newer than the one that corresponds to the grabber.

Recompile your programmes with a recent version of Allegro (honestly, there's no reason at all to use 3.1) and see if that fixes it. If that doesn't help, post the datafile here. Although if the grabber can load and display the file correctly, then so should programmes using the same or newer version of Allegro.

Sparkyboy
Member #6,268
October 2005

Hi Evert,

To respond to your post.

1) I cannot re-compile the game as I no longer have the source.
2) The datafiles were produced with the Grabber from allegro v3.0+ wip in 1998( found this out by loading the exe into a hex editor)
3) I have 2 datafiles containing the game graphics. One file is used when you select the DOS VGA (320x200 mode 13h 256 8 bit colour) version of the game and the other is used when you select the DOS SVGA (640x480 VESA 3.0,2.0,VBE,VESA 1.0 256 8 bit colour).

Now when both these files are simply loaded into the grabber created with MSCV++ 6 and Allegro 4.03, it is ONLY the SVGA file that causes the 'TEXTOUT' command on the menus to FAIL!! The VGA file has no effect on the game code. It is this that I can't understand!!!

As I said earlier, either BOTH or NEITHER should cause the problem, wouldn't you say?

All the best

Mark.

Evert
Member #794
November 2000
avatar

Quote:

As I said earlier, either BOTH or NEITHER should cause the problem, wouldn't you say?

I wouldn't, without more information than I have. The difference can be due to any number of things.

Quote:

Now when both these files are simply loaded into the grabber created with MSCV++ 6 and Allegro 4.03,

Reread what I said: you cannot reliably load a datafile created with Allegro 4 with a programme compiled with Allegro 3. Use the 3.0 grabber to update your sourcefile.

Sparkyboy
Member #6,268
October 2005

Cheers Evert,

I've been trying to compile older versions of Allegro, with older versions of DJGPP and GCC with about as much success as a one legged man in an arse kicking competition!!!!;D

So here I stand on bended knee (ooooucchhh!!!)........;D

Would someone,somewhere,somehow who has Win 98 and Allegro 3.0 + wip(maybe 3.11 or 3.12 would work too), please,please and thrice please put an old man out of his misery and upload the grabber (plus any associated files) from that compile so that I may continue.:-*

What I will do once I have finished altering the graphics, is to send my saviour a copy of the finished article for his/her perusal.;)

Thankyou to anyone who takes the time to help.

All the best

Mark.

Edit:::::

It's OK guys, SORTED!!!!!!!!!!!!!;D

Go to: