Update to sector size of 512

This commit is contained in:
pjht 2022-11-18 16:04:06 -06:00
parent ebbb0b19ed
commit 27fce6feeb

10
rom.68k
View File

@ -27,12 +27,14 @@ ramcode:
move.l #0x1, (a5) | Enable the RAM at base 0x0 move.l #0x1, (a5) | Enable the RAM at base 0x0
move.l d7, a7 move.l d7, a7
| Load sector 0 to 0x0 | Load sector 0 to 0x0
move.l #0x0, (a4) | Set the sector number to 0 move.l #0x0, (0x0, a4) | Set the sector number to 0
| Transfer 0x100 (256) bytes from the storage card's data register to 0x0 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 #0x0, a1 | Load a1, the destination address register, with 0x0
move.w #0xFF, d0 | Load d0 with the sector size - 1. move.w #0xFF, d0 | Load d0 with the sector size in words - 1.
sector_loop: sector_loop:
move.b (4, a4), (a1)+ | Transfer a byte of sector data to the destination 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 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