which versions of djgpp and allegro
peter kenniphaas


Hi, I am a user of djgpp and allegro for 20 years by now.
I still use old versions: djgpp2.02 and allegro3.1 and dosbox0.74
on Windows XP. Yes it is true!

My question is: Which versions do I need for Windows 10 for
compatibility with my old source code ?

DanielH

The latest 4 should be still compatible as the API stayed fairly consistent.

Allegro 5 had a complete change of the API and would not work.

Edgar Reynaldo

Allegro 4.2.3.1 is the latest that includes DOS support for DJGPP and WATCOM

I can't get djgpp to run on Windows 10. I have it on C:\DJGPP and there is C:\DJGPP\cwdspmi.exe and it can't open c:\cwsdpmi.swp for writing because C:\ is write protected.

RmBeer2

The latest Allegro that work with Djgpp is 4.4.2 (maybe with patchs)?
It is recommended to compile from git source code.

Edgar Reynaldo

bad rmbeer. No, 4.4.2/3/x does not work with DOS. CMake does not support DJGPP.

peter kenniphaas

Ok, thanks for the advice, but I notice some contradiction in the replys.
It is confusing for me, because I never did download,setup and install
myself. There was always someone who did that for me.
Is it latest 4(DanielH), is it 4.2.3.1(Reynaldo) or 4.4.2(Rmbeer2)?
And how about djgpp version?

I am a Dutchman and do not always understand the terms(abbreviations)
that are used.
Other question. I need a new computer, should I stay with Windows?

greetings peter kenniphaas.

Edgar Reynaldo

Latest Allegro 4 will not work because CMake doesn't support DJGPP, maybe you can use the Watcom WMake generator though, so it is possible.

The build system was completely redone after 4.2.3 to use CMake. Earlier versions used make files. There is a make file for DJGPP which is why I said to use 4.2.3.1. rmbeer is incorrect.

I tried to get DJGPP to work on Windows 10, but as I said in another thread, C: is write protected and therefore cwsdpmi.tmp cannot be created, which is used by DJGPP. Maybe it would work on another drive, I haven't tried yet.

There is another thread you're probably interested in, which is here :
https://www.allegro.cc/forums/thread/618503

RmBeer2

4.4.2/3 work with DOS. I'm already use it for Djgpp and Windows. Also Djgpp have still support for the last Windows system.

Edgar Reynaldo

I don't believe you. How did you build allegro with an old broken make file for djgpp that doesn't include the addons? The build system was rewritten. There is NO DOS support in 4.4.2/3. All the assembly was removed and the djgpp make file was no longer maintained.

RmBeer2

Edgar Reynaldo:
I don't know what're you talking about. I can see all the ASM code from the git repository.
The only problem is that I lost the file all442.zip that came with djgpp.

Now you can found from:
https://github.com/liballeg/allegro5/releases/tag/4.4.2

Also you can check it from:

git clone https://github.com/liballeg/allegro5.git
cd allegro5
git checkout 4.4
cd src/i386
vim iblit32.s (or any other file)

Edgar Reynaldo

There is no build system for Allegro 4.4 with DJGPP. I'm not making this up. Either you're using an old makefile, or you wrote it yourself.

All the assembly was disabled, it's not used.

I challenge you to build Allegro 4.4.2 for DJGPP. Prove me wrong.

Your link points to source code, not binaries, because there aren't any.

RmBeer2

Edgar Reynaldo:
"you wrote it yourself."
;D, i want (All I have ever done here is copy their code and create new 'blit' functions for allegro).

At the time I did not download allegro binaries, I downloaded their source and compiled them with djgpp. All by default.

Now I could try dosbox, although your result is probably the same.

peter kenniphaas

peter kenniphaas again:

