12#include "common/specializations.h"
13#include "common/Types.h"
14#include "common/crc32.h"
16#if defined(ARDUINO_ARCH_AVR)
25 inline constexpr HW
const kHardwareVersion = OSCR_HARDWARE_VERSION;
27#if defined(ENABLE_ADVANCED_CONFIGURATION)
28 inline constexpr bool const kAdvancedConfiguration =
true;
30 inline constexpr bool const kAdvancedConfiguration =
false;
34#if (HARDWARE_OUTPUT_TYPE == OUTPUT_OS12864)
36#elif defined(ENABLE_OLED)
44#if defined(ENABLE_ROTARY) || (defined(ENABLE_ADVANCED_CONFIGURATION) && (HARDWARE_INPUT_TYPE == 3))
46#elif defined(ENABLE_BUTTON2) || (defined(ENABLE_ADVANCED_CONFIGURATION) && (HARDWARE_INPUT_TYPE == 2))
48#elif defined(ENABLE_ADVANCED_CONFIGURATION) && (HARDWARE_INPUT_TYPE == 0)
55 inline constexpr uint16_t
const kFirmwareFeatures =
68 inline constexpr LanguageID const kFirmwareLanguage =
69# if (OSCR_LANGUAGE == LANG_EN)
74 inline constexpr RegionID const kFirmwareRegion =
75# if (OSCR_REGION == REGN_AF)
77# elif (OSCR_REGION == REGN_AN)
79# elif (OSCR_REGION == REGN_AS)
81# elif (OSCR_REGION == REGN_EU)
83# elif (OSCR_REGION == REGN_NA)
85# elif (OSCR_REGION == REGN_OC)
87# elif (OSCR_REGION == REGN_SA)
100 __constinit
extern char const PROGMEM Version[];
138# if defined(ENABLE_POWERSAVING)
139 extern bool wakeEvent();
141 inline constexpr bool wakeEvent()
147 extern void aboutMenu();
150 [[ noreturn ]]
extern void resetMenu();
154#define CRDB_RECORD_SIZE_BASIC 104
155#define CRDB_RECORD_SIZE_STANDARD 112
156#define CRDB_RECORD_SIZE_EXTENDED 116
157#define CRDB_RECORD_SIZE_BASIC_MAPPER 116
158#define CRDB_RECORD_SIZE_NES 138
159#define CRDB_RECORD_SIZE_NES_MAPPER 100
160#define CRDB_RECORD_SIZE_SNES 116
161#define CRDB_RECORD_SIZE_GBA 112
162#define CRDB_RECORD_SIZE_N64 111
163#define CRDB_RECORD_SIZE_A2600 106
164#define CRDB_RECORD_SIZE_A5200 108
165#define CRDB_RECORD_SIZE_JAG 108
166#define CRDB_RECORD_SIZE_TI99 112
170#if OPTION_NEOPIXEL_ORDER == 1
174#elif OPTION_NEOPIXEL_ORDER == 2
181#if defined(ENABLE_GLOBAL_LOG)
186int EEPROM_writeAnything(
int ee, T
const & value)
188#if defined(ARDUINO_ARCH_AVR)
189 uint8_t
const * p = (uint8_t
const *)(
void const *)&value;
192 for (i = 0; i <
sizeof(value); i++)
193 EEPROM.write(ee++, *p++);
202int EEPROM_readAnything(
size_t ee, T & value)
204#if defined(ARDUINO_ARCH_AVR)
205 uint8_t* p = (uint8_t*)(
void*)&value;
208 for (i = 0; i <
sizeof(value); i++)
210 *p++ = EEPROM.read(ee++);
219#include "Cart_Reader.h"
Core-specific string constants.
Definition OSCR.h:106
String constants.
Definition OSCR.h:98
Main program.
Definition Storage.h:13
InputInterfaceID
Input Interface IDs.
Definition core-types.h:187
@ TwoButtons
2-button interface (HW3)
Definition core-types.h:191
@ Serial
ASCII Serial.
Definition core-types.h:188
@ OneButton
1-button interface (HW1-2)
Definition core-types.h:190
@ RotaryButton
Rotary-button interface (HW4-5)
Definition core-types.h:192
void tick()
Definition OSCR.cpp:60
void idle()
Definition OSCR.cpp:84
@ ClockGenCalibrated
Support for calibrating the clock generator.
Definition core-types.h:151
@ OnBoardMega
Enable on-board ATmega2560 options.
Definition core-types.h:153
@ VSelect
Automatic Voltage Select (VSELECT) via TPS211x.
Definition core-types.h:149
@ StabilityFix
Fix for ATmega2560s with stability issues at 3.3V.
Definition core-types.h:154
@ ClockGen
Clock Generator.
Definition core-types.h:148
@ Updater
Support updating via the OSCR.Tools Firmware Updater.
Definition core-types.h:146
@ PowerSaving
Power Saving.
Definition core-types.h:155
@ RealTimeClock
RTC Support.
Definition core-types.h:150
@ ClockGenCalibration
Load clock generator calibration data.
Definition core-types.h:152
@ Config
Allow the use of config.txt.
Definition core-types.h:147
OutputInterfaceID
Output Interface IDs.
Definition core-types.h:169
@ Serial
ASCII Serial.
Definition core-types.h:170
@ SSD1306
OLED.
Definition core-types.h:172
@ OS12864
LCD (a.k.a. MKS/BTT MINI12864, ST7567, etc)
Definition core-types.h:173
void busy()
Definition OSCR.cpp:107
LanguageID
Language IDs.
Definition core-types.h:114
void resetArduino()
Definition OSCR.cpp:126
RegionID
Region IDs.
Definition core-types.h:123
@ AF
Africa.
Definition core-types.h:125
@ SA
South America.
Definition core-types.h:131
@ Global
All/World/Global.
Definition core-types.h:124
@ OC
Oceania.
Definition core-types.h:130
@ AS
Asia.
Definition core-types.h:127
@ NA
North America.
Definition core-types.h:129
@ AN
Antarctica (for completeness)
Definition core-types.h:126
@ EU
Europe.
Definition core-types.h:128
Metadata for OSCR system cores and main menu options.
Definition Types.h:32