|
9 | 9 | #error This file expects EPSILON_VERSION to be defined |
10 | 10 | #endif |
11 | 11 |
|
| 12 | +#ifndef OMEGA_VERSION_SHORT |
| 13 | +#error This file expects OMEGA_VERSION_SHORT to be defined |
| 14 | +#endif |
| 15 | + |
12 | 16 | #ifndef OMEGA_VERSION |
13 | 17 | #error This file expects OMEGA_VERSION to be defined |
14 | 18 | #endif |
|
19 | 23 |
|
20 | 24 | extern "C" { |
21 | 25 | extern void recovery_start(); |
| 26 | + extern void eadk_display_draw_string(const char * text, KDPoint point, bool large_font, KDColor text_color, KDColor background_color); |
22 | 27 | } |
23 | 28 | namespace Ion { |
24 | 29 | extern char staticStorageArea[]; |
25 | 30 | } |
26 | 31 | constexpr void * storageAddress = &(Ion::staticStorageArea); |
| 32 | + |
27 | 33 | typedef void (*recoveryStartPointerType)(); |
28 | 34 | constexpr recoveryStartPointerType recoveryStartPointer = &(recovery_start); |
29 | 35 |
|
| 36 | +typedef void (*drawStringPointerType)(const char * text, KDPoint point, bool large_font, KDColor text_color, KDColor background_color); |
| 37 | +constexpr drawStringPointerType drawStringPointer = &(eadk_display_draw_string); |
| 38 | + |
30 | 39 | class KernelHeader { |
31 | 40 | public: |
32 | 41 | constexpr KernelHeader() : |
@@ -67,7 +76,9 @@ class UserlandHeader { |
67 | 76 | m_externalAppsRAMEnd(0xFFFFFFFF), |
68 | 77 | m_footer(Magic), |
69 | 78 | m_omegaMagicHeader(OmegaMagic), |
70 | | - m_omegaVersion{OMEGA_VERSION}, |
| 79 | + m_omegaVersion{OMEGA_VERSION_SHORT}, |
| 80 | + m_drawStringAddress(drawStringPointer), |
| 81 | + m_padding{"\0\0\0\0\0\0\0"}, |
71 | 82 | #ifdef OMEGA_USERNAME |
72 | 83 | m_username{OMEGA_USERNAME}, |
73 | 84 | #else |
@@ -136,7 +147,9 @@ class UserlandHeader { |
136 | 147 | uint32_t m_externalAppsRAMEnd; |
137 | 148 | uint32_t m_footer; |
138 | 149 | uint32_t m_omegaMagicHeader; |
139 | | - const char m_omegaVersion[16]; |
| 150 | + const char m_omegaVersion[4]; |
| 151 | + drawStringPointerType m_drawStringAddress; |
| 152 | + const char m_padding[8]; |
140 | 153 | const volatile char m_username[16]; |
141 | 154 | uint32_t m_omegaMagicFooter; |
142 | 155 | uint32_t m_upsilonMagicHeader; |
@@ -173,8 +186,12 @@ class SlotInfo { |
173 | 186 |
|
174 | 187 | }; |
175 | 188 |
|
| 189 | +const char k_omega_version[16] = {OMEGA_VERSION}; |
176 | 190 | const char * Ion::omegaVersion() { |
177 | | - return k_userlandHeader.omegaVersion(); |
| 191 | + // return k_userlandHeader.omegaVersion(); |
| 192 | + // We don't use the UserlandHeader, as for NWA compatibility it can only |
| 193 | + // contain the short version |
| 194 | + return k_omega_version; |
178 | 195 | } |
179 | 196 |
|
180 | 197 | const char * Ion::upsilonVersion() { |
|
0 commit comments