mirror of https://github.com/stella-emu/stella.git
- Changed back to updating sound per-scanline from per-frame. It doesn't
seem to add any more overhead, and it's theoretically supposed to sound better (jury's still out on that one). - Added a patch that fixes compiling under OS X with Fink (thanks to Julian Squires). git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@237 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
dfdfc9a139
commit
27c957b45f
|
@ -13,7 +13,7 @@
|
||||||
## See the file "license" for information on usage and redistribution of
|
## See the file "license" for information on usage and redistribution of
|
||||||
## this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
## this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
##
|
##
|
||||||
## $Id: makefile,v 1.49 2004-04-03 18:54:21 stephena Exp $
|
## $Id: makefile,v 1.50 2004-04-20 21:07:35 stephena Exp $
|
||||||
##============================================================================
|
##============================================================================
|
||||||
|
|
||||||
##============================================================================
|
##============================================================================
|
||||||
|
@ -66,14 +66,16 @@ CORE = $(SRC)/emucore
|
||||||
UI = $(SRC)/ui
|
UI = $(SRC)/ui
|
||||||
COMMON = $(SRC)/ui/common
|
COMMON = $(SRC)/ui/common
|
||||||
|
|
||||||
INCLUDES = -I. -I$(CORE) -I$(CORE)/m6502/src -I$(CORE)/m6502/src/bspf/src -I$(COMMON) -I$(UI)/sdl -I$(UI)/sound
|
INCLUDES = -I. -I$(CORE) -I$(CORE)/m6502/src \
|
||||||
|
-I$(CORE)/m6502/src/bspf/src -I$(COMMON) -I$(UI)/sdl -I$(UI)/sound \
|
||||||
|
-I/sw/include
|
||||||
|
|
||||||
## set some sane optimizations if none have been provided
|
## set some sane optimizations if none have been provided
|
||||||
ifndef OPTIMIZATIONS
|
ifndef OPTIMIZATIONS
|
||||||
ifdef CXXFLAGS
|
ifdef CXXFLAGS
|
||||||
OPTIMIZATIONS = $(CXXFLAGS)
|
OPTIMIZATIONS = $(CXXFLAGS)
|
||||||
else
|
else
|
||||||
OPTIMIZATIONS = -O2 -march=i386
|
OPTIMIZATIONS = -O2
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -85,12 +87,6 @@ endif
|
||||||
|
|
||||||
FLAGS = $(OPTIMIZATIONS) -Wall -Wunused $(INCLUDES) $(SYS_INCLUDES)
|
FLAGS = $(OPTIMIZATIONS) -Wall -Wunused $(INCLUDES) $(SYS_INCLUDES)
|
||||||
|
|
||||||
## set the user-defined options
|
|
||||||
#ifdef DEBUG
|
|
||||||
# OPTS.SDL += -DDEBUG
|
|
||||||
# OPTS.DOS += -DDEBUG
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ifdef JOYSTICK_SUPPORT
|
ifdef JOYSTICK_SUPPORT
|
||||||
OPTIONS += -DJOYSTICK_SUPPORT
|
OPTIONS += -DJOYSTICK_SUPPORT
|
||||||
endif
|
endif
|
||||||
|
@ -122,13 +118,13 @@ default:
|
||||||
@echo ""
|
@echo ""
|
||||||
|
|
||||||
linux:
|
linux:
|
||||||
make $(SMP) stella \
|
$(MAKE) $(SMP) stella \
|
||||||
EXE_NAME="stella" \
|
EXE_NAME="stella" \
|
||||||
OPTIONS="$(OPTIONS) -DBSPF_UNIX -DUNIX -DHAVE_GETTIMEOFDAY" \
|
OPTIONS="$(OPTIONS) -DBSPF_UNIX -DUNIX -DHAVE_GETTIMEOFDAY" \
|
||||||
OBJS="$(OBJECTS) SettingsUNIX.o"
|
OBJS="$(OBJECTS) SettingsUNIX.o"
|
||||||
|
|
||||||
linux-gl:
|
linux-gl:
|
||||||
make $(SMP) stella \
|
$(MAKE) $(SMP) stella \
|
||||||
EXE_NAME="stella" \
|
EXE_NAME="stella" \
|
||||||
LDFLAGS="$(LDFLAGS) -L/usr/X11R6/lib" \
|
LDFLAGS="$(LDFLAGS) -L/usr/X11R6/lib" \
|
||||||
LDLIBS="$(LDLIBS) -lGL" \
|
LDLIBS="$(LDLIBS) -lGL" \
|
||||||
|
@ -136,13 +132,13 @@ linux-gl:
|
||||||
OBJS="$(OBJECTS) FrameBufferGL.o SettingsUNIX.o"
|
OBJS="$(OBJECTS) FrameBufferGL.o SettingsUNIX.o"
|
||||||
|
|
||||||
win32:
|
win32:
|
||||||
make $(SMP) stella \
|
$(MAKE) $(SMP) stella \
|
||||||
EXE_NAME="stella.exe" \
|
EXE_NAME="stella.exe" \
|
||||||
OPTIONS="$(OPTIONS) -DBSPF_WIN32 -DWIN32" \
|
OPTIONS="$(OPTIONS) -DBSPF_WIN32 -DWIN32" \
|
||||||
OBJS="$(OBJECTS) SettingsWin32.o"
|
OBJS="$(OBJECTS) SettingsWin32.o"
|
||||||
|
|
||||||
win32-gl:
|
win32-gl:
|
||||||
make $(SMP) stella \
|
$(MAKE) $(SMP) stella \
|
||||||
EXE_NAME="stella.exe" \
|
EXE_NAME="stella.exe" \
|
||||||
LDLIBS="$(LDLIBS) -lopengl32" \
|
LDLIBS="$(LDLIBS) -lopengl32" \
|
||||||
OPTIONS="$(OPTIONS) -DBSPF_WIN32 -DWIN32 -DDISPLAY_OPENGL -DTEXTURES_ARE_LOST" \
|
OPTIONS="$(OPTIONS) -DBSPF_WIN32 -DWIN32 -DDISPLAY_OPENGL -DTEXTURES_ARE_LOST" \
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: Console.cxx,v 1.24 2004-04-12 23:28:42 stephena Exp $
|
// $Id: Console.cxx,v 1.25 2004-04-20 21:07:40 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
@ -207,7 +207,7 @@ Console::~Console()
|
||||||
void Console::update()
|
void Console::update()
|
||||||
{
|
{
|
||||||
myFrameBuffer.update();
|
myFrameBuffer.update();
|
||||||
mySound.update();
|
//FIXME mySound.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: TIA.cxx,v 1.28 2004-04-12 23:28:42 stephena Exp $
|
// $Id: TIA.cxx,v 1.29 2004-04-20 21:07:47 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
@ -1637,7 +1637,7 @@ inline void TIA::updateFrameScanline(uInt32 clocksToUpdate, uInt32 hpos)
|
||||||
myFramePointer = ending;
|
myFramePointer = ending;
|
||||||
|
|
||||||
// Add sound bytes to the sound queue every scanline
|
// Add sound bytes to the sound queue every scanline
|
||||||
//FIXME mySound.update();
|
mySound.update(); //FIXME
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: FrameBufferGL.cxx,v 1.16 2004-04-15 21:27:31 stephena Exp $
|
// $Id: FrameBufferGL.cxx,v 1.17 2004-04-20 21:07:50 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
@ -134,7 +134,7 @@ bool FrameBufferGL::init()
|
||||||
|
|
||||||
// Check which system we are running under
|
// Check which system we are running under
|
||||||
x11Available = false;
|
x11Available = false;
|
||||||
#ifdef UNIX
|
#if UNIX && (!__APPLE__)
|
||||||
SDL_VERSION(&myWMInfo.version);
|
SDL_VERSION(&myWMInfo.version);
|
||||||
if(SDL_GetWMInfo(&myWMInfo) > 0)
|
if(SDL_GetWMInfo(&myWMInfo) > 0)
|
||||||
if(myWMInfo.subsystem == SDL_SYSWM_X11)
|
if(myWMInfo.subsystem == SDL_SYSWM_X11)
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: FrameBufferSDL.cxx,v 1.11 2004-04-15 22:52:43 stephena Exp $
|
// $Id: FrameBufferSDL.cxx,v 1.12 2004-04-20 21:08:03 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
@ -179,7 +179,8 @@ uInt32 FrameBufferSDL::maxWindowSizeForScreen()
|
||||||
if(!x11Available)
|
if(!x11Available)
|
||||||
return 4;
|
return 4;
|
||||||
|
|
||||||
#ifdef UNIX
|
/* Every UNIX except Darwin with Cocoa. */
|
||||||
|
#if UNIX && (!__APPLE__)
|
||||||
// Otherwise, lock the screen and get the width and height
|
// Otherwise, lock the screen and get the width and height
|
||||||
myWMInfo.info.x11.lock_func();
|
myWMInfo.info.x11.lock_func();
|
||||||
Display* theX11Display = myWMInfo.info.x11.display;
|
Display* theX11Display = myWMInfo.info.x11.display;
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: FrameBufferSoft.cxx,v 1.5 2003-12-10 18:58:56 stephena Exp $
|
// $Id: FrameBufferSoft.cxx,v 1.6 2004-04-20 21:08:03 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
@ -70,7 +70,7 @@ bool FrameBufferSoft::init()
|
||||||
|
|
||||||
// Check which system we are running under
|
// Check which system we are running under
|
||||||
x11Available = false;
|
x11Available = false;
|
||||||
#ifdef UNIX
|
#if UNIX && (!__APPLE__)
|
||||||
SDL_VERSION(&myWMInfo.version);
|
SDL_VERSION(&myWMInfo.version);
|
||||||
if(SDL_GetWMInfo(&myWMInfo) > 0)
|
if(SDL_GetWMInfo(&myWMInfo) > 0)
|
||||||
if(myWMInfo.subsystem == SDL_SYSWM_X11)
|
if(myWMInfo.subsystem == SDL_SYSWM_X11)
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: SoundSDL.cxx,v 1.7 2004-04-04 02:03:15 stephena Exp $
|
// $Id: SoundSDL.cxx,v 1.8 2004-04-20 21:08:03 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
@ -163,7 +163,7 @@ void SoundSDL::update()
|
||||||
if(!myPauseStatus && myIsInitializedFlag)
|
if(!myPauseStatus && myIsInitializedFlag)
|
||||||
{
|
{
|
||||||
// Make sure we have exclusive access to the sample queue
|
// Make sure we have exclusive access to the sample queue
|
||||||
SDL_LockAudio();
|
// SDL_LockAudio();
|
||||||
|
|
||||||
// Generate enough samples to keep the sample queue full to capacity
|
// Generate enough samples to keep the sample queue full to capacity
|
||||||
uInt32 numbytes = mySampleQueue.capacity() - mySampleQueue.size();
|
uInt32 numbytes = mySampleQueue.capacity() - mySampleQueue.size();
|
||||||
|
@ -172,7 +172,7 @@ void SoundSDL::update()
|
||||||
mySampleQueue.enqueue(buffer, numbytes);
|
mySampleQueue.enqueue(buffer, numbytes);
|
||||||
|
|
||||||
// Release lock on the sample queue
|
// Release lock on the sample queue
|
||||||
SDL_UnlockAudio();
|
// SDL_UnlockAudio();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue