summaryrefslogtreecommitdiff
path: root/apps/plugins/sdl/src/hermes/x86_main.asm
diff options
context:
space:
mode:
authorFranklin Wei <git@fwei.tk>2017-01-21 15:18:31 -0500
committerFranklin Wei <git@fwei.tk>2017-12-23 21:01:26 -0500
commita855d6202536ff28e5aae4f22a0f31d8f5b325d0 (patch)
tree8c75f224dd64ed360505afa8843d016b0d75000b /apps/plugins/sdl/src/hermes/x86_main.asm
parent01c6dcf6c7b9bb1ad2fa0450f99bacc5f3d3e04b (diff)
downloadrockbox-a855d6202536ff28e5aae4f22a0f31d8f5b325d0.tar.gz
rockbox-a855d6202536ff28e5aae4f22a0f31d8f5b325d0.zip
Port of Duke Nukem 3D
This ports Fabien Sanglard's Chocolate Duke to run on a version of SDL for Rockbox. Change-Id: I8f2c4c78af19de10c1633ed7bb7a997b43256dd9
Diffstat (limited to 'apps/plugins/sdl/src/hermes/x86_main.asm')
-rw-r--r--apps/plugins/sdl/src/hermes/x86_main.asm75
1 files changed, 75 insertions, 0 deletions
diff --git a/apps/plugins/sdl/src/hermes/x86_main.asm b/apps/plugins/sdl/src/hermes/x86_main.asm
new file mode 100644
index 0000000000..f7dd3db70c
--- /dev/null
+++ b/apps/plugins/sdl/src/hermes/x86_main.asm
@@ -0,0 +1,75 @@
1;
2; x86 format converters for HERMES
3; Some routines Copyright (c) 1998 Christian Nentwich (brn@eleet.mcb.at)
4; This source code is licensed under the GNU LGPL
5;
6; Please refer to the file COPYING.LIB contained in the distribution for
7; licensing conditions
8;
9; Most routines are (c) Glenn Fiedler (ptc@gaffer.org), used with permission
10;
11
12BITS 32
13
14%include "common.inc"
15
16SDL_FUNC _ConvertX86
17
18SECTION .text
19
20;; _ConvertX86:
21;; [ESP+8] ConverterInfo*
22;; --------------------------------------------------------------------------
23;; ConverterInfo (ebp+..)
24;; 0: void *s_pixels
25;; 4: int s_width
26;; 8: int s_height
27;; 12: int s_add
28;; 16: void *d_pixels
29;; 20: int d_width
30;; 24: int d_height
31;; 28: int d_add
32;; 32: void (*converter_function)()
33;; 36: int32 *lookup
34
35_ConvertX86:
36 push ebp
37 mov ebp,esp
38
39; Save the registers used by the blitters, necessary for optimized code
40 pusha
41
42 mov eax,[ebp+8]
43
44 cmp dword [eax+4],BYTE 0
45 je endconvert
46
47 mov ebp,eax
48
49 mov esi,[ebp+0]
50 mov edi,[ebp+16]
51
52y_loop:
53 mov ecx,[ebp+4]
54
55 call [ebp+32]
56
57 add esi,[ebp+12]
58 add edi,[ebp+28]
59
60 dec dword [ebp+8]
61 jnz y_loop
62
63; Restore the registers used by the blitters, necessary for optimized code
64 popa
65
66 pop ebp
67
68endconvert:
69 ret
70
71
72
73%ifidn __OUTPUT_FORMAT__,elf32
74section .note.GNU-stack noalloc noexec nowrite progbits
75%endif