home *** CD-ROM | disk | FTP | other *** search
/ Large Pack of OldSkool DOS MOD Trackers / goattracker_2.73.zip / src / resid / siddefs.h < prev    next >
Encoding:
C/C++ Source or Header  |  2014-07-23  |  2.3 KB  |  69 lines

  1. //  ---------------------------------------------------------------------------
  2. //  This file is part of reSID, a MOS6581 SID emulator engine.
  3. //  Copyright (C) 1999  Dag Lem <resid@nimrod.no>
  4. //
  5. //  This program is free software; you can redistribute it and/or modify
  6. //  it under the terms of the GNU General Public License as published by
  7. //  the Free Software Foundation; either version 2 of the License, or
  8. //  (at your option) any later version.
  9. //
  10. //  This program is distributed in the hope that it will be useful,
  11. //  but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. //  GNU General Public License for more details.
  14. //
  15. //  You should have received a copy of the GNU General Public License
  16. //  along with this program; if not, write to the Free Software
  17. //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  18. //  ---------------------------------------------------------------------------
  19.  
  20. #ifndef __SIDDEFS_H__
  21. #define __SIDDEFS_H__
  22.  
  23. // Define bool, true, and false for C++ compilers that lack these keywords.
  24. #define RESID_HAVE_BOOL 1
  25.  
  26. #if !RESID_HAVE_BOOL
  27. typedef int bool;
  28. const bool true = 1;
  29. const bool false = 0;
  30. #endif
  31.  
  32. // We could have used the smallest possible data type for each SID register,
  33. // however this would give a slower engine because of data type conversions.
  34. // An int is assumed to be at least 32 bits (necessary in the types reg24,
  35. // cycle_count, and sound_sample). GNU does not support 16-bit machines
  36. // (GNU Coding Standards: Portability between CPUs), so this should be
  37. // a valid assumption.
  38.  
  39. typedef unsigned int reg4;
  40. typedef unsigned int reg8;
  41. typedef unsigned int reg12;
  42. typedef unsigned int reg16;
  43. typedef unsigned int reg24;
  44. typedef unsigned int reg32;
  45.  
  46. typedef int cycle_count;
  47. typedef int sound_sample;
  48. typedef sound_sample fc_point[2];
  49.  
  50. enum chip_model { MOS6581 = 1, MOS8580 };
  51.  
  52. enum sampling_method { SAMPLE_FAST, SAMPLE_INTERPOLATE,
  53.            SAMPLE_RESAMPLE_INTERPOLATE, SAMPLE_RESAMPLE_FAST };
  54.  
  55. extern "C"
  56. {
  57. #ifndef __VERSION_CC__
  58. extern const char* resid_version_string;
  59. #else
  60. const char* resid_version_string = VERSION;
  61. #endif
  62. }
  63.  
  64. // Inlining on/off.
  65. #define RESID_INLINING 1
  66. #define RESID_INLINE inline
  67.  
  68. #endif // not __SIDDEFS_H__
  69.