diff --git a/agb/src/display/tiled/map.rs b/agb/src/display/tiled/map.rs index 0c9696b1..2c7f779d 100644 --- a/agb/src/display/tiled/map.rs +++ b/agb/src/display/tiled/map.rs @@ -5,7 +5,6 @@ use crate::bitarray::Bitarray; use crate::display::affine::AffineMatrixBackground; use crate::display::tile_data::TileData; use crate::display::{Priority, DISPLAY_CONTROL}; -use crate::dma::dma_copy16; use crate::fixnum::Vector2D; use crate::memory_mapped::MemoryMapped; @@ -93,9 +92,8 @@ where if *self.tiles_dirty() { unsafe { - dma_copy16( + screenblock_memory.copy_from( self.tiles_mut().as_ptr() as *const u16, - screenblock_memory, self.map_size().num_tiles(), ); } diff --git a/agb/src/display/tiled/vram_manager.rs b/agb/src/display/tiled/vram_manager.rs index 059e8a8e..fcbfe69f 100644 --- a/agb/src/display/tiled/vram_manager.rs +++ b/agb/src/display/tiled/vram_manager.rs @@ -5,7 +5,6 @@ use alloc::{slice, vec::Vec}; use crate::{ agb_alloc::{block_allocator::BlockAllocator, bump_allocator::StartEnd}, display::palette16, - dma::dma_copy16, hash_map::{Entry, HashMap}, memory_mapped::MemoryMapped1DArray, }; @@ -413,7 +412,9 @@ impl VRamManager { /// Copies raw palettes to the background palette without any checks. pub fn set_background_palette_raw(&mut self, palette: &[u16]) { unsafe { - dma_copy16(palette.as_ptr(), PALETTE_BACKGROUND.as_ptr(), palette.len()); + PALETTE_BACKGROUND + .as_ptr() + .copy_from_nonoverlapping(palette.as_ptr(), palette.len()); } }