Mercurial > sdl-ios-xcode
comparison src/video/riscos/SDL_riscosASM.s @ 1035:974ba6ae0fa3
Date: Wed, 26 Jan 2005 13:37:09 GMT
From: Peter Naulls
Subject: RISC OS SDL Patches
Sam, I've attached a diff of the latest changes to libSDL for RISC OS
support. These changes are by Alan Buckley and myself.
The most significant of these are:
Optimised assembler blit rountines - I've attached the file
src/video/riscos/SDL_riscosASM.s which is needed for this.
Move to using /dev/dsp instead of its own audio implementation.
This means that src/audio/riscos/SDL_drenderer.c should be removed
Typo fixes. Mainly correct spelling of "RISC OS", but some from elsewhere
too.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 12 Feb 2005 18:01:31 +0000 |
parents | |
children | 7eeb3324d37d |
comparison
equal
deleted
inserted
replaced
1034:2eca15c3f609 | 1035:974ba6ae0fa3 |
---|---|
1 Date: Wed, 26 Jan 2005 13:37:09 GMT | |
2 From: Peter Naulls <peter@chocky.org> | |
3 To: slouken@libsdl.org | |
4 Subject: RISC OS SDL Patches | |
5 | |
6 ; | |
7 ; SDL - Simple DirectMedia Layer | |
8 ; Copyright (C) 1997-2004 Sam Lantinga | |
9 ; | |
10 ; This library is free software; you can redistribute it and/or | |
11 ; modify it under the terms of the GNU Library General Public | |
12 ; License as published by the Free Software Foundation; either | |
13 ; version 2 of the License, or (at your option) any later version. | |
14 ; | |
15 ; This library is distributed in the hope that it will be useful, | |
16 ; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
18 ; Library General Public License for more details. | |
19 ; | |
20 ; You should have received a copy of the GNU Library General Public | |
21 ; License along with this library; if not, write to the Free | |
22 ; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
23 ; | |
24 ; Sam Lantinga | |
25 ; slouken@devolution.com | |
26 ; | |
27 ; Assembler routines for RISC OS display | |
28 ; | |
29 | |
30 AREA |C$$CODE| | |
31 | |
32 EXPORT |RISCOS_Put32| | |
33 | |
34 ; Display 32bpp to 32bpp, 1:1 | |
35 ; | |
36 ; Code provided by Adrain Lees | |
37 ; | |
38 ; entry a1 -> destination | |
39 ; a2 = dest width in pixels | |
40 ; a3 = dest line length in bytes | |
41 ; a4 = dest height in scanlines | |
42 ; arg5 -> source | |
43 ; arg6 = byte offset from end of source line to start of next | |
44 | |
45 Arg5 * 10*4 | |
46 Arg6 * Arg5+4 | |
47 | |
48 RISCOS_Put32 ROUT | |
49 STMFD sp!,{a2,v1-v6,sl,fp,lr} | |
50 LDR ip,[sp,#Arg5] | |
51 MOV lr,a1 | |
52 B ucp64lp | |
53 | |
54 00 ;tail strip of 1-15 pixels | |
55 | |
56 LDR v1,[ip],#4 | |
57 01 SUBS a2,a2,#1 | |
58 STR v1,[lr],#4 | |
59 LDRHI v1,[ip],#4 | |
60 BHI %01 | |
61 B %02 | |
62 | |
63 ucp64end ADDS a2,a2,#16 | |
64 BNE %00 | |
65 | |
66 02 SUBS a4,a4,#1 ;height-- | |
67 LDRHI v1,[sp,#Arg6] | |
68 LDRHI a2,[sp] ;reload width | |
69 BLS %03 | |
70 | |
71 ;move to start of next scanline | |
72 | |
73 ADD lr,a1,a3 | |
74 ADD a1,a1,a3 | |
75 ADD ip,ip,v1 | |
76 | |
77 ucp64lp SUBS a2,a2,#16 | |
78 BLO ucp64end | |
79 | |
80 PLD [ip,#64] | |
81 | |
82 LDR v1,[ip],#4 | |
83 LDR v2,[ip],#4 | |
84 LDR v3,[ip],#4 | |
85 LDR v4,[ip],#4 | |
86 LDR v5,[ip],#4 | |
87 LDR v6,[ip],#4 | |
88 LDR sl,[ip],#4 | |
89 LDR fp,[ip],#4 | |
90 STR v1,[lr],#4 | |
91 STR v2,[lr],#4 | |
92 STR v3,[lr],#4 | |
93 STR v4,[lr],#4 | |
94 STR v5,[lr],#4 | |
95 STR v6,[lr],#4 | |
96 STR sl,[lr],#4 | |
97 STR fp,[lr],#4 | |
98 | |
99 PLD [ip,#64] | |
100 | |
101 LDR v1,[ip],#4 | |
102 LDR v2,[ip],#4 | |
103 LDR v3,[ip],#4 | |
104 LDR v4,[ip],#4 | |
105 LDR v5,[ip],#4 | |
106 LDR v6,[ip],#4 | |
107 LDR sl,[ip],#4 | |
108 LDR fp,[ip],#4 | |
109 STR v1,[lr],#4 | |
110 STR v2,[lr],#4 | |
111 STR v3,[lr],#4 | |
112 STR v4,[lr],#4 | |
113 STR v5,[lr],#4 | |
114 STR v6,[lr],#4 | |
115 STR sl,[lr],#4 | |
116 STR fp,[lr],#4 | |
117 | |
118 B ucp64lp | |
119 | |
120 03 LDMFD sp!,{a2,v1-v6,sl,fp,pc} | |
121 |