Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Description of missing syscalls #122

Open
xdelatour opened this issue Jun 5, 2023 · 6 comments
Open

Description of missing syscalls #122

xdelatour opened this issue Jun 5, 2023 · 6 comments

Comments

@xdelatour
Copy link
Contributor

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

fchdir.patch.txt

@mikrosk
Copy link
Member

mikrosk commented Jun 5, 2023

Pushed.

@xdelatour
Copy link
Contributor Author

xdelatour commented Jun 6, 2023

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:

  • sys_emu
  • _s_emulation
  • Semulation

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
Copy link
Contributor Author

xdelatour commented Jun 11, 2023

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
Copy link
Member

mikrosk commented Jun 20, 2023

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

All pushed.

@th-otto
Copy link
Contributor

th-otto commented Aug 15, 2023

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
Copy link
Contributor Author

(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):

  • bios(12) Message, Atari Development Partner Newsletter, march 1990, p.3 (docs.dev-docs)

  • bios(12) xVT52-Emulator, ST-Computer, 04/1988, 05/1988, 06/1988, 07/1988

  • bios(12) Lrwabs, osbind.h (#define Lrwabs(a,b,c,d,e) _ibspssl(12,a,b,c,d,e))

  • bios(16-32) Cécile device driver, 2.12 source on ggnkua github repo (no trap 13 handler, VecBios1 does nothing). Latest is 2.22

  • bios(17) diablo 630 emulator. No info

  • bios(17) date_time. EmuTOS 0.7 (available on sourceforge)

  • bios(121) VT_DRIVE. Full doc on CCE_0790.ZIP (downloads.atari-home.de). 10 subfunctions

  • bios(132) Bforce, ST-Computer 07/1991 p.78

  • xbios(47) Waketime. Hard to explain, plenty of return codes. Declaration/binding missing from C compilers, or wrong declaration. Should be long Waketime(ulong datime) instead of void Waketime(word date, word time)

  • xbios(92) VsetVars. source somewhere...

  • xbios(100) xVT52-Emulator, ST-Computer, 04/1988, 05/1988, 06/1988, 07/1988

  • xbios(159) VideoCtrl. No info

  • xbios(299) Install PCI-BIOS. No info

  • xbios(350/351/352/353). PCI-BIOS PLX (?)

  • xbios(420) InitVideo. Do nothing (return 0). VIDIX extension

  • xbios('SCSI') SCSIBios. Doc available. Bindings for Turbo-C 2.x. SCSIBIOS.LIB disassembled: HDFormat pushes 12 bytes but adds 16 to stack pointer after trap

  • gemdos(111) MIDI_COM. Doc available

  • gemdos(112) Mfork. #define Mfork(a,b) gemdos(112,a,0x5aa7,b). Called AFTER shel_write( TRUE, TRUE, 1, a, b ) so 'a' is already running before Mfork()?

  • gemdos(115-127) PAMs NET. No info

  • gemdos(123-124) Lock(filename)/Unlock(filename)

  • gemdos(351) Pemulation

  • gemdos(503-635) ANS. No official doc. TUW-TCP/IP supports _PKT cookie and define gemdos functions (ownfunc.h) (see also ANS_TST sample)

  • gemdos(4200-4201) SysMon. Doc available

  • vdi(-1,8) returns an ASCII version number

  • vdi(-1,7) returns an ASCII string

  • vdi(-1,5) get font info

  • vdi(-1,3) driver list

  • vdi(-1,2) set font extension

  • vdi(-1,1) switch to DOS

  • vdi(8) v_gtext_unicode. No info

  • vdi(135-137,142-143) GEM/4. No info

  • vdi(240) vqt_real_extent_unicode. No info

  • vdi(240) vqt_f_extent16

  • vdi(241) v_ftext16, v_ftext_offset16. Same as v_ftext, v_ftext_offset with 16-bit chars instead of 8-bit, depending on vst_charmap()

  • vdi(254) vq_get_tables (two output parameters). FSM dev doc

  • vdi(224-226,233,243,255) SpeedoGDOS 5.1. No info

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

  • xbios(1) Initjoy. DOLMEN. No info. Add 8 bytes to the stack
  • xbios(40) Cookie. Not implemented. No info
  • xbios(45) Bconctl, defined in Perl 4.035: syscall($_trap_14_wwl, 0x2d, @_);
  • xbios(45/47) GetCookie/PutCookie. DOLMEN. No info. Add 6/10 bytes to the stack
  • xbios(48/55/56) InitPad, PutVBLqueue, KillVBLqueue. DOLMEN. No info. Add 12/6/4 bytes to the stack
  • xbios(58) Metareadaudio, not implemented. 4 parameters
  • xbios(151) VsetOverlay. Not implemented. Merged with VsetMask?
  • xbios($3344) XtendTOS. Doc available
  • xbios($5053) ProSOUND aka P-SOUND. Doc available
  • vdi (-1,81) FreeGEM/XM only
  • vdi (-1,10-18) and vdi(-1,30) GEM XM
  • MaxiFile III, Trap10, TapeBIOS, SCSIDRV, SuperCharger, MX2, MICRO RTX, MIDISHARE, FreeRTOS: full docs are available

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants