Debian Codegraph @

src/engine/platform/sound/nes/common.h

raw
1 /*
2 * Copyright (C) 2010-2019 Fabio Cavallo (aka FHorse)
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18
19 // additional modifications by tildearrow for furnace
20
21 #ifndef COMMON_H_
22 #define COMMON_H_
23
24 #include <stdint.h>
25
26 typedef unsigned char BYTE;
27 typedef unsigned short WORD;
28 typedef unsigned int DBWORD;
29 typedef signed char SBYTE;
30 typedef signed short SWORD;
31 typedef signed int SDBWORD;
32
33 #if !defined (FALSE)
34 enum false_value { FALSE, TRUE };
35 #endif
36 enum exit_type { EXIT_OK, EXIT_ERROR };
37 enum lower_value { LOWER, UPPER };
38 enum machine_mode { AUTO, NTSC, PAL, DENDY, DEFAULT = 255 };
39 enum reset_type {
40 RESET = 0x10,
41 HARD = 0x20,
42 CHANGE_ROM = 0x30,
43 CHANGE_MODE = 0x40,
44 POWER_UP = 0x50
45 };
46 /* le dimesioni dello screen da renderizzare */
47 enum screen_dimension { SCR_LINES = 240, SCR_ROWS = 256 };
48 enum type_of_system_info { HEADER, DATABASE };
49 enum header_type { iNES_1_0, NES_2_0, UNIF_FORMAT, FDS_FORMAT, NSF_FORMAT, NSFE_FORMAT };
50 enum length_file_name_type {
51 LENGTH_FILE_NAME = 512,
52 LENGTH_FILE_NAME_MID = 1024,
53 LENGTH_FILE_NAME_LONG = 2048,
54 LENGTH_FILE_NAME_MAX = 4096
55 };
56 enum forced_mirroring { UNK_HORIZONTAL, UNK_VERTICAL };
57 enum max_chips_rom { MAX_CHIPS = 8 };
58 enum languages { LNG_ENGLISH, LNG_ITALIAN, LNG_RUSSIAN };
59 enum database_mode {
60 NODIPSWITCH = 0xFF00,
61 NOEXTRA = 0x0000,
62 VSZAPPER = 0x0001,
63 CHRRAM32K = 0x0002,
64 CHRRAM256K = 0x0004
65 };
66
67 #define LENGTH(x) (sizeof(x)/sizeof(*(x)))
68 #define UNUSED(var) var __attribute__((unused))
69
70 #if defined (DEBUG)
71 #define INLINE
72 #else
73 #ifdef _MSC_VER
74 #define INLINE __forceinline
75 #else
76 #define INLINE inline __attribute__((always_inline))
77 #endif
78 #endif
79
80 #endif /* COMMON_H_ */