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