Re: [AD] blit() ALLEGRO_NO_ASM crash

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Peter Wang wrote:
The bank switching routines still expect the asm calling convention even
if ALLEGRO_NO_ASM is defined, i.e. ALLEGRO_NO_ASM isn't supported on
Windows.  Patches welcome, especially since we'll need it for 4.3.

I don't know assembler programming. :(

Until someone who does has time to fix this, how about applying something like the attached patch?

--
Daniel Schlyder
Index: makefile.all
===================================================================
--- makefile.all	(revision 7548)
+++ makefile.all	(working copy)
@@ -15,7 +15,7 @@
 #                           to *NOT* be backwards compatible (GCC-based platforms, MSVC).
 #        TARGET_OPTS        allows you to customize general optimizations (GCC-based platforms).
 #        CROSSCOMPILE=1     cross-build under Linux (DJGPP, MinGW32).
-#        ALLEGRO_USE_C=1    use C drawing code instead of asm (GCC-based platforms).
+#        ALLEGRO_USE_C=1    use C drawing code instead of asm (non-Windows GCC-based platforms).
 #        UNIX_TOOLS=1       use Unix-like tools instead of DOS tools.
 #
 #     Targets: 
Index: makefile.mgw
===================================================================
--- makefile.mgw	(revision 7548)
+++ makefile.mgw	(working copy)
@@ -201,6 +201,8 @@
 
 # ------ build a C-only version ------
 
+$(error ALLEGRO_USE_C is not supported on Windows\; see todo.txt)
+
 VPATH += src/c
 MY_OBJECTS = $(C_OBJECTS) cmiscs
 CFLAGS += -DALLEGRO_NO_ASM
Index: todo.txt
===================================================================
--- todo.txt	(revision 7548)
+++ todo.txt	(working copy)
@@ -65,6 +65,8 @@
 - Investigate Alt+Tab pop-up window being overdrawn in windowed mode
 - Investigate problem with keyboard in the dxwindow test
 - Modify convert_hbitmap_to_bitmap() behaviour with 8-bit DDBs
+- Support ALLEGRO_USE_C. The bank switching routines expect the asm calling
+  convention even when ALLEGRO_NO_ASM is defined.
 
 Linux todos:
 ---------------------------------------------------------------------------
Index: docs/src/allegro._tx
===================================================================
--- docs/src/allegro._tx	(revision 7548)
+++ docs/src/allegro._tx	(working copy)
@@ -14895,7 +14895,7 @@
    CROSSCOMPILE=1 (DJGPP, MinGW only)<br>
    Allows you to build the library under Linux by using a cross-compiler.
 <li>
-   ALLEGRO_USE_C=1 (GCC-based platforms only)<br>
+   ALLEGRO_USE_C=1 (non-Windows GCC-based platforms only)<br>
    Allows you to build the library using C drawing code instead of the usual
    asm routines. This is only really useful for testing, since the asm
    version is faster.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/