Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » obsolescent

This thread is locked; no one can reply to it. rss feed Print
obsolescent
peter kenniphaas
Member #20,900
August 2021

Thanks Edgar and Peter for new suggestions.
I hope the following makes some sense.
In MS dos I compile and link my code into an executable.
Since 2012(new comp)I must use DOSBOX to run it, I still don`t know why,
but it is ok.
I know I need new versions, but my last project(since 2010)contains
about 350 functions with a total of 43000 lines of source code.
Almost every function contains calls like rect() circle() textout()
masked_blit() etc...that I need for testing.
Do they still exist in newer versions, or is it possible to adapt them
to new versions?

Because I soon need a new comp will it be wise to stay with djgpp and
allegro or is MinGW a better option for my project(human intelligence chess)?
and the many programs before 2010?

Hope to hear from you.
Peter K.

DanielH
Member #934
January 2001
avatar

Windows dropped DOS support early 2000s. Switch to an updated compiler.

Here is an old 2003 thread asking the same thing.

Chris Katko
Member #1,881
January 2002
avatar

Unless you have a DARN GOOD reason to use DOS, do not use DOS. It was being phased out twenty-five years ago.

Use a Windows compiler with the latest version of Allegro 4. 95% of your program will work without changes. [Allegro 5 is the one that changed the API.]

If you insist on using DOS, you will pay the price for using an unsupported, obsoleted operating system. You might as well be programming on a CP/M machine, a Tandy, or an Amiga.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

amarillion
Member #940
January 2001
avatar

Well, it could be interesting from a constrained creativity / programming challenge perspective. There are still people making games for the NES or the ZX Spectrum.

However, if your question is "why do I need to run my game in dosbox" then this is probably not your thing, and you need to upgrade to the current decade.

LennyLen
Member #5,313
December 2004
avatar

Well, it could be interesting from a constrained creativity / programming challenge perspective.

Or for nostalgia. I do miss DOS programming sometimes. That was around the time that I probably got the most enjoyment out of coding, especially once I discovered DJGPP and could forget about near and far pointers.

edit: Now that I think about it, I think it was discovering Allegro that put me on to DJGPP.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Think about it from your user's perspective. Are they running DOS? Not likely.

Making the upgrade to MinGW-W64 means new versions of gcc and better compilers, along with better warnings.

There's a whole new world out there besides DOS, I suggest you explore it.

Your allegro functions are all included in Allegro 4.4. There's a new API for Allegro 5 though, and that would require a small amount of porting.

For example, textout is still in Allegro 4.4, but it is deprecated in favor of textout_ex.

Peter Hull
Member #1,136
March 2001

You probably already know this but I'll say it anyway: the experience of compiling with MinGW in a Windows terminal prompt is almost identical to using DJGPP in DOS - the compiler is still gcc and you will be using make (probably). So you have nothing to fear!
Going from Allegro 3 to 4 is not nothing, but you will find it very familiar. Originally there was Allegro for DOS, later there was WinAlleg for Windows, XAlleg for Linux etc. These were all brought under the same roof and that was Allegro 4. Its API was the same as Allegro 3, although some more things were added from 4.0 to 4.4.
By the way, what editor do you use? If it's a DOS one you might need to change but I am sure there will be a Windows one which is similar.

peter kenniphaas
Member #20,900
August 2021

You put me on the road again, thanks. I will not be buried in a dosbox !
The editor I use is WordPad, but I know there are more suitable ones.

Chris Katko: Programs should be written for people to read.........
I agree. People make decisions in programming, incidentally for machines
to execute. With that result people write better programs with better decisions
incidentally for machines to execute etc ?

Amarillion: You used the word constrained.I can`t find it in my schoolenglish.
Do you mean getting control over creative programming challenges ?
If so, yes I do(try).

You will hear from me again, when I have my new stuff installed.
Thanks again.
Bye, Peter K.

Peter Hull
Member #1,136
March 2001

My guess is that Amarillion would know the Dutch word for 'constrained' if we asked him :D

Good luck Peter K, I look forward to seeing you next post!

Chris Katko
Member #1,881
January 2002
avatar

Chris Katko: Programs should be written for people to read.........
I agree. People make decisions in programming, incidentally for machines
to execute. With that result people write better programs with better decisions
incidentally for machines to execute etc ?

that's my forum signature, it's the same for every post. But yes, it's a hallmark of experienced, wise, programmers that programs should favor readability over (almost) everything because if the programmer can't understand it all, that's where bugs come from and makes it harder to update as well. Programs that are clearly written, are also easier to optimize. It's a good rule-of-thumb to program with that is violated only when you have a good reason to do so. It's from a programming book written by MIT professors.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

peter kenniphaas
Member #20,900
August 2021

to Peter Hull: I think Amarillion meant: constrained PERSPECTIVE ?
Like tangled up in some idea and never getting there, or anywhere ?
I hope he will read the previous post and could send a creative reply.
I like your responses.

to Chris Katko: A forum signature, OK, I did not know. I`m new in this..
Imagine one line of text containing 20 words (values/meanings/etc.) with a clear message for people to read. That could arise different interpretations of that text for people to create computer programs for people to read and incidentally for machines to execute, etc.
In my programming I create (too)long functions(like 200-500 lines).
I know the risks.
I cannot cut them into separate ones. It becomes too complex.
In my view you cannot interrupt thinking.
Let me hear from you..

Peter K.

LennyLen
Member #5,313
December 2004
avatar

to Peter Hull: I think Amarillion meant: constrained PERSPECTIVE ?
Like tangled up in some idea and never getting there, or anywhere ?
I hope he will read the previous post and could send a creative reply.
I like your responses.

What he meant was that the limitations of the environment add extra challenge to programming for it.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

If your code is valuable to you, port it to MinGW-W64 and GCC on Windows using CodeBlocks with Allegro 4.4.3GIT . That will be the LEAST trouble with the MOST gain for you right now.

Then in the future I would recommend you write all your programs using Allegro 5.

Go to: