forked from hpingel/Sidekick64
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path264config.h
141 lines (118 loc) · 4.2 KB
/
264config.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
/*
_________.__ .___ __ .__ __ ________ ________ _____
/ _____/|__| __| _/____ | | _|__| ____ | | __ \_____ \/ _____/ / | |
\_____ \ | |/ __ |/ __ \| |/ / |/ ___\| |/ / / ____/ __ \ / | |_
/ \| / /_/ \ ___/| <| \ \___| < / \ |__\ \/ ^ /
/_______ /|__\____ |\___ >__|_ \__|\___ >__|_ \ \_______ \_____ /\____ |
\/ \/ \/ \/ \/ \/ \/ \/ |__|
264config.h
RasPiC64 - A framework for interfacing the C64 (and C16/+4) and a Raspberry Pi 3B/3B+
- code for reading/parsing the config file
Copyright (c) 2019, 2020 Carsten Dachsbacher <frenetic@dachsbacher.de>
Logo created with http://patorjk.com/software/taag/
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _config_h
#define _config_h
#define MAX_ITEMS 20
extern int menuX[ 5 ], menuY[ 5 ], menuItems[ 5 ];
extern char menuText[ 5 ][ MAX_ITEMS ][ 32 ], menuFile[ 5 ][ MAX_ITEMS ][ 1024 ], menuFile2[ 5 ][ MAX_ITEMS ][ 1024 ];
extern int menuItemPos[ 5 ][ MAX_ITEMS ][ 2 ];
#define TIMING_NAMES 2
const char timingNames[TIMING_NAMES][32] = {
"WAIT_CYCLE_READ",
"WAIT_CYCLE_WRITEDATA",
};
#define CATEGORY_NAMES 4
const char categoryNames[CATEGORY_NAMES][32] = {
"SPECIAL",
"PRG",
"CRT",
};
const char categoryNamesPrint[CATEGORY_NAMES][32] = {
"SPECIAL",
"PRG",
"NEORAM/CRT",
};
#define SKIN_NAMES 18
const char skinNames[SKIN_NAMES][40] = {
"SKIN_BROWSER_BACKGROUND_COLOR",
"SKIN_BROWSER_BORDER_COLOR",
"SKIN_BROWSER_TEXT_HEADER",
"SKIN_BROWSER_TEXT_FOOTER",
"SKIN_BROWSER_TEXT_FOOTER_HIGHLIGHTED",
"SKIN_TEXT_BROWSER",
"SKIN_TEXT_BROWSER_DIRECTORY",
"SKIN_TEXT_BROWSER_CURRENT",
"SKIN_MENU_BACKGROUND_COLOR",
"SKIN_MENU_BORDER_COLOR",
"SKIN_MENU_TEXT_HEADER",
"SKIN_MENU_TEXT_FOOTER",
"SKIN_MENU_TEXT_CATEGORY",
"SKIN_MENU_TEXT_ITEM",
"SKIN_MENU_TEXT_KEY",
"SKIN_MENU_TEXT_SYSINFO",
"SKIN_ERROR_BAR",
"SKIN_ERROR_TEXT"
};
extern int readConfig( CLogger *logger, char *DRIVE, char *FILENAME );
extern int getMainMenuSelection( int key, char **FILE, int *addIdx = 0 );
extern void printMainMenu();
#pragma pack(push)
#pragma pack(1)
union __attribute__((packed)) T_SKIN_VALUES {
struct __attribute__((packed)) {
// browser colors
u32 SKIN_BROWSER_BACKGROUND_COLOR;
u32 SKIN_BROWSER_BORDER_COLOR;
// text in menu header, footer, and highlighted text
u32 SKIN_BROWSER_TEXT_HEADER;
u32 SKIN_BROWSER_TEXT_FOOTER;
u32 SKIN_BROWSER_TEXT_FOOTER_HIGHLIGHTED;
// standard text (files, crts), for directories in tree view, and item below cursore
u32 SKIN_TEXT_BROWSER;
u32 SKIN_TEXT_BROWSER_DIRECTORY;
u32 SKIN_TEXT_BROWSER_CURRENT;
// menu colors
u32 SKIN_MENU_BACKGROUND_COLOR;
u32 SKIN_MENU_BORDER_COLOR;
// text in menu header and footer
u32 SKIN_MENU_TEXT_HEADER;
u32 SKIN_MENU_TEXT_FOOTER;
// menu items: heading (category), items, and the key that needs to be pressed
u32 SKIN_MENU_TEXT_CATEGORY;
u32 SKIN_MENU_TEXT_ITEM;
u32 SKIN_MENU_TEXT_KEY;
// sysinfo on the bottom right
u32 SKIN_MENU_TEXT_SYSINFO;
// error message colors (horizontal bar and text)
u32 SKIN_ERROR_BAR;
u32 SKIN_ERROR_TEXT;
};
u32 v[ SKIN_NAMES ];
};
#pragma pack(pop)
extern u32 skinFontLoaded;
extern char skinFontFilename[ 1024 ];
extern union T_SKIN_VALUES skinValues;
extern int screenType;
#ifdef WITH_NET
extern char netSidekickHostname[ 256 ];
extern char netSktpHostName[ 256 ];
extern u32 netSktpHostPort;
extern char netSktpHostUser[ 64 ];
extern char netSktpHostPassword[ 64 ];
extern u32 netModemEmuDefaultBaudrate;
extern boolean netConnectOnBoot;
extern boolean netEnableWebserver;
#endif
#endif