WonderWitch/Filesystem: Difference between revisions

From WSdev Wiki
Jump to navigationJump to search
 
(3 intermediate revisions by the same user not shown)
Line 11: Line 11:
|-
|-
| <code>/</code> || || SRAM bank 3, $02F2 || 16 ||  
| <code>/</code> || || SRAM bank 3, $02F2 || 16 ||  
|}
=== /kern ===
The <tt>/kern</tt> folder is provided by FreyaOS.
{| class="wikitable"
|-
! File !! Description
|-
| <tt>@ilib</tt>
| [[WonderWitch/IL/IlibIL|IlibIL]]; can be overridden in <tt>/rom0</tt>
|-
| <tt>@proc</tt>
| [[WonderWitch/IL/ProcIL|ProcIL]]; can be overridden in <tt>/rom0</tt>
|-
| <tt>@pfs</tt>
| [[WonderWitch/IL/FsIL|FsIL]]
|-
| <tt>@shell</tt>
| Shell program; can be overridden in <tt>/rom0</tt>
|-
| <tt>@aux</tt>
|
|-
| <tt>about.txt</tt>
| "About Freya"
|}
|}


Line 26: Line 53:
FreyaOS displays the first 12 characters in its file selector.
FreyaOS displays the first 12 characters in its file selector.
|-
|-
| 40 || 4 || Location in CPU address space (segment:offset)
| 40 || 4 || File: Location in CPU address space (segment:offset)
|-
|-
| 44 || 4 || Total file size, in bytes, excluding the header.
| 44 || 4 || File: Total file size, in bytes, excluding the header.
|-
|-
| 48 || 2 || XMODEM chunk count - above file size divided by 128, then rounded up.
| 48 || 2 || File: 128-byte (XMODEM) chunk count, rounded up.
Directory: Number of total available entries.
<tt>0xFFFF</tt> (-1): Unallocated entry.
|-
|-
| 50 || 2 || File mode
| 50 || 2 || File mode
Line 36: Line 65:
| 52 || 4 || Modification time
| 52 || 4 || Modification time
|-
|-
| 56 || 4 || TODO
| 56 || 4 || File: TODO
Directory: Pointer to FsIL implementation for directory
|-
|-
| 60 || 4 || Offset to resource data, bytes excluding header; -1 if not present.
| 60 || 4 || Offset to resource data, bytes excluding header; <tt>0xFFFFFFFF</tt> if not present.
|}
|}



Latest revision as of 17:52, 12 April 2025

Mount points

FreyaOS mount points
Path File data location File table location File table size (entries) Description
/rom0 ROM (384 KB) SRAM bank 3, $16F2 128
/ram0 SRAM bank 0 (64 KB) SRAM bank 3, $06F2 64
/ SRAM bank 3, $02F2 16

/kern

The /kern folder is provided by FreyaOS.

File Description
@ilib IlibIL; can be overridden in /rom0
@proc ProcIL; can be overridden in /rom0
@pfs FsIL
@shell Shell program; can be overridden in /rom0
@aux
about.txt "About Freya"

File table entry format

Header contents
Offset Length Contents
0 16 File name; zero-terminated Shift-JIS string.
16 24 User-friendly file name; zero-terminated Shift-JIS string.

FreyaOS displays the first 12 characters in its file selector.

40 4 File: Location in CPU address space (segment:offset)
44 4 File: Total file size, in bytes, excluding the header.
48 2 File: 128-byte (XMODEM) chunk count, rounded up.

Directory: Number of total available entries. 0xFFFF (-1): Unallocated entry.

50 2 File mode
52 4 Modification time
56 4 File: TODO

Directory: Pointer to FsIL implementation for directory

60 4 Offset to resource data, bytes excluding header; 0xFFFFFFFF if not present.

Timestamp format

Header contents
Bits Contents
31 - 25 Year, 0 .. (starting from 2000)
24 - 21 Month, 1 .. 12
20 - 16 Day, 1 .. 31
15 - 11 Hour, 0 .. 23
10 - 5 Minute, 0 .. 59
0 - 4 Second, 0 .. 29 (in two-second units)

File modes


15  bit  8  7  bit  0
 ---- ----  ---- ----
 ???? ????  dlis mrwx
            |||| ||||
            |||| |||+- Execute
            |||| ||+-- Write
            |||| |+--- Read
            |||| +---- Prohibit mmap() use
            |||+------ StreamIL-related?
            ||+------- Intermediate library
            |+-------- Symbolic link
            +--------- Directory