VirtualC64 v5.0 beta
Commodore 64 Emulator
Loading...
Searching...
No Matches
config.h
1// -----------------------------------------------------------------------------
2// This file is part of VirtualC64
3//
4// Copyright (C) Dirk W. Hoffmann. www.dirkwhoffmann.de
5// This FILE is dual-licensed. You are free to choose between:
6//
7// - The GNU General Public License v3 (or any later version)
8// - The Mozilla Public License v2
9//
10// SPDX-License-Identifier: GPL-3.0-or-later OR MPL-2.0
11// -----------------------------------------------------------------------------
12
13#pragma once
14
15//
16// Release settings
17//
18
19// Version number
20#define VER_MAJOR 5
21#define VER_MINOR 0
22#define VER_SUBMINOR 0
23#define VER_BETA 6
24
25// Snapshot version number
26#define SNP_MAJOR 5
27#define SNP_MINOR 0
28#define SNP_SUBMINOR 0
29#define SNP_BETA 6
30
31// Uncomment these settings in a release build
32// #define RELEASEBUILD
33
34
35//
36// Build settings
37//
38
39#if defined(__clang__)
40
41#define alwaysinline __attribute__((always_inline))
42#pragma GCC diagnostic ignored "-Wgnu-anonymous-struct"
43#pragma GCC diagnostic ignored "-Wnested-anon-types"
44
45#elif defined(__GNUC__) || defined(__GNUG__)
46
47#define alwaysinline __attribute__((always_inline))
48
49#elif defined(_MSC_VER)
50
51#define alwaysinline __forceinline
52
53#endif
54
55
56//
57// Configuration overrides
58//
59
60#define OVERRIDES { }
61
62
63//
64// Debug settings
65//
66
67#ifdef RELEASEBUILD
68#ifndef NDEBUG
69#define NDEBUG
70#endif
71static const bool releaseBuild = 1;
72static const bool debugBuild = 0;
73typedef const int debugflag;
74#else
75static const bool releaseBuild = 0;
76static const bool debugBuild = 1;
77typedef int debugflag;
78#endif
79
80#if VER_BETA == 0
81static const bool betaRelease = 0;
82#else
83static const bool betaRelease = 1;
84#endif
85
86#ifdef __EMSCRIPTEN__
87static const bool emscripten = 1;
88#else
89static const bool emscripten = 0;
90#endif
91
92
93// General
94extern debugflag XFILES;
95extern debugflag CNF_DEBUG;
96extern debugflag DEF_DEBUG;
97
98// Emulator
99extern debugflag RUN_DEBUG;
100extern debugflag TIM_DEBUG;
101extern debugflag WARP_DEBUG;
102extern debugflag CMD_DEBUG;
103extern debugflag MSG_DEBUG;
104extern debugflag SNP_DEBUG;
105
106// Run ahead
107extern debugflag RUA_DEBUG;
108extern debugflag RUA_ON_STEROIDS;
109
110// CPU
111extern debugflag CPU_DEBUG;
112extern debugflag IRQ_DEBUG;
113
114// Memory
115extern debugflag MEM_DEBUG;
116
117// CIAs
118extern debugflag CIA_DEBUG;
119extern debugflag CIAREG_DEBUG;
120extern debugflag CIA_ON_STEROIDS;
121
122// VICII
123extern debugflag VICII_DEBUG;
124extern debugflag VICII_REG_DEBUG;
125extern debugflag VICII_SAFE_MODE;
126extern debugflag VICII_STATS;
127extern debugflag RASTERIRQ_DEBUG;
128
129// SID
130extern debugflag SID_DEBUG;
131extern debugflag SID_EXEC;
132extern debugflag SIDREG_DEBUG;
133extern debugflag AUDBUF_DEBUG;
134extern debugflag AUDVOL_DEBUG;
135
136// Drive
137extern debugflag VIA_DEBUG;
138extern debugflag PIA_DEBUG;
139extern debugflag SER_DEBUG;
140extern debugflag DSK_DEBUG;
141extern debugflag DSKCHG_DEBUG;
142extern debugflag GCR_DEBUG;
143extern debugflag FS_DEBUG;
144extern debugflag PAR_DEBUG;
145
146// Media
147extern debugflag CRT_DEBUG;
148extern debugflag FILE_DEBUG;
149
150// Peripherals
151extern debugflag JOY_DEBUG;
152extern debugflag DRV_DEBUG;
153extern debugflag TAP_DEBUG;
154extern debugflag KBD_DEBUG;
155extern debugflag PRT_DEBUG;
156extern debugflag EXP_DEBUG;
157extern debugflag LIP_DEBUG;
158
159// Other components
160extern debugflag REC_DEBUG;
161extern debugflag REU_DEBUG;
162
163
164//
165// Forced error conditions
166//
167
168extern debugflag FORCE_ROM_MISSING;
169extern debugflag FORCE_MEGA64_MISMATCH;
170extern debugflag FORCE_SNAP_TOO_OLD;
171extern debugflag FORCE_SNAP_TOO_NEW;
172extern debugflag FORCE_SNAP_IS_BETA;
173extern debugflag FORCE_SNAP_CORRUPTED;
174extern debugflag FORCE_CRT_UNKNOWN;
175extern debugflag FORCE_CRT_UNSUPPORTED;
176extern debugflag FORCE_RECORDING_ERROR;
177extern debugflag FORCE_NO_FFMPEG;
178
179#include <assert.h>