Cleanup C2P routine
authorPatrice Mandin <patmandin@gmail.com>
Thu, 30 Jun 2005 12:03:19 +0000
changeset 108693207759e065
parent 1085 49d154d0c56e
child 1087 8c44005e0979
Cleanup C2P routine
src/video/ataricommon/SDL_ataric2p.S
src/video/ataricommon/SDL_ataric2p_s.h
     1.1 --- a/src/video/ataricommon/SDL_ataric2p.S	Thu Jun 30 12:02:25 2005 +0000
     1.2 +++ b/src/video/ataricommon/SDL_ataric2p.S	Thu Jun 30 12:03:19 2005 +0000
     1.3 @@ -38,7 +38,6 @@
     1.4  	.globl	_SDL_Atari_C2pConvert8
     1.5  	.globl	_SDL_Atari_C2pConvert4
     1.6  	.globl	_SDL_Atari_C2pConvert4_pal
     1.7 -	.globl	_SDL_Atari_table_c2p
     1.8  
     1.9  /* ------------	Conversion C2P, 8 bits ------------ */
    1.10  
    1.11 @@ -247,7 +246,7 @@
    1.12  	movel	d3,a3
    1.13  
    1.14  	cmpl	a0,a2
    1.15 -	bgt	SDL_Atari_C2p8_pix16
    1.16 +	bgt		SDL_Atari_C2p8_pix16
    1.17  
    1.18  	movel	a3,a1@+
    1.19  	movel	a4,a1@+
    1.20 @@ -286,7 +285,7 @@
    1.21  	addl	d1,c2p_curdst
    1.22  
    1.23  	subqw	#1,c2p_row
    1.24 -	bne	SDL_Atari_C2p8_rowloop	
    1.25 +	bne		SDL_Atari_C2p8_rowloop	
    1.26  
    1.27  	moveml	sp@+,d2-d7/a2-a6
    1.28  	rts
    1.29 @@ -331,15 +330,15 @@
    1.30  c2p4_bcl07:
    1.31  #if defined(__M68020__)
    1.32  	moveb	a0@+,d0
    1.33 -	lea	a2@(0,d0:w:4),a3
    1.34 +	lea		a2@(0,d0:w:4),a3
    1.35  #else
    1.36  	moveq	#0,d0
    1.37  	moveb	a0@+,d0
    1.38  	lslw	#2,d0
    1.39 -	lea	a2@(0,d0:w),a3
    1.40 +	lea		a2@(0,d0:w),a3
    1.41  #endif
    1.42  	lsll	#1,d1
    1.43 -	orl	a3@,d1
    1.44 +	orl		a3@,d1
    1.45  	dbra	d5,c2p4_bcl07
    1.46  
    1.47  	movepl	d1,a1@(0)
    1.48 @@ -353,15 +352,15 @@
    1.49  c2p4_bcl815:
    1.50  #if defined(__M68020__)
    1.51  	moveb	a0@+,d0
    1.52 -	lea	a2@(0,d0:w:4),a3
    1.53 +	lea		a2@(0,d0:w:4),a3
    1.54  #else
    1.55  	moveq	#0,d0
    1.56  	moveb	a0@+,d0
    1.57  	lslw	#2,d0
    1.58 -	lea	a2@(0,d0:w),a3
    1.59 +	lea		a2@(0,d0:w),a3
    1.60  #endif
    1.61  	lsll	#1,d1
    1.62 -	orl	a3@,d1
    1.63 +	orl		a3@,d1
    1.64  	dbra	d5,c2p4_bcl815
    1.65  
    1.66  	movepl	d1,a1@(0)
    1.67 @@ -373,7 +372,7 @@
    1.68  	| Double line ?
    1.69  
    1.70  	tstl	c2p_dblligne
    1.71 -	beq	c2p4_nodblligne
    1.72 +	beqs	c2p4_nodblligne
    1.73  
    1.74  	movel	a5,a6			| src line
    1.75  	movel	a5,a1			| dest line
    1.76 @@ -409,17 +408,17 @@
    1.77  
    1.78  	moveml	d2-d3,sp@-
    1.79  
    1.80 -	lea	_SDL_Atari_table_c2p,a1
    1.81 +	lea		_SDL_Atari_table_c2p,a1
    1.82  	movew	#255,d3
    1.83  c2p_pal_initbcl:
    1.84  	movew	a0@+,d0
    1.85  	lsrw	#4,d0
    1.86 -	and	#15,d0
    1.87 +	andw	#15,d0
    1.88  
    1.89  	moveq	#3,d1
    1.90  c2p_pal_initbyte:
    1.91  	btst	d1,d0
    1.92 -	sne	d2
    1.93 +	sne		d2
    1.94  	negw	d2
    1.95  	moveb	d2,a1@(0,d1:w)
    1.96  
    1.97 @@ -434,15 +433,15 @@
    1.98  
    1.99  /* ------------	Buffers ------------ */
   1.100  
   1.101 -	.data
   1.102 +	.bss
   1.103  
   1.104  	.even
   1.105  	.comm	_SDL_Atari_C2pConvert,4
   1.106 -	.comm	_SDL_Atari_table_c2p,2048
   1.107 +	.comm	_SDL_Atari_table_c2p,1024
   1.108  
   1.109  	.comm	c2p_source,4	/* Source framebuffer */
   1.110 -	.comm	c2p_dest,4	/* Destination framebuffer */
   1.111 -	.comm	c2p_width,4	/* Width of zone to convert */
   1.112 +	.comm	c2p_dest,4		/* Destination framebuffer */
   1.113 +	.comm	c2p_width,4		/* Width of zone to convert */
   1.114  	.comm	c2p_height,4	/* Height of zone to convert */
   1.115  	.comm	c2p_dblligne,4	/* Double the lines while converting ? */
   1.116  	.comm	c2p_srcpitch,4	/* Source pitch */
   1.117 @@ -450,4 +449,4 @@
   1.118  	.comm	c2p_cursrc,4	/* Current source line */
   1.119  	.comm	c2p_curdst,4	/* Current destination line */
   1.120  	.comm	c2p_rowlen,2	/* Line length in bytes */
   1.121 -	.comm	c2p_row,2	/* Current line number */
   1.122 +	.comm	c2p_row,2		/* Current line number */
     2.1 --- a/src/video/ataricommon/SDL_ataric2p_s.h	Thu Jun 30 12:02:25 2005 +0000
     2.2 +++ b/src/video/ataricommon/SDL_ataric2p_s.h	Thu Jun 30 12:03:19 2005 +0000
     2.3 @@ -30,10 +30,6 @@
     2.4  
     2.5  #include "SDL_types.h"
     2.6  
     2.7 -/*--- Variables ---*/
     2.8 -
     2.9 -extern Uint8 SDL_Atari_table_c2p[2048];	/* Used by conversions routines */
    2.10 -
    2.11  /*--- Functions pointers ---*/
    2.12  
    2.13  /* Convert a chunky screen to bitplane screen */