Manually copy the first value when you set up hblank (#569)

Fixes the weird lines on the hblank demos

- [x] No changelog update needed
This commit is contained in:
Gwilym Inzani 2024-02-27 20:50:14 +00:00 committed by GitHub
commit b5c97afe61
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -73,9 +73,11 @@ impl Dma {
let n_transfers = (size_of::<T>() / 2) as u32; let n_transfers = (size_of::<T>() / 2) as u32;
self.source_addr.set(handle.data.as_ptr() as u32); self.source_addr.set(handle.data.as_ptr().add(1) as u32);
self.dest_addr.set(location.memory_location as u32); self.dest_addr.set(location.memory_location as u32);
location.memory_location.write_volatile(values[0]);
self.ctrl_addr.set( self.ctrl_addr.set(
(0b10 << 0x15) | // keep destination address fixed (0b10 << 0x15) | // keep destination address fixed
// (0b00 << 0x17) | // increment the source address each time // (0b00 << 0x17) | // increment the source address each time