siddefs.h 2.2 KB

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