Skip to content

Commit

Permalink
Removed broken AmigaOS support.
Browse files Browse the repository at this point in the history
Fixes Bugzilla #337.
  • Loading branch information
icculus committed Oct 29, 2006
1 parent 5837347 commit dca8bc6
Show file tree
Hide file tree
Showing 34 changed files with 10 additions and 5,910 deletions.
12 changes: 0 additions & 12 deletions BUGS
Expand Up @@ -190,15 +190,3 @@ AIX: -= NOT YET SUPPORTED =-
More information on this port is available at:
http://www.kom.e-technik.tu-darmstadt.de/~griff/SDL/

AmigaOS: -= NOT YET SUPPORTED =-
The OpenGL support isn't implemented yet.

SDL_WM_GrabInput() is not implemented.
Does anyone know how to do this? SDL_WM_GrabInput() is designed
to prevent the user from switching input and mouse focus away from
the SDL application.

Continuous relative mouse motion is not implemented.

The AmigaOS port was done by Gabriele.Greco@galactica.it

2 changes: 1 addition & 1 deletion README
Expand Up @@ -14,7 +14,7 @@ and 2D framebuffer across multiple platforms.

The current version supports Linux, Windows, Windows CE, BeOS, MacOS,
Mac OS X, FreeBSD, NetBSD, OpenBSD, BSD/OS, Solaris, IRIX, and QNX.
The code contains support for AmigaOS, Dreamcast, Atari, AIX, OSF/Tru64,
The code contains support for Dreamcast, Atari, AIX, OSF/Tru64,
RISC OS, SymbianOS, and OS/2, but these are not officially supported.

SDL is written in C, but works with C++ natively, and has bindings to
Expand Down
54 changes: 8 additions & 46 deletions README.AmigaOS
@@ -1,50 +1,12 @@
This is the porting of 1.2.0 version of SDL (the latest stable one)
to AmigaOS/68k.
The AmigaOS code has been removed from SDL, since it had been broken for a
long time and had a few bits of fairly invasive code #ifdef'd into the
SDL core.

All the bugs known of the past version have been corrected. And I've
added all the new SDL features.
However, there is an OS4 version of SDL here:
http://www.rcdrummond.net/amiga/index.html

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.
And a MorphOS version here:
http://www.lehtoranta.net/powersdl/

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).
--ryan.

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
4 changes: 1 addition & 3 deletions include/SDL_config.h.default
Expand Up @@ -26,9 +26,7 @@
#include "SDL_platform.h"

/* Add any platform that doesn't build using the configure system */
#if defined(__AMIGA__)
#include "SDL_config_amiga.h"
#elif defined(__DREAMCAST__)
#if defined(__DREAMCAST__)
#include "SDL_config_dreamcast.h"
#elif defined(__MACOS__)
#include "SDL_config_macos.h"
Expand Down
3 changes: 0 additions & 3 deletions include/SDL_config.h.in
Expand Up @@ -195,7 +195,6 @@

/* Enable various input drivers */
#undef SDL_INPUT_TSLIB
#undef SDL_JOYSTICK_AMIGA
#undef SDL_JOYSTICK_BEOS
#undef SDL_JOYSTICK_DC
#undef SDL_JOYSTICK_DUMMY
Expand All @@ -221,7 +220,6 @@
#undef SDL_LOADSO_WIN32

/* Enable various threading systems */
#undef SDL_THREAD_AMIGA
#undef SDL_THREAD_BEOS
#undef SDL_THREAD_DC
#undef SDL_THREAD_EPOC
Expand All @@ -234,7 +232,6 @@
#undef SDL_THREAD_WIN32

/* Enable various timer systems */
#undef SDL_TIMER_AMIGA
#undef SDL_TIMER_BEOS
#undef SDL_TIMER_DC
#undef SDL_TIMER_DUMMY
Expand Down
80 changes: 0 additions & 80 deletions include/SDL_config_amiga.h

This file was deleted.

4 changes: 0 additions & 4 deletions include/SDL_platform.h
Expand Up @@ -29,10 +29,6 @@
#undef __AIX__
#define __AIX__ 1
#endif
#if defined(AMIGA) || defined(__AMIGA) || defined(__amigados__)
#undef __AMIGA__
#define __AMIGA__ 1
#endif
#if defined(__BEOS__)
#undef __BEOS__
#define __BEOS__ 1
Expand Down
72 changes: 0 additions & 72 deletions src/audio/SDL_audio.c
Expand Up @@ -82,9 +82,6 @@ static AudioBootStrap *bootstrap[] = {
#if SDL_AUDIO_DRIVER_SNDMGR
&SNDMGR_bootstrap,
#endif
#if SDL_AUDIO_DRIVER_AHI
&AHI_bootstrap,
#endif
#if SDL_AUDIO_DRIVER_MINT
&MINTAUDIO_GSXB_bootstrap,
&MINTAUDIO_MCSN_bootstrap,
Expand Down Expand Up @@ -115,10 +112,6 @@ SDL_AudioDevice *current_audio = NULL;
int SDL_AudioInit(const char *driver_name);
void SDL_AudioQuit(void);

#if SDL_AUDIO_DRIVER_AHI
static int audio_configured = 0;
#endif

/* The general mixing thread function */
int SDLCALL SDL_RunAudio(void *audiop)
{
Expand All @@ -128,21 +121,6 @@ int SDLCALL SDL_RunAudio(void *audiop)
void *udata;
void (SDLCALL *fill)(void *userdata,Uint8 *stream, int len);
int silence;
#if SDL_AUDIO_DRIVER_AHI
int started = 0;

/* AmigaOS NEEDS that the audio driver is opened in the thread that uses it! */

D(bug("Task audio started audio struct:<%lx>...\n",audiop));

D(bug("Before Openaudio..."));
if(audio->OpenAudio(audio, &audio->spec)==-1)
{
D(bug("Open audio failed...\n"));
return(-1);
}
D(bug("OpenAudio...OK\n"));
#endif

/* Perform any thread setup */
if ( audio->ThreadInit ) {
Expand All @@ -154,14 +132,6 @@ int SDLCALL SDL_RunAudio(void *audiop)
fill = audio->spec.callback;
udata = audio->spec.userdata;

#if SDL_AUDIO_DRIVER_AHI
audio_configured = 1;

D(bug("Audio configured... Checking for conversion\n"));
SDL_mutexP(audio->mixer_lock);
D(bug("Semaphore obtained...\n"));
#endif

if ( audio->convert.needed ) {
if ( audio->convert.src_format == AUDIO_U8 ) {
silence = 0x80;
Expand All @@ -174,11 +144,6 @@ int SDLCALL SDL_RunAudio(void *audiop)
stream_len = audio->spec.size;
}

#if SDL_AUDIO_DRIVER_AHI
SDL_mutexV(audio->mixer_lock);
D(bug("Entering audio loop...\n"));
#endif

#ifdef __OS2__
/* Increase the priority of this thread to make sure that
the audio will be continuous all the time! */
Expand Down Expand Up @@ -253,14 +218,6 @@ int SDLCALL SDL_RunAudio(void *audiop)
audio->WaitDone(audio);
}

#if SDL_AUDIO_DRIVER_AHI
D(bug("WaitAudio...Done\n"));

audio->CloseAudio(audio);

D(bug("CloseAudio..Done, subtask exiting...\n"));
audio_configured = 0;
#endif
#ifdef __OS2__
#ifdef DEBUG_BUILD
printf("[SDL_RunAudio] : Task exiting. (TID%d)\n", SDL_ThreadID());
Expand Down Expand Up @@ -532,33 +489,12 @@ int SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpec *obtained)
audio->enabled = 1;
audio->paused = 1;

#if !SDL_AUDIO_DRIVER_AHI

/* AmigaOS opens audio inside the main loop */
audio->opened = audio->OpenAudio(audio, &audio->spec)+1;

if ( ! audio->opened ) {
SDL_CloseAudio();
return(-1);
}
#else
D(bug("Locking semaphore..."));
SDL_mutexP(audio->mixer_lock);


audio->thread = SDL_CreateThread(SDL_RunAudio, audio);
D(bug("Created thread...\n"));

if ( audio->thread == NULL ) {
SDL_mutexV(audio->mixer_lock);
SDL_CloseAudio();
SDL_SetError("Couldn't create audio thread");
return(-1);
}

while(!audio_configured)
SDL_Delay(100);
#endif

/* If the audio driver changes the buffer size, accept it */
if ( audio->spec.samples != desired->samples ) {
Expand Down Expand Up @@ -602,7 +538,6 @@ int SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpec *obtained)
}
}

#if !SDL_AUDIO_DRIVER_AHI
/* Start the audio thread if necessary */
switch (audio->opened) {
case 1:
Expand All @@ -624,11 +559,6 @@ int SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpec *obtained)
/* The audio is now playing */
break;
}
#else
SDL_mutexV(audio->mixer_lock);
D(bug("SDL_OpenAudio USCITA...\n"));

#endif

return(0);
}
Expand Down Expand Up @@ -702,12 +632,10 @@ void SDL_AudioQuit(void)
SDL_FreeAudioMem(audio->convert.buf);

}
#if !SDL_AUDIO_DRIVER_AHI
if ( audio->opened ) {
audio->CloseAudio(audio);
audio->opened = 0;
}
#endif
/* Free the driver data */
audio->free(audio);
current_audio = NULL;
Expand Down

0 comments on commit dca8bc6

Please sign in to comment.