Amiga-Development

Please login or register.

Login with username, password and session length
Advanced search  

News:

Created for developers of all Amiga camps

Author Topic: MUI classes and their serial numbers  (Read 3056 times)

0 Members and 1 Guest are viewing this topic.

magorium

  • Full Member
  • ***
  • Posts: 184
  • Programming is an art form that fights back
    • View Profile
MUI classes and their serial numbers
« on: December 13, 2015, 05:38:40 PM »

Hi,

For a project i'm analyzing MUI classes, and i noticed that every MUI class uses it's own serial number.

This serial number f.i. is used (using a calculation) for storing configuration options belonging to that class.

That's all swell and dandy, but is there an public list of these used serial numbers ?

I've already looked at tumult website, but that only seems to offer a list of registered classes (and also unregistered ones).

Right now, i need to download each individual sdk's and check the numbers used by the tags/methods, so i thought there had to be a better (more effective) way, presumably by a list that is maintained somewhere ?

Someone around who has an idea ?

fwiw: i'm trying to determine which class belongs to a particular hex number (used by its tags/methods).
Logged

SamuraiCrow

  • Administrator
  • Sr. Member
  • *****
  • Gender: Male
  • Posts: 372
  • Coolness is compiled
    • View Profile
Re: MUI classes and their serial numbers
« Reply #1 on: December 14, 2015, 05:27:53 PM »

Is it just a hash code?  In other words, is it fault-tolerant of collisions involving duplicate IDs?
Logged

magorium

  • Full Member
  • ***
  • Posts: 184
  • Programming is an art form that fights back
    • View Profile
Re: MUI classes and their serial numbers
« Reply #2 on: December 14, 2015, 08:34:10 PM »

hi SamuraiCrow,

Ah, no no, it is not as complicated as one might think :-)

It's actually much simpler, according to tumult (and my findings):
Quote
* Attributes and methods for the new class.

Your tags have to be named MUI(A/M)_<classname>_<foobar>. The upper sixteen bits of your tag values need to be (TAG_USER | ( <your MUI serial Nr> << 16 )) Again, classes with invalid tag specs are promised to go on the blacklist. This implies that you have to be a registered MUI user if you want to distribute public classes.

The first ID tag is used for internal purpose, so you must not use it!

Example:

If your serial number is 4711 (decimal):

          4711 = 0x1267
        tagbase: 0x9267xxxx
First usable ID: 0x92670001
           last: 0x9267ffff

That results in the following conclusions:
- There are max. 32767 unique 'serial numbers', because the user_tag ($80000000) or's off half the word.
- Each 'serial' can have max. $FFFF different tag-id's belonging to that serial number.
- Serial numbers seem to have been given out on a 'user-id/company-id' base, e.g. some registered 'users' use multiple mui classes using the same serial number (but usually there is a 'safe' distance between the tag numbers, needed for expansion).

My current problem:
Theory is all nice, but right now i have to download each and every class, look in its sources to see what 'serial' number could be determined (by looking which tag_base it uses) -> a very lengthy process and one that seems to be without an actual end. More so because not every class out there was (officially) registered.

Right now, it's a needle in a haystack trying to find the correct corresponding class when encountering a 'unknown' tag_id(-range).

All i was able to find so far was/is the mention of a (official registered or not) class-name, trying to find the latest version of that class (links are mostly outdated, authors got lost without a trace, websites down, downloads deleted, etc.), to end up hoping there are sources/headers available that reveal the tag_base (when the class is a public accessible class)

Hence my question, if there (already) is such an existing (public) list somewhere. One concerning official registered classes/user id's would be a good start /me guesses.

PS:
It just occurred to me that this might be interpreted as an illegit question. So far i always have assumed that <your mui serial> number, is/was a special crafted number that is/was issued only when a developer wanted to register his/her class  -> and not an actual MUI registration number obtained when registering MUI for end-user usage.
(it might be i am wrong about that. if you lurkers think i am wrong about that then please let me know).
« Last Edit: December 14, 2015, 08:43:39 PM by magorium »
Logged

salass00

  • Newbie
  • *
  • Gender: Male
  • Posts: 11
    • View Profile
    • A500.org
Re: MUI classes and their serial numbers
« Reply #3 on: December 18, 2015, 01:36:25 PM »

- There are max. 32767 unique 'serial numbers', because the user_tag ($80000000) or's off half the word.

Actually it would be 65535 since there is no sign bit to worry about. You can even make that 65536 if you allow (0x80000000|(serialnr << 16)|0) as a valid tag ID which technically it is.
Logged

