freemint / tos.hyp

The tos.hyp tries to document all functions from TOS. It also has information about MagiC, N.AES, MyAES, Geneva, XaAES, oAESis and some emulators.
https://freemint.github.io/tos.hyp
GNU General Public License v2.0
13 stars 10 forks source link

Description of missing syscalls #122

Open xdelatour opened 1 year ago

xdelatour commented 1 year ago

As a first step, here is a patch to add description of Fchdir()

fchdir.patch.txt

mikrosk commented 1 year ago

Pushed.

xdelatour commented 1 year ago

One more patch: ffdopendir-20230607.patch.txt

Next time it will be Fdirfd.

However I have a problem with Pemulation. Only tos.hyp and FreeMiNT headers quote Pemulation. The source code uses:

And the NEWS and readme.1.15 files use emulation()

I guess the name Pemulation is wrong but we can't fix it because it's used in mintbind.h.

[EDIT] Both Ffdopendir and Fdirfd (adds fdirfd.ui, adds ffdopendir.ui, updates file.u) ffdopendir_fdirfd.patch.txt

[EDIT2] Dsetkey (adds dsetkey.ui and updates dir.u) dsetkey.patch.txt

[EDIT3] Psysctl (adds psysctl.ui and updates prozess.u) see pull request 125 psysctl.patch.txt

Still missing (GEMDOS): Fseek64, Pemulation (see note above), SystemV IPC (probably needs a new category).

xdelatour commented 1 year ago

Patch to add get_pagesize.ui (and update pci_bios.u) get_pagesize.patch.txt

Btw, syntax for fast_read_config_byte/longword/word are wrong: reg is an unsigned short (it's not an uint8_t).

Still missing (XBIOS): too many

mikrosk commented 1 year ago

ffdopendir_fdirfd.patch.txt dsetkey.patch.txt get_pagesize.patch.txt

All pushed.

th-otto commented 1 year ago

BTW Pemulation is supposed to be only used by the kernel. I'm not sure whether it is a good idea to document what it does in tos.hyp, that will only make it harder to do changes there and keep them compatible. Maybe just adding a note about this fact will do.

xdelatour commented 1 year ago

(long post)

I agree. Also, except for SCSIDRV, Pemulation only takes long words as parameters, I imagine that not all XHDI and PCI functions use only longs.

Here is the complete list of functions that are still undocumented (I'm still stuck on SysV functions because of the bug freemint/mintlib#57 and lack of time):

Here are other functions/extensions but there are already too many functions to describe:

Note: GEMLib define v_ftext16, v_ftext16n, v_ftext_offset16, v_ftext_offset16n... 'n' means there is an extra parameter to specify the length of the string (otherwise, the binding uses strlen - or wstrlen - to get this value). The Atari Compendium define these functions with this extra parameter but the name doesn't have 'n'