WonderWitch/Filesystem

From WSdev Wiki
Jump to navigationJump to search

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

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 Location in CPU address space (segment:offset)
44 4 Total file size, in bytes, excluding the header.
48 2 XMODEM chunk count - above file size divided by 128, then rounded up.
50 2 File mode
52 4 Modification time - seconds since January 1st, 2000.
56 4 TODO
60 4 Offset to resource data, bytes excluding header; -1 if not present.

File modes


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