Rmbeer2 & Reynaldo:
I am starting to like you two, but your answer is still blowing in the wind.
I do not need latest version, do I? I am satisfied with the old ones.
and I just need to continue developing, programming and testing my AI-chessgame.
Can`t you send me a cd rom with everything on it like in old days?
Question worth trying.....(nice reward waiting)
Please help me..gr peter kenniphaas

RmBeer2

ok, I have already tried it in practice and nothing works with dosbox. So it's a DEAD END. They can forget about me. :/

Maybe somewhere in the future I can try qemu and DOS, or with FreeDOS on a new machine...

EDIT: i'm already tried with a older versions of djgpp and allegro. But don't work even djgpp. Only work my old binaries of old games.

Peter Hull

As far as I can see DOSBOX 0.74 will still run on Windows 10 so you can carry on doing what you're doing.
An alternative is to go to Allegro 4.4 and MingW-W64 which will run natively on Windows (as Daniel says, the Allegro 4.x API is similar to 3.x)
Or, you can go all the way to Allegro 5 - this will be a learning curve for you but you're more likely to find people to help you. Depends on how much code you've built up in the last 20 years...
Edgar's the expert, possibly the world's foremost expert, on setting up Allegro + MinGW !

Edgar Reynaldo

If you can find binaries you're good to go, but djgpp doesn't work on Windows 10 as far as I can figure out how to get it to work. The C:\ drive is write protected, and so cwsdpmi.swp can't be created, and djgpp refuses to create it anywhere else.

I tried running dosbox and cmd as administrator and no go either way.

If anyone can get djgpp running on Win 10, you should be able to build allegro 4.2.3 at least and maybe 4.4 with Watcom. I'm out of ideas.

Peter Hull

I found https://www.windowscentral.com/dosbox-windows-10 and others which suggested to me that DOSBOX does run on Windows 10, though I haven't tried it. DJGPP definitely won't run outside DOSBOX but should run inside, that's what Peter has been doing.

http://sandmann.dotster.com/cwsdpmi/ suggests it's possible to move the swapfile (using the -s command line option) - did this not work for you?

Edgar Reynaldo

Peter, thanks for your reply.

I never had any problems with DosBox (I am using DosBoxX) - it was just compiling with djgpp that wouldn't work. Every time I tried to run make for allegro it failed to create cwsdpmi.swp.

I will try your workaround and see what happens.

I changed the parameters for cwsdpmi using cwsparam program to move the swap file. This works, but make still segfaults and I can't build allegro.

https://www.allegro.cc/files/attachment/613046

EDIT
I'm going to try and compile make from sources and debug it.

Audric

Allegro 4 is mostly forward compatible with Allegro 3 - the only big exception I can remember is a function that ended up with a change of signature (textout_ex() as a remplacement for textout()?)

Most code written for DJGPP can be easily compiled using Mingw-gcc, since they both are ports of gcc.
A lot of stuff that you would think djgpp-specific are in fact gcc-specific, and thus implemented on all platforms
https://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html

The standards and default have changed a lot since DJGPP 2, so you probably want to compile your old code with -std=c89

I would suggest you try an easily-installed environment (Code:blocks maybe? It has a package system in order to get allegro 4.x), and see it compile an allegro 4 example.
It will let you see if such environment is familiar enough to justify the time investment of adapting the environment and your own code.

Edgar Reynaldo

I'm trying to build a debugging djgpp version of make but it's not working very well.

First of all configure is not an 8.3 filename, so it isn't recognized.

Second, builddos.bat chokes on a define.

DJGPP is looking like a dead dodo bird to me.

Do you need DOS support? Or are you just stuck in your ways? I would suggest MinGW-W64 as well. That will let you compile Allegro 4.4 or Allegro 5.2 for Windows. If you don't need DOS. just drop it.

RmBeer2

Allegro 5.2, I can only use it with 'cmake', but 'cmake' does not exist among Djgpp tools. Maybe I could just use 'make', but it's incompatible with the huge project I'm working on, I have also not managed to get it to work from 'make' for Allegro 5. :-/

It seems like it's being too troublesome, even for many programmers here.

Peter Hull

I tried a slightly different tack - FreeDOS on a VirtualBox VM. The latest DJGPP runs fine but fails to build Allegro 3.12 early on due to some linker errors. Fixable I guess but may be more trouble than it's worth. Next I will try Allegro 4.2.3.1, and as an alternative Allegro 3 + older DJGPP. But really this is a nerd rabbit hole - for Peter I recommend just continuing DOSBOX, or embracing the future and Allegro 4 or 5 + MinGW-W64. It depends Peter what you want to do, run old programs that you already have or develop new ones?

[append]
Possibly related for old-skool fans: https://github.com/mattiasgustavsson/dos-like ?

Edgar Reynaldo

No matter what I do, make segfaults. Ich bin ein berliner.
https://www.allegro.cc/files/attachment/613050

https://www.allegro.cc/files/attachment/613051

Peter Hull

I had some success with VirtualBox + FreeDOS and Allegro 4.2. I took the DJGPP files from https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/group-devel.html rather than from DJ's site, because those gave me a SIGSEGV when running make, similar to yours Edgar.

{"name":"613052","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/1\/0\/103de59d2531f5a295972c187ee30aaf.png","w":668,"h":468,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/1\/0\/103de59d2531f5a295972c187ee30aaf"}613052

Honestly I wouldn't recommend this, feels like constantly fighting ten years plus of obsolescence. Better to move onto the latest I'd say.

Edgar Reynaldo

make 3.7 is sort of working.

This is going to take hours to compile allegro inside dosboxx

EDIT
There are major memory and cpu problems. make is probably running out of memory

peter kenniphaas

First I want to thank everybody for the time and effort to help me out.

It is not easy for me to formulate in English what I mean to say,
and what I am doing.
I am working on that, so I hope to contact you again in a couple of days
with a more clear message/explanation.

Greetings, peter kenniphaas.

Edgar Reynaldo

Greetings Peter K.

translate.google.com may be able to help you get your message across.

I think so far, Peter Hull has had the best success. Try FreeDOS in a VM. If you get it working there, it should work in DosBox too.

Thread #618509. Printed from Allegro.cc