AmigaLib

From Freepascal Amiga wiki
Revision as of 20:15, 14 January 2016 by Molly (talk | contribs) (→‎AmigaLib Table: start adding entries)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Introduction

Unit amigalib is a unit that has its origin in Classic Amiga amiga_lib headers.


The Problem

Functions declared inside unit AmigaLib are primarily dictated by their c counter part on the underlying platform (plus some additional helpful routines that we can use ?).

On Classic there are c headers for amiga_lib, on AROS there are the alib headers, while on MorphOS we have something similar also using alib headers.

As usual, none of the available c headers offer any kind of unification, making a big mess of things when attempting to transfer to Pascal. AROS alib complicate things even further because alib was heavily expanded there, overlapping most of the functions declared in classic Amiga unit sysvartags.

Since (currently) none of the available AmigaLib units contain all function implementations, there is room to toy around a little and attempting to organize the big messy pile.

In order to do so, you can find a very large table, that contains all functions declared in their c counterparts that originates from their c-headers and which theoretically all belong to unit AmigaLib. The fact that some functions are not available on all supported platforms does not really matter as much.

The goal of the table is to provide information on where the functions originate from, and be able to decide into which Pascal unit they need to end up.

Note that implementing all functions inside the same unit poses the same difficulties encountered with classic Amiga unit sysvartags. There are some questions that requires answering before able to continue with this unit (See Below).

AmigaLib Table

In the table below the left subtable contains the original c location, while the right subtable displays the pascal unit location in which the function (is) located).

List of amiga lib functions and their location/status (c/Pascal) per platform
Function OS3.x AROS MorphOS OS3.x AROS MorphOS Remark(s)
ACrypt
AddAmigaguideHost
AddAppIcon
AddAppMenuItem
AddAppWindow
AddAppWindowDropZone
AllocAslRequestTags
AllocDosObjectTags
AllocNamedObject
AllocSpriteData
AndRectRect
AddTOF
afp
ArgArrayDone
ArgArrayInit
ArgInt
ArgString
ArosInquire
arnd
AslRequestTags
asmallocpooled
asmcreatepool
asmdeletepool
asmfreepooled
BeginIO
BestCModeIDTags
BestModeID
BuildEasyRequest
CallHook
red = unimplemented
red + n/a = unimplemented, no other implementation available (e.g. no c, no pascal meaning implement from scratch).
blue = implemented, untested
purple = difficulty, discuss first
Green = implemented, tested, and having correct (pascal) location mentioned

Questions