Refactored platform code to use interfaces for patch code with a special feature and improved patch code file names

This commit is contained in:
Gericom
2026-01-02 15:18:45 +01:00
parent d6080984d1
commit 231f14a783
180 changed files with 1073 additions and 1057 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