Switch to use DMA

This commit is contained in:
pjht 2022-11-21 10:39:39 -06:00
parent 27fce6feeb
commit 779624e340

View File

@ -29,13 +29,8 @@ ramcode:
| Load sector 0 to 0x0
move.l #0x0, (0x0, a4) | Set the sector number to 0
move.l #0x1, (0x4, a4) | Set the sector count to 1
move.w #0x0, (0x8, a4) | Send a read command
| Transfer 0x200 (512) bytes from the storage card's data register to 0x0
move.w #0x0, a1 | Load a1, the destination address register, with 0x0
move.w #0xFF, d0 | Load d0 with the sector size in words - 1.
sector_loop:
move.w (0xA, a4), (a1)+ | Transfer a word of sector data to the destination
dbra d0, sector_loop | Loop back if there is more to transfer
move.l #0x0, (0xC, a4) | Set the destination address to 0x0
move.w #0x1, (0x8, a4) | Send a DMA read command
jmp (0x0).W | Jump to the loaded sector
stop #0x2700