view README.RISCOS @ 5067:61d53410eb41

Fixed bug #859 CREATE_SUBDIRS helps a lot if browsing HTML documentation in a file browser. ALWAYS_DETAILED_SEC makes sure everything has at least the automatic documentation like function prototype and source references. STRIP_FROM_PATH allows you to include only the relevant portions of the files' paths, cleaning up both the file list and directory tree, though you need to change the path listed here to match wherever you put SDL. ALIASES avoids some warnings generated by C:\source\svn.libsdl.org\trunk\SDL\src\joystick\darwin\10.3.9-FIX\IOHIDLib.h. It seems Apple uses a few commands which are not normally supported by Doxygen. BUILTIN_STL_SUPPORT adds support for parsing code which makes use of the standard template library. There isn't a lot of C++ in SDL (some in bwindow at least), but this still seems like a good idea. TYPEDEF_HIDES_STRUCT means that for code like this: typedef struct A {int B;} C; C is documented as a structure containing B instead of a typedef mapped to A. EXTRACT_ALL, EXTRACT_PRIVATE, EXTRACT_STATIC, EXTRACT_LOCAL_METHODS, EXTRACT_ANON_NSPACES and INTERNAL_DOCS make sure that _everything_ is documented. CASE_SENSE_NAMES = NO avoids potential conflicts when building documentation on case insensitive file systems like NTFS and FAT32. WARN_NO_PARAMDOC lets you know when you have documented some, but not all, of the parameters of a function. This is useful when you're working on adding such documentation since it makes partially documented functions easier to spot. WARN_LOGFILE writes warnings to a seperate file instead of mixing them in with stdout. When not running in quiet mode, these warnings can be hard to spot without this flag. I added *.h.in and *.h.default to FILE_PATTERNS to generate documentation for config.h.in and config.h.default. RECURSIVE tells doxygen to look not only in the input directory, but also in subfolders. EXCLUDE avoids documenting things like test programs, examples and templates which need to be documented separately. I've used EXCLUDE_PATTERNS to exclude non-source subdirectories that often find their way into source folders (such as obj or .svn). EXAMPLE_PATH lists directories doxygen will search to find included example code. So far, SDL doesn't really use this feature, but I've listed some likely locations. SOURCE_BROWSER adds syntax highlighted source code to the HTML output. USE_HTAGS is nice, but not available on Windows. INLINE_SOURCES adds the body of a function to it's documentation so you can quickly see exactly what it does. ALPHABETICAL_INDEX generates an alphabetical list of all structures, functions, etc., which makes it much easier to find what you're looking for. IGNORE_PREFIX skips the SDL_ prefix when deciding which index page to place an item on so you don't have everything show up under "S". HTML_DYNAMIC_SECTIONS hides the includes/included by diagrams by default and adds JavaScript to allow the user to show and hide them by clicking a link. ENUM_VALUES_PER_LINE = 1 makes enums easier to read by placing each value on it's own line. GENERATE_TREEVIEW produces a two frame index page with a navigation tree on the left. I have LaTeX and man pages turned off to speed up doxygen, you may want to turn them back on yourself. I added _WIN32=1 to PREDEFINED to cause SDL to output documentation related to Win32 builds of SDL. Normally, doxygen gets confused since there are multiple definitions for various structures and formats that vary by platform. Without this doxygen can produce broken documentation or, if you're lucky, output documentation only for the dummy drivers, which isn't very useful. You need to pick a platform. GENERATE_TAGFILE produces a file which can be used to link other doxygen documentation to the SDL documentation. CLASS_DIAGRAMS turns on class diagrams even when dot is not available. HAVE_DOT tells doxygen to try to use dot to generate diagrams. TEMPLATE_RELATIONS and INCLUDE_GRAPH add additional diagrams to the documentation. DOT_MULTI_TARGETS speeds up dot. OUTPUT_DIRECTORY, INPUT and other paths reflect the fact that this Doxyfile is intended to process src as well as include and is being run from a separate subdirectory. Doxygen produces several temporary files while it's running and if interrupted, can leave those files behind. It's easier to clean up if there aren't a hundred or so files in the same folder. I typically run doxygen in SDL/doxy and set the output directory to '.'. Since doxygen puts it's output in subfolders by type, this keeps things pretty well organised. You could use '../doc' instead and get the same results.
author Sam Lantinga <slouken@libsdl.org>
date Fri, 21 Jan 2011 12:57:01 -0800
parents 7c73d5b5a0d6
children
line wrap: on
line source

Readme for RISC OS port of SDL
==============================

This document last updated on 2nd Februrary 2006

This is a RISC OS port of the Simple Direct Media Layer (SDL) by Alan Buckley with contributions from Peter Naulls.

Details of the SDL can be found at http://www.libsdl.org.

The source code including the RISC OS version can be obtained from:

