Add ryfs_tell, bump version to 0.4.0

This commit is contained in:
Ry 2022-08-30 16:27:22 -07:00
parent f307c55bdd
commit f31a722e4f
3 changed files with 15 additions and 2 deletions

View File

@ -68,6 +68,7 @@ ryfs_read: jmp [0xF0045010]
ryfs_read_whole_file: jmp [0xF0045014] ryfs_read_whole_file: jmp [0xF0045014]
ryfs_get_size: jmp [0xF0045018] ryfs_get_size: jmp [0xF0045018]
ryfs_get_file_list: jmp [0xF004501C] ryfs_get_file_list: jmp [0xF004501C]
ryfs_tell: jmp [0xF0045020]
; memory copy/compare jump table ; memory copy/compare jump table
copy_memory_bytes: jmp [0xF0046000] copy_memory_bytes: jmp [0xF0046000]

View File

@ -3,8 +3,8 @@
org 0xF0000000 org 0xF0000000
const FOX32ROM_VERSION_MAJOR: 0 const FOX32ROM_VERSION_MAJOR: 0
const FOX32ROM_VERSION_MINOR: 3 const FOX32ROM_VERSION_MINOR: 4
const FOX32ROM_VERSION_PATCH: 3 const FOX32ROM_VERSION_PATCH: 0
const SYSTEM_STACK: 0x01FFF800 const SYSTEM_STACK: 0x01FFF800
const BACKGROUND_COLOR: 0xFF674764 const BACKGROUND_COLOR: 0xFF674764
@ -242,6 +242,7 @@ get_rom_version:
data.32 ryfs_read_whole_file data.32 ryfs_read_whole_file
data.32 ryfs_get_size data.32 ryfs_get_size
data.32 ryfs_get_file_list data.32 ryfs_get_file_list
data.32 ryfs_tell
; memory copy/compare jump table ; memory copy/compare jump table
org.pad 0xF0046000 org.pad 0xF0046000

View File

@ -73,6 +73,17 @@ ryfs_seek:
pop r1 pop r1
ret ret
; get the seek offset of the specified file
; inputs:
; r0: pointer to file struct
; outputs:
; r0: byte offset
ryfs_tell:
add r0, 3
mov r0, [r0]
ret
; read specified number of bytes into the specified buffer ; read specified number of bytes into the specified buffer
; inputs: ; inputs:
; r0: number of bytes to read ; r0: number of bytes to read