# HG changeset patch # User Patrice Mandin # Date 1120132999 0 # Node ID 93207759e065287581f597c149884a3a1bf53f50 # Parent 49d154d0c56ea5b3d6814cd0e5f646a8ee5e0f08 Cleanup C2P routine diff -r 49d154d0c56e -r 93207759e065 src/video/ataricommon/SDL_ataric2p.S --- a/src/video/ataricommon/SDL_ataric2p.S Thu Jun 30 12:02:25 2005 +0000 +++ b/src/video/ataricommon/SDL_ataric2p.S Thu Jun 30 12:03:19 2005 +0000 @@ -38,7 +38,6 @@ .globl _SDL_Atari_C2pConvert8 .globl _SDL_Atari_C2pConvert4 .globl _SDL_Atari_C2pConvert4_pal - .globl _SDL_Atari_table_c2p /* ------------ Conversion C2P, 8 bits ------------ */ @@ -247,7 +246,7 @@ movel d3,a3 cmpl a0,a2 - bgt SDL_Atari_C2p8_pix16 + bgt SDL_Atari_C2p8_pix16 movel a3,a1@+ movel a4,a1@+ @@ -286,7 +285,7 @@ addl d1,c2p_curdst subqw #1,c2p_row - bne SDL_Atari_C2p8_rowloop + bne SDL_Atari_C2p8_rowloop moveml sp@+,d2-d7/a2-a6 rts @@ -331,15 +330,15 @@ c2p4_bcl07: #if defined(__M68020__) moveb a0@+,d0 - lea a2@(0,d0:w:4),a3 + lea a2@(0,d0:w:4),a3 #else moveq #0,d0 moveb a0@+,d0 lslw #2,d0 - lea a2@(0,d0:w),a3 + lea a2@(0,d0:w),a3 #endif lsll #1,d1 - orl a3@,d1 + orl a3@,d1 dbra d5,c2p4_bcl07 movepl d1,a1@(0) @@ -353,15 +352,15 @@ c2p4_bcl815: #if defined(__M68020__) moveb a0@+,d0 - lea a2@(0,d0:w:4),a3 + lea a2@(0,d0:w:4),a3 #else moveq #0,d0 moveb a0@+,d0 lslw #2,d0 - lea a2@(0,d0:w),a3 + lea a2@(0,d0:w),a3 #endif lsll #1,d1 - orl a3@,d1 + orl a3@,d1 dbra d5,c2p4_bcl815 movepl d1,a1@(0) @@ -373,7 +372,7 @@ | Double line ? tstl c2p_dblligne - beq c2p4_nodblligne + beqs c2p4_nodblligne movel a5,a6 | src line movel a5,a1 | dest line @@ -409,17 +408,17 @@ moveml d2-d3,sp@- - lea _SDL_Atari_table_c2p,a1 + lea _SDL_Atari_table_c2p,a1 movew #255,d3 c2p_pal_initbcl: movew a0@+,d0 lsrw #4,d0 - and #15,d0 + andw #15,d0 moveq #3,d1 c2p_pal_initbyte: btst d1,d0 - sne d2 + sne d2 negw d2 moveb d2,a1@(0,d1:w) @@ -434,15 +433,15 @@ /* ------------ Buffers ------------ */ - .data + .bss .even .comm _SDL_Atari_C2pConvert,4 - .comm _SDL_Atari_table_c2p,2048 + .comm _SDL_Atari_table_c2p,1024 .comm c2p_source,4 /* Source framebuffer */ - .comm c2p_dest,4 /* Destination framebuffer */ - .comm c2p_width,4 /* Width of zone to convert */ + .comm c2p_dest,4 /* Destination framebuffer */ + .comm c2p_width,4 /* Width of zone to convert */ .comm c2p_height,4 /* Height of zone to convert */ .comm c2p_dblligne,4 /* Double the lines while converting ? */ .comm c2p_srcpitch,4 /* Source pitch */ @@ -450,4 +449,4 @@ .comm c2p_cursrc,4 /* Current source line */ .comm c2p_curdst,4 /* Current destination line */ .comm c2p_rowlen,2 /* Line length in bytes */ - .comm c2p_row,2 /* Current line number */ + .comm c2p_row,2 /* Current line number */ diff -r 49d154d0c56e -r 93207759e065 src/video/ataricommon/SDL_ataric2p_s.h --- a/src/video/ataricommon/SDL_ataric2p_s.h Thu Jun 30 12:02:25 2005 +0000 +++ b/src/video/ataricommon/SDL_ataric2p_s.h Thu Jun 30 12:03:19 2005 +0000 @@ -30,10 +30,6 @@ #include "SDL_types.h" -/*--- Variables ---*/ - -extern Uint8 SDL_Atari_table_c2p[2048]; /* Used by conversions routines */ - /*--- Functions pointers ---*/ /* Convert a chunky screen to bitplane screen */