DOSBox-X
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
src/hardware/reSID/siddefs.h
00001 //  ---------------------------------------------------------------------------
00002 //  This file is part of reSID, a MOS6581 SID emulator engine.
00003 //  Copyright (C) 1999  Dag Lem <resid@nimrod.no>
00004 //
00005 //  This program is free software; you can redistribute it and/or modify
00006 //  it under the terms of the GNU General Public License as published by
00007 //  the Free Software Foundation; either version 2 of the License, or
00008 //  (at your option) any later version.
00009 //
00010 //  This program is distributed in the hope that it will be useful,
00011 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 //  GNU General Public License for more details.
00014 //
00015 //  You should have received a copy of the GNU General Public License along
00016 //  with this program; if not, write to the Free Software Foundation, Inc.,
00017 //  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00018 //  ---------------------------------------------------------------------------
00019 
00020 #ifndef __SIDDEFS_H__
00021 #define __SIDDEFS_H__
00022 
00023 // Define bool, true, and false for C++ compilers that lack these keywords.
00024 #define RESID_HAVE_BOOL 1
00025 
00026 #if !RESID_HAVE_BOOL
00027 typedef int bool;
00028 const bool true = 1;
00029 const bool false = 0;
00030 #endif
00031 
00032 // We could have used the smallest possible data type for each SID register,
00033 // however this would give a slower engine because of data type conversions.
00034 // An int is assumed to be at least 32 bits (necessary in the types reg24,
00035 // cycle_count, and sound_sample). GNU does not support 16-bit machines
00036 // (GNU Coding Standards: Portability between CPUs), so this should be
00037 // a valid assumption.
00038 
00039 typedef unsigned int reg4;
00040 typedef unsigned int reg8;
00041 typedef unsigned int reg12;
00042 typedef unsigned int reg16;
00043 typedef unsigned int reg24;
00044 
00045 typedef int cycle_count;
00046 typedef int sound_sample;
00047 typedef sound_sample fc_point[2];
00048 
00049 enum chip_model { MOS6581, MOS8580 };
00050 
00051 enum sampling_method { SAMPLE_FAST, SAMPLE_INTERPOLATE,
00052                        SAMPLE_RESAMPLE_INTERPOLATE, SAMPLE_RESAMPLE_FAST };
00053 
00054 extern "C"
00055 {
00056 #ifndef __VERSION_CC__
00057 extern const char* resid_version_string;
00058 #else
00059 const char* resid_version_string = "0.16";//VERSION;
00060 #endif
00061 }
00062 
00063 // Inlining on/off.
00064 #define RESID_INLINING 1
00065 #define RESID_INLINE inline
00066 
00067 #endif // not __SIDDEFS_H__