Updated for Dreamcast KOS June 2005 snapshot:

http://cadcdev.sourceforge.net/svn/snapshots/
http://gamedev.allusion.net/softprj/kos/dcsetup.php

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401465
This commit is contained in:
Sam Lantinga 2006-03-02 13:16:02 +00:00
parent 073a8d79d8
commit b8ecf02fdf
11 changed files with 59 additions and 62 deletions

View file

@ -24,13 +24,6 @@
/* Output dreamcast aica */
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "SDL_timer.h"
#include "SDL_audio.h"
#include "../SDL_audiomem.h"

View file

@ -6,6 +6,9 @@
*/
#include "aica.h"
#include <arch/irq.h>
#include <dc/spu.h>
/* #define dc_snd_base ((volatile unsigned char *)0x00800000) */ /* arm side */
#define dc_snd_base ((volatile unsigned char *)0xa0700000) /* dc side */
@ -37,7 +40,7 @@
void aica_init() {
int i, j, old;
int i, j, old = 0;
/* Initialize AICA channels */
G2_LOCK(old);
@ -146,9 +149,10 @@ static inline unsigned AICA_FREQ(unsigned freq) {
This routine (and the similar ones) owe a lot to Marcus' sound example --
I hadn't gotten quite this far into dissecting the individual regs yet. */
void aica_play(int ch,int mode,unsigned long smpptr,int loopst,int loopend,int freq,int vol,int pan,int loopflag) {
int i;
/* int i;
*/
int val;
int old;
int old = 0;
/* Stop the channel (if it's already playing) */
aica_stop(ch);

View file

@ -86,7 +86,7 @@ static int SDL_SYS_CDGetTOC(SDL_CD *cdrom)
cdrom->track[i].id = i+1;
cdrom->track[i].type = (TOC_CTRL(toc.entry[i])==TRACK_CDDA)?SDL_AUDIO_TRACK:SDL_DATA_TRACK;
cdrom->track[i].offset = TOC_LBA(entry)-150;
cdrom->track[i].length = TOC_LBA((i+1<toc.last)?toc.entry[i+1]:toc.dunno)-TOC_LBA(entry);
cdrom->track[i].length = TOC_LBA((i+1<toc.last)?toc.entry[i+1]:toc.leadout_sector)-TOC_LBA(entry);
}
return 0;
@ -95,7 +95,6 @@ static int SDL_SYS_CDGetTOC(SDL_CD *cdrom)
/* Get CD-ROM status */
static CDstatus SDL_SYS_CDStatus(SDL_CD *cdrom, int *position)
{
CDstatus status;
int ret,dc_status,disc_type;
ret = cdrom_get_status(&dc_status,&disc_type);

View file

@ -21,8 +21,7 @@
*/
#include "SDL_config.h"
/* Win32 MultiMedia Joystick driver, contributed by Andrei de A. Formiga */
#include "SDL_events.h"
#include "SDL_joystick.h"
#include "../SDL_sysjoystick.h"
#include "../SDL_joystick_c.h"

View file

@ -24,38 +24,11 @@
/* Thread management routines for SDL */
#include "SDL_thread.h"
#include "../SDL_thread_c.h"
#include "../SDL_systhread.h"
#include <kos/thread.h>
#if SDL_THREADS_DISABLED
int SDL_SYS_CreateThread(SDL_Thread *thread, void *args)
{
SDL_SetError("Threads are not supported on this platform");
return(-1);
}
void SDL_SYS_SetupThread(void)
{
return;
}
Uint32 SDL_ThreadID(void)
{
return(0);
}
void SDL_SYS_WaitThread(SDL_Thread *thread)
{
return;
}
void SDL_SYS_KillThread(SDL_Thread *thread)
{
return;
}
#else
int SDL_SYS_CreateThread(SDL_Thread *thread, void *args)
{
thread->handle = thd_create(SDL_RunThread,args);
@ -85,4 +58,3 @@ void SDL_SYS_KillThread(SDL_Thread *thread)
{
thd_destroy(thread->handle);
}
#endif

View file

@ -113,7 +113,7 @@ static void keyboard_update(void)
maple_raddr(addr,&port,&unit);
state = kbd_get_state(port,unit);
state = maple_dev_state(port,unit);
if (!state) return;
shiftkeys = state->shift_keys ^ old_state.shift_keys;

View file

@ -53,10 +53,12 @@ static int DC_FlipHWSurface(_THIS, SDL_Surface *surface);
static void DC_UpdateRects(_THIS, int numrects, SDL_Rect *rects);
/* OpenGL */
#if SDL_VIDEO_OPENGL
static void *DC_GL_GetProcAddress(_THIS, const char *proc);
static int DC_GL_LoadLibrary(_THIS, const char *path);
static int DC_GL_GetAttribute(_THIS, SDL_GLattr attrib, int* value);
static void DC_GL_SwapBuffers(_THIS);
#endif
/* DC driver bootstrap functions */