[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] FreeMiNT for ColdFire



Here are the ColdFire patches for XaAES' whlmoose.

1) Rename xaaes/src.km/adi/whlmoose/vex_x.s to vex_x.S, with a capital S, and apply whlmoose1.patch.

Added preprocessor support. Contributed by Vincent Riviere.

2) Apply whlmoose2.patch.

Added ColdFire support. Contributed by Vincent Riviere.

Alan, please commit!

--
Vincent Rivière
diff -aurN -x CVS freemint.orig/xaaes/src.km/adi/whlmoose/Makefile freemint/xaaes/src.km/adi/whlmoose/Makefile
--- freemint.orig/xaaes/src.km/adi/whlmoose/Makefile	2010-05-16 15:05:54.950819500 +0200
+++ freemint/xaaes/src.km/adi/whlmoose/Makefile	2011-04-02 17:27:41.984375000 +0200
@@ -28,7 +28,7 @@
 
 # default definitions
 SGENFILES = moose.adi moose_w.adi
-OBJS = $(SOBJS:.s=.o)
+OBJS = $(SOBJS:.S=.o)
 
 
 entry:
diff -aurN -x CVS freemint.orig/xaaes/src.km/adi/whlmoose/SRCFILES freemint/xaaes/src.km/adi/whlmoose/SRCFILES
--- freemint.orig/xaaes/src.km/adi/whlmoose/SRCFILES	2004-07-20 20:36:33.000000000 +0200
+++ freemint/xaaes/src.km/adi/whlmoose/SRCFILES	2011-04-02 17:28:56.968750000 +0200
@@ -8,6 +8,6 @@
 	whlmoose.c
 
 SOBJS = \
-	vex_x.s
+	vex_x.S
 
 SRCFILES = $(HEADER) $(COBJS) $(SOBJS)
diff -aurN -x CVS freemint.orig/xaaes/src.km/adi/whlmoose/vex_x.S freemint/xaaes/src.km/adi/whlmoose/vex_x.S
--- freemint.orig/xaaes/src.km/adi/whlmoose/vex_x.S	2004-12-25 22:36:41.000000000 +0100
+++ freemint/xaaes/src.km/adi/whlmoose/vex_x.S	2011-04-02 17:32:12.750000000 +0200
@@ -17,29 +17,70 @@
 |** These are exchanged VDI change vectors ****************************************************
 _motv:		move.w	d0,_sample_x
 		move.w	d1,_sample_y
+#ifdef __mcoldfire__
+		lea	-24(sp),sp
+		movem.l	d0-d2/a0-a2,(sp)
+#else
 		movem.l	d0-d2/a0-a2,-(sp)
+#endif
 		jsr	_cmotv
+#ifdef __mcoldfire__
+		movem.l	(sp),d0-d2/a0-a2
+		lea	24(sp),sp
+#else
 		movem.l	(sp)+,d0-d2/a0-a2
+#endif
 		rts
 
 _butv:
+#ifdef __mcoldfire__
+		lea	-24(sp),sp
+		movem.l	d0-d2/a0-a2,(sp)
+#else
 		movem.l	d0-d2/a0-a2,-(sp)
+#endif
 		move.w	d0,_sample_butt
 		jsr	_cbutv
+#ifdef __mcoldfire__
+		movem.l	(sp),d0-d2/a0-a2
+		lea	24(sp),sp
+#else
 		movem.l	(sp)+,d0-d2/a0-a2
+#endif
 		rts
 
 _whlv:
+#ifdef __mcoldfire__
+		lea	-24(sp),sp
+		movem.l	d0-d2/a0-a2,(sp)
+#else
 		movem.l	d0-d2/a0-a2,-(sp)
+#endif
 		move.w	d0,_sample_wheel
 		move.w	d1,_sample_wclicks
 		jsr	_cwhlv
+#ifdef __mcoldfire__
+		movem.l	(sp),d0-d2/a0-a2
+		lea	24(sp),sp
+#else
 		movem.l	(sp)+,d0-d2/a0-a2
+#endif
 		rts
 
 _timv:		rts
 
-_th_wrapper:	movem.l	d0-d7/a0-a6,-(sp)
+_th_wrapper:
+#ifdef __mcoldfire__
+		lea	-60(sp),sp
+		movem.l	d0-d7/a0-a6,(sp)
+#else
+		movem.l	d0-d7/a0-a6,-(sp)
+#endif
 		jsr	_timer_handler
+#ifdef __mcoldfire__
+		movem.l	(sp),d0-d7/a0-a6
+		lea	60(sp),sp
+#else
 		movem.l	(sp)+,d0-d7/a0-a6
+#endif
 		rts