magorium

  • Full Member
  • ***
  • Posts: 184
  • Programming is an art form that fights back
    • View Profile
Re: MUI classes and their serial numbers
« Reply #4 on: December 18, 2015, 03:09:31 PM »

Hi salass00,

uhm, now you got me all confused :-)

Maybe it would be better if i was to refine that part of my conclusion ?

"There are 32536 serials numbers that can produce a unique tagbase."

e.g.

serial number #13395 would produce tagbase $B453xxxx, but so would serial number #46163

e.g. if both serial numbers would have registered a 'public' MUI class, their tagbase would conflict ?

or did i perhaps misunderstood something there ? (i am fairly good at missing obvious hints)

edit: except for the fact that i must have been drunk: e.g. it should read 32768 instead of 32536 (no idea where that number was coming from).
« Last Edit: December 19, 2015, 12:51:45 AM by magorium »
Logged

itix

  • Newbie
  • *
  • Posts: 42
    • View Profile
Re: MUI classes and their serial numbers
« Reply #5 on: December 19, 2015, 10:04:00 PM »

- There are max. 32767 unique 'serial numbers', because the user_tag ($80000000) or's off half the word.

Actually it would be 65535 since there is no sign bit to worry about. You can even make that 65536 if you allow (0x80000000|(serialnr << 16)|0) as a valid tag ID which technically it is.

No, it is only 32767 because TAG_USER ($80000000) is required in attributes.
Logged

itix

  • Newbie
  • *
  • Posts: 42
    • View Profile
Re: MUI classes and their serial numbers
« Reply #6 on: December 19, 2015, 10:12:11 PM »

Hi,

For a project i'm analyzing MUI classes, and i noticed that every MUI class uses it's own serial number.

This serial number f.i. is used (using a calculation) for storing configuration options belonging to that class.

That's all swell and dandy, but is there an public list of these used serial numbers ?

I've already looked at tumult website, but that only seems to offer a list of registered classes (and also unregistered ones).

Right now, i need to download each individual sdk's and check the numbers used by the tags/methods, so i thought there had to be a better (more effective) way, presumably by a list that is maintained somewhere ?

Someone around who has an idea ?

fwiw: i'm trying to determine which class belongs to a particular hex number (used by its tags/methods).

The serial number is not per class but per author. For example I have obtained my own serial number I am using in my public MUI classes. Therefore you can't determine any specific class from a serial number but you can determinen the original author of this class. For example good old BetterString.mcc (now open source) is using 0xad00 that belongs to famous ex-Amiga developer Allan Odgaard but there are more classes from Odgaard using this serial.

 Yes, the list of all registered developers does exist but it is private. There is also list of registered MUI custom classes with their methods and attributes but it is not maintained anymore. In fact I think it has been out of sync since 1997 or so. This document is private, too.

Quote
serial number #13395 would produce tagbase $B453xxxx, but so would serial number #46163

e.g. if both serial numbers would have registered a 'public' MUI class, their tagbase would conflict ?

In the old days serial number in MUI classes was your MUI registration number but this changed when the MUI key system was reworked in 90s.

Quote
All i was able to find so far was/is the mention of a (official registered or not) class-name, trying to find the latest version of that class (links are mostly outdated, authors got lost without a trace, websites down, downloads deleted, etc.), to end up hoping there are sources/headers available that reveal the tag_base (when the class is a public accessible class)

Please note that private classes are often using undocumented tag ID. I recall there was given one ID for internal private classes but I can't remember it anymore.
« Last Edit: December 19, 2015, 10:32:37 PM by itix »
Logged

magorium

  • Full Member
  • ***
  • Posts: 184
  • Programming is an art form that fights back
    • View Profile
Re: MUI classes and their serial numbers
« Reply #7 on: December 20, 2015, 02:34:29 AM »

Thank you very much for your clarifications itix. they are very much appreciated.

Quote
The serial number is not per class but per author.

For example I have obtained my own serial number I am using in my public MUI classes. Therefore you can't determine any specific class from a serial number but you can determinen the original author of this class.
Ok, thank you for having that made more clear (as i already suspected that to be that case).

Quote
For example good old BetterString.mcc (now open source) is using 0xad00 that belongs to famous ex-Amiga developer Allan Odgaard but there are more classes from Odgaard using this serial.
Ah, i recognize that one, which worked as a perfect example for my research :-)

Maybe it is unwise of me to do so, but for that 'serial' i've for instance concluded that :
TextEditor, uses serial tag offset $0000 for Methods and Attributes
BetterString, uses serial tag offset $1000 for Methods and Attributes
HTMLview, uses  serial tag offset $3000 for configuration tags

So, what i've done now is that i've created a list of tag numbers and when i 'encounter' a tag, the application searches in that list to which class this particular tag number belongs (and with that, what method/attribute/other).

I am aware this is not foolproof, but at least provides some interresting (=readable) material along the way, and directly shows when a tag is not available in my 'search-list'.

The idea was to refine the misses with determining to which 'serial' the class belongs, so that i could provide myself with more information that would help finding more information about 'the unknown' (tag-ranges seems to be fairly recognizable, simply because most developers seem to prefer to use distinc numbers between tagbases for their classes/methods/atributes, be it in decimal or hexadecimal common used numbers like 100 and $100 (or 1000 and $1000 when the class has loads of tags being used).

Quote
In the old days serial number in MUI classes was your MUI registration number but this changed when the MUI key system was reworked in 90s.
Ah, i already wondered about that, thank you for the hint ;-)

Quote
Please note that private classes are often using undocumented tag ID.
Dearly noted, and indeed also encountered (also in a open sourced class -> probably obsolete).

In that regards, i have for now assumed that no conclusions can be made whatsoever with regards to private classes (although one could do some heavy duty research).

^^ which was also reason for me to at least make a list of known public classes, so that a clear distinction could be made.

Quote
Yes, the list of all registered developers does exist but it is private. There is also list of registered MUI custom classes with their methods and attributes but it is not maintained anymore. In fact I think it has been out of sync since 1997 or so. This document is private, too.
Can i conclude from that, that currently it would not be very much appreciated if such list (that i currently have/use) would find its way into the public domain ?

Reason to ask is that i'm currently working on a (unrelated) project that (eventually) is going to find its way to github, but which uses such a searchlist. In worse case scenario i could make that list user configurable, so that the project itself would not have to 'provide' a complete list.


Which more or less brings me to another question (maybe you or someone else reading this knows the answer to)

Is it currently still possible to register public mui classes ? And if so, does anyone know the responsible parties involved ?

Not that i currently want to release mui classes into public, but i was wondering if such thing would still be possible (or if there is no use for such things at all anymore these days).

Atm this question is research for an idea for a future project, and it would entail the need for customized MUI classes, that could be distributed (I am still a bit unsure if that would require those classes to be made public or not, so any hints or tips on that subject would be appreciated as most available information seems outdated).
Logged

itix

  • Newbie
  • *
  • Posts: 42
    • View Profile
Re: MUI classes and their serial numbers
« Reply #8 on: December 20, 2015, 05:24:29 PM »

Quote
Yes, the list of all registered developers does exist but it is private. There is also list of registered MUI custom classes with their methods and attributes but it is not maintained anymore. In fact I think it has been out of sync since 1997 or so. This document is private, too.
Can i conclude from that, that currently it would not be very much appreciated if such list (that i currently have/use) would find its way into the public domain ?

I dont see problem there if you publish your list into the public domain. The private list found in MUI repository is awfully out of date... those lists are extremely useful since each tag and method have unique ID it is possible to transalate each ID to tag/method name respectively. It is extremely useful for debugging.

Quote
Is it currently still possible to register public mui classes ? And if so, does anyone know the responsible parties involved ?

Yes it is. Contact Stefan Stuntzi or MorphOS developer (me, jacadcaps, kiero) to get your serial number. However, it is recommended to not obtain one until you are going to make it public.

Quote
Atm this question is research for an idea for a future project, and it would entail the need for customized MUI classes, that could be distributed (I am still a bit unsure if that would require those classes to be made public or not, so any hints or tips on that subject would be appreciated as most available information seems outdated).

The serial number is required only if you are going to create #?.mcc from it. You can still embed custom classes to your application or just distribute it as library with your own API. Generally it is preferred that only general purpose, useful classes are made public. If the class is useful in your application only then making public custom class is not recommended.
Logged

magorium

  • Full Member
  • ***
  • Posts: 184
  • Programming is an art form that fights back
    • View Profile
Re: MUI classes and their serial numbers
« Reply #9 on: December 20, 2015, 06:29:26 PM »

@itix,

Splendid, as you've been able to answer all that i wanted to know for the time being. This is very much appreciated, so thank you very much for that.

Yes, indeed. i'm currently using the tag-id recognition for debugging purposes, and the other project that's in the process to be published sheds a light on configurations/preferences files (mui prefs files being one of them).
Logged