Coded DataTypes Descriptors

This forum is for general developer support questions.
Post Reply
Belxjander
Posts: 315
Joined: Mon May 14, 2012 11:26 pm
Location: 日本千葉県松戸市 / Matsudo City, Chiba, Japan
Contact:

Coded DataTypes Descriptors

Post 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.
User avatar
thomasrapp
Posts: 318
Joined: Sun Jun 19, 2011 12:22 am

Re: Coded DataTypes Descriptors

Post 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.
User avatar
salass00
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 534
Joined: Sat Jun 18, 2011 4:12 pm
Location: Finland
Contact:

Re: Coded DataTypes Descriptors

Post 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).
User avatar
salass00
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 534
Joined: Sat Jun 18, 2011 4:12 pm
Location: Finland
Contact:

Re: Coded DataTypes Descriptors

Post 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.
Post Reply