Skip to content

Fork of Allegro 4.2.2 for cross compiling for DOS game development also Support for CMake Crosscompiling with OpenWatcom v2, in a far future support for NEC PC-98, and if i had more time and knowledge, FM Towns.

Notifications You must be signed in to change notification settings

hydexon/allegro-4.2.2-xc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Allegro 4.2.2 (OpenWatcom v2 Support)

========================================

This fork of mine enables OpenWatcom v2 for building Allegro 4.2.2 with CMake crosscompiling, without needing a virtual machine or a Win9x machine to build it (it needs DOSBox-X to generate asmdef.inc) and no need for the flaky and unreliable DJGPP Make crashing everytime trying to build it read that convulted makefile.

see CMakeLists.txt for more information to how to build it, it works with Allegro 4.2.3 (albeit the demo freezes in DOSBox-X) from this article just copy CMakeLists.txt, the cmake/ directory, and apply the changes requested in the linked article.

Notice you still need DJGPP, but only needed to call djgpp version of GNU assembler and that's it.

Warning!

This CMakeLists.txt is really crude and full of hacks, but still more reliable than DJGPP Make known to be prone to crashing for some reason.

Allegro 4.2.2 (DJGPP/DOS cross compiling)

A fork of the old Allegro 4.2.2 release from July 2007, with a few minor modifications to the source to facilitate cross compiling with DJGPP.

This fork exists so that you can use Allegro to write DOS games with a version of DJGPP for a non-DOS, non-Windows system. If you don't intend specifically to build DOS games, you should use the latest release instead!

Originally, this version of Allegro was intended to be used with GCC 2.91.N. Some modifications have been made to make it work with GCC 5.2.0 as provided by DJGPP.

If you must compile this for a target other than DJGPP, you must edit /include/allegro/platform/alplatf.h and add the correct platform setting.

Usage

The first step is to get a working DJGPP compiler, as per andrewwutw's build-djgpp instructions. This should work for Mac OS X, Linux and FreeBSD, but I've only tested it with Mac OS X. Please let me know if you can verify that this works for other OSes.

Compiling

If you're on Mac OS X, and you've set up DJGPP correctly, it should work out of the box. On other platforms, you'll need to edit xmake.sh to set the correct paths.

Run ./xmake.sh lib to compile the library. No standard make command will work.

If all goes well, a lib/djgpp/liballeg.a file will be generated that you can link with.

Targeting Windows

If you're targeting Windows, you should probably not use this. Just use MinGW instead. It should be easy to compile something that works on both Windows 10 and DOS.

Patches

Aside from the modifications for easier cross-compiling, the following changes were made:

Example

There's an Allegro DOS example repository available with a small Hello World program.

Copyright

Allegro 4.2.2 is giftware licensed. My own modifications to the source are public domain. This repository was forked off the liballeg/allegro5 repository, with all commit history past 2007-07-22 removed.

About

Fork of Allegro 4.2.2 for cross compiling for DOS game development also Support for CMake Crosscompiling with OpenWatcom v2, in a far future support for NEC PC-98, and if i had more time and knowledge, FM Towns.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 78.3%
  • Assembly 12.8%
  • C++ 3.9%
  • Objective-C 2.7%
  • Shell 1.4%
  • Python 0.3%
  • Other 0.6%