-
Notifications
You must be signed in to change notification settings - Fork 3
/
config.h
248 lines (207 loc) · 4.54 KB
/
config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
#pragma once
//#define PICOGB_RP2 1
//#define PICOGB_PD 1
#if defined(PICOGB_CUSTOM) && (PICOGB_CUSTOM)
// do not the config
#include "pgb_config.h"
#elif defined(PICOGB_PD) || (defined(TARGET_SIMULATOR) && TARGET_SIMULATOR)
#define NO_ASSERT
#include "config_pd.h"
#elif defined(PICO_NO_FPGA_CHECK) || defined(PICOGB_RP2)
#include "config_rp2.h"
#else
#warning "Do not fall back on default config! Define PICOGB_CUSTOM as 1, and copypaste this config to pgb_config.h instead."
//#define CONFIG_DBG
//#define CONFIG_DBG_IO
//#define GBA
//#define PPU_SCANLINE_UPDATES
#define CONFIG_NOBOOTMEME
//#define CONFIG_IS_CGB
//#define CONFIG_FORCE_ENABLE_CGB
//#define CONFIG_PPU_CGB_MONO
#define CONFIG_PPU_INVERT
#define CONFIG_APU_ENABLE_PARTIAL
#define CONFIG_APU_ENABLE
#define CONFIG_APU_RICH
//#define CONFIG_APU_MONO
#define CONFIG_APU_N_PER_TICK 8
#define CONFIG_APU_N_BUFSIZE 32768
//#define CONFIG_ENABLE_LRU
//#define CONFIG_USE_FLAT_ROM
//#define CONFIG_PPU_ACTION_ON_START
// 0 - default 32bit full-color
// 1 - 1bpp jankdither globally fixed
// 2 - 1bpp nodither
// 3 - 1bpp jankdither locally fixed
// 4 - 2x4bpp ANSI 16-color packed, doubled
// 5 - 8bpp ANSI 16-color (low nybble), single
// 6 - RGB565
#define PPU_MODE 0
// 0 - no interlacing
// 1 - full frame interlacing (half FPS)
// 2 - actual interlacing
#define PPU_INTERLACE 0
#endif
// ========[DO NOT CHANGE PAST THIS]========
#ifdef NO_ASSERT
#undef assert
#define assert(h) ;
#endif
#ifndef PPU_MODE
#define PPU_MODE 0
#endif
#if PPU_MODE == 1 || PPU_MODE == 2 || PPU_MODE == 3
#define PPU_IS_MONOCHROME 1
#define PPU_IS_BPP 1
#define PPU_IS_IPP 8
#define PPU_IS_SPP 1
#if PPU_MODE == 1 || PPU_MODE == 3
#define PPU_IS_DITHER 1
#else
#define PPU_IS_DITHER 0
#endif
#else
#define PPU_IS_MONOCHROME 0
#define PPU_IS_BPP (sizeof(pixel_t)*8)
#define PPU_IS_IPP 1
#define PPU_IS_SPP 8
#define PPU_IS_DITHER 0
#endif
#ifndef GBA
#define GBA 0
#else
#undef GBA
#define GBA 1
#endif
#ifndef CONFIG_DBG
#define CONFIG_DBG 0
#else
#undef CONFIG_DBG
#define CONFIG_DBG 1
#endif
#ifndef CONFIG_DBG_IO
#define CONFIG_DBG_IO 0
#else
#undef CONFIG_DBG_IO
#define CONFIG_DBG_IO 1
#endif
#ifndef PPU_SCANLINE_UPDATES
#define PPU_SCANLINE_UPDATES 0
#else
#undef PPU_SCANLINE_UPDATES
#define PPU_SCANLINE_UPDATES 1
#endif
#ifndef CONFIG_MIC_CACHE_BYPASS
#define CONFIG_MIC_CACHE_BYPASS 0
#else
#undef CONFIG_MIC_CACHE_BYPASS
#define CONFIG_MIC_CACHE_BYPASS 1
#endif
#ifndef CONFIG_DOCTOR
#define CONFIG_DOCTOR 0
#else
#undef CONFIG_DOCTOR
#define CONFIG_DOCTOR 1
#endif
#ifndef CONFIG_LYC_90
#define CONFIG_LYC_90 0
#else
#undef CONFIG_LYC_90
#define CONFIG_LYC_90 1
#endif
#ifndef CONFIG_BOOTMEME
#define CONFIG_BOOTMEME 0
#else
#undef CONFIG_BOOTMEME
#define CONFIG_BOOTMEME 1
#endif
#ifndef CONFIG_NOBOOTMEME
#define CONFIG_NOBOOTMEME 0
#else
#undef CONFIG_NOBOOTMEME
#define CONFIG_NOBOOTMEME 1
#endif
#ifndef CONFIG_IS_CGB
#define CONFIG_IS_CGB 0
#else
#undef CONFIG_IS_CGB
#define CONFIG_IS_CGB 1
#endif
#ifndef CONFIG_PPU_CGB_MONO
#define CONFIG_PPU_CGB_MONO 0
#else
#undef CONFIG_PPU_CGB_MONO
#define CONFIG_PPU_CGB_MONO 1
#endif
#ifndef CONFIG_VSYNC
#define CONFIG_VSYNC 0
#endif
#ifndef CONFIG_PPU_INVERT
#define CONFIG_PPU_INVERT 0
#else
#undef CONFIG_PPU_INVERT
#define CONFIG_PPU_INVERT 1
#endif
#ifndef CONFIG_APU_ENABLE
#define CONFIG_APU_ENABLE 0
#else
#undef CONFIG_APU_ENABLE
#define CONFIG_APU_ENABLE 1
#endif
#ifndef CONFIG_APU_RICH
#define CONFIG_APU_RICH 0
#else
#undef CONFIG_APU_RICH
#define CONFIG_APU_RICH 1
#endif
#ifndef CONFIG_APU_MONO
#define CONFIG_APU_MONO 0
#else
#undef CONFIG_APU_MONO
#define CONFIG_APU_MONO 1
#endif
#ifndef PPU_INTERLACE
#define PPU_INTERLACE 0
#endif
#ifndef CONFIG_ENABLE_LRU
#define CONFIG_ENABLE_LRU 0
#else
#undef CONFIG_ENABLE_LRU
#define CONFIG_ENABLE_LRU 1
#endif
#ifndef CONFIG_USE_FLAT_ROM
#define CONFIG_USE_FLAT_ROM 0
#else
#undef CONFIG_USE_FLAT_ROM
#define CONFIG_USE_FLAT_ROM 1
#endif
#ifndef CONFIG_PPU_ACTION_ON_START
#define CONFIG_PPU_ACTION_ON_START 0
#else
#undef CONFIG_PPU_ACTION_ON_START
#define CONFIG_PPU_ACTION_ON_START 1
#endif
#ifndef PGB_FUNC
#define PGB_FUNC
#endif
#ifndef PGB_DATA
#define PGB_DATA
#endif
#ifndef CONFIG_FORCE_ENABLE_CGB
#define CONFIG_FORCE_ENABLE_CGB CONFIG_IS_CGB
#else
#undef CONFIG_FORCE_ENABLE_CGB
#define CONFIG_FORCE_ENABLE_CGB 1
#endif
#ifndef CONFIG_APU_ENABLE_PARTIAL
#define CONFIG_APU_ENABLE_PARTIAL CONFIG_APU_ENABLE
#else
#undef CONFIG_APU_ENABLE_PARTIAL
#define CONFIG_APU_ENABLE_PARTIAL 1
#endif
#ifndef CONFIG_APU_N_PER_TICK
#define CONFIG_APU_N_PER_TICK 8
#endif
#ifndef CONFIG_APU_N_BUFSIZE
#define CONFIG_APU_N_BUFSIZE 32768
#endif