Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Updated Atari port for new system headers (thanks Patrice!)
  • Loading branch information
slouken committed Dec 7, 2002
1 parent 77a9ab7 commit 82478ed
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 29 deletions.
18 changes: 12 additions & 6 deletions README.MiNT
Expand Up @@ -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)
Expand All @@ -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:

Expand Down Expand Up @@ -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).

Expand Down
13 changes: 8 additions & 5 deletions configure.in
Expand Up @@ -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)
Expand Down Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions src/SDL.c
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/audio/mint/SDL_mintaudio.c
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/joystick/mint/SDL_sysjoystick.c
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/timer/mint/SDL_systimer.c
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/video/ataricommon/SDL_ataric2p060.c
Expand Up @@ -35,7 +35,7 @@ static char rcsid =

#include <string.h>

#include <sys/cookie.h>
#include <mint/cookie.h>

#include "SDL_ataric2p_s.h"

Expand Down
2 changes: 1 addition & 1 deletion src/video/ataricommon/SDL_atarievents.c
Expand Up @@ -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"
Expand Down
11 changes: 4 additions & 7 deletions src/video/gem/SDL_gemvideo.c
Expand Up @@ -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"
Expand Down Expand Up @@ -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 */
Expand All @@ -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();
Expand Down Expand Up @@ -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];

Expand Down
5 changes: 2 additions & 3 deletions src/video/gem/SDL_gemvideo.h
Expand Up @@ -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 */
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/video/gem/SDL_gemwm.c
Expand Up @@ -96,15 +96,15 @@ 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;
message[5] = GEM_desk_h-ICONHEIGHT;
message[6] = ICONWIDTH;
message[7] = ICONHEIGHT;

appl_write(GEM_ap_id, sizeof(message), message);
appl_write(gl_apid, sizeof(message), message);

return 1;
}
Expand Down
2 changes: 1 addition & 1 deletion src/video/xbios/SDL_xbios.c
Expand Up @@ -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>

Expand Down

0 comments on commit 82478ed

Please sign in to comment.