Fixed inttypes support so that Stella compiles in Visual C+ .Net (which

is currently the lowest supported version of Visual Studio that Stella
can be compiled in).  It seems that VS.Net already knows about the
inttypes, so an explicit 'include <inttypes.h>' isn't required.  However,
when compiling under MingW, the include *is* required.

MingW is still the preferred environment for compiling Stella though, as
VS.Net doesn't read the SDL environment variables.  So if you're working
on Stella, feel free to use VS.Net (as long as you don't use anything
specific to that environment).  But all binary releases of Stella will use
MingW, and code that doesn't work in MingW will be reworked/removed.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@435 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2005-05-21 19:35:59 +00:00
parent 0572e86e9e
commit 2df00cd64b
3 changed files with 16 additions and 19 deletions

View File

@ -13,7 +13,7 @@
## See the file "license" for information on usage and redistribution of
## this file, and for a DISCLAIMER OF ALL WARRANTIES.
##
## $Id: makefile,v 1.82 2005-05-19 18:42:36 stephena Exp $
## $Id: makefile,v 1.83 2005-05-21 19:35:58 stephena Exp $
##============================================================================
##============================================================================
@ -46,6 +46,10 @@ OPTIMIZATIONS =
### change to number of CPU's you have
NUMBER_CPU = 1
### to explictly provide inttypes.h
### some platforms include it as part of another header, so including
### it again would cause an error
HAVE_INTTYPES = 1
##============================================================================
## All done, type make to get a list of frontends
@ -106,7 +110,10 @@ ifdef SOUND_SUPPORT
OPTIONS += -DSOUND_SUPPORT
endif
ifdef SOUND_SUPPORT
OPTIONS += -DHAVE_INTTYPES
endif
default:
@echo ""
@echo "To build Stella type: 'make <version>'"

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: TIA.cxx,v 1.42 2005-05-21 16:12:13 stephena Exp $
// $Id: TIA.cxx,v 1.43 2005-05-21 19:35:58 stephena Exp $
//============================================================================
#include <cassert>
@ -21,8 +21,6 @@
#include <cstring>
#include <iostream>
#include <inttypes.h>
#include "Console.hxx"
#include "Control.hxx"
#include "M6502.hxx"
@ -249,7 +247,7 @@ void TIA::systemCyclesReset()
uInt32 cycles = mySystem->cycles();
// Adjust the sound cycle indicator
mySound->adjustCycleCounter(-cycles);
mySound->adjustCycleCounter(-1 * cycles);
// Adjust the dump cycle
myDumpDisabledCycle -= cycles;
@ -503,7 +501,7 @@ void TIA::update()
mySystem->resetCycles();
// Setup clocks that'll be used for drawing this frame
myClockWhenFrameStarted = -clocks;
myClockWhenFrameStarted = -1 * clocks;
myClockStartDisplay = myClockWhenFrameStarted + myStartDisplayOffset;
myClockStopDisplay = myClockWhenFrameStarted + myStopDisplayOffset;
myClockAtLastUpdate = myClockStartDisplay;

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: bspf.hxx,v 1.4 2004-05-28 22:07:57 stephena Exp $
// $Id: bspf.hxx,v 1.5 2005-05-21 19:35:59 stephena Exp $
//============================================================================
#ifndef BSPF_HXX
@ -24,7 +24,7 @@
that need to be defined for different operating systems.
@author Bradford W. Mott
@version $Id: bspf.hxx,v 1.4 2004-05-28 22:07:57 stephena Exp $
@version $Id: bspf.hxx,v 1.5 2005-05-21 19:35:59 stephena Exp $
*/
// Types for 8-bit signed and unsigned integers
@ -52,16 +52,8 @@ typedef unsigned int uInt32;
using namespace std;
#endif
#ifdef BSPF_WIN32
// pragma to avoid all of the int <-> bool conversion warnings
// #pragma warning(disable: 4800)
#endif
// Some old compilers do not support the bool type
#ifdef BSPF_BOOL
#define bool int
#define true 1
#define false 0
#ifdef HAVE_INTTYPES
#include <inttypes.h>
#endif
// Defines to help with path handling