Skip to content

Commit

Permalink
Add ryfs_tell, bump version to 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ry755 committed Aug 30, 2022
1 parent f307c55 commit f31a722
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions fox32rom.def
Expand Up @@ -68,6 +68,7 @@ ryfs_read: jmp [0xF0045010]
ryfs_read_whole_file: jmp [0xF0045014]
ryfs_get_size: jmp [0xF0045018]
ryfs_get_file_list: jmp [0xF004501C]
ryfs_tell: jmp [0xF0045020]

; memory copy/compare jump table
copy_memory_bytes: jmp [0xF0046000]
Expand Down
5 changes: 3 additions & 2 deletions main.asm
Expand Up @@ -3,8 +3,8 @@
org 0xF0000000

const FOX32ROM_VERSION_MAJOR: 0
const FOX32ROM_VERSION_MINOR: 3
const FOX32ROM_VERSION_PATCH: 3
const FOX32ROM_VERSION_MINOR: 4
const FOX32ROM_VERSION_PATCH: 0

const SYSTEM_STACK: 0x01FFF800
const BACKGROUND_COLOR: 0xFF674764
Expand Down Expand Up @@ -242,6 +242,7 @@ get_rom_version:
data.32 ryfs_read_whole_file
data.32 ryfs_get_size
data.32 ryfs_get_file_list
data.32 ryfs_tell

; memory copy/compare jump table
org.pad 0xF0046000
Expand Down
11 changes: 11 additions & 0 deletions ryfs.asm
Expand Up @@ -73,6 +73,17 @@ ryfs_seek:
pop r1
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
; inputs:
; r0: number of bytes to read
Expand Down

0 comments on commit f31a722

Please sign in to comment.