Trinity in Trouble

From Freepascal Amiga wiki
Revision as of 22:37, 12 January 2016 by Molly (talk | contribs) (→‎agraphics: entry for record Isrvstr)
Jump to navigation Jump to search

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 no yes
amigaprinter printer.device yes test test
#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 no no
conunit console.device yes no no
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 rexx.library yes ??? no
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

amigados

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).

  • function: ASLRequestTags()
AROS implementation seems missing.
Amiga implements it in utility unit systemvartags (see also unit: systemvartags)
MorphOS implements it in unit ASL
  • function: AslRequest()
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()
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()
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)

exec

  • type: Tag
Autodocs: "typedef ULONG Tag;"
Amiga: "Type Tag = LongInt;"
  • record field: ti_Data of record tTagItem
Autodocs: "ULONG ti_Data;"
Amiga: "ti_Data : LongInt;"
  • 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

commodities

expansion

(see also other expansion support units)

  • structure: TExpansionControl()
Amiga: field ec_Reserved11 is currently advertised with name ec_Z3_HighBase
  • 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

  • function: SetPointer()
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.

workbench

  • function: AddAppIconA()
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()
Amiga: Missing


uncategorized

  • unit: systemvartags
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: WriteStr()
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.

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]

Fixed in current trunk

  • function: GetAttr() fixed in trunk [28]
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 [29]
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 [30]
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 [31]
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 [32]
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 [33]
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 [34]
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 [35]
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[36]
Missing for Amiga and MorphOS
  • function: TextLength() fixed in trunk[37]
MorphOS: types the string parameter as pShortInt. Autodocs/Amiga/AROS uses type STRPTR.
  • function: Text() fixed in trunk[38]
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[39]
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[40]
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[41]
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[42]
Amiga: missing
MorphOS: missing
  • Const: MIDDLEUP fixed in trunk[43]
Amiga: Missing
MorphOS: Missing
  • Const: MIDDLEDOWN fixed in trunk[44]
Amiga: Missing
MorphOS: Missing
  • unit: diskfont fixed in triforce[45], fixed in trunk[46]
MorphOS: missing
  • unit: CyberGraphics fixed in trunk[47]
MorphOS: Missing
  • function: ObtainBestPen() fixed in trunk[48]
MorphOS: Missing
  • macro: DrawCircle fixed in trunk[49]
Amiga: missing
MorphOS: missing
  • varargs function: BestModeID() fixed in trunk[50]
MorphOS: missing
  • function: AllocDosObjectTags() fixed in trunk[51]
MorphOS: Function missing.
  • function FPuts() fixed in trunk[52]
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[53]
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[54]
Amiga + MorphOS implementations seems missing
  • function: SetGadgetAttrs() fixed in trunk[55]
MorphOS version seems missing
  • function: EasyRequest() fixed in trunk[56]
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[57]
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[58]
Amiga: Seems missing
MorphOS: Seems missing
  • function: CloseScreen() fixed in trunk[59]
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[60]
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[61]
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[62]
All: This function conflicts with Free Pascal own DateToStr function. Renamed to DOSSateToStr (and StrToDate to DOSStrToDate)
  • record TmemChunk fixed in trunk[63]
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[64]
MorphOS: missing.
  • record: TNewBroker (was already) fixed in trunk[65]
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[66]
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[67]
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).

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.