view README.AmigaOS @ 1078:e2ef6b7001fd

Patch from Antonio SJ Musumeci: " This code with SDL-1.2.8 and CVS: #include <stdio.h> #include <stdlib.h> #include <SDL.h> int main(int argc, char** argv) { char alphabet[26] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; char buffer_file[27] = {0}; char buffer_mem[27] = {0}; int rv_file; int rv_mem; FILE* file_ptr; SDL_RWops* rwop_file; SDL_RWops* rwop_mem; file_ptr = fopen("./blah", "w"); fwrite(alphabet, 1, sizeof(alphabet), file_ptr); fclose(file_ptr); rwop_mem = SDL_RWFromMem(alphabet, sizeof(alphabet)); rwop_file = SDL_RWFromFile("./blah", "r"); rv_mem = SDL_RWread(rwop_mem , buffer_mem, 5, 6); rv_file = SDL_RWread(rwop_file, buffer_file, 5, 6); printf("From File: %d %s\n" "From Mem: %d %s\n", rv_file, buffer_file, rv_mem, buffer_mem); printf("Seek end of File: %d\n" "Seek end of Mem: %d\n", SDL_RWseek(rwop_file, 0, SEEK_END), SDL_RWseek(rwop_mem , 0, SEEK_END)); SDL_RWclose(rwop_file); SDL_RWclose(rwop_mem); return 0; } Produces this output: From File: 5 ABCDEFGHIJKLMNOPQRSTUVWXYZ From Mem: 5 ABCDEFGHIJKLMNOPQRSTUVWXY Seek end of File: 26 Seek end of Mem: 26 " --ryan.
author Ryan C. Gordon <icculus@icculus.org>
date Fri, 24 Jun 2005 12:48:38 +0000
parents 75a95f82bc1f
children 6d2e1961661a
line wrap: on
line source

This is the porting of 1.2.0 version of SDL (the latest stable one)
to AmigaOS/68k.

All the bugs known of the past version have been corrected. And I've
added all the new SDL features.

This version of SDL needs Cybergraphx V3 (r69+) or CyberGraphX V4
and AHI v3+. Probably it works also with P96 or CGXAga, but it's 
untested.

This version is available as linked library for SAS/C and GCC, only 68k this 
time, a powerup (ppcemu compatible) and a morphos version will be ready quite 
soon (i hope).

Implemented:

- 8/16/24/32bit video modes, both fullscreen and windowed.
- Hardware surfaces.
- CGX blitting acceleration.
- CGX colorkey blitting acceleration.
- AHI audio (8/16 bit, with any audio format), always uses unit 0 for now.
- Thread support (maybe not 100% compatible with other implementations)
- Semaphores 
- Window resizing and backdrop windows (NEW)
- Joystick/Joypad support.

To do:

- CDRom audio playing support
- OpenGL (A guy was working on it but I've lost his tracks :( )

The SAS/C library is distributed with debug info attached, to strip debug info 
simply add STRIPDEBUG argument to the linker.

NOTE: SDL includes debug output using kprintf, to disable it add to your 
project a function like this:

void kprintf(char *a,...)
{
}

Otherwise you can redirect the debug to a console window with sushi, sashimi or
similar tools (the default output is the internal serial port). 

For info, support, bugfix and other feel free to mail me:

Gabriele Greco (gabriele.greco@aruba.it)

You can find also a small SDL Amiga page at:
http://ggreco.interfree.it/sdl.html