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