Commit graph

36 commits

Author SHA1 Message Date
Yann MAGNIN
8156c8437b
fygue: merge dev branch that add FXCP400 file IO support 2025-04-08 18:12:52 +02:00
Yann MAGNIN
f1bf037a18
fygue: rework flash abstraction + support FAT12 (untested) + support G35PE2 device + support Math+ device (untested) 2025-04-08 11:21:04 +02:00
Yann MAGNIN
fc358c2fb1
fygue: rework flash initialization + fix mount fail behaviour 2025-04-07 13:29:02 +02:00
Lephe
3dedbea70d
fs: fix incorrect cursor state after pread/pwrite 2025-04-06 15:54:44 +02:00
Lephe
8e64a8a107
fs: fx-CP 400 fixes, still unreliable when writing as previously known 2025-04-06 15:54:44 +02:00
Yann MAGNIN
a56d57ad61
fygue: support FXCP400 (work, but broken for BFile syscalls) 2025-04-06 12:23:25 +02:00
Yann MAGNIN
d9b03e7052
fygue: support read() primitive 2025-04-05 18:16:24 +02:00
Yann MAGNIN
20cb87c0c1
fygue: support close() primitive for file 2025-04-05 17:05:33 +02:00
Yann MAGNIN
b1b4e8a287
fygue: support cluster chunk list generator for file (needed for the future read() primitive) 2025-04-05 15:22:09 +02:00
Yann MAGNIN
eaa0602225
fygue: fix FAT cluster resolution + support stat() for directory + support stat(), lseek() and write() (EROFS) for file 2025-04-05 13:34:42 +02:00
Yann MAGNIN
bad0dbd5f4
fygue: support stat for directory and file 2025-04-05 09:31:38 +02:00
Lephe
7180b52fd4
fs: first steps towards working fx-CP 400 support (compiles, no syscalls) 2025-04-05 08:34:08 +02:00
Yann MAGNIN
8b5ede80fe
fygue: support directory lseek,write(error),close 2025-04-04 11:25:18 +02:00
Yann MAGNIN
dae0972878
fygue: support readdir() + small fixes 2025-04-04 08:50:24 +02:00
Yann MAGNIN
e4e09052fc
fygue: support open() primitive 2025-04-03 14:22:02 +02:00
Yann MAGNIN
6d99494d30
fygue: (WIP) add syncfs support + add FAT/Flash backend + prepare open() primitive 2025-04-02 15:34:15 +02:00
Yann MAGNIN
b40a6b3fa8
fs: prepare Fygue integration 2025-04-01 21:06:55 +02:00
Yann MAGNIN
968588bac3
fugue: manually handle world-switch 2025-04-01 16:12:09 +02:00
Lephe
ae3250edd0
fs readdir: fix handling of BFile_Type_MainMem entries
These are g*m files, not the @MainMem folder.
2024-08-04 07:55:14 +02:00
Lephe
a45135776a
fs readdir: recognize a few more bfile types 2024-07-27 21:49:01 +02:00
Lephe
b2b1f00d04
fs: take const descriptor in open_generic() 2024-03-19 19:03:33 +01:00
Lephe
542b4f0a81
fs: fix fugue_dir_explore() error not propagating to open() 2024-02-04 18:50:37 +01:00
Lephe
1e220af616
fs: fix incorrect OoM handling in fugue_dir_explore()
Non-NULL dp would be returned by alloc failure path despite having been
freed.
2024-02-04 18:17:41 +01:00
Lephe
45881995e9
fs: initialize dynamically-allocated fd table
Obvious oversight from 736b58f205.
2023-01-14 22:28:27 +01:00
Lephe
736b58f205
reduce static user RAM footprint for mono targets
* Make INTC data const (it should've always been)
* Introduce GRODATA3/.gint.rodata.sh3 for that purpose
* Dynamically allocate file descriptor table
2023-01-01 19:22:41 +01:00
Lephe
9924dc4684
fs: add rename() function on fx-CG 2022-08-22 15:25:14 +02:00
Lephe
f300338a57
fs: fix tracking of initial position with O_APPEND (*)
(*) O_APPEND is *not* functional yet, this is just a hack for write-only
streams. Currently O_APPEND does not reposition the cursor at the end of
the file before every write.
2022-03-19 19:26:23 +00:00
Lephe
227c06631b
fs: buffer Fugue writes through RAM
Writing from ROM causes occasional crashes, which are fairly hard to
produce when the buffers are small.
2022-01-10 14:47:14 +01:00
Lephe
8aea762e7a
fs: use a static variable in calls to BFile_Create()
There is no evidence that BFile_Create() keeps the address and writes
to it later on, but I'd rather be overly careful than have to debug a
stack corruption problem in half a year :)
2022-01-10 13:38:28 +01:00
Lephe
3aa1471ac5
fs: track offset of Fugue files manually
This helped locate some bugs:
* read() could read past EOF due to BFile_Read() allowing you to read up
  until the end of the last sector, beyond the file size
* pread() did not restore the file offset because the negative seek at
  the end is not relative (that was the CASIOWIN fs API), so pread()
  could not actually be written without knowing the current position
* lseek() would clamp you to EOF but still return its out-of-bounds
  arguments, as a direct result of BFile_Seek() doing that

Benefits:
* Made pread() a generic function
2022-01-06 14:05:52 +01:00
Lephe
b549fd68ba
fs: stat(), proper unlink(), rmdir() 2021-12-30 18:17:13 +01:00
Lephe
aed90d9b3c
fs: folder support, part 2 (path normalization and root) 2021-12-23 01:19:45 +01:00
Lephe
9cae0040b5
fs: folder support, part 1 (mkdir/rmdir and the opendir(3) family) 2021-12-21 19:01:00 +01:00
Lephe
34c73ba0ba
fs: fix include path for bfile.h 2021-12-15 13:32:39 +01:00
Lephe
6903bd58d5
fs: cast BFile support into generic file descriptors
This paves the way for standard streams, USB streams, and some more.
2021-12-13 18:38:47 +01:00
Lephe
8635880bbb
fs: basic filesystem support over BFile 2021-12-11 16:38:28 +01:00