http://www.libsdl.org.

Pre built libraries and many games and applications compiled for RISC OS using this library can be downloaded from The Unix Porting Project at http://www.riscos.info/unix/.

This is released under the LGPL see the file COPYING for details.


Compiling applications under RISC OS
====================================

Add -ISDL: for the C compiler flags if you include the files in the SDL directory. e.g. #include "SDL/SDL.h"
Add -ISDL:SDL for the C compiler flags if you include the files directly. e.g. #include "SDL/SDL.h"

Add -LSDL: -lSDL to the link stage of compilation.

For example, to compile the testbitmap.c sample you could use:

gcc -ISDL:SDL -LSDL: -lSDL testbitmap.c -otestbitmap


RISC OS port of SDL runtime information
=======================================

Runtime requirements
--------------------

This library currently needs a minimum of RISC OS 3.6. The source code for the library (and a lot of the programs built with it) also need long file names.

To use the audio you also need 16 bit sound and to have installed the DigitalRender module by Andreas Dehmel version 0.51 available from his
web site: http://home.t-online.de/~zarquon
This is loaded when needed by UnixLib.

Note: As most programs ported from other OSes use high resolution graphics and a memory back buffer a machine with a StrongARM processor and 1 or 2MB of VRAM (or a better machine) is recomended.


RISC OS runtime parameters
--------------------------

Several environmental variables have been defined to make porting programs easier (i.e. By setting these variable you do not need to have source code differences between OSes).

They are all defined on an application basis.

The <appname> used below is found as follows:
1. Use the name of the program unless it is !RunImage
2. Check the folder specification for the folder !RunImage is run from. If it is a folder name use that name, otherwise if it is an environmental variable of the form <XXX$Dir> use the value of XXX.

The variables are:

SDL$<appname>$TaskName

The name of the task for RISC OS. If omitted then <appname> is used for the task name,

SDL$<appname>$BackBuffer

Set to 1 to use a system memory back buffer for the screen in full screen mode. Some programs on other systems assume their is always a back buffer even though the SDL specification specifies this is not the case. The current RISC OS implementation uses direct writes to the screen if a hardware fullscreen is requested.

Set to 2 to use an ARM code full word copy. This is faster than the standard back buffer, but uses aligned words only so it is possible (but unlikely) for it to corrupt the screen for 8bpp and 16bpp modes.

Set to 3 to use a RISC OS sprite as the back buffer. This is usually the slowest for most SDL applications, however it may be useful in the future as Sprite acceleration is added to various hardware that runs RISC OS.

SDL$<appname>$CloseAction - set the action for the close icon. Again as programs don't match the specification you can set this to 0 to remove the close icon from the main window for applications where this does not affect the program.


RISC OS SDL port API notes
==========================

Current level of implementation
-------------------------------

The following list is an overview of how much of the SDL is implemented. The areas match the main areas of the SDL.

video - Mostly done. Doesn't cover gamma, YUV-overlay or OpenGL.
Window Manager - Mostly done. SetIcon/IconifyWindow not implemented.
Events - Mostly done. Resize and some joystick events missing.
Joystick - Currently assumes a single joystick with 4 buttons.
Audio - Done
Threads - Done
Timers - Done

Thread support can be removed by defining DISABLE_THREADS and recompiling the library.

SDL API notes
-------------

This section contains additional notes on some specific commands.

SDL_SetVideoMode
  On RISC OS a fullscreen mode directly accesses the screen. This can be modified by the environmental variable (SDL$<appname>$BackBuffer) or by using the SDL_SWSURFACE flag to write to an offscreen buffer that is updated using SDL_UpdateRects.
  Open GL is not supported so SDL_OPENGL and SDL_OPENGLBLIT flags fail.
  SDL_RESIZEABLE and SDL_NOFRAME flags are not supported.

SDL_SetColors
  In a wimp mode the screen colours are not changed for a hardware palette instead the RISC OS sprite colour mapping is used to get the best matching colours.

SDL_CreateCursor
   Inverted colour is not supported.

SDL_WM_ToggleFullScreen
   Currently this won't work if the application starts up in Fullscreen mode.
   Toggling to fullscreen will only work if the monitor is set up to support the exact screen size requested.

SDL_EnableUNICODE
   Unicode translation used here is only really accurate for 7 bit characters.

SDL_NumJoysticks/JoystickName etc.
   Hardcoded to expect only 1 joystick with 4 buttons if the Joystick module is loaded.

SDL_GetTicks
   Timer used has only a centisecond accuracy. This applies to other time related functions.
   
SDL_Delay
   Modified to poll keyboard/mouse during the delay on the event thread.


Notes on current implementation
-------------------------------

Keyboard and mouse are polled so if too long a time is spent between a call to SDL_PumpEvents, functions that use it, or SDL_Delay events can be missed.