DTC
This commit is contained in:
parent
a84b2c4f14
commit
89ab744486
|
@ -38,4 +38,11 @@ static constexpr __always_inline void io_class__update_with(T& dst, const T& src
|
|||
const_cast<volatile DST_VALUE&>(dst.raw_value) = src.raw_value;
|
||||
}
|
||||
|
||||
template<typename T, typename U>
|
||||
static constexpr __always_inline void io_class__update_with(T& dst, const U& src) {
|
||||
typedef decltype(dst.raw_value) DST_VALUE;
|
||||
|
||||
const_cast<volatile DST_VALUE&>(dst.raw_value) = src;
|
||||
}
|
||||
|
||||
#endif //!__JABYENGINE_IO_CLASS_HELPER_HPP__
|
|
@ -212,6 +212,12 @@ namespace SPU {
|
|||
io_class__2option_map_getter_is(bool, external_audio_off, external_audio_on, 1);
|
||||
io_class__2option_map_getter_is(bool, cd_audio_disable, cd_audio_enable, 0);
|
||||
};
|
||||
|
||||
struct __no_align DataTransferControl {
|
||||
static inline __always_inline auto& Register = *reinterpret_cast<DataTransferControl*>(0x1F801DAC);
|
||||
|
||||
uint16_t raw_value = 0;
|
||||
};
|
||||
}
|
||||
|
||||
#endif //!__JABYENGINE_SPU_IO_HPP__
|
|
@ -41,6 +41,7 @@ namespace SPU {
|
|||
clear_voice(voice);
|
||||
}
|
||||
|
||||
io_class__update_with(DataTransferControl::Register, (2 << 1));
|
||||
enable_control();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue