Initial commit

This commit is contained in:
Gericom
2025-11-22 11:08:28 +01:00
commit 9cf3ffbfcf
358 changed files with 58350 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
.cpu arm7tdmi
.section "offsettosectorremap", "ax"
.syntax unified
.thumb
// r0 = rom offset
// returns sd sector in r0
// returns remaining sectors in cluster in lr
.global offset_to_sector_remap
.type offset_to_sector_remap, %function
offset_to_sector_remap:
push {lr}
lsrs r0, r0, #9 // byte address to sector address
movs r1, #1
mov lr, r1 // read at most 1 sector at a time
pop {pc}
.balign 4
.pool
.end