diff --git a/include/PSX/System/IOPorts/IOValues/memory_io_values.hpp b/include/PSX/System/IOPorts/IOValues/memory_io_values.hpp new file mode 100644 index 00000000..d0c5d0c2 --- /dev/null +++ b/include/PSX/System/IOPorts/IOValues/memory_io_values.hpp @@ -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}; + } + }; + } +} \ No newline at end of file diff --git a/include/PSX/System/IOPorts/memory_io.hpp b/include/PSX/System/IOPorts/memory_io.hpp index dafb47ef..4a166444 100644 --- a/include/PSX/System/IOPorts/memory_io.hpp +++ b/include/PSX/System/IOPorts/memory_io.hpp @@ -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; + using COM_DELAY_IO = IOPort; - __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); } } \ No newline at end of file