jabyengine/include/PSX/System/IOPorts/memory_io.hpp

31 lines
898 B
C++

#ifndef __JABYENGINE_MEMORY_IO_HPP__
#define __JABYENGINE_MEMORY_IO_HPP__
#include "ioport.hpp"
namespace JabyEngine {
namespace Memory_IO {
template<template<typename> typename T>
struct COM_DELAY_base {
T<uint32_t>::Value value;
void setup() {
this->value = 0x1325;
}
};
typedef COM_DELAY_base<VolatileValue> COM_DELAY_v;
typedef COM_DELAY_base<NormalValue> COM_DELAY_t;
struct CD_DELAY {
typedef uint32_t Type;
static constexpr uint32_t SetupValue = 0x20943;
};
static auto& COM_DELAY = *reinterpret_cast<COM_DELAY_v*>(0x1F801020);
//__declare_io_port_global_simple(COM_DELAY::Type, COM_DELAY, 0x1F801020);
__declare_io_port_global_simple(CD_DELAY::Type, CD_DELAY, 0x1F801018);
}
}
#endif //!__JABYENGINE_MEMORY_IO_HPP__