Save state before change
This commit is contained in:
@@ -13,6 +13,15 @@ namespace JabyEngine {
|
||||
static constexpr T words_to_sectors(T size) {
|
||||
return (size + static_cast<T>(DataSector::SizeWords - 1))/static_cast<T>(DataSector::SizeWords);
|
||||
}
|
||||
|
||||
constexpr size_t hash() const {
|
||||
uint32_t value = 0;
|
||||
|
||||
for(const auto word : this->data) {
|
||||
value += word;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
};
|
||||
|
||||
enum Index {
|
||||
@@ -142,10 +151,10 @@ namespace JabyEngine {
|
||||
|
||||
static void ack_extended(IOPort<InterruptFlag>& port) {
|
||||
port.write(InterruptFlag::from(InterruptFlag::InterruptTypValue.range_max<uint8_t>(), InterruptEnable::UnknownIRQ, InterruptEnable::CommandStartIRQ));
|
||||
// *reinterpret_cast<uint32_t*>(0x0) = 0;
|
||||
// *reinterpret_cast<uint32_t*>(0x0) = 0;
|
||||
// *reinterpret_cast<uint32_t*>(0x0) = 0;
|
||||
// *reinterpret_cast<uint32_t*>(0x0) = 0;
|
||||
}
|
||||
|
||||
static void reset_parameter_fifo(IOPort<InterruptFlag>& port) {
|
||||
port.write(InterruptFlag{0x40});
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user