Page 1 of 1

Coded DataTypes Descriptors

Posted: Wed Sep 11, 2013 5:37 am
by Belxjander
What is required to code for a Devs:DataTypes/Descriptor file to Identify a type of file using a coded routine...

Are they 68K code only? or is PPC code permitted?

Are the David M.Junod Documents the total sum of reference material? anything else?

Who would I register "DataTypes Descriptors" with as a central registry?
Do I simply throw the new Descriptors "into the wild" and let people have at writing the various DataType class libraries themselves?

If anyone has a few breadcrumbs or can point to an example I can work from... it would be appreciated.

Thanks in advance for your time.

Re: Coded DataTypes Descriptors

Posted: Wed Sep 11, 2013 8:46 am
by thomasrapp
I use this: http://aminet.net/dev/misc/MakeDT-1.3.lha

You can use PPC code but then it only works on OS4. If you want to use the same descriptor file on OS3 and MorphOS then you have to use 68k code.

Usually the coders of the class libraries code the descritor, too. No registration needed. A descriptor without a class is senseless. I.e. you first code the class and then the descriptor.

If you think an existing descriptor can be improved you should contact the author of the class.

Re: Coded DataTypes Descriptors

Posted: Wed Sep 11, 2013 10:03 am
by salass00
Basically on AmigaOS 4.x the entry point for your descriptor code should look like:

Code: Select all

LONG _start(struct DTHookContext *dthc);
The return value should be TRUE or FALSE depending on if it's a match or not.

Note that the descriptor code must be compiled without startup code (-nostartfiles if using gcc, -nostdlib if using vbcc).

Re: Coded DataTypes Descriptors

Posted: Wed Sep 11, 2013 10:07 am
by salass00
Belxjander wrote:Are they 68K code only? or is PPC code permitted?
AddDataTypes checks if the descriptor code is in ELF (AmigaOS 4.x) or hunk (AmigaOS <= 3.x) format and uses appropriate code in either case so both are fine.