Mercurial > sdl-ios-xcode
annotate src/video/ataricommon/SDL_ataric2p.S @ 4392:2b8c1aea633b SDL-1.2
Fixed bug #898
Jeremiah Morris 2009-12-09 16:07:17 PST
No-op GlobalToLocal translations in fullscreen mode
On my MacBook Pro running 10.6, I noticed a small upward bias on mouse movement
in a fullscreen SDL application. The app uses WarpCursor and GetMouseState in a
loop to measure relative movement. I tracked it down to NSWindow's
convertBaseToScreen: routine, which added a 2-pixel offset on the Y coordinate
instead of the expected (+0,+0) translation.
In fullscreen mode, QZ_PrivateWarpCursor() does not translate the desired
position through QZ_PrivateGlobalToLocal() before passing it to the Core
Graphics system. However, QZ_GetMouseLocation() does call the reverse
QZ_PrivateLocalToGlobal() even in fullscreen mode. This asymmetry caused
problems each time the mouse was moved.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 11 Dec 2009 15:31:37 +0000 |
parents | a52047c790a2 |
children |
rev | line source |
---|---|
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1 /* |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
2 SDL - Simple DirectMedia Layer |
4159 | 3 Copyright (C) 1997-2009 Sam Lantinga |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
4 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
5 This library is free software; you can redistribute it and/or |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1086
diff
changeset
|
6 modify it under the terms of the GNU Lesser General Public |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
7 License as published by the Free Software Foundation; either |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1086
diff
changeset
|
8 version 2.1 of the License, or (at your option) any later version. |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
9 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
10 This library is distributed in the hope that it will be useful, |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1086
diff
changeset
|
13 Lesser General Public License for more details. |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
14 |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1086
diff
changeset
|
15 You should have received a copy of the GNU Lesser General Public |
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1086
diff
changeset
|
16 License along with this library; if not, write to the Free Software |
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1086
diff
changeset
|
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
18 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
19 Sam Lantinga |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
20 slouken@libsdl.org |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
21 */ |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
22 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
23 /* |
734
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
24 Chunky to planar conversion routine |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
25 1 byte/pixel -> 4 or 8 bit planes |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
26 |
734
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
27 Patrice Mandin |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
28 Xavier Joubert |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
29 Mikael Kalms |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
30 */ |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
31 |
734
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
32 .globl _SDL_Atari_C2pConvert |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
33 .globl _SDL_Atari_C2pConvert8 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
34 .globl _SDL_Atari_C2pConvert4 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
35 .globl _SDL_Atari_C2pConvert4_pal |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
36 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
37 /* ------------ Conversion C2P, 8 bits ------------ */ |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
38 |
734
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
39 .text |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
40 _SDL_Atari_C2pConvert8: |
4375
a52047c790a2
Disable C2P routines for Coldfire CPUs
Patrice Mandin <patmandin@gmail.com>
parents:
4159
diff
changeset
|
41 #if !defined(__mcoldfire__) |
734
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
42 movel sp@(4),c2p_source |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
43 movel sp@(8),c2p_dest |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
44 movel sp@(12),c2p_width |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
45 movel sp@(16),c2p_height |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
46 movel sp@(20),c2p_dblligne |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
47 movel sp@(24),c2p_srcpitch |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
48 movel sp@(28),c2p_dstpitch |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
49 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
50 moveml d2-d7/a2-a6,sp@- |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
51 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
52 movel c2p_source,c2p_cursrc |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
53 movel c2p_dest,c2p_curdst |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
54 movel #0x0f0f0f0f,d4 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
55 movel #0x00ff00ff,d5 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
56 movel #0x55555555,d6 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
57 movew c2p_height+2,c2p_row |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
58 movew c2p_width+2,d0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
59 andw #-8,d0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
60 movew d0,c2p_rowlen |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
61 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
62 SDL_Atari_C2p8_rowloop: |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
63 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
64 movel c2p_cursrc,a0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
65 movel c2p_curdst,a1 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
66 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
67 movel a0,a2 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
68 addw c2p_rowlen,a2 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
69 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
70 movel a0@+,d0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
71 movel a0@+,d1 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
72 movel a0@+,d2 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
73 movel a0@+,d3 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
74 /* |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
75 d0 = a7a6a5a4a3a2a1a0 b7b6b5b4b3b2b1b0 c7c6c5c4c3c2c1c0 d7d6d5d4d3d2d1d0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
76 d1 = e7e6e5e4e3e2e1e0 f7f6f5f4f3f2f1f0 g7g6g5g4g3g2g1g0 h7h6h5h4h3h2h1h0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
77 d2 = i7i6i5i4i3i2i1i0 j7j6j5j4j3j2j1j0 k7k6k5k4k3k2k1k0 l7l6l5l4l3l2l1l0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
78 d3 = m7m6m5m4m3m2m1m0 n7n6n5n4n3n2n1n0 o7o6o5o4o3o2o1o0 p7p6p5p4p3p2p1p0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
79 */ |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
80 movel d1,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
81 lsrl #4,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
82 eorl d0,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
83 andl d4,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
84 eorl d7,d0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
85 lsll #4,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
86 eorl d7,d1 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
87 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
88 movel d3,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
89 lsrl #4,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
90 eorl d2,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
91 andl d4,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
92 eorl d7,d2 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
93 lsll #4,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
94 eorl d7,d3 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
95 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
96 movel d2,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
97 lsrl #8,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
98 eorl d0,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
99 andl d5,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
100 eorl d7,d0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
101 lsll #8,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
102 eorl d7,d2 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
103 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
104 movel d3,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
105 lsrl #8,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
106 eorl d1,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
107 andl d5,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
108 eorl d7,d1 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
109 lsll #8,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
110 eorl d7,d3 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
111 /* |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
112 d0 = a7a6a5a4e7e6e5e4 i7i6i5i4m7m6m5m4 c7c6c5c4g7g6g5g4 k7k6k5k4o7o6o5o4 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
113 d1 = a3a2a1a0e3e2e1e0 i3i2i1i0m3m2m1m0 c3c2c1c0g3g2g1g0 k3k2k1k0o3o2o1o0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
114 d2 = b7b6b5b4f7f6f5f4 j7j6j5j4n7n6n5n4 d7d6d5d4h7h6h5h4 l7l6l5l4p7p6p5p4 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
115 d3 = b3b2b1b0f3f2f1f0 j3j2j1j0n3n2n1n0 d3d2d1d0h3h2h1h0 l3l2l1l0p3p2p1p0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
116 */ |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
117 bras SDL_Atari_C2p8_start |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
118 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
119 SDL_Atari_C2p8_pix16: |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
120 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
121 movel a0@+,d0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
122 movel a0@+,d1 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
123 movel a0@+,d2 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
124 movel a0@+,d3 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
125 /* |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
126 d0 = a7a6a5a4a3a2a1a0 b7b6b5b4b3b2b1b0 c7c6c5c4c3c2c1c0 d7d6d5d4d3d2d1d0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
127 d1 = e7e6e5e4e3e2e1e0 f7f6f5f4f3f2f1f0 g7g6g5g4g3g2g1g0 h7h6h5h4h3h2h1h0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
128 d2 = i7i6i5i4i3i2i1i0 j7j6j5j4j3j2j1j0 k7k6k5k4k3k2k1k0 l7l6l5l4l3l2l1l0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
129 d3 = m7m6m5m4m3m2m1m0 n7n6n5n4n3n2n1n0 o7o6o5o4o3o2o1o0 p7p6p5p4p3p2p1p0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
130 */ |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
131 movel d1,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
132 lsrl #4,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
133 movel a3,a1@+ |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
134 eorl d0,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
135 andl d4,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
136 eorl d7,d0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
137 lsll #4,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
138 eorl d7,d1 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
139 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
140 movel d3,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
141 lsrl #4,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
142 eorl d2,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
143 andl d4,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
144 eorl d7,d2 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
145 movel a4,a1@+ |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
146 lsll #4,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
147 eorl d7,d3 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
148 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
149 movel d2,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
150 lsrl #8,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
151 eorl d0,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
152 andl d5,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
153 eorl d7,d0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
154 movel a5,a1@+ |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
155 lsll #8,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
156 eorl d7,d2 |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
157 |
734
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
158 movel d3,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
159 lsrl #8,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
160 eorl d1,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
161 andl d5,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
162 eorl d7,d1 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
163 movel a6,a1@+ |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
164 lsll #8,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
165 eorl d7,d3 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
166 /* |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
167 d0 = a7a6a5a4e7e6e5e4 i7i6i5i4m7m6m5m4 c7c6c5c4g7g6g5g4 k7k6k5k4o7o6o5o4 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
168 d1 = a3a2a1a0e3e2e1e0 i3i2i1i0m3m2m1m0 c3c2c1c0g3g2g1g0 k3k2k1k0o3o2o1o0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
169 d2 = b7b6b5b4f7f6f5f4 j7j6j5j4n7n6n5n4 d7d6d5d4h7h6h5h4 l7l6l5l4p7p6p5p4 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
170 d3 = b3b2b1b0f3f2f1f0 j3j2j1j0n3n2n1n0 d3d2d1d0h3h2h1h0 l3l2l1l0p3p2p1p0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
171 */ |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
172 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
173 SDL_Atari_C2p8_start: |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
174 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
175 movel d2,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
176 lsrl #1,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
177 eorl d0,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
178 andl d6,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
179 eorl d7,d0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
180 addl d7,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
181 eorl d7,d2 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
182 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
183 movel d3,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
184 lsrl #1,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
185 eorl d1,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
186 andl d6,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
187 eorl d7,d1 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
188 addl d7,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
189 eorl d7,d3 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
190 /* |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
191 d0 = a7b7a5b5e7f7e5f5 i7j7i5j5m7n7m5n5 c7d7c5d5g7h7g5h5 k7l7k5l5o7p7o5p5 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
192 d1 = a3b3a1b1e3f3e1f1 i3j3i1j1m3n3m1n1 c3d3c1d1g3h3g1h1 k3l3k1l1o3p3o1p1 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
193 d2 = a6b6a4b4e6f6e4f4 i6j6i4j4m6n6m4n4 c6d6c4d4g6h6g4h4 k6l6k4l4o6p6o4p4 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
194 d3 = a2b2a0b0e2f2e0f0 i2j2i0j0m2n2m0n0 c2d2c0d0g2h2g0h0 k2l2k0l0o2p2o0p0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
195 */ |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
196 movew d2,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
197 movew d0,d2 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
198 swap d2 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
199 movew d2,d0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
200 movew d7,d2 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
201 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
202 movew d3,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
203 movew d1,d3 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
204 swap d3 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
205 movew d3,d1 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
206 movew d7,d3 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
207 /* |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
208 d0 = a7b7a5b5e7f7e5f5 i7j7i5j5m7n7m5n5 a6b6a4b4e6f6e4f4 i6j6i4j4m6n6m4n4 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
209 d1 = a3b3a1b1e3f3e1f1 i3j3i1j1m3n3m1n1 a2b2a0b0e2f2e0f0 i2j2i0j0m2n2m0n0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
210 d2 = c7d7c5d5g7h7g5h5 k7l7k5l5o7p7o5p5 c6d6c4d4g6h6g4h4 k6l6k4l4o6p6o4p4 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
211 d3 = c3d3c1d1g3h3g1h1 k3l3k1l1o3p3o1p1 c2d2c0d0g2h2g0h0 k2l2k0l0o2p2o0p0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
212 */ |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
213 movel d2,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
214 lsrl #2,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
215 eorl d0,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
216 andl #0x33333333,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
217 eorl d7,d0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
218 lsll #2,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
219 eorl d7,d2 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
220 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
221 movel d3,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
222 lsrl #2,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
223 eorl d1,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
224 andl #0x33333333,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
225 eorl d7,d1 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
226 lsll #2,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
227 eorl d7,d3 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
228 /* |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
229 d0 = a7b7c7d7e7f7g7h7 i7j7k7l7m7n7o7p7 a6b6c6d6e6f6g6h6 i6j6k6l6m6n6o6p6 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
230 d1 = a3b3c3d3e3f3g3h3 i3j3k3l3m3n3o3p3 a2b2c2d2e2f2g2h2 i2j2k2l2m2n2o2p2 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
231 d2 = a5b5c5d5e5f5g5h5 i5j5k5l5m5n5o5p5 a4b4c4d4e4f4g4h4 i4j4k4l4m4n4o4p4 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
232 d3 = a1b1c1d1e1f1g1h1 i1j1k1l1m1n1o1p1 a0b0c0d0e0f0g0h0 i0j0k0l0m0n0o0p0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
233 */ |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
234 swap d0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
235 swap d1 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
236 swap d2 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
237 swap d3 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
238 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
239 movel d0,a6 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
240 movel d2,a5 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
241 movel d1,a4 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
242 movel d3,a3 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
243 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
244 cmpl a0,a2 |
1086 | 245 bgt SDL_Atari_C2p8_pix16 |
734
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
246 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
247 movel a3,a1@+ |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
248 movel a4,a1@+ |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
249 movel a5,a1@+ |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
250 movel a6,a1@+ |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
251 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
252 /* Double the line ? */ |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
253 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
254 movel c2p_srcpitch,d0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
255 movel c2p_dstpitch,d1 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
256 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
257 tstl c2p_dblligne |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
258 beqs SDL_Atari_C2p8_nodblline |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
259 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
260 movel c2p_curdst,a0 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
261 movel a0,a1 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
262 addl d1,a1 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
263 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
264 movew c2p_width+2,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
265 lsrw #4,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
266 subql #1,d7 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
267 SDL_Atari_C2p8_dblloop: |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
268 movel a0@+,a1@+ |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
269 movel a0@+,a1@+ |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
270 movel a0@+,a1@+ |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
271 movel a0@+,a1@+ |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
272 dbra d7,SDL_Atari_C2p8_dblloop |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
273 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
274 addl d1,c2p_curdst |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
275 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
276 SDL_Atari_C2p8_nodblline: |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
277 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
278 /* Next line */ |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
279 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
280 addl d0,c2p_cursrc |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
281 addl d1,c2p_curdst |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
282 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
283 subqw #1,c2p_row |
1086 | 284 bne SDL_Atari_C2p8_rowloop |
734
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
285 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
286 moveml sp@+,d2-d7/a2-a6 |
4375
a52047c790a2
Disable C2P routines for Coldfire CPUs
Patrice Mandin <patmandin@gmail.com>
parents:
4159
diff
changeset
|
287 #endif |
734
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
288 rts |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
289 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
290 /* ------------ Conversion C2P, 4 bits ------------ */ |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
291 |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
292 _SDL_Atari_C2pConvert4: |
4375
a52047c790a2
Disable C2P routines for Coldfire CPUs
Patrice Mandin <patmandin@gmail.com>
parents:
4159
diff
changeset
|
293 #if !defined(__mcoldfire__) |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
294 movel sp@(4),c2p_source |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
295 movel sp@(8),c2p_dest |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
296 movel sp@(12),c2p_width |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
297 movel sp@(16),c2p_height |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
298 movel sp@(20),c2p_dblligne |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
299 movel sp@(24),c2p_srcpitch |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
300 movel sp@(28),c2p_dstpitch |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
301 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
302 moveml d2-d7/a2-a6,sp@- |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
303 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
304 movel c2p_source,a0 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
305 movel c2p_dest,a1 |
734
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
306 lea _SDL_Atari_table_c2p,a2 |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
307 movel #0x00070001,d3 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
308 #if defined(__M68020__) |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
309 moveq #0,d0 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
310 #endif |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
311 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
312 movel c2p_height,d7 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
313 subql #1,d7 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
314 c2p4_bcly: |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
315 movel a0,a4 | Save start address of source |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
316 movel a1,a5 | Save start address of dest |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
317 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
318 | Conversion |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
319 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
320 movel c2p_width,d6 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
321 lsrw #4,d6 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
322 subql #1,d6 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
323 c2p4_bclx: |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
324 | Octets 0-7 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
325 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
326 moveq #0,d1 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
327 moveq #7,d5 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
328 c2p4_bcl07: |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
329 #if defined(__M68020__) |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
330 moveb a0@+,d0 |
1086 | 331 lea a2@(0,d0:w:4),a3 |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
332 #else |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
333 moveq #0,d0 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
334 moveb a0@+,d0 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
335 lslw #2,d0 |
1086 | 336 lea a2@(0,d0:w),a3 |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
337 #endif |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
338 lsll #1,d1 |
1086 | 339 orl a3@,d1 |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
340 dbra d5,c2p4_bcl07 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
341 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
342 movepl d1,a1@(0) |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
343 addw d3,a1 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
344 swap d3 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
345 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
346 | Octets 8-15 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
347 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
348 moveq #0,d1 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
349 moveq #7,d5 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
350 c2p4_bcl815: |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
351 #if defined(__M68020__) |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
352 moveb a0@+,d0 |
1086 | 353 lea a2@(0,d0:w:4),a3 |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
354 #else |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
355 moveq #0,d0 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
356 moveb a0@+,d0 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
357 lslw #2,d0 |
1086 | 358 lea a2@(0,d0:w),a3 |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
359 #endif |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
360 lsll #1,d1 |
1086 | 361 orl a3@,d1 |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
362 dbra d5,c2p4_bcl815 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
363 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
364 movepl d1,a1@(0) |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
365 addw d3,a1 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
366 swap d3 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
367 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
368 dbra d6,c2p4_bclx |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
369 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
370 | Double line ? |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
371 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
372 tstl c2p_dblligne |
1086 | 373 beqs c2p4_nodblligne |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
374 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
375 movel a5,a6 | src line |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
376 movel a5,a1 | dest line |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
377 addl c2p_dstpitch,a1 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
378 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
379 movel c2p_width,d6 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
380 lsrw #3,d6 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
381 subql #1,d6 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
382 c2p4_copydbl: |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
383 movel a6@+,a1@+ |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
384 dbra d6,c2p4_copydbl |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
385 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
386 addl c2p_dstpitch,a5 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
387 c2p4_nodblligne: |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
388 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
389 | Next line |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
390 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
391 movel a4,a0 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
392 addl c2p_srcpitch,a0 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
393 movel a5,a1 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
394 addl c2p_dstpitch,a1 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
395 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
396 dbra d7,c2p4_bcly |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
397 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
398 moveml sp@+,d2-d7/a2-a6 |
4375
a52047c790a2
Disable C2P routines for Coldfire CPUs
Patrice Mandin <patmandin@gmail.com>
parents:
4159
diff
changeset
|
399 #endif |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
400 rts |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
401 |
734
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
402 /* ------------ Conversion of a light palette in 4 bits ------------ */ |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
403 |
734
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
404 _SDL_Atari_C2pConvert4_pal: |
4375
a52047c790a2
Disable C2P routines for Coldfire CPUs
Patrice Mandin <patmandin@gmail.com>
parents:
4159
diff
changeset
|
405 #if !defined(__mcoldfire__) |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
406 /* a0 is a 256-word light palette */ |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
407 movel sp@(4),a0 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
408 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
409 moveml d2-d3,sp@- |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
410 |
1086 | 411 lea _SDL_Atari_table_c2p,a1 |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
412 movew #255,d3 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
413 c2p_pal_initbcl: |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
414 movew a0@+,d0 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
415 lsrw #4,d0 |
1086 | 416 andw #15,d0 |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
417 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
418 moveq #3,d1 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
419 c2p_pal_initbyte: |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
420 btst d1,d0 |
1086 | 421 sne d2 |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
422 negw d2 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
423 moveb d2,a1@(0,d1:w) |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
424 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
425 dbra d1,c2p_pal_initbyte |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
426 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
427 addql #4,a1 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
428 dbra d3,c2p_pal_initbcl |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
429 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
430 moveml sp@+,d2-d3 |
4375
a52047c790a2
Disable C2P routines for Coldfire CPUs
Patrice Mandin <patmandin@gmail.com>
parents:
4159
diff
changeset
|
431 #endif |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
432 rts |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
433 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
434 /* ------------ Buffers ------------ */ |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
435 |
1086 | 436 .bss |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
437 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
438 .even |
734
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
439 .comm _SDL_Atari_C2pConvert,4 |
1086 | 440 .comm _SDL_Atari_table_c2p,1024 |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
441 |
734
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
442 .comm c2p_source,4 /* Source framebuffer */ |
1086 | 443 .comm c2p_dest,4 /* Destination framebuffer */ |
444 .comm c2p_width,4 /* Width of zone to convert */ | |
734
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
445 .comm c2p_height,4 /* Height of zone to convert */ |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
446 .comm c2p_dblligne,4 /* Double the lines while converting ? */ |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
447 .comm c2p_srcpitch,4 /* Source pitch */ |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
448 .comm c2p_dstpitch,4 /* Destination pitch */ |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
449 .comm c2p_cursrc,4 /* Current source line */ |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
450 .comm c2p_curdst,4 /* Current destination line */ |
0310bb01091f
New C2P conversion routine
Patrice Mandin <patmandin@gmail.com>
parents:
297
diff
changeset
|
451 .comm c2p_rowlen,2 /* Line length in bytes */ |
1086 | 452 .comm c2p_row,2 /* Current line number */ |