mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[bootloader] Made bootloader Upsilon-aware
This commit is contained in:
@@ -42,6 +42,7 @@ void Interface::drawImage(KDContext* ctx, const Image* image, int offset) {
|
||||
|
||||
void Interface::draw() {
|
||||
KDContext * ctx = KDIonContext::sharedContext();
|
||||
ctx->fillRect(KDRect(0,0,320,240), KDColorBlack);
|
||||
drawImage(ctx, ImageStore::Computer, 70);
|
||||
drawImage(ctx, ImageStore::Cable, 172);
|
||||
|
||||
@@ -61,7 +62,10 @@ void Interface::draw() {
|
||||
Slot slot = slots[i];
|
||||
|
||||
if (slot.kernelHeader()->isValid() && slot.userlandHeader()->isValid()) {
|
||||
if (slot.userlandHeader()->isOmega()) {
|
||||
if (slot.userlandHeader()->isOmega() && slot.userlandHeader()->isUpsilon()) {
|
||||
ctx->drawString("Upsilon", KDPoint(56, i*13), KDFont::SmallFont, KDColorWhite, KDColorBlack);
|
||||
ctx->drawString(slot.userlandHeader()->upsilonVersion(), KDPoint(112, i*13), KDFont::SmallFont, KDColorWhite, KDColorBlack);
|
||||
} else if (slot.userlandHeader()->isOmega()) {
|
||||
ctx->drawString("Omega", KDPoint(56, i*13), KDFont::SmallFont, KDColorWhite, KDColorBlack);
|
||||
ctx->drawString(slot.userlandHeader()->omegaVersion(), KDPoint(112, i*13), KDFont::SmallFont, KDColorWhite, KDColorBlack);
|
||||
} else {
|
||||
|
||||
@@ -22,4 +22,12 @@ const char * UserlandHeader::omegaVersion() const {
|
||||
return m_omegaVersion;
|
||||
}
|
||||
|
||||
const bool UserlandHeader::isUpsilon() const {
|
||||
return m_ups_header == UpsilonMagic && m_ups_footer == UpsilonMagic;
|
||||
}
|
||||
|
||||
const char * UserlandHeader::upsilonVersion() const {
|
||||
return m_UpsilonVersion;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,11 +13,14 @@ public:
|
||||
const bool isValid() const;
|
||||
const bool isOmega() const;
|
||||
const char * omegaVersion() const;
|
||||
const bool isUpsilon() const;
|
||||
const char * upsilonVersion() const;
|
||||
|
||||
private:
|
||||
UserlandHeader();
|
||||
constexpr static uint32_t Magic = 0xDEC0EDFE;
|
||||
constexpr static uint32_t OmegaMagic = 0xEFBEADDE;
|
||||
constexpr static uint32_t UpsilonMagic = 0x55707369;
|
||||
uint32_t m_header;
|
||||
const char m_expectedEpsilonVersion[8];
|
||||
void * m_storageAddressRAM;
|
||||
@@ -33,6 +36,10 @@ private:
|
||||
const char m_omegaVersion[16];
|
||||
const volatile char m_username[16];
|
||||
uint32_t m_ohm_footer;
|
||||
uint32_t m_ups_header;
|
||||
const char m_UpsilonVersion[16];
|
||||
uint32_t m_osType;
|
||||
uint32_t m_ups_footer;
|
||||
};
|
||||
|
||||
extern const UserlandHeader* s_userlandHeaderA;
|
||||
|
||||
Reference in New Issue
Block a user