README.RISCOS
changeset 1332 de3d552b59b2
parent 1035 974ba6ae0fa3
child 3244 7c73d5b5a0d6
child 13054 d07097a0e57e
equal deleted inserted replaced
1331:1cbaeee565b1 1332:de3d552b59b2
     1 Readme for RISC OS port of SDL
     1 Readme for RISC OS port of SDL
     2 ==============================
     2 ==============================
     3 
     3 
     4 This document last updated on 26th January 2005
     4 This document last updated on 2nd Februrary 2006
     5 
     5 
     6 This is a RISC OS port of the Simple Direct Media Layer (SDL) by Alan Buckley with contributions from Peter Naulls.
     6 This is a RISC OS port of the Simple Direct Media Layer (SDL) by Alan Buckley with contributions from Peter Naulls.
     7 
     7 
     8 Details of the SDL can be found at http://www.libsdl.org.
     8 Details of the SDL can be found at http://www.libsdl.org.
     9 
     9 
    10 The source code including the RISC OS version can be obtained from
    10 The source code including the RISC OS version can be obtained from:
       
    11 
    11 http://www.libsdl.org.
    12 http://www.libsdl.org.
    12 
    13 
    13 RISC OS makefiles, 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.chocky.org/unix/index.html.
    14 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/.
    14 
    15 
    15 This is released under the LGPL see the file COPYING for details.
    16 This is released under the LGPL see the file COPYING for details.
    16 
    17 
    17 
    18 
       
    19 Compiling applications under RISC OS
       
    20 ====================================
       
    21 
       
    22 Add -ISDL: for the C compiler flags if you include the files in the SDL directory. e.g. #include "SDL/SDL.h"
       
    23 Add -ISDL:SDL for the C compiler flags if you include the files directly. e.g. #include "SDL/SDL.h"
       
    24 
       
    25 Add -LSDL: -lSDL to the link stage of compilation.
       
    26 
       
    27 For example, to compile the testbitmap.c sample you could use:
       
    28 
       
    29 gcc -ISDL:SDL -LSDL: -lSDL testbitmap.c -otestbitmap
       
    30 
       
    31 
    18 RISC OS port of SDL runtime information
    32 RISC OS port of SDL runtime information
    19 ======================================
    33 =======================================
    20 
    34 
    21 Runtime requirements
    35 Runtime requirements
    22 --------------------
    36 --------------------
    23 
    37 
    24 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.
    38 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.
    29 
    43 
    30 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.
    44 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.
    31 
    45 
    32 
    46 
    33 RISC OS runtime parameters
    47 RISC OS runtime parameters
    34 -------------------------
    48 --------------------------
    35 
    49 
    36 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).
    50 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).
    37 
    51 
    38 They are all defined on an application basis.
    52 They are all defined on an application basis.
    39 
    53 
    41 1. Use the name of the program unless it is !RunImage
    55 1. Use the name of the program unless it is !RunImage
    42 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.
    56 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.
    43 
    57 
    44 The variables are:
    58 The variables are:
    45 
    59 
    46 SDL$<appname>$TaskName - The name of the task for RISC OS. If omitted then <appname> is used for the task name,
    60 SDL$<appname>$TaskName
    47 
    61 
    48 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.
    62 The name of the task for RISC OS. If omitted then <appname> is used for the task name,
       
    63 
       
    64 SDL$<appname>$BackBuffer
       
    65 
       
    66 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.
       
    67 
       
    68 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.
       
    69 
       
    70 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.
    49 
    71 
    50 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.
    72 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.
    51 
    73 
    52 SDL$<appname>$AudioBuffer - set the minimum size of the audio buffer in samples in steps of 512. If this is less than the minimum calculated from the parameters requested in the program by SDL_OpenAudio these will be used instead. If this parameter is not used or set to 0 the buffer size will be calculated to buffer 10 centisecond of sound. The time buffered can be calculated as specified size/frequency in seconds. The larger the buffer the more audio data that will be buffered, but this can lead to a lag between a sound being requested and it being heard, so the size should be kept to a minimum. You should only set this parameter if the sound is being missed out. 
       
    53 
       
    54 
       
    55 
    74 
    56 RISC OS SDL port API notes
    75 RISC OS SDL port API notes
    57 =========================
    76 ==========================
    58 
    77 
    59 Current level of implementation
    78 Current level of implementation
    60 -------------------------------
    79 -------------------------------
    61 
    80 
    62 The following list is an overview of how much of the SDL is implemented. The areas match the main areas of the SDL.
    81 The following list is an overview of how much of the SDL is implemented. The areas match the main areas of the SDL.