Skip to content
Permalink
Browse files

Added Atari audio support (thanks Patrice!)

  • Loading branch information
slouken committed Jun 10, 2002
1 parent 89785c6 commit cf67d05bb4b047431b61d25cb4282744e3992e99
@@ -10,9 +10,8 @@ I. Building the Simple DirectMedia Layer libraries:
Do the classic configure, with --disable-shared --enable-static and:

Tos version (should run everywhere):
--disable-audio --disable-threads
Tos does not support threads, so can not support audio, maybe in a future
version audio support will be added via interrupts.
--disable-threads
Tos does not support threads.

MiNT version (maybe Magic, only for multitasking OS):
--disable-pthreads --enable-pth
@@ -50,11 +49,11 @@ Mouse (XBIOS, GEM, Ikbd)
Video (XBIOS (Fullscreen), GEM (Windowed and Fullscreen))
Timer (VBL vector)
Joystick and joypad support (Ikbd, Hardware)
Audio support (Hardware, XBIOS, GSXB, /dev/audio if threads enabled)
Threads support (Multitasking OS only via GNU pth library)

- What is missing:
Audio support (TOS)
CDROM support (Metados, /dev/cdrom)
Threads support (TOS)

- Driver combinations:
Video Kbd Mouse Timer Jstick Joypads
@@ -69,15 +68,20 @@ to report this type event.
==============================================================================
V. Environment variables:

SDL_VIDEODRIVER:
Set to 'xbios' to force xbios video driver
Set to 'gem' to force gem video driver

SDL_AUDIODRIVER:
Set to 'mint' to force Atari audio driver
Set to 'audio' to force Sun /dev/audio audio driver
Set to 'disk' to force disk-writing audio driver

SDL_ATARI_EVENTSDRIVER
Set to 'ikbd' to force IKBD 6301 keyboard driver
Set to 'gemdos' to force gemdos keyboard driver
Set to 'bios' to force bios keyboard driver

SDL_VIDEODRIVER:
Set to 'xbios' to force xbios video driver
Set to 'gem' to force gem video driver

SDL_JOYSTICK_ATARI:
Use any of these strings in the environment variable to enable or
disable a joystick:
@@ -151,7 +155,19 @@ Joypad driver:
Available if _MCH cookie is STE or Falcon.

VBL timer driver:
Available all machines (I think).
Available on all machines (I think).

Audio driver:
Cookie _SND is used to detect supported audio capabilities

STE, Mega STE, TT:
8 bits DMA (hardware access)

Falcon, machines with GSXB driver:
Xbios functions

Other machines:
Not supported

--
Patrice Mandin <pmandin@caramail.com>
@@ -435,6 +435,24 @@ CheckDiskAudio()
fi
}

dnl Set up the Atari Audio driver
CheckAtariAudio()
{
AC_ARG_ENABLE(mintaudio,
[ --enable-mintaudio support Atari audio driver [default=yes]],
, enable_mintaudio=yes)
if test x$enable_audio = xyes -a x$enable_mintaudio = xyes; then
mintaudio=no
AC_CHECK_HEADER(mint/falcon.h, have_mint_falcon_hdr=yes)
if test x$have_mint_falcon_hdr = xyes; then
mintaudio=yes
CFLAGS="$CFLAGS -DMINTAUDIO_SUPPORT"
AUDIO_SUBDIRS="$AUDIO_SUBDIRS mint"
AUDIO_DRIVERS="$AUDIO_DRIVERS mint/libaudio_mintaudio.la"
fi
fi
}

dnl See if we can use x86 assembly blitters
# NASM is available from: http://nasm.octium.net/
CheckNASM()
@@ -2380,13 +2398,17 @@ case "$target" in
CheckAtariBiosEvent
CheckAtariXbiosVideo
CheckAtariGemVideo
CheckAtariAudio
CheckPTH
# Set up files for the main() stub
COPY_ARCH_SRC(src/main, linux, SDL_main.c)
# Set up files for the audio library
if test x$enable_audio = xyes; then
AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
if test x$enable_threads = xyes -a x$enable_pth = xyes; then
if test x$enable_audio = xyes; then
CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
fi
fi
# Set up files for the joystick library
if test x$enable_joystick = xyes; then
@@ -2575,6 +2597,7 @@ src/audio/ums/Makefile
src/audio/windib/Makefile
src/audio/windx5/Makefile
src/audio/disk/Makefile
src/audio/mint/Makefile
src/video/Makefile
src/video/XFree86/Makefile
src/video/XFree86/extensions/Makefile
@@ -5,7 +5,8 @@ noinst_LTLIBRARIES = libaudio.la

# Define which subdirectories need to be built
SUBDIRS = @AUDIO_SUBDIRS@
DIST_SUBDIRS = alsa arts baudio dma dmedia dsp esd macrom nas nto openbsd paudio sun ums windib windx5 disk
DIST_SUBDIRS = alsa arts baudio dma dmedia dsp esd macrom nas nto openbsd \
paudio sun ums windib windx5 disk mint

DRIVERS = @AUDIO_DRIVERS@

@@ -83,6 +83,9 @@ static AudioBootStrap *bootstrap[] = {
#ifdef ENABLE_AHI
&AHI_bootstrap,
#endif
#ifdef MINTAUDIO_SUPPORT
&MINTAUDIO_bootstrap,
#endif
#ifdef DISKAUD_SUPPORT
&DISKAUD_bootstrap,
#endif
@@ -377,6 +380,9 @@ int SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpec *obtained)

#ifdef macintosh
/* FIXME: Need to implement PPC interrupt asm for SDL_LockAudio() */
#else
#if defined(__MINT__) && !defined(ENABLE_THREADS)
/* Uses interrupt driven audio, without thread */
#else
/* Create a semaphore for locking the sound buffers */
audio->mixer_lock = SDL_CreateMutex();
@@ -385,7 +391,8 @@ int SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpec *obtained)
SDL_CloseAudio();
return(-1);
}
#endif
#endif /* __MINT__ */
#endif /* macintosh */

/* Calculate the silence and size of the audio specification */
SDL_CalculateAudioSpec(desired);
@@ -147,6 +147,9 @@ extern AudioBootStrap SNDMGR_bootstrap;
#ifdef ENABLE_AHI
extern AudioBootStrap AHI_bootstrap;
#endif
#ifdef MINTAUDIO_SUPPORT
extern AudioBootStrap MINTAUDIO_bootstrap;
#endif
#ifdef DISKAUD_SUPPORT
extern AudioBootStrap DISKAUD_bootstrap;
#endif
@@ -0,0 +1,6 @@
Makefile.in
Makefile
.libs
*.o
*.lo
*.la
@@ -0,0 +1,14 @@

## Makefile.am for SDL using Xbios/Dma/whatever available audio functions

noinst_LTLIBRARIES = libaudio_mintaudio.la
libaudio_mintaudio_la_SOURCES = $(SRCS)

# The SDL audio driver sources
SRCS = SDL_mintaudio.c \
SDL_mintaudio.h \
SDL_mintaudiointerrupt.S \
SDL_mintaudiointerrupt_s.h \
SDL_mintaudiodma.h \
SDL_mintaudiogsxb.h

0 comments on commit cf67d05

Please sign in to comment.