Switch to use DMA
This commit is contained in:
parent
27fce6feeb
commit
779624e340
9
rom.68k
9
rom.68k
@ -29,13 +29,8 @@ ramcode:
|
|||||||
| Load sector 0 to 0x0
|
| Load sector 0 to 0x0
|
||||||
move.l #0x0, (0x0, a4) | Set the sector number to 0
|
move.l #0x0, (0x0, a4) | Set the sector number to 0
|
||||||
move.l #0x1, (0x4, a4) | Set the sector count to 1
|
move.l #0x1, (0x4, a4) | Set the sector count to 1
|
||||||
move.w #0x0, (0x8, a4) | Send a read command
|
move.l #0x0, (0xC, a4) | Set the destination address to 0x0
|
||||||
| Transfer 0x200 (512) bytes from the storage card's data register to 0x0
|
move.w #0x1, (0x8, a4) | Send a DMA read command
|
||||||
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
|
|
||||||
jmp (0x0).W | Jump to the loaded sector
|
jmp (0x0).W | Jump to the loaded sector
|
||||||
|
|
||||||
stop #0x2700
|
stop #0x2700
|
||||||
|
Loading…
Reference in New Issue
Block a user