Difference between revisions of "Trinity in Trouble"

From Freepascal Amiga wiki
Jump to navigation Jump to search
(→‎Hardening trinity: updated unit trinity v2015-08-22)
(→‎List of issues: GFXBase Type fixed in trunk)
 
(173 intermediate revisions by 3 users not shown)
Line 18: Line 18:
 
NOTE: I thought there is no use to mention the Tag, Tags, Taglist, etc. inconsistency and additional incompatibilities that this causes. We are all aware of those and will hopefully get some unity in the future
 
NOTE: I thought there is no use to mention the Tag, Tags, Taglist, etc. inconsistency and additional incompatibilities that this causes. We are all aware of those and will hopefully get some unity in the future
  
 +
== Table of units ==
  
== List of issues ==
+
The triforce repo introduced the usage of unit [//github.com/magorium/fpc-triforce/blob/master/Sys/Trinity/TriniTypes.pas trinitypes] in order to fight the type inconsistencies (at least for the new units, not the examples). The contents of trinitype will be extended as things progresses. A simple load-search-replace-save routine/program can be applied since the used types are fairly unique.
  
* function: DoMethod()
+
{| class="wikitable"
: Amiga version seems missing completely.
+
|+ List of available units per platform:
: Implemented versions for AROS and MorphOS don't follow autodocs 100% and are inconsistent.
+
|-
* function: ASLRequestTags()
+
! Unit          !! Category              !! OS3.x                  !! AROS                  !! MorphOS                !! Remark(s)
: AROS implementation seems missing.
+
|-
: Amiga implements it in utility unit systemvartags (see also unit: systemvartags)
+
| [[#agraphics]] || graphics.library      || class="working"  | yes || class="working"  | yes || class="working"  | yes ||
: MorphOS implements it in unit ASL
+
|-
* structure: Hook
+
| ahi            || ahi.device            || class="working"  | yes || class="progress" | MAG || class="working"  | yes ||
: AROS version, entries are not IPTR rather APTR.
+
|-
* function: GetAttr()
+
| ahi_sub        || ahi_sub.library      || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
: MorphOS uses a var for parameter Return-Value while Amiga + AROS uses a pointer. Autodocs states it to be a pointer.
+
|-
* function: SetAttrs()
+
| akeyboard      || keyboard.device      || class="working"  | yes || class="progress" | [//github.com/magorium/fpc-triforce/blob/master/Sys/AROS/akeyboard.pas test] || class="progress" | [//github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/akeyboard.pas test] ||
: Amiga + MorphOS implementations seems missing
+
|-
* unit: Workbench
+
| amarquee      || amarquee.library      || class="working"  | yes || class="unknown"  | n/a || class="unknown"  | n/a ||
: MorphOS version seems missing
+
|-
* unit: systemvartags
+
| [[#amigados]]  || dos.library          || class="working"  | yes || class="working"  | yes || class="working"  | yes ||
: This utility unit is Amiga specific and implements most if not all vartags versions of library-calls rendering it incompatible with AROS and MorphOS
+
|-
* function: AllocMem() '''(high priority)'''
+
| amigaguide    || amigaguide.library    || class="working"  | yes || class="progress" | MAG || class="not"      | no  || No use though, AROS' lib functions are not implemented
: MorphOS implemented it as ExecAllocMem
+
|-
: Amiga + AROS version have this function declared as AllocMem(), which is ambiguous with Free Pascal's AllocMem function.
+
| [[#amigalib]]  || amigalib              || class="working"  | yes || class="progress" | [//github.com/magorium/fpc-triforce/blob/master/Sys/AROS/amigalib.pas test] || class="working"  | yes || Unit amigalib has it's own status page, [[AmigaLib]]
* function: Info()
+
|-
: AutoDocs: BOOL = Info( BPTR, struct InfoData * )
+
| amigaprinter  || printer.device        || class="working"  | yes || class="progress" | [//github.com/magorium/fpc-triforce/blob/master/Sys/AROS/amigaprinter.pas test] || class="progress"      | [//github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/amigaprinter.pas test] ||
: Amiga declaration: FUNCTION Info(lock : LONGINT location 'd1'; parameterBlock : pInfoData location 'd2') : LongBool; syscall _DOSBase 114;
+
|-
: AROS declaration: function Info(Lock: BPTR; ParameterBlock: PInfoData): LongInt; syscall AOS_DOSBase 19;
+
| aroslib        || aros.library          || class="unknown"  | n/a || class="working"  | [//github.com/magorium/fpc-triforce/blob/master/Sys/AROS/aroslib.pas yes] || class="unknown"  | n/a ||
: MorphOS declaration: function Info(lock : LongInt location 'd1'; parameterBlock: PInfoData location 'd2'): LongInt; SysCall MOS_DOSBase 114;
+
|-
* function: VFPrintf()
+
| [[#asl]]      || asl.library          || class="working"  | yes || class="working"  | yes || class="working"  | yes ||
: AutoDocs: LONG = VFPrintf(BPTR, STRPTR, LONG *)
+
|-
: Amiga declaration: FUNCTION VFPrintf(fh : LONGINT location 'd1';const format : pCHAR location 'd2';const argarray : POINTER location 'd3') : LONGINT; syscall _DOSBase 354;
+
| audio          || audio.device          || class="working"  | yes || class="progress" | MAG || class="not"      | no  ||
: AROS declaration: function VFPrintf(Fh: BPTR; const format: STRPTR; const ArgArray: PLongInt): LongInt; syscall AOS_DOSBase 59;
+
|-
: MorphOS declaration: function VFPrintf(fh : LongInt location 'd1'; format: PChar location 'd2'; argarray: Pointer location 'd3'): LongInt; SysCall MOS_DOSBase 354;
+
| bootblock      || bootblock.device      || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
: NOTE: the generic pointer declaration prevents using "VFPrintf(nil/0, 'text', vargs );" where vargs = array of long.
+
|-
: Remark: AFAIK for AROS it is theoretically possible to pass 64-bit formatted values.
+
| bullet        || bullet.library        || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
* function: AslRequest()
+
|-
: autodocs: BOOL AslRequest( APTR,struct TagItem * );
+
| cd            || cd.device            || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
: Amiga: FUNCTION AslRequest(requester : POINTER location 'a0'; tagList : pTagItem location 'a1') : LongInt; syscall AslBase 060;
+
|-
: AROS: function AslRequest(Requester: Pointer; const Tags: array of const): LongBool;
+
| clipboard      || clipboard.device      || class="working"  | yes || class="working"  | yes || class="working"  | yes ||
: MorphOS: function AslRequest(requester: Pointer location 'a0'; tagList : pTagItem location 'a1'): LongBool; SysCall AslBase 060;
+
|-
* function: SetGadgetAttrs()
+
| colorwheel    || colorwheel.gadget    || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
: MorphOS version seems missing
+
|-
* Constants: MUIX_R, MUIX_C, MUIX_L, MUIX_N, MUIX_B, MUIX_I, MUIX_U, MUIX_PT and MUIX_PH
+
| [[#commodities]] || commodities.library  || class="working"  | yes || class="progress" | [//github.com/magorium/fpc-triforce/blob/master/Sys/AROS/commodities.pas test] || class="progress"      | [//github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/commodities.pas test] ||
: AMIGA + AROS: these MUI constants uses c-language escape code characters, which won't work for Free Pascal.
+
|-
: MorphOS: declared them as they should.
+
| configregs    || see expansion        || class="working"  | yes || class="progress" | [//github.com/magorium/fpc-triforce/blob/master/Sys/AROS/configregs.pas test] || class="progress"      | [//github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/configregs.pas test] ||
* function: NextTagItem()
+
|-
: autodocs: struct TagItem *NextTagItem(struct TagItem **);
+
| configvars    || see expansion        || class="working"  | yes || class="progress" | [//github.com/magorium/fpc-triforce/blob/master/Sys/AROS/configvars.pas test] || class="progress"      | [//github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/configvars.pas test] ||
: Amiga: function NextTagItem(Item : ppTagItem location 'a0') : pTagItem; syscall _UtilityBase 048;
+
|-
: AROS: function NextTagItem(var Item: PTagItem): PTagItem; syscall AOS_UtilityBase 8;
+
| console        || console.device        || class="working"  | yes || class="progress" | [//github.com/magorium/fpc-triforce/blob/master/Sys/AROS/console.pas test] || class="progress"      | [//github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/console.pas test] ||
: MorphOS: function NextTagItem(tagListPtr: pPTagItem location 'a0'): PTagItem; SysCall MOS_UtilityBase 048;
+
|-
* function: WriteStr()
+
| conunit        || console.device        || class="working"  | yes || class="progress" | [//github.com/magorium/fpc-triforce/blob/master/Sys/AROS/conunit.pas test] || class="progress"      | [//github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/conunit.pas test] ||
: On MorphOS this function seems declared as Amiga-function, which clashes with Free Pascal build-in function WriteStr. Strange as WriteStr seems only declared as dos/stdio.h macro.
+
|-
* function: CoerceMethod()
+
| cgxvideo      ||                      || class="not"      | no  || class="not"      | no  || class="working"  | [//svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=32343 yes] || Recently added to MorphOS by Chain-Q
: MorphOS version seems missing completely (including CoerceMethodA().
+
|-
: Amiga version has CoerceMethodA() implemented but no CoerceMethod()
+
| cybergraphics  || cybergraphics.library || class="working"  | yes || class="working"  | yes || class="working"  | [//svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=32343 yes] || Recently added to MorphOS by Chain-Q
: Implemented versions for AROS and Amiga don't follow autodocs 100% and are inconsistent.
+
|-
 +
| datatypes      || datatypes.library    || class="working"  | yes || class="progress" | [//github.com/magorium/fpc-triforce/blob/master/Sys/AROS/datatypes.pas test] || class="working"  | yes || Unit source (AROS) is still a bit of a mess. Amiga version needs an overhaul (no PObject_ being used where it should -> concerns most if not all of declared functions).
 +
|-
 +
| diskfont      || diskfont.library     || class="working"  | yes || class="working"  | yes || class="progress" | [//github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/diskfont.pas test] || A diskfont unit was added to MorphOS by Chain-Q
 +
|-
 +
| [[#exec]]      || exec.library          || class="working"  | yes || class="working"  | yes || class="working"  | yes || MorphOS: noticed some things missing in comparison to SDK 3.9 (this is meant as a reminder to verify this unit)
 +
|-
 +
| [[#expansion]] || expansion.library    || class="working"  | yes || class="progress" | [//github.com/magorium/fpc-triforce/blob/master/Sys/AROS/expansion.pas test] || class="progress"      | [//github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/expansion.pas test] ||
 +
|-
 +
| expansionbase  || see expansion        || class="working"  | yes || class="progress" | [//github.com/magorium/fpc-triforce/blob/master/Sys/AROS/expansionbase.pas test] || class="progress"      | [//github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/expansionbase.pas test] ||
 +
|-
 +
| [[#gadtools]]  || gadtools.library      || class="working"  | yes || class="working"  | yes || class="progress" | [//github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/gadtools.pas test] ||
 +
|-
 +
| gameport      || gameport.device      || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
 +
|-
 +
| get9          || ?                    || class="unknown"  | n/a || class="unknown"  | n/a || class="working"  | yes || silly MorphOS-only historic .library, Pascal interface unit exist as a joke, ignore this :)  
 +
|-
 +
| gradientslider || gradientslider.gadget || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
 +
|-
 +
| gtlayout      || gtlayout.library      || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
 +
|-
 +
| guigfx        || guigfx.library        || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
 +
|-
 +
| hardblocks    || hardblocks.device    || class="working"  | yes || class="not"      | no || class="not"      | no  ||
 +
|-
 +
| hardware      || hardware.resource    || class="working"  | yes || class="working"  | yes || class="working"  | yes ||
 +
|-
 +
| icon          || icon.library          || class="working"  | yes || class="working"  | yes || class="progress" | [//github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/icon.pas test] ||
 +
|-
 +
| identify      || identify.lbrary      || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
 +
|-
 +
| iffparse      || iffparse.library      || class="working"  | yes || class="working"  | yes || class="working"  | yes ||
 +
|-
 +
| input          || input.device          || class="working"  | yes || class="progress" | [//github.com/magorium/fpc-triforce/blob/master/Sys/AROS/input.pas test] || class="progress" | [//github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/input.pas test] ||
 +
|-
 +
| inputevent    || see input.device      || class="working"  | yes || class="working"  | yes || class="working"  | yes ||
 +
|-
 +
| [[#intuition]] || intuition.library    || class="working"  | yes || class="working"  | yes || class="working"  | yes ||
 +
|-
 +
| [[#keymap]]    || keymap.library        || class="working"  | yes || class="working"  | yes || class="working"  | yes ||
 +
|-
 +
| kvm            || ?                    || class="unknown"  | n/a  || class="unknown" | n/a || class="unknown"  | n/a || This unit is now dropped. It was a helper unit for the KVM stuff, but it's no longer used, and it doesn't provide any other useful functionality. It's "API" was never meant for public use either. The idea was, mouse unit could be used w/o the video and keyboard, and doesn't depend on each other. But it doesn't really matter any more. I removed it from trunk.
 +
|-
 +
| layers        || layers.library        || class="working"  | yes || class="working"  | yes || class="working"  | yes ||
 +
|-
 +
| locale        || locale.library        || class="working"  | yes || class="progress" | [//github.com/magorium/fpc-triforce/blob/master/Sys/AROS/locale.pas test] || class="progress" | [//github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/locale.pas test] ||
 +
|-
 +
| lowlevel      || lowlevel.library      || class="working"  | yes || class="progress" | MAG || class="not"      | no  ||
 +
|-
 +
| lucyplay      || lucyplay.library      || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
 +
|-
 +
| mui            || mui.library (ZUNE)   || class="working"  | yes || class="working"  | yes || class="working"  | yes ||
 +
|-
 +
| muihelper      || see mui.library      || class="not"      | no  || class="not"      | no  || class="working"  | yes || MUIHelper contains some Pascal syntax-sugar and helpers for writing MUI code. It can be moved to ami-extra Package when it's verified it works everywhere.
 +
|-
 +
| mysticview    || mysticview.library    || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
 +
|-
 +
| nonvolatile    || nonvolatile.library  || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
 +
|-
 +
| parallel      || parallel.device      || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
 +
|-
 +
| picasso96api  || picasso library      || class="working"  | yes || class="unknown"  | n/a || class="unknown"  | n/a  || MorphOS and AROS don't have Picasso96 support.
 +
|-
 +
| preferences    || preferences.library  || class="working"  | yes || class="not"      | n/a || class="not"      | no  ||
 +
|-
 +
| prefs          || see preferences      || class="working"  | yes || class="progress" | [//github.com/magorium/fpc-triforce/blob/master/Sys/AROS/prefs.pas test] || class="progress" | [//github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/prefs.pas test] ||
 +
|-
 +
| prtbase        || printer.device        || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
 +
|-
 +
| prtgfx        || ?                    || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
 +
|-
 +
| ptreplay      || ptreplay.library      || class="working"  | yes || class="progress" | MAG || class="not"      | no  ||
 +
|-
 +
| realtime      || realtime.library      || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
 +
|-
 +
| render        || render.library        || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
 +
|-
 +
| reqtools      || reqtools.library      || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
 +
|-
 +
| [[#rexx]]      || rexxsyslib.library    || class="working"  | yes || class="progress" | [//github.com/magorium/fpc-triforce/blob/master/Sys/AROS/rexx.pas test] || class="progress" | [//github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/rexx.pas test] ||
 +
|-
 +
| romboot_base  ||                      || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
 +
|-
 +
| scsidisk      || scscidisk.device      || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
 +
|-
 +
| serial        || serial.device        || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
 +
|-
 +
| tapedeck      || tapedeck.gadget      || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
 +
|-
 +
| timer          || timer.device          || class="working"  | yes || class="working"  | yes || class="working" | yes ||
 +
|-
 +
| tinygl        || tinygl library        || class="unknown"  | n/a || class="unknown"  | n/a || class="working"  | yes || TinyGL is MorphOS specific and the unit there is only used to get the OpenGL package of FPC running.
 +
|-
 +
| trackdisk      || trackdisk.device      || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
 +
|-
 +
| translator    || translator.library    || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
 +
|-
 +
| triton        || triton.library        || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
 +
|-
 +
| tritonmacros  || macros for triton    || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
 +
|-
 +
| ttengine      || ttengine.library      || class="working"  | yes || class="progress" | MAG || class="not"      | no  ||
 +
|-
 +
| utility        || utility.library      || class="working"  | yes || class="working"  | yes || class="working"  | yes ||
 +
|-
 +
| [[#workbench]] || workbench.library    || class="working"  | yes || class="working"  | yes || class="progress" | [//github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/workbench.pas test] ||
 +
|-
 +
| xadmaster      || xadmaster.library    || class="working"  | yes || class="progress" | MAG || class="not"      | no  ||
 +
|-
 +
| zlib          || zlib.library          || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
 +
|-
 +
|
 +
<!-- Util Units -->
 +
|-
 +
|
 +
|-
 +
| amigautils    || amigautils            || class="working"  | yes || class="not"      | no  || class="not"      | no  || Should be moved to ami-extra when it's verified it works elsewhere and contains no deprecated code.
 +
|-
 +
| amsgbox        || msgbox using easyasl  || class="working"  | yes || class="not"      | no  || class="not"      | no  || Should be moved to ami-extra when it's verified it works elsewhere and contains no deprecated code.
 +
|-
 +
| consoleio      || crt using console    || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
 +
|-
 +
| deadkeys      || console deadkeys      || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
 +
|-
 +
| doublebuffer  ||                      || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
 +
|-
 +
| easyasl        || easyasl.library      || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
 +
|-
 +
| hisoft        ||                      || class="working"  | yes || class="not"      | no  || class="not"      | no  || Should be moved to ami-extra when it's verified it works elsewhere and contains no deprecated code.
 +
|-
 +
| linklist      ||                      || class="working"  | yes || class="not"      | no  || class="not"      | no  || Should be moved to ami-extra when it's verified it works elsewhere and contains no deprecated code.
 +
|-
 +
| longarray      ||                      || class="working"  | yes || class="working"  | yes || class="not"      | no  ||
 +
|-
 +
| pastoc        ||                      || class="working"  | yes || class="not"      | no  || class="not"      | no  || This is deprecated, and must *not* be ported to other platforms.
 +
|-
 +
| pcq            ||                      || class="working"  | yes || class="not"      | no  || class="not"      | no  || Should be moved to ami-extra when it's verified it works elsewhere and contains no deprecated code.
 +
|-
 +
| systemvartags  ||                      || class="working"  | yes || class="not"      | no  || class="not"      | no  || NOTE: this unit cannot be used when trying to create executables to be run on AROS-m68k because AROS misses bullet.library.
 +
|-
 +
| tagsarray      ||                      || class="working"  | yes || class="working"  | yes || class="not"      | no  || Tagsarray implementation is not thread safe, at least on classic.
 +
|-
 +
| timerutils    ||                      || class="working"  | yes || class="not"      | no  || class="not"      | no  || Should be moved to ami-extra when it's verified it works elsewhere.
 +
|-
 +
| vartags        ||                      || class="working"  | yes || class="not"      | no  || class="not"      | no  ||
 +
|-
 +
| wbargs        ||                      || class="working"  | yes || class="not"      | no  || class="not"      | no ||
 +
|}
  
== Some of your finest ==
+
== List of issues ==
  
* AslRequest()
+
=== agraphics ===
<source lang="pascal">
 
{$IFDEF AMIGA}
 
if (AslRequest(fr, nil) <> 0) then
 
{$ENDIF}
 
{$IFDEF AROS}
 
if (AslRequestA(fr, nil)) then
 
{$ENDIF}
 
{$IFDEF MORPHOS}
 
if (AslRequest(fr, nil)) then
 
{$ENDIF}
 
begin
 
  // Could we now please check what the requester returned ?
 
end;
 
</source>
 
  
 +
* '''record: Isrvstr'''
 +
: AROS: Missing
 +
* <strike>'''var: GfxBase'''</strike> fixed in r49515
 +
: AROS: type is PGfxBase
 +
: Amiga: type is PLibrary
 +
: MorphOS: type is Pointer
 +
: Note: According to rkrm it should be PGfxBase
  
== Hardening trinity ==
+
=== amigados ===
  
In order to circumvent some of the inconsistencies and incompatibilities, i needed a solution without tempering with the RTL and/or support units.
+
* <strike> '''function: DOSRename()''' </strike> fixed in r49515
 +
: aros: function DOSRename(const OldName: STRPTR; const NewName: STRPTR): LongInt; syscall AOS_DOSBase 13;
 +
: os4:  function DosRename(const OldName: STRPTR; const NewName: STRPTR): LongBool; syscall IDos 108;
 +
: os3:  FUNCTION DOSRename(const oldName : pCHAR location 'd1';const newName : pCHAR location 'd2') : LongBool; syscall _DOSBase 078;
 +
: mos:  function dosRename(oldName: PChar location 'd1'; newName: PChar location 'd2'): LongInt; SysCall MOS_DOSBase 78;
 +
: remark: PChar vs STRPTR (should be STRPTR) and LongInt vs LongBool (should be BOOL)
  
So, i invented unit trinity which solves some of the encountered issues (the unit itself is a work in progress). Whether or not it is the right solution to solve things, i don't know. But, i also don't care as things simply needed to be compiled *period*.
+
* <strike> '''function: Examine()''' </strike> fixed in r49515
 +
: aros: function Examine(Lock: BPTR; FileInfoBlock: PFileInfoBlock): LongInt; syscall AOS_DOSBase 17;
 +
: os4:  function Examine(Lock: BPTR; FileInfoBlock: PFileInfoBlock): LongBool; syscall IDos 124;
 +
: os3:  FUNCTION Examine(lock: BPTR location 'd1'; fileInfoBlock: pFileInfoBlock location 'd2'): LongBool; syscall _DOSBase 102;
 +
: mos:  function Examine(lock: BPTR location 'd1'; fileInfoBlock: PFileInfoBlock location 'd2'): LongInt; SysCall MOS_DOSBase 102;
 +
: remark: LongInt vs LongBool (should be BOOL)
  
Without further ado: Unit Trinity
+
* <strike> '''function: Execute()''' </strike> fixed in r49515
 +
: aros: function Execute(const String_: STRPTR; Input: BPTR; Output: BPTR): LongInt; syscall AOS_DOSBase 37;
 +
: os4:  function Execute(const String_: STRPTR; File_: BPTR; File2: BPTR): LongBool; syscall IDos 204;
 +
: os3:  FUNCTION Execute(const string_ : pCHAR location 'd1'; file_ : LONGINT location 'd2'; file2 : LONGINT location 'd3') : LongBool; syscall _DOSBase 222;
 +
: mos:  function Execute(string1: PChar location 'd1'; file1 : BPTR location 'd2'; file2 : BPTR location 'd3'): LongBool;
 +
: remark: PChar vs STRPTR (should be STRPTR), BPTR vs LONGINT (should be BPTR) and LongInt vs LongBool (should be BOOL)
  
<source lang="pascal">
+
* <strike> '''function: ExNext()''' </strike> fixed in r49515
unit trinity;
+
: aros: function ExNext(Lock: BPTR; FileInfoBlock: PFileInfoBlock): LongInt; syscall AOS_DOSBase 18;
 +
: os4:  function ExNext(Lock: BPTR; FileInfoBlock: PFileInfoBlock): LongBool; syscall IDos 128;
 +
: os3:  FUNCTION ExNext(lock: BPTR location 'd1'; fileInfoBlock: pFileInfoBlock location 'd2'): LongBool; syscall _DOSBase 108;
 +
: mos:  function ExNext(lock: BPTR location 'd1'; fileInfoBlock: PFileInfoBlock location 'd2'): LongInt; SysCall MOS_DOSBase 108;
 +
: remark: LongInt vs LongBool (should be BOOL)
  
 +
=== amigalib ===
  
// ---------------------------------------------------------------------------
+
* '''function: CreatePort()'''
// Edit Date  $ Entry
+
: Missing for AROS and MorphOS
// ---------------------------------------------------------------------------
+
* '''function: DeletePort()'''
// 2015-08-22  $ CoerceMethod()
+
: Missing for AROS and MorphOS
//            $ GetAttr()
+
* '''function: CreateExtIO()'''
// 2015-08-21  $ SetAndTest Longint version
+
: Missing for AROS and MorphOS
// 2015-08-11  $ SetAttrs()  
+
* '''function: DeleteExtIO()'''
//            $ additional TAG_() functions for Amiga
+
: Missing for AROS and MorphOS
//            $ additional TAG_() functions for MorphOS
+
* '''function: DoMethod()'''
//            $ array of const for Amiga's DoMethod() instead of LW's
+
: Amiga version seems missing completely.
//            $ workaround "Conversion between ordinals and pointers
+
: Implemented versions for AROS and MorphOS don't follow autodocs 100% and are inconsistent.
//              is not portable" hint messages
+
* '''function: CoerceMethod()'''
//            $ Useful MUI text macro's
+
: MorphOS version seems missing completely (including CoerceMethodA().
// 2015-08-06  $ initial release
+
: Amiga version has CoerceMethodA() implemented but no CoerceMethod()
// ---------------------------------------------------------------------------
+
: Implemented versions for AROS and Amiga don't follow autodocs 100% and are inconsistent.
  
  
{$IFNDEF HASAMIGA}
+
=== asl ===
{$FATAL This source is compatible with Amiga, AROS and MorphOS only !}
 
{$ENDIF}
 
  
 +
AROS' implementation of asl uses 'modern' function names, ending with or without an A depending whether it's a varargs version or not. Amiga and MorphOS implementations uses 'old-style' naming scheme as dictated by classic autodocs. In order to 'fix' this, unit trinity re-declares asl functions using the 'old-style' naming scheme (it was the quickest fix).
  
{$MODE OBJFPC}{$H+}
+
=== exec ===
  
 +
* '''structure: Hook'''
 +
: AROS version, entries are not IPTR rather APTR. [http://amigadev.elowar.com/read/ADCD_2.1/Includes_and_Autodocs_3._guide/node0617.html#line27 Amiga version] uses ULONG's for h_entry and h_subentry, but that doesn't comply on 64-bit. AROS version can be found [https://trac.aros.org/trac/browser/AROS/branches/ABI_V0-on-trunk-20141231/AROS/compiler/include/utility/hooks.h?rev=51123 here].
 +
: Remark: In case it's compatibility holding back the change, i'm willing to create a multiplatform advanced record solution
 +
* <strike>'''function: NewCreateTask()''' </strike> fixed in r49516
 +
: AROS: missing.
 +
: Note: Most probably introduced when v0-on-trunk became v0.
 +
*  <strike>'''function: AVL_FindNextNodeByKey()''' </strike> fixed in r49516
 +
: AROS: Missing of 3th parameter 'comparefunction'
 +
: AROS sdk: struct AVLNode *AVL_FindNextNodeByKey(const struct AVLNode *node, AVLKey key, AVLKEYCOMP func) (A0, A1, A2)
 +
*  <strike>'''function: AVL_FindPrevNodeByKey()''' </strike> fixed in r49516
 +
: AROS: Missing of 3th parameter 'comparefunction'
 +
: AROS sdk: struct AVLNode *AVL_FindPrevNodeByKey(const struct AVLNode *root, AVLKey key, AVLKEYCOMP func) (A0, A1, A2)
 +
*  <strike>'''function: AVL_FindNode()''' </strike> fixed in r49516
 +
: AROS: 3th parameter Func is declared as type PAVLNODECOMP. Should be PAVLKEYCOMP.
 +
*  <strike>'''function: AVL_RemNodeByKey()''' </strike> fixed in r49516
 +
: AROS: 3th parameter Func is declared as type PAVLNODECOMP. Should be PAVLKEYCOMP.
  
interface
+
=== commodities ===
  
 +
=== expansion ===
 +
(see also other expansion support units)
  
Uses
+
* '''syscall routine: ReadExpansionRom'''
  Exec, Intuition, Utility;
+
: Amiga: declared as procedure. autodocs are inconsistent (both procedure and function are being mentioned). AROS (also 68k) tells it is indeed a function and returning a bool.
 +
* '''syscall routine: ConfigBoard()'''
 +
: Amiga: declared as procedure. autodocs are inconsistent (both procedure and function are being mentioned). AROS (also 68k) tells it is indeed a function and returning a bool.
  
 +
=== gadtools ===
  
//////////////////////////////////////////////////////////////////////////////
+
* '''unit: gadtools'''
//
+
: <strike>MorphOS: unit missing</strike> Available in fpc-triforce repo (for link see unit table). Waiting for testing/approval.
//  Topic: Some generic c-helpers, should not be in here at all but convienent
+
* '''varargs function: CreateGadget()'''
//
+
: AROS: missing
//////////////////////////////////////////////////////////////////////////////
+
* '''varargs function: CreateMenus()'''
 +
: AROS: missing
 +
* '''varargs function: DrawBevelBox()'''
 +
: AROS: missing
 +
* '''varargs function: GetVisualInfo()'''
 +
: AROS: missing
 +
* '''varargs function: GT_GetGadgetAttrs()'''
 +
: AROS: missing
 +
* '''varargs function: GT_SetGadgetAttrs()'''
 +
: AROS: missing
 +
* '''varargs function: LayoutMenuItems()'''
 +
: AROS: missing
 +
* '''varargs function: LayoutMenus()'''
 +
: AROS: missing
 +
* '''function: CreateContext()'''
 +
: Amiga SDK: struct Gadget *CreateContext(struct Gadget **);
 +
: AROS SDK: struct Gadget *CreateContext(struct Gadget **glistpointer) (A0)
 +
: Amiga: FUNCTION CreateContext(glistptr : pGadget location 'a0'): pGadget; syscall GadToolsBase 114;
 +
: AROS: function CreateContext(GListPtr: PGadget): PGadget; syscall GadToolsBase 19;
 +
: Note: glistpointer is a pointer to a pointer
  
 +
=== intuition ===
  
 +
=== keymap ===
  
  function  SetAndTest(Var OldValue: pointer;  NewValue: pointer) : boolean; overload; inline;
+
=== rexx ===
  function  SetAndTest(Var OldValue: LongWord; NewValue: LongWord): boolean; overload; inline;
 
  function  SetAndTest(Var OldValue: LongInt;  NewValue: LongInt) : boolean; overload; inline;
 
  
 +
=== workbench ===
  
 +
=== uncategorized ===
  
//////////////////////////////////////////////////////////////////////////////
+
== Fixed in triforce ==
//
 
//  Topic: Hooks -> cross-platform support
 
//
 
//////////////////////////////////////////////////////////////////////////////
 
  
 +
Additional units, added to triforce repo. Note that all issues listed above are already addressed with using unit trinity.
  
 +
* <strike>'''unit: akeyboard'''</strike> <!-- 20150928 -->
 +
: AROS: missing | fixed in triforce[https://github.com/magorium/fpc-triforce/blob/master/Sys/AROS/akeyboard.pas]
 +
: MorphOS: missing | fixed in triforce[https://github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/akeyboard.pas]
  
Type
+
* <strike>'''unit: diskfont'''</strike> <!-- 20150929 -->
  // THookFunction = function(Hook: pHook; obj: PObject_; Msg: Pointer): LongWord;
+
: MorphOS: missing | fixed in triforce[https://github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/diskfont.pas]
  THookFunction = function(Hook: pHook; obj: APTR; Msg: APTR): LongWord;
 
  
  Procedure InitHook(Var Hook: THook; Func: THookFunction; Data: APTR);
+
* <strike>'''unit: prefs'''</strike> <!-- 20151001 -->
 +
: AROS: missing | fixed in triforce[https://github.com/magorium/fpc-triforce/blob/master/Sys/AROS/prefs.pas]
 +
: MorphOS: missing | fixed in triforce[https://github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/prefs.pas]
  
 +
* <strike>'''unit: AmigaPrinter'''</strike> <!-- 20151002 -->
 +
: AROS: missing | fixed in triforce[https://github.com/magorium/fpc-triforce/blob/master/Sys/AROS/amigaprinter.pas]
 +
: MorphOS: missing | fixed in triforce[https://github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/amigaprinter.pas]
  
 +
* <strike>'''unit: Datatypes'''</strike> <!-- 20151003 -->
 +
: AROS: missing | fixed in triforce[https://github.com/magorium/fpc-triforce/blob/master/Sys/AROS/datatypes.pas]
  
//////////////////////////////////////////////////////////////////////////////
+
* <strike>'''unit: input'''</strike> <!-- 20151005 -->
//
+
: AROS: missing | fixed in triforce[https://github.com/magorium/fpc-triforce/blob/master/Sys/AROS/input.pas]
//  Topic: Tags and TagValue's. Array of const = LongInt vs. Array of long
+
: MorphOS: missing | fixed in triforce[https://github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/input.pas]
//         Cosmetic only e.g. get rid of compiler warnings
 
//
 
//////////////////////////////////////////////////////////////////////////////
 
  
 +
* <strike>'''unit: workbench'''</strike> <!-- 20151026 -->
 +
: MorphOS: missing | fixed in triforce[https://github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/workbench.pas]
  
 +
* <strike>'''unit: icon'''</strike> <!-- 20151027 -->
 +
: MorphOS: missing | fixed in triforce[https://github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/icon.pas]
  
  {$IFDEF AROS}
+
* <strike>'''unit: locale'''</strike> <!-- 20151103 -->
  Function TAG_(TagItem: LongWord): LongInt; overload; inline;
+
: AROS: missing | fixed in triforce[https://github.com/magorium/fpc-triforce/blob/master/Sys/AROS/locale.pas]
  //Function TAG_(TagItem: LongInt ): LongInt; overload; inline;
+
: MorphOS: missing | fixed in triforce[https://github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/locale.pas]
  Function  TAG_(TagItem: Pointer ): LongInt; overload; inline;
 
  function  TAG_(TagItem: boolean ): LongInt; overload; inline;
 
  {$ENDIF}
 
  {$IFDEF AMIGA}
 
  Function  TAG_(TagItem: LongWord): LongInt; overload; inline;
 
  //Function TAG_(TagItem: LongInt ): LongInt; overload; inline;
 
  Function  TAG_(TagItem: Pointer ): LongInt; overload; inline;
 
  function  TAG_(TagItem: boolean ): LongInt; overload; inline;
 
  {$ENDIF}
 
  {$IFDEF MORPHOS}
 
  //Function TAG_(TagItem: LongWord): LongWord; overload; inline;
 
  Function  TAG_(TagItem: LongInt ): LongWord; overload; inline;
 
  Function  TAG_(TagItem: Pointer ): LongWord; overload; inline;
 
  function  TAG_(TagItem: boolean ): LongWord; overload; inline; 
 
  {$ENDIF}
 
  
 +
* <strike>'''unit: gadtools'''</strike> <!-- 20151119 -->
 +
: MorphOS: missing | fixed in triforce[https://github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/gadtools.pas]
  
 +
* <strike>'''unit: commodities'''</strike> <!-- 20151223 -->
 +
: AROS: missing | fixed in triforce[https://github.com/magorium/fpc-triforce/blob/master/Sys/AROS/commodities.pas]
 +
: MorphOS: missing | fixed in triforce[https://github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/commodities.pas]
  
//////////////////////////////////////////////////////////////////////////////
+
* <strike>'''unit: configregs'''</strike> <!-- 20160106 -->
//
+
: AROS: missing | fixed in triforce[https://github.com/magorium/fpc-triforce/blob/master/Sys/AROS/configregs.pas]
//  Topic: SetGadgetAttrs(), missing from MorphOS
+
: MorphOS: missing | fixed in triforce[https://github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/configregs.pas]
//
 
//////////////////////////////////////////////////////////////////////////////
 
  
 +
* <strike>'''unit: configvars'''</strike> <!-- 20160107 -->
 +
: AROS: missing | fixed in triforce[https://github.com/magorium/fpc-triforce/blob/master/Sys/AROS/configvars.pas]
 +
: MorphOS: missing | fixed in triforce[https://github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/configvars.pas]
  
 +
* <strike>'''unit: configregs'''</strike> <!-- 20160107 -->
 +
: AROS: missing | fixed in triforce[https://github.com/magorium/fpc-triforce/blob/master/Sys/AROS/configvars.pas]
 +
: MorphOS: missing | fixed in triforce[https://github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/configvars.pas]
  
  {$IFDEF MORPHOS}
+
* <strike>'''unit: expansionbase'''</strike> <!-- 20160108 -->
  function  SetGadgetAttrs(Gadget: PGadget; Window: PWindow; Requester: PRequester; const Tags: array of long): ULONG;
+
: AROS: missing | fixed in triforce[https://github.com/magorium/fpc-triforce/blob/master/Sys/AROS/expansionbase.pas]
  {$ENDIF}
+
: MorphOS: missing | fixed in triforce[https://github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/expansionbase.pas]
  
 +
* <strike>'''unit: expansion'''</strike> <!-- 20160109 -->
 +
: AROS: missing | fixed in triforce[https://github.com/magorium/fpc-triforce/blob/master/Sys/AROS/expansion.pas]
 +
: MorphOS: missing | fixed in triforce[https://github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/expansion.pas]
  
 +
* <strike>'''unit: rexx'''</strike> <!-- 20160116 -->
 +
: AROS: missing | fixed in triforce[https://github.com/magorium/fpc-triforce/blob/master/Sys/AROS/rexx.pas]
 +
: MorphOS: missing | fixed in triforce[https://github.com/magorium/fpc-triforce/blob/master/Sys/MorphOS/rexx.pas]
  
//////////////////////////////////////////////////////////////////////////////
+
* <strike>'''unit: aroslib'''</strike> <!-- 20160117 -->
//
+
: AROS: added to triforce[https://github.com/magorium/fpc-triforce/blob/master/Sys/AROS/rexx.pas]
//  Topic: DoMethod()
 
//        Amiga  : Missing
 
//        MorphOS : wrong parameter declaration
 
//        ALL    : missing none msg version
 
//
 
//////////////////////////////////////////////////////////////////////////////
 
  
 +
== Fixed in current trunk ==
  
 +
* <strike>'''unit: systemvartags'''</strike> [http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=33222]
 +
: This utility unit is Amiga specific and implements most if not all vartags versions of library-calls rendering it incompatible with AROS and MorphOS
  
  function DoMethod(obj : pointer; MethodID: ULONG): ULONG; overload;
+
* <strike>'''function: AddAppIconA()'''</strike> [http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=33225]
  {$IFDEF AMIGA}
+
: Autodocs: struct AppIcon *AddAppIconA(ULONG, ULONG, char *, struct MsgPort *, BPTR, struct DiskObject *, struct TagItem *);
  function  DoMethod(obj : pointer; MethodID: ULONG; const msg : array of const): ULONG; overload;
+
: Amiga: FUNCTION AddAppIconA(id : ULONG location 'd0'; userdata : ULONG location 'd1'; text_ : pCHAR location 'a0'; msgport : pMsgPort location 'a1'; lock : pFileLock location 'a2'; diskobj : pDiskObject location 'a3'; const taglist : pTagItem location 'a4') : pAppIcon; syscall WorkbenchBase 060;
  {$ENDIF}
+
: Note: lock parameter is of type BPTR not pFileLock
  {$IFDEF MORPHOS}
+
* <strike>'''varargs function: AddAppIcon()'''</strike> [http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=33225]
  function  DoMethod(obj : pointer; MethodID: ULONG; const msg : array of ULONG): ULONG; overload;
+
:Amiga: Missing
  {$ENDIF}
 
  
 +
* <strike>'''function: DeleteArgstring()'''</strike> [http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=33225]
 +
: Amiga SDK: VOID DeleteArgstring(UBYTE* argstring:A0)
 +
: Amiga: procedure DeleteArgstring(argstring: PChar location 'd0'); syscall RexxSysBase 132;
 +
: Note: d0 as location ?
  
 +
* <strike>'''function: MapANSI()'''</strike> [http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=33225]
 +
: Amiga SDK: LONG MapANSI( STRPTR, LONG, STRPTR, LONG, struct KeyMap * );
 +
: MorphOS: function MapANSI(CONST strg : pSHORTINT location 'a0'; count : longint location 'd0'; buffer : pSHORTINT location 'a1'; length : longint location 'd1'; CONST keyMap : pKeyMap location 'a2') : longint; SysCall KeymapBase 048;
 +
: Note: PShortInt vs STRPTR for buffer/strg argument
 +
* <strike>'''function: MapRawKey()'''</strike> [http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=33225]
 +
: Amiga SDK: WORD MapRawKey( struct InputEvent *, STRPTR, WORD, struct Keymap * );
 +
: MorphOS: function MapRawKey(CONST event : pInputEvent location 'a0'; buffer : pSHORTINT location 'a1'; length : longint location 'd1'; CONST keyMap : pKeyMap location 'a2') : INTEGER; SysCall KeymapBase 042;
 +
: Note: PShortInt vs STRPTR for buffer argument
  
//////////////////////////////////////////////////////////////////////////////
+
* <strike>'''function: SetPointer()'''</strike> [http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=33225]
//
+
: Amiga SDK: SetPointer( Window, Pointer, Height, Width, XOffset, YOffset )
//  Topic: DoSuperMethod()
+
: AROS SDK: void SetPointer(struct Window * window, const UWORD* pointer, LONG height, LONG width, LONG xOffset, LONG yOffset );
//        Amiga         : Missing
+
: MorphOS SDK: VOID SetPointer( struct Window *window, UWORD *pointer, LONG height, LONG width, LONG xOffset, LONG yOffset );
//        MorphOS + AROS : wrong parameter declaration
+
: Amiga: PROCEDURE SetPointer(window : pWindow location 'a0'; pointer_ : pword location 'a1'; height : LONGINT location 'd0'; width : LONGINT location 'd1'; xOffset : LONGINT location 'd2'; yOffset : LONGINT location 'd3'); syscall _IntuitionBase 270;
//        ALL            : missing none msg version
+
: AROS: procedure SetPointer(Window: PWindow; Pointer_: PWord; Height: LongInt; Width: LongInt; XOffset: LongInt; YOffset: LongInt); syscall IntuitionBase 45;
//
+
: MorphOS: procedure SetPointer(window : pWindow location 'a0'; VAR pointer : Word location 'a1'; height : LongInt location 'd0'; width : LongInt location 'd1'; xOffset : LongInt location 'd2'; yOffset : LongInt location 'd3'); SysCall IntuitionBase 270;
//////////////////////////////////////////////////////////////////////////////
+
: Note: Using a var for pointerdata seems a bad idea. If must, then please provide both options.
  
 +
* <strike>'''structure: TExpansionControl()'''</strike> [http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=33225]
 +
: Amiga: field ec_Reserved11 is currently advertised with name ec_Z3_HighBase
  
 +
* <strike>'''type: Tag'''</strike> [http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=33225]
 +
: Autodocs: "typedef ULONG Tag;"
 +
: Amiga: "Type Tag = LongInt;"
 +
* <strike>'''record field: ti_Data of record tTagItem'''</strike> [http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=33225]
 +
: Autodocs: "ULONG ti_Data;"
 +
: Amiga: "ti_Data : LongInt;"
  
  function DoSuperMethod(cl: pointer; obj : pointer; id: LongWord): LongWord; overload;
+
* <strike>'''function: ASLRequestTags()'''</strike> [http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=33225]
  {$IF DEFINED(AMIGA) or DEFINED(MORPHOS) or DEFINED(AROS)}
+
: <strike>AROS implementation seems missing.</strike> [http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=31663]
  function DoSuperMethod(cl: pointer; obj : pointer; id: LongWord; const msg : array of LongWord): longword; overload;
+
: Amiga implements it in utility unit systemvartags (see also unit: systemvartags)
  {$ENDIF}
+
: MorphOS implements it in unit ASL
 +
* <strike>'''function: AslRequest()'''</strike> [http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=33225]
 +
: autodocs: BOOL AslRequest( APTR,struct TagItem * );
 +
: Amiga: FUNCTION AslRequest(requester : POINTER location 'a0'; tagList : pTagItem location 'a1') : LongInt; syscall AslBase 060;
 +
: AROS: function AslRequest(Requester: Pointer; const Tags: array of const): LongBool;
 +
: MorphOS: function AslRequest(requester: Pointer  location 'a0'; tagList : pTagItem location 'a1'): LongBool; SysCall AslBase 060;
 +
* <strike>'''function: RequestFile()'''</strike> [http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=33225]
 +
: Autodocs: BOOL RequestFile(struct FileRequester *);
 +
: Amiga: FUNCTION RequestFile(fileReq : pFileRequester location 'a0') : LongInt; syscall AslBase 042;
 +
: Remark: Here the boolean return type is allowed (as is used on the other platforms)
 +
* <strike>'''function: AslRequest()'''</strike> [http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=33225]
 +
: Autodocs: BOOL AslRequest(APTR,struct TagItem *);
 +
: Amiga: FUNCTION AslRequest(requester: POINTER location 'a0'; tagList: pTagItem location 'a1'): LongInt; syscall AslBase 060;
 +
: Remark: Here the boolean return type is allowed (as is used on the other platforms)
  
  
 +
* <strike>'''function: BltClear()'''</strike> [http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=33225]
 +
: Amiga: PROCEDURE BltClear(memBlock : pCHAR location 'a1'; byteCount : ULONG location 'd0'; flags : ULONG location 'd1'); syscall GfxBase 300;
 +
: AROS: procedure BltClear(MemBlock: Pointer; ByteCount: LongWord; Flags: LongWord); syscall GfxBase 50; deprecated;
 +
: MorphOS: procedure BltClear(memBlock : pCHAR location 'a1'; byteCount : CARDINAL location 'd0'; flags : CARDINAL location 'd1'); SysCall GfxBase 300;
 +
: Note: Parameter MemBlock should really be a generic pointer.
 +
* <strike>'''function: VideoControl()'''</strike> [http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=33225]
 +
: Amiga: FUNCTION VideoControl(colorMap : pColorMap location 'a0'; tagarray : pTagItem location 'a1') : LongBool; syscall GfxBase 708;
 +
: AROS: function VideoControl(Cm: PColorMap; Tags: PTagItem): LongWord; syscall GfxBase 118; unimplemented;
 +
: MorphOS: function VideoControl(colorMap : pColorMap location 'a0'; tagarray : pTagItem location 'a1') : LongBool; SysCall GfxBase 708;
 +
: Note: suggest to use LongBool as return-type.
 +
* <strike>'''function: LoadRGB4()'''</strike> [http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=33225]
 +
: Amiga: PROCEDURE LoadRGB4(vp : pViewPort location 'a0';const colors : pWord location 'a1'; count : LONGINT location 'd0'); syscall GfxBase 192;
 +
: AROS: procedure LoadRGB4(Vp: PViewPort; Colors: PWord; Count: LongInt); syscall GfxBase 32;
 +
: MorphOS: procedure LoadRGB4(vp : pViewPort location 'a0'; VAR colors : Integer location 'a1'; count : LongInt location 'd0'); SysCall GfxBase 192;
 +
: Note: This time MorphOS is the odd one out using var for colour parameter.
  
//////////////////////////////////////////////////////////////////////////////
 
//
 
//  Topic: Structure TWBArg, Missing from MorphOS because of lacking unit
 
//        Workbench
 
//
 
//////////////////////////////////////////////////////////////////////////////
 
  
 +
* <strike>'''function: GetAttr()'''</strike> fixed in trunk [http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=31606]
 +
: MorphOS uses a var for parameter Return-Value while Amiga + AROS uses a pointer. Autodocs states it to be a pointer.
 +
* <strike>'''function: AllocMem()''' '''(high priority)'''</strike> Fixed in trunk [http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=31600]
 +
: MorphOS implemented it as ExecAllocMem
 +
: Amiga + AROS version have this function declared as AllocMem(), which is ambiguous with Free Pascal's AllocMem function.
 +
* <strike>'''function: Info()'''</strike> fixed in trunk [http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=31606]
 +
: AutoDocs: BOOL  = Info( BPTR, struct InfoData * )
 +
: Amiga declaration: FUNCTION Info(lock : LONGINT location 'd1'; parameterBlock : pInfoData location 'd2') : LongBool; syscall _DOSBase 114;
 +
: AROS declaration: function Info(Lock: BPTR; ParameterBlock: PInfoData): LongInt; syscall AOS_DOSBase 19;
 +
: MorphOS declaration: function Info(lock : LongInt location 'd1'; parameterBlock: PInfoData location 'd2'): LongInt; SysCall MOS_DOSBase 114;
 +
* <strike>'''macros: All MUI macros'''</strike> fixed in trunk [http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=31607]
 +
: Amiga: The OBJ_xxx() macros are not implemented as macro's at all, rather as a cast to a particular structure in order to obtain information -> that is totally completely wickedly wrong.
 +
: MorphOS: See Amiga.
 +
* <strike>'''Constants: MUIX_R, MUIX_C, MUIX_L, MUIX_N, MUIX_B, MUIX_I, MUIX_U, MUIX_PT and MUIX_PH'''</strike> fixed in trunk [http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=31607]
 +
: AMIGA + AROS: these MUI constants uses c-language escape code characters, which won't work for Free Pascal.
 +
: MorphOS: declared them as they should.
 +
* <strike>'''function: NextTagItem()'''</strike> fixed in trunk [http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=31606]
 +
: autodocs: struct TagItem *NextTagItem(struct TagItem **);
 +
: Amiga: function NextTagItem(Item : ppTagItem location 'a0') : pTagItem; syscall _UtilityBase 048;
 +
: AROS: function NextTagItem(var Item: PTagItem): PTagItem; syscall AOS_UtilityBase 8;
 +
: MorphOS: function NextTagItem(tagListPtr: pPTagItem location 'a0'): PTagItem; SysCall MOS_UtilityBase 048;
 +
* <strike>'''function: ReadPixelArray8()'''</strike> fixed in [http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=31852]
 +
: autodocs: LONG ReadPixelArray8(struct  RastPort *, UWORD, UWORD, UWORD, UWORD, UBYTE *, struct RastPort *);
 +
: Amiga: FUNCTION ReadPixelArray8(rp: pRastPort location 'a0'; xstart: ULONG location 'd0'; ystart: ULONG location 'd1'; xstop: ULONG location 'd2'; ystop: ULONG location 'd3'; array_: pointer location 'a2'; temprp: pRastPort location 'a1'): LONGINT; syscall GfxBase 780;
 +
: AROS: function ReadPixelArray8(Rp: PRastPort; xStart, yStart, xStop, yStop: LongWord; Array_: PByte; TempRp: PRastPort): LongInt; syscall GfxBase 130;
 +
: MorphOS: function ReadPixelArray8(rp: pRastPort location 'a0'; xstart: CARDINAL location 'd0'; ystart: CARDINAL location 'd1'; xstop: CARDINAL location 'd2'; ystop: CARDINAL location 'd3'; array1: pCHAR location 'a2'; temprp: pRastPort location 'a1'): LongInt; SysCall GfxBase 780;
 +
: Remark: PChar for pointing to Array data ?
 +
* <strike>'''function: WritePixelArray8()'''</strike>
 +
: See: ReadPixelArray8()
 +
* <strike>'''function: PolyDraw()'''</strike> fixed in trunk [http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=31852]
 +
: Autodocs: void PolyDraw( struct RastPort *, WORD, WORD * );
 +
: Amiga: PROCEDURE PolyDraw(rp : pRastPort location 'a1'; count : LONGINT location 'd0';const polyTable : pLongint location 'a0'); syscall GfxBase 336;
 +
: AROS: procedure PolyDraw(Rp: PRastPort; Count: LongInt; PolyTable: PSmallInt); syscall GfxBase 56;
 +
: MorphOS: procedure PolyDraw(rp : pRastPort location 'a1'; count : LongInt location 'd0'; VAR polyTable : INTEGER location 'a0'); SysCall GfxBase 336;
 +
: Remark: MorphOS' use of var for argument polyTable is imho just plain weird and also dictates the array to consist out of integers. Amiga version dictates using LongInt for the PolyTable array.
 +
* <strike>'''type: PPObject_'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=31854]
 +
: Missing for Amiga and MorphOS
 +
* <strike>'''function: TextLength()'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=31854]
 +
: MorphOS: types the string parameter as pShortInt. Autodocs/Amiga/AROS uses type STRPTR.
 +
* <strike>'''function: Text()'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=31854]
 +
: MorphOS: still called Text() while Amiga and AROS named it GfxText(). Also the string parameter for MorphOS is declared as pShortInt. Autodocs/Amiga/AROS uses type STRPTR.
 +
* <strike>'''const: ACTION_READ'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=31854]
 +
: MorphOS: Defines this constant as 'R', which is incompatible with TDOSPacket.dp_Type (LONG)
 +
: Remark: Amiga + AROS defines this constant as  ACTION_READ = $52;  // 'R'
 +
* <strike>'''const: ACTION_WRITE'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=31854]
 +
: MorphOS: Defines this constant as 'W', which is incompatible with TDOSPacket.dp_Type (LONG)
 +
: Remark: Amiga + AROS defines this constant as  ACTION_WRITE = $57;  // 'W'
 +
* <strike>'''Function: ReadArgs()'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=31854]
 +
: autodocs: struct RDArgs * ReadArgs(STRPTR, LONG *, struct RDArgs *)
 +
: Amiga: FUNCTION ReadArgs(const arg_template : pCHAR location 'd1'; arra : pLONGINT location 'd2'; args : pRDArgs location 'd3') : pRDArgs; syscall _DOSBase 798;
 +
: AROS: function ReadArgs(const Template: STRPTR; var Array_: IPTR; RdArgs: PRDArgs): PRDArgs; syscall AOS_DOSBase 133;
 +
: MorphOS: function ReadArgs(arg_template: PChar location 'd1'; var array1: LongInt location 'd2'; args: PRDArgs location 'd3'): PRDArgs; SysCall MOS_DOSBase 798;
 +
: Remark: using var for Array_ parameter is ok, but restricts when attempting to pass f.i. a record structure. Why not declare both variants in such cases ?
 +
* <strike>'''macro: RASSIZE()'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=31854]
 +
: Amiga: missing
 +
: MorphOS: missing
 +
* <strike>'''Const: MIDDLEUP'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=31854]
 +
: Amiga: Missing
 +
: MorphOS: Missing
 +
* <strike>'''Const: MIDDLEDOWN'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=31854]
 +
: Amiga: Missing
 +
: MorphOS: Missing
 +
* <strike>'''unit: diskfont'''</strike> fixed in triforce[https://github.com/magorium/fpc-triforce/commit/95dc1c869dac53da5a70f908a2f63c06d0853bd4], fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=31854]
 +
: MorphOS: missing
 +
* <strike>'''unit: CyberGraphics'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=32343]
 +
: MorphOS: Missing
  
 +
* <strike>'''function: ObtainBestPen()'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=32642]
 +
: MorphOS: Missing
 +
* <strike>''' macro: DrawCircle'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=32642]
 +
: Amiga: missing
 +
: MorphOS: missing
 +
* <strike>'''varargs function: BestModeID()'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=32642]
 +
: MorphOS: missing
  
{$IFDEF MORPHOS}
+
* <strike>'''function: AllocDosObjectTags()'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=32642]
Type
+
: MorphOS: Function missing.
  PWBArg = ^TWBArg;
+
* <strike>'''function FPuts()'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=32642]
  TWBArg = Record
+
: Autodocs: LONG FPuts(BPTR, STRPTR)
    wa_lock: BPTR;  //* a lock descriptor */
+
: Amiga1: FUNCTION FPuts(fh : LONGINT location 'd1';const str : pCHAR location 'd2') : LongBool; syscall _DOSBase 342;
    wa_Name: PChar; //* a string relative to that lock */
+
: Amiga2: FUNCTION FPuts(fh : LONGINT;const str : string) : BOOLEAN;
  end;
+
: AROS: function FPuts(File_: BPTR; const String_: STRPTR): LongInt; syscall AOS_DOSBase 57;
{$ENDIF}
+
: MorphOS: function FPuts(fh : LongInt location 'd1'; str: PChar   location 'd2'): LongInt; SysCall MOS_DOSBase 342;
 +
: Remark: note the use of different return-types as well as not using BPTR for filehandle type.
 +
: Note: returns zero on success, -1 if an error occurs, so please forget using a boolean return type.
 +
* <strike>'''function: VFPrintf()'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=32642]
 +
: AutoDocs: LONG = VFPrintf(BPTR, STRPTR, LONG *)
 +
: Amiga declaration: FUNCTION VFPrintf(fh : LONGINT location 'd1';const format : pCHAR location 'd2';const argarray : POINTER location 'd3') : LONGINT; syscall _DOSBase 354;
 +
: AROS declaration: function VFPrintf(Fh: BPTR; const format: STRPTR; const ArgArray: PLongInt): LongInt; syscall AOS_DOSBase 59;
 +
: MorphOS declaration: function VFPrintf(fh : LongInt location 'd1'; format: PChar location 'd2'; argarray: Pointer location 'd3'): LongInt; SysCall MOS_DOSBase 354;
 +
: NOTE: the generic pointer declaration prevents using "VFPrintf(nil/0, 'text', vargs );" where vargs = array of long.
 +
: Remark: AFAIK for AROS it is theoretically possible to pass 64-bit formatted values.
  
 +
* <strike>'''function: SetAttrs()'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=32642]
 +
: Amiga + MorphOS implementations seems missing
 +
* <strike>'''function: SetGadgetAttrs()'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=32642]
 +
: MorphOS version seems missing
 +
* <strike>'''function: EasyRequest()'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=32642]
 +
: Amiga: Missing
 +
: AROS: version with no array of const is missing -> forced to use [TAG_END, 0] <- extra 0 required for AROS due to small issue
 +
: MorphOS: Missing
 +
* <strike>'''field: dri_pens of structure tDrawInfo'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=32642]
 +
: Autodocs: UWORD *dri_Pens; /* pointer to pen array */
 +
: Amiga:  dri_Pens : Pointer;  { pointer to pen array }
 +
: AROS:    dri_Pens : PWord;    // pointer to pen array
 +
: MorphOS: dri_Pens : Pointer;  { pointer to pen array }
 +
: Remark: afaik the pen array is an array of word (for all platforms), so the only really practical type for dri_pens would then be a Pointer to an unsigned word
 +
* <strike>'''varargs function: SetWindowPointer()'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=32642]
 +
: Amiga: Seems missing
 +
: MorphOS: Seems missing
 +
* <strike>'''function: CloseScreen()'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=32642]
 +
: Amiga: Amiga declaration is still pre v36 (procedure), and does not return a boolean value (function) on success/failure which is the case on v36+ systems.
  
 +
* <strike>'''structure: TWindow field WScreen'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=32643]
 +
: Autodocs: struct Screen *WScreen;
 +
: Amiga: WScreen : Pointer;
 +
: AROS: WScreen : PScreen;
 +
: MorphOS: WScreen : Pointer;
 +
: Status: Needs complete rewrite of intuition unit
  
//////////////////////////////////////////////////////////////////////////////
+
* <strike>'''type: TDateTime'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=32644]
//
+
: Amiga + AROS: declares this structure (and accompanied pointer) as TDateTime,  
//  Topic: Function SetAttrs(), this varargs version missing from Amiga & MOS
+
: MorphOS: declares this structure _TDateTime and accompanied pointer _PDateTime
//
+
: Remark: TDateTime declared in AmigaDOS conflicts with Free Pascal's declared TDateTime structure.
//////////////////////////////////////////////////////////////////////////////
+
* <strike>'''function: DateToStr()'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=32644]
 +
: All: This function conflicts with Free Pascal own DateToStr function. Renamed to DOSSateToStr (and StrToDate to DOSStrToDate)
  
 +
* <strike>'''record TmemChunk'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=32682]
 +
: MorphOS: the field names right now are nc_Next and nc_Bytes -> should read '''m'''c_Next and '''m'''c_Bytes
 +
* <strike>'''vararg function: SystemTags()'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=32682]
 +
: MorphOS: missing.
  
 +
* <strike>'''record: TNewBroker'''</strike> (was already) fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=32660]
 +
: Amiga: This structure seems aligned wrongly.
 +
: Note1: Packrecords c failed, packrecords 2 seems to work, but its influence on other record structure (InputXpression) was not tested (it uses two bytes as first entry in its structure).
 +
: Note2: Amiga and morphos sdk seems to use pragmapack #2, so also for the second structure.
 +
* <strike>'''function CxBroker()'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=32705]
 +
: AutoDocs: CxObj *CxBroker(struct NewBroker *,LONG *);
 +
: Amiga: 238 FUNCTION CxBroker(nb : pNewBroker location 'a0'; error : pCxObj location 'd0') : pCxObj; syscall CxBase 036;
 +
: Note: according to autodocs, error is a pointer to a generic LONG, not pCxObj;
 +
* <strike>'''function CreateCxObj()'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=32702]
 +
: AutoDocs: co = CreateCxObj(type,arg1,arg2); D0 =  D0  A0  A1
 +
: Amiga: 237 FUNCTION CreateCxObj(typ : ULONG location 'd0'; arg1 : LONGINT location 'a1'; arg2 : LONGINT location 'a2') : pCxObj; syscall CxBase 030;
 +
: Note: notice different use of address registers. I have not faintest idea why they don't match. Maybe there's a valid reason ? (although aros and mos also uses same registers as stated by autodocs).
  
  {$IFDEF AMIGA}
+
* <strike>'''function: WriteStr()'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=32709]
  function SetAttrs(Obj: APTR; tagList: Array of Const): ULONG;
+
: On MorphOS this function seems declared as Amiga-function, which clashes with Free Pascal build-in function WriteStr. Strange as WriteStr seems only declared as dos/stdio.h macro.
  {$ENDIF}
 
  {$IFDEF MORPHOS}
 
  function SetAttrs(Obj: APTR; tagList: Array of DWord): ULONG;
 
  {$ENDIF}
 
  
 +
* <strike>'''function: ChangeSprite()'''</strike> fixed in trunk[http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=33235]
 +
: Amiga: PROCEDURE ChangeSprite(vp : pViewPort location 'a0'; sprite : pSimpleSprite location 'a1'; newData : pWORD location 'a2'); syscall GfxBase 420;
 +
: AROS: procedure ChangeSprite(Vp: PViewPort; s: PSimpleSprite; NewData: Pointer); syscall GfxBase 70; unimplemented;
 +
: MorphOS: procedure ChangeSprite(vp : pViewPort location 'a0'; sprite : pSimpleSprite location 'a1'; VAR newData : Integer location 'a2'); SysCall GfxBase 420;
 +
: Note: MOS version uses var for sprite data parameter. Should be opaque pointer type (perhaps also for amiga ?)
  
  
//////////////////////////////////////////////////////////////////////////////
+
== Some of your finest ==
//
 
//  Topic:  Useful MUI text macro's. Used other names to avoid conflicts.
 
//
 
//////////////////////////////////////////////////////////////////////////////
 
  
 +
* AslRequest()
 +
<source lang="pascal">
 +
{$IFDEF AMIGA}
 +
if (AslRequest(fr, nil) <> 0) then
 +
{$ENDIF}
 +
{$IFDEF AROS}
 +
if (AslRequestA(fr, nil)) then
 +
{$ENDIF}
 +
{$IFDEF MORPHOS}
 +
if (AslRequest(fr, nil)) then
 +
{$ENDIF}
 +
begin
 +
  // Could we now please check what the requester returned ?
 +
end;
 +
</source>
  
  
const
+
== Hardening trinity ==
  Esc_R            = #27#114;  //  right justified
 
  Esc_C            = #27#099;  //  centered
 
  Esc_L            = #27#108;  //  left justified
 
  Esc_N            = #27#110;  //  normal
 
  Esc_B            = #27#098;  //  bold
 
  Esc_I            = #27#105;  //  italic
 
  Esc_U            = #27#117;  //  underlined
 
  Esc_PT            = #27#050;  //  text pen
 
  Esc_PH            = #27#056;  //  highlight text pen
 
 
 
  // Specials
 
  Esc_IMS          = #27#073;  //  Standard MUI Image
 
  Esc_IMC          = #27#079;  //  Created MUI Image
 
 
 
 
 
 
 
//////////////////////////////////////////////////////////////////////////////
 
//
 
//  Topic: CoerceMethos()
 
//
 
//////////////////////////////////////////////////////////////////////////////
 
 
 
 
 
 
 
{$IFDEF MORPHOS}
 
Type
 
  PBoopsiObject = PObject_;
 
{$ENDIF}
 
 
 
  {$IFDEF AMIGA}
 
  function  CoerceMethod(cl: PIClass; Obj: PObject_; MethodID: ULONG): ULONG;
 
  function  CoerceMethod(cl: PIClass; Obj: PObject_; MethodID: ULONG; const Msg: array of const): ULONG; overload;
 
  {$ENDIF}
 
  {$IFDEF AROS}
 
  function  CoerceMethod(cl: PIClass; Obj: PObject_; MethodID: IPTR): IPTR;
 
  {$ENDIF}
 
  {$IFDEF MORPHOS}
 
  function  CoerceMethodA(cl: PIClass; Obj: PObject_; Msg: Pointer): ULONG;
 
  function  CoerceMethod(cl: PIClass; Obj: PBoopsiobject; MethodID: ULONG): ULONG;
 
  function  CoerceMethod(cl: PIClass; Obj: PBoopsiObject; MethodID: ULONG; const Msg: array of ULONG): ULONG;
 
  {$ENDIF}
 
 
 
 
 
 
 
//////////////////////////////////////////////////////////////////////////////
 
//
 
//  Topic: GetAttr() for Morphos, complying to autodocs.
 
//
 
//////////////////////////////////////////////////////////////////////////////
 
 
 
 
 
 
 
  {$IFDEF MORPHOS}
 
  function GetAttr(attrID : CARDINAL location 'd0'; object1 : POINTER location 'a0'; storagePtr : PCARDINAL location 'a1') : CARDINAL; SysCall IntuitionBase 654; 
 
  {$ENDIF}
 
 
 
 
 
 
 
//////////////////////////////////////////////////////////////////////////////
 
//
 
//  Topic:
 
//
 
//////////////////////////////////////////////////////////////////////////////
 
 
 
 
 
 
 
implementation
 
 
 
 
 
{$IFDEF AMIGA}
 
Uses
 
  AmigaLib, tagsarray;
 
{$ENDIF}
 
 
 
{$IFDEF MORPHOS}
 
Uses
 
  AmigaLib;
 
{$ENDIF}
 
 
 
 
 
 
 
//////////////////////////////////////////////////////////////////////////////
 
//
 
//  Topic: Some generic c-helpers, should not be in here
 
//
 
//////////////////////////////////////////////////////////////////////////////
 
 
 
 
 
 
 
function  SetAndTest(Var OldValue: pointer; NewValue: pointer): boolean;
 
begin
 
  OldValue := NewValue;
 
  result := (NewValue <> nil)
 
end;
 
 
 
function  SetAndTest(Var OldValue: LongWord; NewValue: LongWord): boolean;
 
begin
 
  OldValue := NewValue;
 
  result := (NewValue <> 0)
 
end;
 
 
 
function  SetAndTest(Var OldValue: LongInt; NewValue: LongInt): boolean;
 
begin
 
  OldValue := NewValue;
 
  result := (NewValue <> 0)
 
end;
 
 
 
 
 
 
 
//////////////////////////////////////////////////////////////////////////////
 
//
 
//  Topic: Hooks
 
//
 
//////////////////////////////////////////////////////////////////////////////
 
 
 
 
 
 
 
{$IFDEF CPU68}
 
procedure InitHook(var Hook: THook; Func: THookFunction; Data: APTR);
 
begin
 
  Hook.h_Entry    := @HookEntry;
 
  Hook.h_SubEntry := Func;
 
  Hook.h_Data    := Data;
 
end;
 
{$ENDIF}
 
 
 
 
 
 
 
{$IFDEF CPU86}
 
function  _hookEntry(h: PHook; obj: PObject_; Msg: Pointer): LongWord; cdecl;
 
var
 
  Func: THookFunction;
 
begin
 
  {$PUSH}{$HINTS OFF}
 
  Func  := THookFunction(h^.h_SubEntry);
 
  {$POP}
 
  result := Func(h, obj, msg);
 
end;
 
 
 
procedure InitHook(var Hook: THook; Func: THookFunction; Data: APTR);
 
begin
 
  {$PUSH}{$HINTS OFF}
 
  Hook.h_Entry    := IPTR(@_hookEntry);
 
  Hook.h_SubEntry := IPTR(Func);
 
  {$POP}
 
  Hook.h_Data    := Data;
 
end;
 
{$ENDIF}
 
 
 
 
 
 
 
{$IFDEF CPUPOWERPC}
 
procedure InitHook(var Hook: THook; Func: THookFunction; Data: APTR);
 
const
 
  HOOKENTRY_TRAP: TEmulLibEntry = ( Trap: TRAP_LIB; Extension: 0; Func: @HookEntry );
 
begin
 
  Hook.h_Entry    := @HOOKENTRY_TRAP;
 
  Hook.h_SubEntry := Func;
 
  Hook.h_Data    := Data;
 
end;
 
{$ENDIF}
 
 
 
  
 +
In order to circumvent some of the inconsistencies and incompatibilities, there was need for a solution without tempering with the RTL and/or default support units.
  
//////////////////////////////////////////////////////////////////////////////
+
That's were unit trinity comes into play, which solves some of the encountered issues (the unit itself is a work in progress). It provides the user with a way to solve things and let sources compile without too much hassle/workarounds.
//
 
//  Topic: Tags
 
//
 
//////////////////////////////////////////////////////////////////////////////
 
  
 
+
The latest version of unit trinity is kindly provided by Magorium and can be found [https://github.com/magorium/fpc-triforce/tree/master/Base/Trinity here].
 
 
{$IFDEF AROS}
 
Function  TAG_(TagItem: LongWord): LongInt; inline;
 
begin
 
  Result := LongInt(TagItem);
 
end;
 
 
 
Function  TAG_(TagItem: LongInt): LongInt; inline;
 
begin
 
  Result := LongInt(TagItem);
 
end;
 
 
 
Function  TAG_(TagItem: Pointer): LongInt; inline;
 
begin
 
  {$PUSH}{$HINTS OFF}
 
  Result := LongInt(TagItem);
 
  {$POP}
 
end;
 
 
 
function  TAG_(TagItem: boolean): LongInt; inline;
 
begin
 
  Result := Ord(TagItem);
 
end;
 
{$ENDIF}
 
 
 
 
 
 
 
{$IFDEF AMIGA}
 
Function  TAG_(TagItem: LongWord): LongInt; inline;
 
begin
 
  Result := LongInt(TagItem);
 
end;
 
 
 
Function  TAG_(TagItem: LongInt): LongInt; inline;
 
begin
 
  Result := LongInt(TagItem);
 
end;
 
 
 
Function  TAG_(TagItem: Pointer): LongInt; inline;
 
begin
 
  {$PUSH}{$HINTS OFF}
 
  Result := LongInt(TagItem);
 
  {$POP}
 
end;
 
 
 
function  TAG_(TagItem: boolean): LongInt; inline;
 
begin
 
  Result := Ord(TagItem);
 
end;
 
{$ENDIF}
 
 
 
 
 
 
 
{$IFDEF MORPHOS}
 
Function  TAG_(TagItem: LongInt): LongWord; inline;
 
begin
 
  Result := LongWord(TagItem);
 
end;
 
 
 
Function  TAG_(TagItem: LongWord): LongWord; inline;
 
begin
 
  Result := LongWord(TagItem);
 
end;
 
 
 
Function  TAG_(TagItem: Pointer): LongWord; inline;
 
begin
 
  {$PUSH}{$HINTS OFF}
 
  Result := LongWord(TagItem);
 
  {$POP}
 
end;
 
 
 
function  TAG_(TagItem: boolean): LongWord; inline;
 
begin
 
  Result := Ord(TagItem);
 
end;
 
{$ENDIF}
 
 
 
 
 
 
 
//////////////////////////////////////////////////////////////////////////////
 
//
 
//  Topic: SetGadgetAttrs(), missing from MorphOS
 
//
 
//////////////////////////////////////////////////////////////////////////////
 
 
 
 
 
 
 
{$IFDEF MORPHOS}
 
function  SetGadgetAttrs(Gadget: PGadget; Window: PWindow; Requester: PRequester; const Tags: array of long): ULONG;
 
begin
 
  result := SetGadgetAttrsA(Gadget, Window, Requester, @Tags[0]);
 
end;
 
{$ENDIF}
 
 
 
 
 
 
 
//////////////////////////////////////////////////////////////////////////////
 
//
 
//  Topic: DoMethod()
 
//
 
//////////////////////////////////////////////////////////////////////////////
 
 
 
 
 
 
 
function  DoMethod(obj : pointer; MethodID: ULONG): ULONG;
 
Var
 
  Tags : Array[0..0] of ULONG;
 
begin
 
  Tags[0] := MethodID;
 
  Result := CALLHOOKPKT(PHook(OCLASS(obj)), obj, @(Tags[0]));
 
// or should it be: CALLHOOKPKT(PHook(OCLASS(Obj)), Obj, nil);
 
end;
 
 
 
{$IFDEF AMIGA}
 
operator := (Src: TVarRec) Dest: LongWord;
 
begin
 
  Case Src.vtype of
 
    {$PUSH}{$HINTS OFF}
 
    vtinteger  : Dest := PtrInt(Src.vinteger);
 
    vtboolean  : Dest := PtrInt(Src.vboolean);
 
    vtpchar    : Dest := PtrInt(Src.vpchar);
 
    vtchar    : Dest := PtrInt(Src.vchar);
 
    vtstring  : Dest := PtrInt(PChar(string(Src.vstring^)));
 
    vtpointer  : Dest := PtrInt(Src.vpointer);
 
    {$POP}
 
  end;
 
end;
 
 
 
function  DoMethod(obj : pointer; MethodID: ULONG; const msg : array of const): ULONG; overload;
 
Var
 
  Tags : Array of LongWord; i,n: integer;
 
begin
 
  SetLength(Tags, Length(msg) + 1);
 
 
 
  i := 0;
 
  Tags[i] := MethodID;
 
 
 
  for n := low(msg) to high(msg) do
 
  begin
 
    inc(i); 
 
    Tags[i] := msg[n];  // See operator
 
  end;
 
 
 
  Result := CALLHOOKPKT(PHook(OCLASS(Obj)), Obj, @(Tags[0]));
 
 
 
  SetLength(Tags, 0);
 
end;
 
{$ENDIF}
 
 
 
{$IFDEF MORPHOS}
 
function  DoMethod(obj : pointer; MethodID: ULONG; const msg : array of ULONG): ULONG; overload;
 
Var
 
  Tags : Array of LongWord; i,n: integer;
 
begin
 
  SetLength(Tags, Length(msg) + 1);
 
 
 
  i := 0;
 
  Tags[i] := MethodID;
 
 
 
  for n := low(msg) to high(msg) do
 
  begin
 
    inc(i);
 
    Tags[i] := msg[n];
 
  end;
 
 
 
  Result := CALLHOOKPKT(PHook(OCLASS(Obj)), Obj, @(Tags[0]));
 
  SetLength(Tags, 0);
 
end;
 
{$ENDIF}
 
 
 
 
 
 
 
//////////////////////////////////////////////////////////////////////////////
 
//
 
//  Topic: DoSuperMethod()
 
//        Amiga          : Missing
 
//        MorphOS + AROS : wrong parameter declaration
 
//        ALL            : missing none msg version
 
//
 
//////////////////////////////////////////////////////////////////////////////
 
 
 
 
 
 
 
function  DoSuperMethod(cl: pointer; obj : pointer; id: LongWord): LongWord; overload;
 
Var
 
  Tags : Array[0..0] of LongWord;
 
begin
 
  Tags[0] := id;
 
  Result  := DoSuperMethodA(cl, obj, @tags[0]);
 
  // or should it be: DoSuperMethodA(cl, obj, nil);
 
end;
 
 
 
 
 
 
 
{$IF DEFINED(AMIGA) or DEFINED(MORPHOS) or DEFINED(AROS)}
 
function  DoSuperMethod(cl: pointer; obj : pointer; id: LongWord; const msg : array of LongWord): longword; overload;
 
Var
 
  Tags : Array of LongWord; i,n: integer;
 
begin
 
  SetLength(Tags, Length(msg) + 1);
 
 
 
  i := 0;
 
  Tags[i] := id;
 
 
 
  for n := low(msg) to high(msg) do
 
  begin
 
    inc(i);
 
    Tags[i] := msg[n];
 
  end;
 
 
 
  Result := DoSuperMethodA(cl, obj, @tags[0]);
 
  SetLength(Tags, 0);
 
end;
 
{$ENDIF}
 
 
 
 
 
 
 
//////////////////////////////////////////////////////////////////////////////
 
//
 
//  Topic: SetAttrs()
 
//
 
//////////////////////////////////////////////////////////////////////////////
 
 
 
 
 
 
 
{$IFDEF AMIGA}
 
function  SetAttrs(Obj: APTR; tagList: Array of Const): ULONG;
 
begin
 
  Result := SetAttrsA(Obj, ReadInTags(tagList));
 
end;
 
{$ENDIF}
 
 
 
{$IFDEF MORPHOS}
 
function  SetAttrs(Obj: APTR; tagList: Array of DWord): ULONG;
 
begin
 
  Result := SetAttrsA(Obj, @tagList);
 
end;
 
{$ENDIF}
 
 
 
 
 
 
 
//////////////////////////////////////////////////////////////////////////////
 
//
 
//  Topic: CoerceMethod()
 
//
 
//////////////////////////////////////////////////////////////////////////////
 
 
 
 
 
 
 
{$IFDEF MORPHOS}
 
{$WARNING MORPHOS implementation of CoerceMethodA() is untested}
 
function  CoerceMethodA(cl: PIClass; Obj: PObject_; Msg: Pointer): ULONG;
 
begin
 
  If  ( (cl <> nil) and (Obj <> nil) )
 
  then result := CALLHOOKPKT(PHook(cl), obj, Msg)
 
  else result := 0;
 
end;
 
{$ENDIF}
 
 
 
{$IFDEF AMIGA}
 
function  CoerceMethod(cl: PIClass; Obj: PObject_; MethodID: ULONG): ULONG;
 
{$ENDIF}
 
{$IFDEF AROS}
 
function  CoerceMethod(cl: PIClass; Obj: PObject_; MethodID: IPTR): IPTR;
 
{$ENDIF}
 
{$IFDEF MORPHOS}
 
function  CoerceMethod(cl: PIClass; Obj: PBoopsiobject; MethodID: ULONG): ULONG;
 
{$ENDIF}
 
Var
 
  Tags : Array[0..0] of ULONG;
 
begin
 
  {$IFDEF AROS}
 
  if ( not(obj <> nil) or not (cl <> nil) ) then exit(0);
 
  {$ENDIF}
 
  Tags[0] := MethodID;
 
  Result := CoerceMethodA(cl, Obj, @(Tags[0]));
 
end;
 
 
 
{$IFDEF AMIGA}
 
function  CoerceMethod(cl: PIClass; Obj: PObject_; MethodID: ULONG; const Msg: array of const): ULONG; overload;
 
Var
 
  Tags : Array of LongWord; i,n: integer;
 
begin
 
  SetLength(Tags, Length(Msg) + 1);
 
 
 
  i := 0;
 
  Tags[i] := MethodID;
 
 
 
  for n := low(Msg) to high(Msg) do
 
  begin
 
    inc(i); 
 
    Tags[i] := Msg[n];  // See operator
 
  end;
 
 
 
  Result := CoerceMethodA(cl, Obj, @(Tags[0]));
 
 
 
  SetLength(Tags, 0);
 
end;
 
{$ENDIF}
 
 
 
{$IFDEF MORPHOS}
 
function  CoerceMethod(cl: PIClass; Obj: PBoopsiObject; MethodID: ULONG; const Msg: array of ULONG): ULONG;
 
Var
 
  Tags : Array of LongWord; i,n: integer;
 
begin
 
  SetLength(Tags, Length(Msg) + 1);
 
 
 
  i := 0;
 
  Tags[i] := MethodID;
 
 
 
  for n := low(Msg) to high(Msg) do
 
  begin
 
    inc(i);
 
    Tags[i] := Msg[n];
 
  end;
 
 
 
  Result := CoerceMethodA(cl, Obj, @(Tags[0]));
 
 
 
  SetLength(Tags, 0);
 
end;
 
{$ENDIF}
 
 
 
 
 
 
 
//////////////////////////////////////////////////////////////////////////////
 
//
 
//  Topic:
 
//
 
//////////////////////////////////////////////////////////////////////////////
 
 
 
 
 
end.
 
</source>
 

Latest revision as of 19:15, 18 June 2021

Note

Based on Free Pascal branch "fixes 3.0"

Feel free to add delete or change status.

Our trinity consist of Amiga, AROS and MorphOS.

Unfortunately, there are (still) some incompatibilities and/or some lack of consistency here and there. The idea is to have a list here that mentions them all. Layout may change, i simply had to start somewhere.

NOTE: I thought there is no use to mention the Tag, Tags, Taglist, etc. inconsistency and additional incompatibilities that this causes. We are all aware of those and will hopefully get some unity in the future

Table of units

The triforce repo introduced the usage of unit trinitypes in order to fight the type inconsistencies (at least for the new units, not the examples). The contents of trinitype will be extended as things progresses. A simple load-search-replace-save routine/program can be applied since the used types are fairly unique.

List of available units per platform:
Unit Category OS3.x AROS MorphOS Remark(s)
#agraphics graphics.library yes yes yes
ahi ahi.device yes MAG yes
ahi_sub ahi_sub.library yes no no
akeyboard keyboard.device yes test test
amarquee amarquee.library yes n/a n/a
#amigados dos.library yes yes yes
amigaguide amigaguide.library yes MAG no No use though, AROS' lib functions are not implemented
#amigalib amigalib yes test yes Unit amigalib has it's own status page, AmigaLib
amigaprinter printer.device yes test test
aroslib aros.library n/a yes n/a
#asl asl.library yes yes yes
audio audio.device yes MAG no
bootblock bootblock.device yes no no
bullet bullet.library yes no no
cd cd.device yes no no
clipboard clipboard.device yes yes yes
colorwheel colorwheel.gadget yes no no
#commodities commodities.library yes test test
configregs see expansion yes test test
configvars see expansion yes test test
console console.device yes test test
conunit console.device yes test test
cgxvideo no no yes Recently added to MorphOS by Chain-Q
cybergraphics cybergraphics.library yes yes yes Recently added to MorphOS by Chain-Q
datatypes datatypes.library yes test yes Unit source (AROS) is still a bit of a mess. Amiga version needs an overhaul (no PObject_ being used where it should -> concerns most if not all of declared functions).
diskfont diskfont.library yes yes test A diskfont unit was added to MorphOS by Chain-Q
#exec exec.library yes yes yes MorphOS: noticed some things missing in comparison to SDK 3.9 (this is meant as a reminder to verify this unit)
#expansion expansion.library yes test test
expansionbase see expansion yes test test
#gadtools gadtools.library yes yes test
gameport gameport.device yes no no
get9 ? n/a n/a yes silly MorphOS-only historic .library, Pascal interface unit exist as a joke, ignore this :)
gradientslider gradientslider.gadget yes no no
gtlayout gtlayout.library yes no no
guigfx guigfx.library yes no no
hardblocks hardblocks.device yes no no
hardware hardware.resource yes yes yes
icon icon.library yes yes test
identify identify.lbrary yes no no
iffparse iffparse.library yes yes yes
input input.device yes test test
inputevent see input.device yes yes yes
#intuition intuition.library yes yes yes
#keymap keymap.library yes yes yes
kvm ? n/a n/a n/a This unit is now dropped. It was a helper unit for the KVM stuff, but it's no longer used, and it doesn't provide any other useful functionality. It's "API" was never meant for public use either. The idea was, mouse unit could be used w/o the video and keyboard, and doesn't depend on each other. But it doesn't really matter any more. I removed it from trunk.
layers layers.library yes yes yes
locale locale.library yes test test
lowlevel lowlevel.library yes MAG no
lucyplay lucyplay.library yes no no
mui mui.library (ZUNE) yes yes yes
muihelper see mui.library no no yes MUIHelper contains some Pascal syntax-sugar and helpers for writing MUI code. It can be moved to ami-extra Package when it's verified it works everywhere.
mysticview mysticview.library yes no no
nonvolatile nonvolatile.library yes no no
parallel parallel.device yes no no
picasso96api picasso library yes n/a n/a MorphOS and AROS don't have Picasso96 support.
preferences preferences.library yes n/a no
prefs see preferences yes test test
prtbase printer.device yes no no
prtgfx ? yes no no
ptreplay ptreplay.library yes MAG no
realtime realtime.library yes no no
render render.library yes no no
reqtools reqtools.library yes no no
#rexx rexxsyslib.library yes test test
romboot_base yes no no
scsidisk scscidisk.device yes no no
serial serial.device yes no no
tapedeck tapedeck.gadget yes no no
timer timer.device yes yes yes
tinygl tinygl library n/a n/a yes TinyGL is MorphOS specific and the unit there is only used to get the OpenGL package of FPC running.
trackdisk trackdisk.device yes no no
translator translator.library yes no no
triton triton.library yes no no
tritonmacros macros for triton yes no no
ttengine ttengine.library yes MAG no
utility utility.library yes yes yes
#workbench workbench.library yes yes test
xadmaster xadmaster.library yes MAG no
zlib zlib.library yes no no
amigautils amigautils yes no no Should be moved to ami-extra when it's verified it works elsewhere and contains no deprecated code.
amsgbox msgbox using easyasl yes no no Should be moved to ami-extra when it's verified it works elsewhere and contains no deprecated code.
consoleio crt using console yes no no
deadkeys console deadkeys yes no no
doublebuffer yes no no
easyasl easyasl.library yes no no
hisoft yes no no Should be moved to ami-extra when it's verified it works elsewhere and contains no deprecated code.
linklist yes no no Should be moved to ami-extra when it's verified it works elsewhere and contains no deprecated code.
longarray yes yes no
pastoc yes no no This is deprecated, and must *not* be ported to other platforms.
pcq yes no no Should be moved to ami-extra when it's verified it works elsewhere and contains no deprecated code.
systemvartags yes no no NOTE: this unit cannot be used when trying to create executables to be run on AROS-m68k because AROS misses bullet.library.
tagsarray yes yes no Tagsarray implementation is not thread safe, at least on classic.
timerutils yes no no Should be moved to ami-extra when it's verified it works elsewhere.
vartags yes no no
wbargs yes no no

List of issues

agraphics

  • record: Isrvstr
AROS: Missing
  • var: GfxBase fixed in r49515
AROS: type is PGfxBase
Amiga: type is PLibrary
MorphOS: type is Pointer
Note: According to rkrm it should be PGfxBase

amigados

  • function: DOSRename() fixed in r49515
aros: function DOSRename(const OldName: STRPTR; const NewName: STRPTR): LongInt; syscall AOS_DOSBase 13;
os4: function DosRename(const OldName: STRPTR; const NewName: STRPTR): LongBool; syscall IDos 108;
os3: FUNCTION DOSRename(const oldName : pCHAR location 'd1';const newName : pCHAR location 'd2') : LongBool; syscall _DOSBase 078;
mos: function dosRename(oldName: PChar location 'd1'; newName: PChar location 'd2'): LongInt; SysCall MOS_DOSBase 78;
remark: PChar vs STRPTR (should be STRPTR) and LongInt vs LongBool (should be BOOL)
  • function: Examine() fixed in r49515
aros: function Examine(Lock: BPTR; FileInfoBlock: PFileInfoBlock): LongInt; syscall AOS_DOSBase 17;
os4: function Examine(Lock: BPTR; FileInfoBlock: PFileInfoBlock): LongBool; syscall IDos 124;
os3: FUNCTION Examine(lock: BPTR location 'd1'; fileInfoBlock: pFileInfoBlock location 'd2'): LongBool; syscall _DOSBase 102;
mos: function Examine(lock: BPTR location 'd1'; fileInfoBlock: PFileInfoBlock location 'd2'): LongInt; SysCall MOS_DOSBase 102;
remark: LongInt vs LongBool (should be BOOL)
  • function: Execute() fixed in r49515
aros: function Execute(const String_: STRPTR; Input: BPTR; Output: BPTR): LongInt; syscall AOS_DOSBase 37;
os4: function Execute(const String_: STRPTR; File_: BPTR; File2: BPTR): LongBool; syscall IDos 204;
os3: FUNCTION Execute(const string_ : pCHAR location 'd1'; file_ : LONGINT location 'd2'; file2 : LONGINT location 'd3') : LongBool; syscall _DOSBase 222;
mos: function Execute(string1: PChar location 'd1'; file1 : BPTR location 'd2'; file2 : BPTR location 'd3'): LongBool;
remark: PChar vs STRPTR (should be STRPTR), BPTR vs LONGINT (should be BPTR) and LongInt vs LongBool (should be BOOL)
  • function: ExNext() fixed in r49515
aros: function ExNext(Lock: BPTR; FileInfoBlock: PFileInfoBlock): LongInt; syscall AOS_DOSBase 18;
os4: function ExNext(Lock: BPTR; FileInfoBlock: PFileInfoBlock): LongBool; syscall IDos 128;
os3: FUNCTION ExNext(lock: BPTR location 'd1'; fileInfoBlock: pFileInfoBlock location 'd2'): LongBool; syscall _DOSBase 108;
mos: function ExNext(lock: BPTR location 'd1'; fileInfoBlock: PFileInfoBlock location 'd2'): LongInt; SysCall MOS_DOSBase 108;
remark: LongInt vs LongBool (should be BOOL)

amigalib

  • function: CreatePort()
Missing for AROS and MorphOS
  • function: DeletePort()
Missing for AROS and MorphOS
  • function: CreateExtIO()
Missing for AROS and MorphOS
  • function: DeleteExtIO()
Missing for AROS and MorphOS
  • function: DoMethod()
Amiga version seems missing completely.
Implemented versions for AROS and MorphOS don't follow autodocs 100% and are inconsistent.
  • function: CoerceMethod()
MorphOS version seems missing completely (including CoerceMethodA().
Amiga version has CoerceMethodA() implemented but no CoerceMethod()
Implemented versions for AROS and Amiga don't follow autodocs 100% and are inconsistent.


asl

AROS' implementation of asl uses 'modern' function names, ending with or without an A depending whether it's a varargs version or not. Amiga and MorphOS implementations uses 'old-style' naming scheme as dictated by classic autodocs. In order to 'fix' this, unit trinity re-declares asl functions using the 'old-style' naming scheme (it was the quickest fix).

exec

  • structure: Hook
AROS version, entries are not IPTR rather APTR. Amiga version uses ULONG's for h_entry and h_subentry, but that doesn't comply on 64-bit. AROS version can be found here.
Remark: In case it's compatibility holding back the change, i'm willing to create a multiplatform advanced record solution
  • function: NewCreateTask() fixed in r49516
AROS: missing.
Note: Most probably introduced when v0-on-trunk became v0.
  • function: AVL_FindNextNodeByKey() fixed in r49516
AROS: Missing of 3th parameter 'comparefunction'
AROS sdk: struct AVLNode *AVL_FindNextNodeByKey(const struct AVLNode *node, AVLKey key, AVLKEYCOMP func) (A0, A1, A2)
  • function: AVL_FindPrevNodeByKey() fixed in r49516
AROS: Missing of 3th parameter 'comparefunction'
AROS sdk: struct AVLNode *AVL_FindPrevNodeByKey(const struct AVLNode *root, AVLKey key, AVLKEYCOMP func) (A0, A1, A2)
  • function: AVL_FindNode() fixed in r49516
AROS: 3th parameter Func is declared as type PAVLNODECOMP. Should be PAVLKEYCOMP.
  • function: AVL_RemNodeByKey() fixed in r49516
AROS: 3th parameter Func is declared as type PAVLNODECOMP. Should be PAVLKEYCOMP.

commodities

expansion

(see also other expansion support units)

  • syscall routine: ReadExpansionRom
Amiga: declared as procedure. autodocs are inconsistent (both procedure and function are being mentioned). AROS (also 68k) tells it is indeed a function and returning a bool.
  • syscall routine: ConfigBoard()
Amiga: declared as procedure. autodocs are inconsistent (both procedure and function are being mentioned). AROS (also 68k) tells it is indeed a function and returning a bool.

gadtools

  • unit: gadtools
MorphOS: unit missing Available in fpc-triforce repo (for link see unit table). Waiting for testing/approval.
  • varargs function: CreateGadget()
AROS: missing
  • varargs function: CreateMenus()
AROS: missing
  • varargs function: DrawBevelBox()
AROS: missing
  • varargs function: GetVisualInfo()
AROS: missing
  • varargs function: GT_GetGadgetAttrs()
AROS: missing
  • varargs function: GT_SetGadgetAttrs()
AROS: missing
  • varargs function: LayoutMenuItems()
AROS: missing
  • varargs function: LayoutMenus()
AROS: missing
  • function: CreateContext()
Amiga SDK: struct Gadget *CreateContext(struct Gadget **);
AROS SDK: struct Gadget *CreateContext(struct Gadget **glistpointer) (A0)
Amiga: FUNCTION CreateContext(glistptr : pGadget location 'a0'): pGadget; syscall GadToolsBase 114;
AROS: function CreateContext(GListPtr: PGadget): PGadget; syscall GadToolsBase 19;
Note: glistpointer is a pointer to a pointer

intuition

keymap

rexx

workbench

uncategorized

Fixed in triforce

Additional units, added to triforce repo. Note that all issues listed above are already addressed with using unit trinity.

  • unit: akeyboard
AROS: missing | fixed in triforce[1]
MorphOS: missing | fixed in triforce[2]
  • unit: diskfont
MorphOS: missing | fixed in triforce[3]
  • unit: prefs
AROS: missing | fixed in triforce[4]
MorphOS: missing | fixed in triforce[5]
  • unit: AmigaPrinter
AROS: missing | fixed in triforce[6]
MorphOS: missing | fixed in triforce[7]
  • unit: Datatypes
AROS: missing | fixed in triforce[8]
  • unit: input
AROS: missing | fixed in triforce[9]
MorphOS: missing | fixed in triforce[10]
  • unit: workbench
MorphOS: missing | fixed in triforce[11]
  • unit: icon
MorphOS: missing | fixed in triforce[12]
  • unit: locale
AROS: missing | fixed in triforce[13]
MorphOS: missing | fixed in triforce[14]
  • unit: gadtools
MorphOS: missing | fixed in triforce[15]
  • unit: commodities
AROS: missing | fixed in triforce[16]
MorphOS: missing | fixed in triforce[17]
  • unit: configregs
AROS: missing | fixed in triforce[18]
MorphOS: missing | fixed in triforce[19]
  • unit: configvars
AROS: missing | fixed in triforce[20]
MorphOS: missing | fixed in triforce[21]
  • unit: configregs
AROS: missing | fixed in triforce[22]
MorphOS: missing | fixed in triforce[23]
  • unit: expansionbase
AROS: missing | fixed in triforce[24]
MorphOS: missing | fixed in triforce[25]
  • unit: expansion
AROS: missing | fixed in triforce[26]
MorphOS: missing | fixed in triforce[27]
  • unit: rexx
AROS: missing | fixed in triforce[28]
MorphOS: missing | fixed in triforce[29]
  • unit: aroslib
AROS: added to triforce[30]

Fixed in current trunk

  • unit: systemvartags [31]
This utility unit is Amiga specific and implements most if not all vartags versions of library-calls rendering it incompatible with AROS and MorphOS
  • function: AddAppIconA() [32]
Autodocs: struct AppIcon *AddAppIconA(ULONG, ULONG, char *, struct MsgPort *, BPTR, struct DiskObject *, struct TagItem *);
Amiga: FUNCTION AddAppIconA(id : ULONG location 'd0'; userdata : ULONG location 'd1'; text_ : pCHAR location 'a0'; msgport : pMsgPort location 'a1'; lock : pFileLock location 'a2'; diskobj : pDiskObject location 'a3'; const taglist : pTagItem location 'a4') : pAppIcon; syscall WorkbenchBase 060;
Note: lock parameter is of type BPTR not pFileLock
  • varargs function: AddAppIcon() [33]
Amiga: Missing
  • function: DeleteArgstring() [34]
Amiga SDK: VOID DeleteArgstring(UBYTE* argstring:A0)
Amiga: procedure DeleteArgstring(argstring: PChar location 'd0'); syscall RexxSysBase 132;
Note: d0 as location ?
  • function: MapANSI() [35]
Amiga SDK: LONG MapANSI( STRPTR, LONG, STRPTR, LONG, struct KeyMap * );
MorphOS: function MapANSI(CONST strg : pSHORTINT location 'a0'; count : longint location 'd0'; buffer : pSHORTINT location 'a1'; length : longint location 'd1'; CONST keyMap : pKeyMap location 'a2') : longint; SysCall KeymapBase 048;
Note: PShortInt vs STRPTR for buffer/strg argument
  • function: MapRawKey() [36]
Amiga SDK: WORD MapRawKey( struct InputEvent *, STRPTR, WORD, struct Keymap * );
MorphOS: function MapRawKey(CONST event : pInputEvent location 'a0'; buffer : pSHORTINT location 'a1'; length : longint location 'd1'; CONST keyMap : pKeyMap location 'a2') : INTEGER; SysCall KeymapBase 042;
Note: PShortInt vs STRPTR for buffer argument
  • function: SetPointer() [37]
Amiga SDK: SetPointer( Window, Pointer, Height, Width, XOffset, YOffset )
AROS SDK: void SetPointer(struct Window * window, const UWORD* pointer, LONG height, LONG width, LONG xOffset, LONG yOffset );
MorphOS SDK: VOID SetPointer( struct Window *window, UWORD *pointer, LONG height, LONG width, LONG xOffset, LONG yOffset );
Amiga: PROCEDURE SetPointer(window : pWindow location 'a0'; pointer_ : pword location 'a1'; height : LONGINT location 'd0'; width : LONGINT location 'd1'; xOffset : LONGINT location 'd2'; yOffset : LONGINT location 'd3'); syscall _IntuitionBase 270;
AROS: procedure SetPointer(Window: PWindow; Pointer_: PWord; Height: LongInt; Width: LongInt; XOffset: LongInt; YOffset: LongInt); syscall IntuitionBase 45;
MorphOS: procedure SetPointer(window : pWindow location 'a0'; VAR pointer : Word location 'a1'; height : LongInt location 'd0'; width : LongInt location 'd1'; xOffset : LongInt location 'd2'; yOffset : LongInt location 'd3'); SysCall IntuitionBase 270;
Note: Using a var for pointerdata seems a bad idea. If must, then please provide both options.
  • structure: TExpansionControl() [38]
Amiga: field ec_Reserved11 is currently advertised with name ec_Z3_HighBase
Autodocs: "typedef ULONG Tag;"
Amiga: "Type Tag = LongInt;"
  • record field: ti_Data of record tTagItem [40]
Autodocs: "ULONG ti_Data;"
Amiga: "ti_Data : LongInt;"
  • function: ASLRequestTags() [41]
AROS implementation seems missing. [42]
Amiga implements it in utility unit systemvartags (see also unit: systemvartags)
MorphOS implements it in unit ASL
  • function: AslRequest() [43]
autodocs: BOOL AslRequest( APTR,struct TagItem * );
Amiga: FUNCTION AslRequest(requester : POINTER location 'a0'; tagList : pTagItem location 'a1') : LongInt; syscall AslBase 060;
AROS: function AslRequest(Requester: Pointer; const Tags: array of const): LongBool;
MorphOS: function AslRequest(requester: Pointer location 'a0'; tagList : pTagItem location 'a1'): LongBool; SysCall AslBase 060;
  • function: RequestFile() [44]
Autodocs: BOOL RequestFile(struct FileRequester *);
Amiga: FUNCTION RequestFile(fileReq : pFileRequester location 'a0') : LongInt; syscall AslBase 042;
Remark: Here the boolean return type is allowed (as is used on the other platforms)
  • function: AslRequest() [45]
Autodocs: BOOL AslRequest(APTR,struct TagItem *);
Amiga: FUNCTION AslRequest(requester: POINTER location 'a0'; tagList: pTagItem location 'a1'): LongInt; syscall AslBase 060;
Remark: Here the boolean return type is allowed (as is used on the other platforms)


  • function: BltClear() [46]
Amiga: PROCEDURE BltClear(memBlock : pCHAR location 'a1'; byteCount : ULONG location 'd0'; flags : ULONG location 'd1'); syscall GfxBase 300;
AROS: procedure BltClear(MemBlock: Pointer; ByteCount: LongWord; Flags: LongWord); syscall GfxBase 50; deprecated;
MorphOS: procedure BltClear(memBlock : pCHAR location 'a1'; byteCount : CARDINAL location 'd0'; flags : CARDINAL location 'd1'); SysCall GfxBase 300;
Note: Parameter MemBlock should really be a generic pointer.
  • function: VideoControl() [47]
Amiga: FUNCTION VideoControl(colorMap : pColorMap location 'a0'; tagarray : pTagItem location 'a1') : LongBool; syscall GfxBase 708;
AROS: function VideoControl(Cm: PColorMap; Tags: PTagItem): LongWord; syscall GfxBase 118; unimplemented;
MorphOS: function VideoControl(colorMap : pColorMap location 'a0'; tagarray : pTagItem location 'a1') : LongBool; SysCall GfxBase 708;
Note: suggest to use LongBool as return-type.
  • function: LoadRGB4() [48]
Amiga: PROCEDURE LoadRGB4(vp : pViewPort location 'a0';const colors : pWord location 'a1'; count : LONGINT location 'd0'); syscall GfxBase 192;
AROS: procedure LoadRGB4(Vp: PViewPort; Colors: PWord; Count: LongInt); syscall GfxBase 32;
MorphOS: procedure LoadRGB4(vp : pViewPort location 'a0'; VAR colors : Integer location 'a1'; count : LongInt location 'd0'); SysCall GfxBase 192;
Note: This time MorphOS is the odd one out using var for colour parameter.


  • function: GetAttr() fixed in trunk [49]
MorphOS uses a var for parameter Return-Value while Amiga + AROS uses a pointer. Autodocs states it to be a pointer.
  • function: AllocMem() (high priority) Fixed in trunk [50]
MorphOS implemented it as ExecAllocMem
Amiga + AROS version have this function declared as AllocMem(), which is ambiguous with Free Pascal's AllocMem function.
  • function: Info() fixed in trunk [51]
AutoDocs: BOOL = Info( BPTR, struct InfoData * )
Amiga declaration: FUNCTION Info(lock : LONGINT location 'd1'; parameterBlock : pInfoData location 'd2') : LongBool; syscall _DOSBase 114;
AROS declaration: function Info(Lock: BPTR; ParameterBlock: PInfoData): LongInt; syscall AOS_DOSBase 19;
MorphOS declaration: function Info(lock : LongInt location 'd1'; parameterBlock: PInfoData location 'd2'): LongInt; SysCall MOS_DOSBase 114;
  • macros: All MUI macros fixed in trunk [52]
Amiga: The OBJ_xxx() macros are not implemented as macro's at all, rather as a cast to a particular structure in order to obtain information -> that is totally completely wickedly wrong.
MorphOS: See Amiga.
  • Constants: MUIX_R, MUIX_C, MUIX_L, MUIX_N, MUIX_B, MUIX_I, MUIX_U, MUIX_PT and MUIX_PH fixed in trunk [53]
AMIGA + AROS: these MUI constants uses c-language escape code characters, which won't work for Free Pascal.
MorphOS: declared them as they should.
  • function: NextTagItem() fixed in trunk [54]
autodocs: struct TagItem *NextTagItem(struct TagItem **);
Amiga: function NextTagItem(Item : ppTagItem location 'a0') : pTagItem; syscall _UtilityBase 048;
AROS: function NextTagItem(var Item: PTagItem): PTagItem; syscall AOS_UtilityBase 8;
MorphOS: function NextTagItem(tagListPtr: pPTagItem location 'a0'): PTagItem; SysCall MOS_UtilityBase 048;
  • function: ReadPixelArray8() fixed in [55]
autodocs: LONG ReadPixelArray8(struct RastPort *, UWORD, UWORD, UWORD, UWORD, UBYTE *, struct RastPort *);
Amiga: FUNCTION ReadPixelArray8(rp: pRastPort location 'a0'; xstart: ULONG location 'd0'; ystart: ULONG location 'd1'; xstop: ULONG location 'd2'; ystop: ULONG location 'd3'; array_: pointer location 'a2'; temprp: pRastPort location 'a1'): LONGINT; syscall GfxBase 780;
AROS: function ReadPixelArray8(Rp: PRastPort; xStart, yStart, xStop, yStop: LongWord; Array_: PByte; TempRp: PRastPort): LongInt; syscall GfxBase 130;
MorphOS: function ReadPixelArray8(rp: pRastPort location 'a0'; xstart: CARDINAL location 'd0'; ystart: CARDINAL location 'd1'; xstop: CARDINAL location 'd2'; ystop: CARDINAL location 'd3'; array1: pCHAR location 'a2'; temprp: pRastPort location 'a1'): LongInt; SysCall GfxBase 780;
Remark: PChar for pointing to Array data ?
  • function: WritePixelArray8()
See: ReadPixelArray8()
  • function: PolyDraw() fixed in trunk [56]
Autodocs: void PolyDraw( struct RastPort *, WORD, WORD * );
Amiga: PROCEDURE PolyDraw(rp : pRastPort location 'a1'; count : LONGINT location 'd0';const polyTable : pLongint location 'a0'); syscall GfxBase 336;
AROS: procedure PolyDraw(Rp: PRastPort; Count: LongInt; PolyTable: PSmallInt); syscall GfxBase 56;
MorphOS: procedure PolyDraw(rp : pRastPort location 'a1'; count : LongInt location 'd0'; VAR polyTable : INTEGER location 'a0'); SysCall GfxBase 336;
Remark: MorphOS' use of var for argument polyTable is imho just plain weird and also dictates the array to consist out of integers. Amiga version dictates using LongInt for the PolyTable array.
  • type: PPObject_ fixed in trunk[57]
Missing for Amiga and MorphOS
  • function: TextLength() fixed in trunk[58]
MorphOS: types the string parameter as pShortInt. Autodocs/Amiga/AROS uses type STRPTR.
  • function: Text() fixed in trunk[59]
MorphOS: still called Text() while Amiga and AROS named it GfxText(). Also the string parameter for MorphOS is declared as pShortInt. Autodocs/Amiga/AROS uses type STRPTR.
  • const: ACTION_READ fixed in trunk[60]
MorphOS: Defines this constant as 'R', which is incompatible with TDOSPacket.dp_Type (LONG)
Remark: Amiga + AROS defines this constant as ACTION_READ = $52; // 'R'
  • const: ACTION_WRITE fixed in trunk[61]
MorphOS: Defines this constant as 'W', which is incompatible with TDOSPacket.dp_Type (LONG)
Remark: Amiga + AROS defines this constant as ACTION_WRITE = $57; // 'W'
  • Function: ReadArgs() fixed in trunk[62]
autodocs: struct RDArgs * ReadArgs(STRPTR, LONG *, struct RDArgs *)
Amiga: FUNCTION ReadArgs(const arg_template : pCHAR location 'd1'; arra : pLONGINT location 'd2'; args : pRDArgs location 'd3') : pRDArgs; syscall _DOSBase 798;
AROS: function ReadArgs(const Template: STRPTR; var Array_: IPTR; RdArgs: PRDArgs): PRDArgs; syscall AOS_DOSBase 133;
MorphOS: function ReadArgs(arg_template: PChar location 'd1'; var array1: LongInt location 'd2'; args: PRDArgs location 'd3'): PRDArgs; SysCall MOS_DOSBase 798;
Remark: using var for Array_ parameter is ok, but restricts when attempting to pass f.i. a record structure. Why not declare both variants in such cases ?
  • macro: RASSIZE() fixed in trunk[63]
Amiga: missing
MorphOS: missing
  • Const: MIDDLEUP fixed in trunk[64]
Amiga: Missing
MorphOS: Missing
  • Const: MIDDLEDOWN fixed in trunk[65]
Amiga: Missing
MorphOS: Missing
  • unit: diskfont fixed in triforce[66], fixed in trunk[67]
MorphOS: missing
  • unit: CyberGraphics fixed in trunk[68]
MorphOS: Missing
  • function: ObtainBestPen() fixed in trunk[69]
MorphOS: Missing
  • macro: DrawCircle fixed in trunk[70]
Amiga: missing
MorphOS: missing
  • varargs function: BestModeID() fixed in trunk[71]
MorphOS: missing
  • function: AllocDosObjectTags() fixed in trunk[72]
MorphOS: Function missing.
  • function FPuts() fixed in trunk[73]
Autodocs: LONG FPuts(BPTR, STRPTR)
Amiga1: FUNCTION FPuts(fh : LONGINT location 'd1';const str : pCHAR location 'd2') : LongBool; syscall _DOSBase 342;
Amiga2: FUNCTION FPuts(fh : LONGINT;const str : string) : BOOLEAN;
AROS: function FPuts(File_: BPTR; const String_: STRPTR): LongInt; syscall AOS_DOSBase 57;
MorphOS: function FPuts(fh : LongInt location 'd1'; str: PChar location 'd2'): LongInt; SysCall MOS_DOSBase 342;
Remark: note the use of different return-types as well as not using BPTR for filehandle type.
Note: returns zero on success, -1 if an error occurs, so please forget using a boolean return type.
  • function: VFPrintf() fixed in trunk[74]
AutoDocs: LONG = VFPrintf(BPTR, STRPTR, LONG *)
Amiga declaration: FUNCTION VFPrintf(fh : LONGINT location 'd1';const format : pCHAR location 'd2';const argarray : POINTER location 'd3') : LONGINT; syscall _DOSBase 354;
AROS declaration: function VFPrintf(Fh: BPTR; const format: STRPTR; const ArgArray: PLongInt): LongInt; syscall AOS_DOSBase 59;
MorphOS declaration: function VFPrintf(fh : LongInt location 'd1'; format: PChar location 'd2'; argarray: Pointer location 'd3'): LongInt; SysCall MOS_DOSBase 354;
NOTE: the generic pointer declaration prevents using "VFPrintf(nil/0, 'text', vargs );" where vargs = array of long.
Remark: AFAIK for AROS it is theoretically possible to pass 64-bit formatted values.
  • function: SetAttrs() fixed in trunk[75]
Amiga + MorphOS implementations seems missing
  • function: SetGadgetAttrs() fixed in trunk[76]
MorphOS version seems missing
  • function: EasyRequest() fixed in trunk[77]
Amiga: Missing
AROS: version with no array of const is missing -> forced to use [TAG_END, 0] <- extra 0 required for AROS due to small issue
MorphOS: Missing
  • field: dri_pens of structure tDrawInfo fixed in trunk[78]
Autodocs: UWORD *dri_Pens; /* pointer to pen array */
Amiga: dri_Pens : Pointer; { pointer to pen array }
AROS: dri_Pens : PWord; // pointer to pen array
MorphOS: dri_Pens : Pointer; { pointer to pen array }
Remark: afaik the pen array is an array of word (for all platforms), so the only really practical type for dri_pens would then be a Pointer to an unsigned word
  • varargs function: SetWindowPointer() fixed in trunk[79]
Amiga: Seems missing
MorphOS: Seems missing
  • function: CloseScreen() fixed in trunk[80]
Amiga: Amiga declaration is still pre v36 (procedure), and does not return a boolean value (function) on success/failure which is the case on v36+ systems.
  • structure: TWindow field WScreen fixed in trunk[81]
Autodocs: struct Screen *WScreen;
Amiga: WScreen : Pointer;
AROS: WScreen : PScreen;
MorphOS: WScreen : Pointer;
Status: Needs complete rewrite of intuition unit
  • type: TDateTime fixed in trunk[82]
Amiga + AROS: declares this structure (and accompanied pointer) as TDateTime,
MorphOS: declares this structure _TDateTime and accompanied pointer _PDateTime
Remark: TDateTime declared in AmigaDOS conflicts with Free Pascal's declared TDateTime structure.
  • function: DateToStr() fixed in trunk[83]
All: This function conflicts with Free Pascal own DateToStr function. Renamed to DOSSateToStr (and StrToDate to DOSStrToDate)
  • record TmemChunk fixed in trunk[84]
MorphOS: the field names right now are nc_Next and nc_Bytes -> should read mc_Next and mc_Bytes
  • vararg function: SystemTags() fixed in trunk[85]
MorphOS: missing.
  • record: TNewBroker (was already) fixed in trunk[86]
Amiga: This structure seems aligned wrongly.
Note1: Packrecords c failed, packrecords 2 seems to work, but its influence on other record structure (InputXpression) was not tested (it uses two bytes as first entry in its structure).
Note2: Amiga and morphos sdk seems to use pragmapack #2, so also for the second structure.
  • function CxBroker() fixed in trunk[87]
AutoDocs: CxObj *CxBroker(struct NewBroker *,LONG *);
Amiga: 238 FUNCTION CxBroker(nb : pNewBroker location 'a0'; error : pCxObj location 'd0') : pCxObj; syscall CxBase 036;
Note: according to autodocs, error is a pointer to a generic LONG, not pCxObj;
  • function CreateCxObj() fixed in trunk[88]
AutoDocs: co = CreateCxObj(type,arg1,arg2); D0 = D0 A0 A1
Amiga: 237 FUNCTION CreateCxObj(typ : ULONG location 'd0'; arg1 : LONGINT location 'a1'; arg2 : LONGINT location 'a2') : pCxObj; syscall CxBase 030;
Note: notice different use of address registers. I have not faintest idea why they don't match. Maybe there's a valid reason ? (although aros and mos also uses same registers as stated by autodocs).
  • function: WriteStr() fixed in trunk[89]
On MorphOS this function seems declared as Amiga-function, which clashes with Free Pascal build-in function WriteStr. Strange as WriteStr seems only declared as dos/stdio.h macro.
  • function: ChangeSprite() fixed in trunk[90]
Amiga: PROCEDURE ChangeSprite(vp : pViewPort location 'a0'; sprite : pSimpleSprite location 'a1'; newData : pWORD location 'a2'); syscall GfxBase 420;
AROS: procedure ChangeSprite(Vp: PViewPort; s: PSimpleSprite; NewData: Pointer); syscall GfxBase 70; unimplemented;
MorphOS: procedure ChangeSprite(vp : pViewPort location 'a0'; sprite : pSimpleSprite location 'a1'; VAR newData : Integer location 'a2'); SysCall GfxBase 420;
Note: MOS version uses var for sprite data parameter. Should be opaque pointer type (perhaps also for amiga ?)


Some of your finest

  • AslRequest()
 {$IFDEF AMIGA}
 if (AslRequest(fr, nil) <> 0) then
 {$ENDIF}
 {$IFDEF AROS}
 if (AslRequestA(fr, nil)) then
 {$ENDIF}
 {$IFDEF MORPHOS}
 if (AslRequest(fr, nil)) then
 {$ENDIF}
 begin
  // Could we now please check what the requester returned ?
 end;


Hardening trinity

In order to circumvent some of the inconsistencies and incompatibilities, there was need for a solution without tempering with the RTL and/or default support units.

That's were unit trinity comes into play, which solves some of the encountered issues (the unit itself is a work in progress). It provides the user with a way to solve things and let sources compile without too much hassle/workarounds.

The latest version of unit trinity is kindly provided by Magorium and can be found here.