Skip to content

Commit dca8bc6

Browse files
committed
Removed broken AmigaOS support.
Fixes Bugzilla libsdl-org#337.
1 parent 5837347 commit dca8bc6

34 files changed

+10
-5910
lines changed

BUGS

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -190,15 +190,3 @@ AIX: -= NOT YET SUPPORTED =-
190190
More information on this port is available at:
191191
http://www.kom.e-technik.tu-darmstadt.de/~griff/SDL/
192192

193-
AmigaOS: -= NOT YET SUPPORTED =-
194-
The OpenGL support isn't implemented yet.
195-
196-
SDL_WM_GrabInput() is not implemented.
197-
Does anyone know how to do this? SDL_WM_GrabInput() is designed
198-
to prevent the user from switching input and mouse focus away from
199-
the SDL application.
200-
201-
Continuous relative mouse motion is not implemented.
202-
203-
The AmigaOS port was done by [email protected]
204-

README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ and 2D framebuffer across multiple platforms.
1414

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

2020
SDL is written in C, but works with C++ natively, and has bindings to

README.AmigaOS

Lines changed: 8 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,12 @@
1-
This is the porting of 1.2.0 version of SDL (the latest stable one)
2-
to AmigaOS/68k.
1+
The AmigaOS code has been removed from SDL, since it had been broken for a
2+
long time and had a few bits of fairly invasive code #ifdef'd into the
3+
SDL core.
34

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

7-
This version of SDL needs Cybergraphx V3 (r69+) or CyberGraphX V4
8-
and AHI v3+. Probably it works also with P96 or CGXAga, but it's
9-
untested.
8+
And a MorphOS version here:
9+
http://www.lehtoranta.net/powersdl/
1010

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

15-
Implemented:
16-
17-
- 8/16/24/32bit video modes, both fullscreen and windowed.
18-
- Hardware surfaces.
19-
- CGX blitting acceleration.
20-
- CGX colorkey blitting acceleration.
21-
- AHI audio (8/16 bit, with any audio format), always uses unit 0 for now.
22-
- Thread support (maybe not 100% compatible with other implementations)
23-
- Semaphores
24-
- Window resizing and backdrop windows (NEW)
25-
- Joystick/Joypad support.
26-
27-
To do:
28-
29-
- CDRom audio playing support
30-
- OpenGL (A guy was working on it but I've lost his tracks :( )
31-
32-
The SAS/C library is distributed with debug info attached, to strip debug info
33-
simply add STRIPDEBUG argument to the linker.
34-
35-
NOTE: SDL includes debug output using kprintf, to disable it add to your
36-
project a function like this:
37-
38-
void kprintf(char *a,...)
39-
{
40-
}
41-
42-
Otherwise you can redirect the debug to a console window with sushi, sashimi or
43-
similar tools (the default output is the internal serial port).
44-
45-
For info, support, bugfix and other feel free to mail me:
46-
47-
Gabriele Greco ([email protected])
48-
49-
You can find also a small SDL Amiga page at:
50-
http://ggreco.interfree.it/sdl.html

include/SDL_config.h.default

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@
2626
#include "SDL_platform.h"
2727

2828
/* Add any platform that doesn't build using the configure system */
29-
#if defined(__AMIGA__)
30-
#include "SDL_config_amiga.h"
31-
#elif defined(__DREAMCAST__)
29+
#if defined(__DREAMCAST__)
3230
#include "SDL_config_dreamcast.h"
3331
#elif defined(__MACOS__)
3432
#include "SDL_config_macos.h"

include/SDL_config.h.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@
195195

196196
/* Enable various input drivers */
197197
#undef SDL_INPUT_TSLIB
198-
#undef SDL_JOYSTICK_AMIGA
199198
#undef SDL_JOYSTICK_BEOS
200199
#undef SDL_JOYSTICK_DC
201200
#undef SDL_JOYSTICK_DUMMY
@@ -221,7 +220,6 @@
221220
#undef SDL_LOADSO_WIN32
222221

223222
/* Enable various threading systems */
224-
#undef SDL_THREAD_AMIGA
225223
#undef SDL_THREAD_BEOS
226224
#undef SDL_THREAD_DC
227225
#undef SDL_THREAD_EPOC
@@ -234,7 +232,6 @@
234232
#undef SDL_THREAD_WIN32
235233

236234
/* Enable various timer systems */
237-
#undef SDL_TIMER_AMIGA
238235
#undef SDL_TIMER_BEOS
239236
#undef SDL_TIMER_DC
240237
#undef SDL_TIMER_DUMMY

include/SDL_config_amiga.h

Lines changed: 0 additions & 80 deletions
This file was deleted.

include/SDL_platform.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@
2929
#undef __AIX__
3030
#define __AIX__ 1
3131
#endif
32-
#if defined(AMIGA) || defined(__AMIGA) || defined(__amigados__)
33-
#undef __AMIGA__
34-
#define __AMIGA__ 1
35-
#endif
3632
#if defined(__BEOS__)
3733
#undef __BEOS__
3834
#define __BEOS__ 1

src/audio/SDL_audio.c

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,6 @@ static AudioBootStrap *bootstrap[] = {
8282
#if SDL_AUDIO_DRIVER_SNDMGR
8383
&SNDMGR_bootstrap,
8484
#endif
85-
#if SDL_AUDIO_DRIVER_AHI
86-
&AHI_bootstrap,
87-
#endif
8885
#if SDL_AUDIO_DRIVER_MINT
8986
&MINTAUDIO_GSXB_bootstrap,
9087
&MINTAUDIO_MCSN_bootstrap,
@@ -115,10 +112,6 @@ SDL_AudioDevice *current_audio = NULL;
115112
int SDL_AudioInit(const char *driver_name);
116113
void SDL_AudioQuit(void);
117114

118-
#if SDL_AUDIO_DRIVER_AHI
119-
static int audio_configured = 0;
120-
#endif
121-
122115
/* The general mixing thread function */
123116
int SDLCALL SDL_RunAudio(void *audiop)
124117
{
@@ -128,21 +121,6 @@ int SDLCALL SDL_RunAudio(void *audiop)
128121
void *udata;
129122
void (SDLCALL *fill)(void *userdata,Uint8 *stream, int len);
130123
int silence;
131-
#if SDL_AUDIO_DRIVER_AHI
132-
int started = 0;
133-
134-
/* AmigaOS NEEDS that the audio driver is opened in the thread that uses it! */
135-
136-
D(bug("Task audio started audio struct:<%lx>...\n",audiop));
137-
138-
D(bug("Before Openaudio..."));
139-
if(audio->OpenAudio(audio, &audio->spec)==-1)
140-
{
141-
D(bug("Open audio failed...\n"));
142-
return(-1);
143-
}
144-
D(bug("OpenAudio...OK\n"));
145-
#endif
146124

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

157-
#if SDL_AUDIO_DRIVER_AHI
158-
audio_configured = 1;
159-
160-
D(bug("Audio configured... Checking for conversion\n"));
161-
SDL_mutexP(audio->mixer_lock);
162-
D(bug("Semaphore obtained...\n"));
163-
#endif
164-
165135
if ( audio->convert.needed ) {
166136
if ( audio->convert.src_format == AUDIO_U8 ) {
167137
silence = 0x80;
@@ -174,11 +144,6 @@ int SDLCALL SDL_RunAudio(void *audiop)
174144
stream_len = audio->spec.size;
175145
}
176146

177-
#if SDL_AUDIO_DRIVER_AHI
178-
SDL_mutexV(audio->mixer_lock);
179-
D(bug("Entering audio loop...\n"));
180-
#endif
181-
182147
#ifdef __OS2__
183148
/* Increase the priority of this thread to make sure that
184149
the audio will be continuous all the time! */
@@ -253,14 +218,6 @@ int SDLCALL SDL_RunAudio(void *audiop)
253218
audio->WaitDone(audio);
254219
}
255220

256-
#if SDL_AUDIO_DRIVER_AHI
257-
D(bug("WaitAudio...Done\n"));
258-
259-
audio->CloseAudio(audio);
260-
261-
D(bug("CloseAudio..Done, subtask exiting...\n"));
262-
audio_configured = 0;
263-
#endif
264221
#ifdef __OS2__
265222
#ifdef DEBUG_BUILD
266223
printf("[SDL_RunAudio] : Task exiting. (TID%d)\n", SDL_ThreadID());
@@ -532,33 +489,12 @@ int SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpec *obtained)
532489
audio->enabled = 1;
533490
audio->paused = 1;
534491

535-
#if !SDL_AUDIO_DRIVER_AHI
536-
537-
/* AmigaOS opens audio inside the main loop */
538492
audio->opened = audio->OpenAudio(audio, &audio->spec)+1;
539493

540494
if ( ! audio->opened ) {
541495
SDL_CloseAudio();
542496
return(-1);
543497
}
544-
#else
545-
D(bug("Locking semaphore..."));
546-
SDL_mutexP(audio->mixer_lock);
547-
548-
549-
audio->thread = SDL_CreateThread(SDL_RunAudio, audio);
550-
D(bug("Created thread...\n"));
551-
552-
if ( audio->thread == NULL ) {
553-
SDL_mutexV(audio->mixer_lock);
554-
SDL_CloseAudio();
555-
SDL_SetError("Couldn't create audio thread");
556-
return(-1);
557-
}
558-
559-
while(!audio_configured)
560-
SDL_Delay(100);
561-
#endif
562498

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

605-
#if !SDL_AUDIO_DRIVER_AHI
606541
/* Start the audio thread if necessary */
607542
switch (audio->opened) {
608543
case 1:
@@ -624,11 +559,6 @@ int SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpec *obtained)
624559
/* The audio is now playing */
625560
break;
626561
}
627-
#else
628-
SDL_mutexV(audio->mixer_lock);
629-
D(bug("SDL_OpenAudio USCITA...\n"));
630-
631-
#endif
632562

633563
return(0);
634564
}
@@ -702,12 +632,10 @@ void SDL_AudioQuit(void)
702632
SDL_FreeAudioMem(audio->convert.buf);
703633

704634
}
705-
#if !SDL_AUDIO_DRIVER_AHI
706635
if ( audio->opened ) {
707636
audio->CloseAudio(audio);
708637
audio->opened = 0;
709638
}
710-
#endif
711639
/* Free the driver data */
712640
audio->free(audio);
713641
current_audio = NULL;

0 commit comments

Comments
 (0)