Please login or register.

Login with username, password and session length
Advanced search  


Created for developers of all Amiga camps

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - magorium

Pages: [1]
Free Pascal / Intuition window example
« on: April 02, 2017, 09:58:34 PM »

Small example for those always wanted to see/ask how one could create a new (Free Pascal) class.

In this case it's all about a smallish wrapper for an intuition window (far from finished e.g. just there to show how one could approach things, and as such could be used as a generic way of accomplishing such task).

The example is accompanied with some explanations here and there and which can be read here and the sources can (also) be found here.

Keep coding !

PS: Please keep in mind that the original c source-code was kindly provided by Thomas Rapp.

AmigaOS 3.x Dev / Hunk symbols
« on: March 22, 2017, 01:50:18 AM »

How can i map symbols located in the symbol hunk to my (runtime) program ?

Or perhaps the better question would be (?): how do i figure out at runtime at what memory address my executable (hunk) was loaded so that i can map the relative symbol offsets to absolute offsets.

It might be i'm doing things wrong here but (available online) information seems very scarce or non existent.

Initially i was looking at pr_SegList but that seems to be a dead end or maybe i'm missing something.

Perhaps someone is able to recommend a link and/or good book title on the subject on hunks and how they relate to actual practice ?

The only usable links i was able to find/use so far is inside the OS4 wiki and this page.

The latter link does mention a function named get_hunk_address() but i fail to locate an actual implementation and also fail to come up with something of my own that works.


Free Pascal / hvl2wav c2pas translation failure
« on: February 11, 2017, 06:07:49 PM »
Since another thread already discussed the basics of C, and some 'hidden' specifics that the language confronts you with i got into a bit of a problem with regards to translating hively player to Pascal.

I've looked at my 'port' a numerous amount of times now and, i simply fail to see where i go wrong. Most probably i have interpreted that the c-code does something but in fact does something different then i was expecting. As can be read from that earlier mentioned thread, that is something i am still struggling with (even after all these years).

The wonderful results can be found here.

I would be obliged if someone with more c knowledge (and preferably a bit of Pascal as well) would be able to point me a bit into the right direction. One word of warning though as the code is a bit tedious and long winded. I've looked at the code for so long that i can't even distinguish spaces from numbers anymore  ;D

In case wondering, i used the hvl2wav sources. That way i could use the original c produced executable to generate a wav file and see what the Pascal translated code produced, compare the wav files to see if both codes produced the same -> my code goes a bit off at some of the effects (i was even unable to determine which effect(s)).

In the end i would like to add the ahi/wav back-end to be used in a player or all platforms (even though the c code can be used to do the same).


Common standards / MUI classes and their serial numbers
« on: December 13, 2015, 05:38:40 PM »

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

CheckListView - Step 0

The original question that brought us here was: "How do i make a list with items that can be 'checked' visually"

The question was asked by user tolkien in this thread, and some discussion regarding this topic have already taken place in that thread (with some already very helpful pointers/remarks from user itix).

Before even starting it would perhaps be a good idea for some announcements, so that we are all on the same page:

Some ground rules:
  • Source-code is written in (procedural) Pascal to be used with Free Pascal 3.0 or above.
  • Published sources are not always based on good coding style or use good practice. They are meant as being examples (and most likely, even bad ones). Please treat them that way.
  • All published material is presented "as is" without any warranty. I don't intentionally try to harm hardware and/or software and all examples are tested in order to check that they work as intended. Nevertheless things can work unexpected, so always keep in mind to use them at your own risk.

Regarding the revision system:
  • Examples are based on Krashan's cradle (translated into Pascal)
  • This initial cradle, is what i would call Step 0 (or revision 0). The filename of this 'cradle' will always be Krashans_Cradle(.pas).
  • In step 1 (or revision 1), Some default values from Krashan's Cradle are being updated, and the class/feature we are discussing will be introduced.
  • From there on, each new step/revision will introduce new features and/or implementations which are based on the previous step/revision. Where possible/required the new features/implementations wil be documented and/or explained.

  • Because of incompatibilities in implementation of Free Pascal for Amiga, AROS and MorphOS, all the examples steps will use a unit named "trinity". Unit trinity tries to 'solve' as much of the incompatibilities as possible. This way we don't 'clutter' the actual example sources too much.

The Free Pascal sources and available executables for Amiga (m68k/020), AROS (i386) and Morphos (PowerPC) of Krashan's cradle can be found here in this zipfile.

This zipfile also contains unit trinity that is used to 'hide' the incompatibilities amongst our three supported platforms. All the examples make use of this unit, but i thought it would be redundant to re-distribute this unit for every posted example. I'm assuming no-one is interested in compiling form source themselves (but please let me know if you do, and need help).

In case there are question, then please feel free to ask them. Just try to keep it on-topic.

(and drats, i forgot how much i dislike writing documentation and/or manuals :D )

System Development / Shell arguments, template
« on: March 29, 2014, 11:54:13 AM »

I have a question in relation to dos handling arguments, templates and that sort of thing.

Currently, i use AllocDosObject() to get myself an new RDA structure, attach some extended help and use that in a ReadArgs() call together with a nice template.

That works splendid. But while i was toiling my way through the reference material it occured to me that i never came across something related to 'hidden' arguments (or i must have overread something obvious, which tbh isn't impossible ;D ).

Because right now, whenever the program gets invoked with a questionmark it'll display the complete template.

What i would like to do is indeed display the template to the enduser, but 'hide' one of the switches that is declared in the template. Is there any recommended way of doing such thing or some documentation on how such thing could be achieved ?

Ofcourse other hints and/or tips regarding this topic are welcome :)


General Discussion / TimeWarp
« on: August 10, 2013, 01:02:40 PM »
Hi Team Chaos Leader/Admin,

Unfortunately i am unable to reply in the thread TCL created (comes with the territory of being a ordinairy peasant, i guess  ;D).

Just weanted to say that this join message is perhaps not so smart. Although i love to be called a  Chronomancer :thanks for the compliment:.

The reason for this message to have reached you, is that i had to change my e-mail address. This because i (formerly) used an e-mail provider that recently stopped working (can you guess which one ?  ;D)

I have no idea if admin can change this behaviour. I can't imagine it is desirable that we receive such message everytime a user changes its mail-address ?

Please delete this message/thread if it is inconvienent or otherwise unwanted.


User amiga was so kind enough to post about a brand new website for the TiNA project.

AROS Dev / Varargs - va_list, va_start and va_end
« on: May 06, 2013, 09:15:43 PM »

I'm trying to implement support for varargs lists (i386).

Looking through the sources of AROS i can see that type va_list and functions/macros va_start and va_end are being used all over.

However, what i fail to find is the actual implementation of this type and/or functions/macros. I surely must be overlooking things  :-[.

I already have a semi-working solution, it just fails when i supply floats. Hence my reason to want to know how exactly this is implemented.

And, are there more caveats i have to take into account when setting up a va_list in order to accommodate al AROS supported types that can be stored in such va_list ?

A link or hint to the actual implementation(s) would be very welcome.


Pages: [1]