annotate README.NanoX @ 1982:3b4ce57c6215

First shot at new audio data types (int32 and float32). Notable changes: - Converters between types are autogenerated. Instead of making multiple passes over the data with seperate filters for endianess, size, signedness, etc, converting between data types is always one specialized filter. This simplifies SDL_BuildAudioCVT(), which otherwise had a million edge cases with the new types, and makes the actually conversions more CPU cache friendly. Left a stub for adding specific optimized versions of these routines (SSE/MMX/Altivec, assembler, etc) - Autogenerated converters are built by SDL/src/audio/sdlgenaudiocvt.pl. This does not need to be run unless tweaking the code, and thus doesn't need integration into the build system. - Went through all the drivers and tried to weed out all the "Uint16" references that are better specified with the new SDL_AudioFormat typedef. - Cleaned out a bunch of hardcoded bitwise magic numbers and replaced them with new SDL_AUDIO_* macros. - Added initial float32 and int32 support code. Theoretically, existing drivers will push these through converters to get the data they want to feed to the hardware. Still TODO: - Optimize and debug new converters. - Update the CoreAudio backend to accept float32 data directly. - Other backends, too? - SDL_LoadWAV() needs to be updated to support int32 and float32 .wav files (both of which exist and can be generated by 'sox' for testing purposes). - Update the mixer to handle new datatypes. - Optionally update SDL_sound and SDL_mixer, etc.
author Ryan C. Gordon <icculus@icculus.org>
date Thu, 24 Aug 2006 12:10:46 +0000
parents 26dafefeebb2
children
rev   line source
30
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1 =================================================================
471
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
2 Patch version 0.9 of SDL(Simple DirectMedia Layer) for Nano-X API
30
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
3 =================================================================
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
4
471
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
5 Authors: Hsieh-Fu Tsai, clare@setabox.com
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
6 Greg Haerr, greg@censoft.com
30
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
7
471
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
8 This patch is against SDL version 1.2.4.
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
9 It enhances previous patch 0.8 by providing direct framebuffer
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
10 access as well as dynamic hardware pixel type support, not
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
11 requiring a compile-time option setting for different framebuffer
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
12 modes.
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
13 Tested against Microwindows version 0.89pre9.
30
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
14
471
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
15 Older Microwindows versions
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
16 ===========================
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
17 If running on a version older than Microwindows 0.89pre9,
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
18 the following items might need to be patched in Microwindows.
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
19
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
20 1. Patch src/nanox/client.c::GrClose()
30
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
21 It fixes the client side GrClose(). In the original version,
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
22 GrOpen() can only be called once. When the GrOpen() is called at
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
23 the second time, the program will terminate. In order to prevent
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
24 this situation, we need to insert "nxSocket = -1" after
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
25 "close(nxSocket)" in GrClose(). If you do not have this problem,
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
26 you may skip this step.
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
27
471
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
28 2. Patch src/nanox/clientfb.c to return absolute x,y coordinates
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
29 when using GrGetWindowFBInfo(). Copy the version 0.89pre9
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
30 of src/nanox/clientfb.c to your system, or configure
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
31 using --disable-nanox-direct-fb.
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
32
30
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
33 =============
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
34 Quick Install
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
35 =============
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
36
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
37 1. ./configure --disable-video-x11 --disable-video-fbcon \
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
38 --enable-video-nanox \
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
39 --with-nanox-pixel-type=[rgb/0888/888/565/555/332/pal]
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
40 2. make clean
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
41 3. make
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
42 4. make install (as root)
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
43
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
44 ============
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
45 Nitty-gritty
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
46 ============
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
47
471
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
48 --enable-nanox-direct-fb Use direct framebuffer access
30
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
49 --enable-nanox-debug Show debug messages
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
50 --enable-nanox-share-memory Use shared-memory to speed up
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
51
471
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
52 When running multi-threaded applications using SDL, such
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
53 as SMPEG, set THREADSAFE=Y in Microwindows' config file,
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
54 to enable GrXXX() system call critical section support.
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
55
30
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
56 =============================================
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
57 Some programs can be used to test this patch.
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
58 =============================================
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
59
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
60 1. http://www.cs.berkeley.edu/~weimer/atris (a tetris-like game)
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
61 2. http://www.libsdl.org/projects/newvox/
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
62 3. http://www.libsdl.org/projects/xflame/
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
63 4. http://www.libsdl.org/projects/optimum/
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
64 5. http://www.gnugeneration.com/software/loop/
471
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
65 6: http://www.lokigames.com/development/smpeg.php3 (SMPEG version 0.4.4)
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
66
30
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
67 =========
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
68 Todo List
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
69 =========
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
70
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
71 1. Create hardware surface
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
72 2. Create YUVOverlay on hardware
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
73 3. Use OpenGL
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
74 4. Gamma correction
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
75 5. Hide/Change mouse pointer
471
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
76 6. Better window movement control with direct fb access
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
77 7. Palette handling in 8bpp could be improved
30
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
78
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
79 =====================
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
80 Supporting Institutes
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
81 =====================
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
82
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
83 Many thanks to go to Setabox Co., Ltd. and CML (Communication and
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
84 Multimedia Laboratory, http://www.cmlab.csie.ntu.edu.tw/) in the
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
85 Department of Computer Science and Information Engineering of
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
86 National Taiwan University for supporting this porting project.
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
87
471
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
88 Century Embedded Technologies (http://embedded.censoft.com)
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
89 for this patch.
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
90
30
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
91 ===================
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
92 Contact Information
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
93 ===================
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
94
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
95 Welcome to give me any suggestion and to report bugs.
57bf11a5efd7 Added initial support for Nano-X (thanks Hsieh-Fu!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
96 My e-mail address : clare@setabox.com or niky@cmlab.csie.ntu.edu.tw
471
26dafefeebb2 Date: Sat, 24 Aug 2002 22:20:01 -0600
Sam Lantinga <slouken@libsdl.org>
parents: 30
diff changeset
97 or greg@censoft.com