diff --git a/rom.68k b/rom.68k index b5a9d22..14667d6 100644 --- a/rom.68k +++ b/rom.68k @@ -27,12 +27,14 @@ ramcode: move.l #0x1, (a5) | Enable the RAM at base 0x0 move.l d7, a7 | Load sector 0 to 0x0 - move.l #0x0, (a4) | Set the sector number to 0 - | Transfer 0x100 (256) bytes from the storage card's data register 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 - 1. + move.w #0xFF, d0 | Load d0 with the sector size in words - 1. 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 jmp (0x0).W | Jump to the loaded sector