Convert Memory IO

This commit is contained in:
jaby 2024-09-28 15:19:19 +02:00
parent dfbfc220ea
commit 60c565bfde
2 changed files with 24 additions and 13 deletions

View File

@ -0,0 +1,18 @@
#pragma once
#include "../ioport.hpp"
namespace JabyEngine {
namespace Memory_IO_Values {
__declare_io_value(CD_DELAY, uint32_t) {
static constexpr CD_DELAY create() {
return CD_DELAY{0x20943};
}
};
__declare_io_value(COM_DELAY, uint32_t) {
static constexpr COM_DELAY create() {
return COM_DELAY{0x1325};
}
};
}
}

View File

@ -1,21 +1,14 @@
#pragma once
#include "ioport.hpp"
#include "IOValues/memory_io_values.hpp"
namespace JabyEngine {
namespace Memory_IO {
__declare_io_value(COM_DELAY, uint32_t) {
static constexpr COM_DELAY create() {
return COM_DELAY{0x1325};
}
};
using namespace Memory_IO_Values;
__declare_io_value(CD_DELAY, uint32_t) {
static constexpr CD_DELAY create() {
return CD_DELAY{0x20943};
}
};
using CD_DELAY_IO = IOPort<Memory_IO_Values::CD_DELAY>;
using COM_DELAY_IO = IOPort<Memory_IO_Values::COM_DELAY>;
__declare_io_port(, COM_DELAY, 0x1F801020);
__declare_io_port(, CD_DELAY, 0x1F801018);
static auto& CD_DELAY = __new_declare_io_port(CD_DELAY_IO, 0x1F801018);
static auto& COM_DELAY = __new_declare_io_port(COM_DELAY_IO, 0x1F801020);
}
}