Commit cdde594d authored by Sam Lantinga's avatar Sam Lantinga

Updated Atari port for new system headers (thanks Patrice!)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40558
parent 1a5622ba
...@@ -47,7 +47,7 @@ IV. What is supported: ...@@ -47,7 +47,7 @@ IV. What is supported:
Keyboard (GEMDOS, BIOS, GEM, Ikbd) Keyboard (GEMDOS, BIOS, GEM, Ikbd)
Mouse (XBIOS, GEM, Ikbd) Mouse (XBIOS, GEM, Ikbd)
Video (XBIOS (Fullscreen), GEM (Windowed and Fullscreen)) Video (XBIOS (Fullscreen), GEM (Windowed and Fullscreen))
Timer (VBL vector) Timer (VBL vector, GNU pth library)
Joystick and joypad support (Ikbd, Hardware) Joystick and joypad support (Ikbd, Hardware)
Audio support (Hardware, XBIOS, GSXB, /dev/audio if threads enabled) Audio support (Hardware, XBIOS, GSXB, /dev/audio if threads enabled)
Threads support (Multitasking OS only via GNU pth library) Threads support (Multitasking OS only via GNU pth library)
...@@ -57,14 +57,17 @@ CDROM support (Metados, /dev/cdrom) ...@@ -57,14 +57,17 @@ CDROM support (Metados, /dev/cdrom)
- Driver combinations: - Driver combinations:
Video Kbd Mouse Timer Jstick Joypads Video Kbd Mouse Timer Jstick Joypads
xbios ikbd ikbd vbl ikbd hardware xbios ikbd ikbd vbl(2) ikbd hardware
xbios gemdos xbios vbl xbios hardware xbios gemdos xbios vbl(2) xbios hardware
xbios bios xbios vbl xbios hardware xbios bios xbios vbl(2) xbios hardware
gem gem gem(*) vbl xbios hardware gem gem gem(1) vbl(2) xbios hardware
(*) GEM does not report relative mouse motion, so xbios mouse driver is used (1) GEM does not report relative mouse motion, so xbios mouse driver is used
to report this type event. to report this type event.
(2) If you build SDL with threads using the GNU pth library, timers are
supported via the pth library.
============================================================================== ==============================================================================
V. Environment variables: V. Environment variables:
...@@ -154,6 +157,9 @@ Mouse and joystick xbios driver: ...@@ -154,6 +157,9 @@ Mouse and joystick xbios driver:
Joypad driver: Joypad driver:
Available if _MCH cookie is STE or Falcon. Available if _MCH cookie is STE or Falcon.
PTH timer driver:
Available with multitasking OS.
VBL timer driver: VBL timer driver:
Available on all machines (I think). Available on all machines (I think).
......
...@@ -38,8 +38,7 @@ AC_SUBST(LT_REVISION) ...@@ -38,8 +38,7 @@ AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE) AC_SUBST(LT_AGE)
dnl Detect the canonical host and target build environment dnl Detect the canonical host and target build environment
AC_CANONICAL_HOST AC_CANONICAL_SYSTEM
AC_CANONICAL_TARGET
dnl Setup for automake dnl Setup for automake
AM_INIT_AUTOMAKE(SDL, $SDL_VERSION) AM_INIT_AUTOMAKE(SDL, $SDL_VERSION)
...@@ -2437,9 +2436,13 @@ case "$target" in ...@@ -2437,9 +2436,13 @@ case "$target" in
fi fi
# Set up files for the timer library # Set up files for the timer library
if test x$enable_timers = xyes; then if test x$enable_timers = xyes; then
COPY_ARCH_SRC(src/timer, mint, SDL_systimer.c) if test x$enable_threads = xyes -a x$enable_pth = xyes; then
COPY_ARCH_SRC(src/timer, mint, SDL_vbltimer.S) COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
COPY_ARCH_SRC(src/timer, mint, SDL_vbltimer_s.h) else
COPY_ARCH_SRC(src/timer, mint, SDL_systimer.c)
COPY_ARCH_SRC(src/timer, mint, SDL_vbltimer.S)
COPY_ARCH_SRC(src/timer, mint, SDL_vbltimer_s.h)
fi
fi fi
# MiNT does not define "unix" # MiNT does not define "unix"
CFLAGS="$CFLAGS -Dunix" CFLAGS="$CFLAGS -Dunix"
......
...@@ -28,6 +28,9 @@ static char rcsid = ...@@ -28,6 +28,9 @@ static char rcsid =
/* Initialization code for SDL */ /* Initialization code for SDL */
#include <stdlib.h> /* For getenv() */ #include <stdlib.h> /* For getenv() */
#ifdef ENABLE_PTH
#include <pth.h>
#endif
#include "SDL.h" #include "SDL.h"
#include "SDL_endian.h" #include "SDL_endian.h"
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
/* Mint includes */ /* Mint includes */
#include <mint/osbind.h> #include <mint/osbind.h>
#include <mint/falcon.h> #include <mint/falcon.h>
#include <sys/cookie.h> #include <mint/cookie.h>
#include "SDL_endian.h" #include "SDL_endian.h"
#include "SDL_audio.h" #include "SDL_audio.h"
......
...@@ -35,7 +35,7 @@ static char rcsid = ...@@ -35,7 +35,7 @@ static char rcsid =
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <sys/cookie.h> #include <mint/cookie.h>
#include <mint/osbind.h> #include <mint/osbind.h>
#include "SDL_types.h" #include "SDL_types.h"
......
...@@ -40,7 +40,7 @@ static char rcsid = ...@@ -40,7 +40,7 @@ static char rcsid =
#include <errno.h> #include <errno.h>
#include <mint/osbind.h> #include <mint/osbind.h>
#include <sysvars.h> #include <mint/sysvars.h>
#include "SDL_error.h" #include "SDL_error.h"
#include "SDL_timer.h" #include "SDL_timer.h"
......
...@@ -35,7 +35,7 @@ static char rcsid = ...@@ -35,7 +35,7 @@ static char rcsid =
#include <string.h> #include <string.h>
#include <sys/cookie.h> #include <mint/cookie.h>
#include "SDL_ataric2p_s.h" #include "SDL_ataric2p_s.h"
......
...@@ -36,7 +36,7 @@ static char rcsid = ...@@ -36,7 +36,7 @@ static char rcsid =
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <sys/cookie.h> #include <mint/cookie.h>
#include "SDL.h" #include "SDL.h"
#include "SDL_sysevents.h" #include "SDL_sysevents.h"
......
...@@ -42,7 +42,7 @@ static char rcsid = ...@@ -42,7 +42,7 @@ static char rcsid =
#include <gem.h> #include <gem.h>
#include <gemx.h> #include <gemx.h>
#include <mint/osbind.h> #include <mint/osbind.h>
#include <sys/cookie.h> #include <mint/cookie.h>
#include "SDL.h" #include "SDL.h"
#include "SDL_error.h" #include "SDL_error.h"
...@@ -105,7 +105,6 @@ static void refresh_window(_THIS, int winhandle, short *rect); ...@@ -105,7 +105,6 @@ static void refresh_window(_THIS, int winhandle, short *rect);
static int GEM_Available(void) static int GEM_Available(void)
{ {
short ap_id;
const char *envr = getenv("SDL_VIDEODRIVER"); const char *envr = getenv("SDL_VIDEODRIVER");
/* Check if user asked a different video driver */ /* Check if user asked a different video driver */
...@@ -114,8 +113,7 @@ static int GEM_Available(void) ...@@ -114,8 +113,7 @@ static int GEM_Available(void)
} }
/* Test if AES available */ /* Test if AES available */
ap_id = appl_init(); if (appl_init() == -1)
if (ap_id == -1)
return 0; return 0;
appl_exit(); appl_exit();
...@@ -374,14 +372,13 @@ int GEM_VideoInit(_THIS, SDL_PixelFormat *vformat) ...@@ -374,14 +372,13 @@ int GEM_VideoInit(_THIS, SDL_PixelFormat *vformat)
short work_in[12], work_out[272], dummy; short work_in[12], work_out[272], dummy;
/* Open AES (Application Environment Services) */ /* Open AES (Application Environment Services) */
GEM_ap_id = appl_init(); if (appl_init() == -1) {
if (GEM_ap_id == -1) {
fprintf(stderr,"Can not open AES\n"); fprintf(stderr,"Can not open AES\n");
return 1; return 1;
} }
/* Read version and features */ /* Read version and features */
GEM_version = aes_global[0]; GEM_version = aes_params.global[0];
if (GEM_version >= 0x0400) { if (GEM_version >= 0x0400) {
short ap_gout[4]; short ap_gout[4];
......
...@@ -56,8 +56,7 @@ struct SDL_PrivateVideoData { ...@@ -56,8 +56,7 @@ struct SDL_PrivateVideoData {
Uint32 screensize; Uint32 screensize;
MFDB src_mfdb, dst_mfdb; /* VDI MFDB for bitblt */ MFDB src_mfdb, dst_mfdb; /* VDI MFDB for bitblt */
short blit_coords[8]; /* Coordinates for bitblt */ short blit_coords[8]; /* Coordinates for bitblt */
/* Gem infos */ /* GEM infos */
short ap_id; /* AES handle */
short desk_x, desk_y; /* Desktop properties */ short desk_x, desk_y; /* Desktop properties */
short desk_w, desk_h; short desk_w, desk_h;
short win_handle; /* Our window handle */ short win_handle; /* Our window handle */
...@@ -92,7 +91,7 @@ struct SDL_PrivateVideoData { ...@@ -92,7 +91,7 @@ struct SDL_PrivateVideoData {
#define VDI_src_mfdb (this->hidden->src_mfdb) #define VDI_src_mfdb (this->hidden->src_mfdb)
#define VDI_dst_mfdb (this->hidden->dst_mfdb) #define VDI_dst_mfdb (this->hidden->dst_mfdb)
#define VDI_blit_coords (this->hidden->blit_coords) #define VDI_blit_coords (this->hidden->blit_coords)
#define GEM_ap_id (this->hidden->ap_id)
#define GEM_desk_x (this->hidden->desk_x) #define GEM_desk_x (this->hidden->desk_x)
#define GEM_desk_y (this->hidden->desk_y) #define GEM_desk_y (this->hidden->desk_y)
#define GEM_desk_w (this->hidden->desk_w) #define GEM_desk_w (this->hidden->desk_w)
......
...@@ -96,7 +96,7 @@ int GEM_IconifyWindow(_THIS) ...@@ -96,7 +96,7 @@ int GEM_IconifyWindow(_THIS)
return 0; return 0;
message[0] = WM_ICONIFY; message[0] = WM_ICONIFY;
message[1] = GEM_ap_id; message[1] = gl_apid;
message[2] = 0; message[2] = 0;
message[3] = GEM_handle; message[3] = GEM_handle;
message[4] = 0; message[4] = 0;
...@@ -104,7 +104,7 @@ int GEM_IconifyWindow(_THIS) ...@@ -104,7 +104,7 @@ int GEM_IconifyWindow(_THIS)
message[6] = ICONWIDTH; message[6] = ICONWIDTH;
message[7] = ICONHEIGHT; message[7] = ICONHEIGHT;
appl_write(GEM_ap_id, sizeof(message), message); appl_write(gl_apid, sizeof(message), message);
return 1; return 1;
} }
......
...@@ -38,7 +38,7 @@ static char rcsid = ...@@ -38,7 +38,7 @@ static char rcsid =
#include <unistd.h> #include <unistd.h>
/* Mint includes */ /* Mint includes */
#include <sys/cookie.h> #include <mint/cookie.h>
#include <mint/osbind.h> #include <mint/osbind.h>
#include <mint/falcon.h> #include <mint/falcon.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment