diff --git a/include/PSX/Auxiliary/complex_bitmap.hpp b/include/PSX/Auxiliary/complex_bitmap.hpp index b2aa6abc..b1a6bb64 100644 --- a/include/PSX/Auxiliary/complex_bitmap.hpp +++ b/include/PSX/Auxiliary/complex_bitmap.hpp @@ -33,6 +33,10 @@ namespace JabyEngine { T value; size_t begin; size_t length; + + constexpr BitRangeValue() = default; + constexpr BitRangeValue(T value, size_t begin, size_t length) : value(value), begin(begin), length(length) { + } }; template @@ -47,7 +51,7 @@ namespace JabyEngine { } constexpr BitRangeValue with(T value) const { - return {value, this->begin, this->length}; + return BitRangeValue(value, this->begin, this->length); } constexpr BitRangeValue max() const { diff --git a/include/PSX/System/IOPorts/cd_io.hpp b/include/PSX/System/IOPorts/cd_io.hpp index 1f3d48b9..5f210a55 100644 --- a/include/PSX/System/IOPorts/cd_io.hpp +++ b/include/PSX/System/IOPorts/cd_io.hpp @@ -43,7 +43,7 @@ namespace JabyEngine { } static void ack(VolatileBitMapPOD& port) { - port.write_range_value(InterruptFlag::InterruptTypValue.max()); + port.write(InterruptFlag::InterruptTypValue.max()); } }; diff --git a/include/PSX/System/IOPorts/ioport.hpp b/include/PSX/System/IOPorts/ioport.hpp index e89d6e30..94f8ea33 100644 --- a/include/PSX/System/IOPorts/ioport.hpp +++ b/include/PSX/System/IOPorts/ioport.hpp @@ -31,7 +31,7 @@ namespace JabyEngine { return T{this->pod.read()}; } - constexpr Raw read_range_value(const BitRange& range) const { + constexpr Raw read(const BitRange& range) const { return VolatileBitMapPOD::read().get_value(range); } @@ -43,7 +43,7 @@ namespace JabyEngine { this->pod.write(static_cast(value)); } - constexpr void write_range_value(const BitRangeValue& value) { + constexpr void write(const BitRangeValue& value) { VolatileBitMapPOD::write(T{T::with(value)}); } }; diff --git a/include/PSX/Timer/high_res_timer.hpp b/include/PSX/Timer/high_res_timer.hpp index 5e6c44a8..7cb78e5c 100644 --- a/include/PSX/Timer/high_res_timer.hpp +++ b/include/PSX/Timer/high_res_timer.hpp @@ -66,7 +66,7 @@ namespace JabyEngine { ~HighResTime() = delete; static TimeStamp get_time_stamp() { - return TimeStamp(HighResTime::global_counter_10ms, Timer_IO::Counter2.value.read_range_value(Timer_IO::CounterValue::Value)); + return TimeStamp(HighResTime::global_counter_10ms, Timer_IO::Counter2.value.read(Timer_IO::CounterValue::Value)); } }; #endif //JABYENGINE_USE_HIGH_PERCISION_TIMER diff --git a/src/Library/include/GPU/gpu_internal.hpp b/src/Library/include/GPU/gpu_internal.hpp index fd38dbc4..7d2b89e2 100644 --- a/src/Library/include/GPU/gpu_internal.hpp +++ b/src/Library/include/GPU/gpu_internal.hpp @@ -95,7 +95,7 @@ namespace JabyEngine { } static void set_src(uintptr_t adr) { - DMA_IO::GPU.adr.write_range_value(DMA_IO::MADR::MemoryAdr.with(static_cast(adr))); + DMA_IO::GPU.adr.write(DMA_IO::MADR::MemoryAdr.with(static_cast(adr))); } static void set_dst(const PositionU16& position, const SizeU16& size) { diff --git a/src/Library/src/BootLoader/timer_boot.cpp b/src/Library/src/BootLoader/timer_boot.cpp index 6663eec8..0d348a79 100644 --- a/src/Library/src/BootLoader/timer_boot.cpp +++ b/src/Library/src/BootLoader/timer_boot.cpp @@ -26,7 +26,7 @@ __syscall_SysEnqIntRP(Timer2Irq, &IRQCallback); __syscall_ExitCriticalSection(); - Counter2.target.write_range_value(CounterTarget::CounterTargetValue.with(HighResTime::TicksFor10ms)); + Counter2.target.write(CounterTarget::CounterTargetValue.with(HighResTime::TicksFor10ms)); Counter2.mode.write({Mode}); Interrupt::enable_irq(Interrupt::Timer2);