Archives on September, 2013

Freepascal Threading

Posted by ALB42 on 22. September 2013No Comments

A new Release of FPC for AROS is out today.
The only new thing is:

* Support for Threads (using TThread class)

Thanks to Mag, he supplied some example codes and the library wrapper unit in the FPC-AROS Wiki.
So my interrest was awaked and I need a little break from the boring basic library rewriting and documentary work.

Implemented id the TThread Class and the Critical sections functionality, „TEvents“ are still not supported as long I dont know exactly how they are working, it seems its not directly possible to do such thing in AROS, maybe must self write a mechanism for it.

AROS Threads (with thread.library) have no chance to suspend/kill from outside and so on.
The suspend I managed with a Mutex Condition, wich can be fired with a „resume“, but this makes it impossible to Suspend the Thread from outside. But this is not allowed at some other platforms as well, Resume and Suspend are even marked as deprecated in newer Delphi/Freepascal versions.
I known a nice replacement for Suspend is the TEvent feature which is still not available for aros… but I’m working on this until this the suspend inside the thread and resume from outside must do it.

An example for the us of threads with suspend resume and critical sections can be found in pp/fp/src/threadtest.pas inside the archive

New Release (rewritten basic units Part 1)

Posted by ALB42 on 16. September 2013No Comments

After a half month of hard work of rewrite the basic units of AROS and make the documentation, I think its time for a new Release to let the people play with it (and find errors, maybe)

So whats new:
Complete rewrite: Exec, AmigaDos, Workbench, Icon, AGraphics
Many new types and constants added. Addtional procedures/functions for variable number of tags as arguments (like known from C). One function in AGraphics is renamed from „GText“ to „GFXText“ comparable to the „DOSFlush“ in AmigaDOS Unit or „ExecInsert“ in Exec.
There are some function which are deprecated or not implemented atm, or only work on real Amigas i try to flag this functions with the right function flags (‚deprecated‘ e.g. „BltClear“, ‚platform‘ e.g. „SetChipRev“, ‚unimplemented‘ e.g. „WaitBlit“) do they should give a warning if a user use them in own code.

Documentation: Exec, AmigaDos, Icon, AGraphics
as HTML here on the Webpage or as CHM as part of the archive file pp/fp/docs/arosunits.chm. For view this files you can use the fp editor, Help->Files but it does not work very well. better is the HH.exe in Windows or the kchmviewer for linux both searchable with index and so on.

like always the download available on the FPC Page

AGraphics finished. Documentation pending

Posted by ALB42 on 8. September 2013No Comments

The AGraphics unit is finished. And all Circular type calls are solved… I’m a little Bit curious if it is possible in Intuition as well… I noticed there are much more of such problems.
Sadly, because of this change, the Structure and the corresponding Constants are now a little bit far form each other. But I think the right type is much more important, especially when nicely linked in the Docu (As I Did in AmigaOS and little bit in Exec) there is no need to look to the Source.

The FPDoc util can also create the CHM file we need as help for FP-IDE would be nice to add it as context sensitive help. Next Days I will start/continue with AGraphics Documentation. Stay tuned.

I got another idea for better convert C-structs to pascal
for example:

struct XXX
{
  Int abc;
}
#define cde abc

Such things you can find everywhere in AROS includes (because of compatibility with AOS4, MorphOS? MayBe)
There is a functionality that records can act like classes in Delphi compat mode, so this record would look like this in Pascal:

TXXX = record
  abc: Integer;
  property cde: Integer read abc write abc;
end;

Needs to be tested but should work well. The property does not mark an other field so it does not extend the records size (SizeOf should stay the same) just an other Access function is added. This also work into other records for example, maybe even some unions could be replaced with this functionality:

TTextFont = record
  tf_Message: TMessage;
  // .... more fields
  property tf_extension: PMsgPort read tf_Message.mn_ReplyPort write tf_Message.mn_ReplyPort;
end;

Working on (A)Graphics

Posted by ALB42 on 8. September 2013No Comments

Finished work at „AmigaDOS“ unit. also changed the documentation.. some of the functions are not descripted in the official reference. Can add a Description later. I’m still thinking how to „save“ the documentation source files. as archive? as seperate SVN (like fpc is doing) or add it into (but then can not add to official SVN)

Now starting with AGraphics unit. wrapper for graphics.library, there ar esome problems to solve… some cycle type uses.. but I think the most of them I can solve.

BugFix Release

Posted by ALB42 on 2. September 2013No Comments

Again a release, not much changed.
Only a small bug in FP-IDE: Copy to/from AROS only copied 256 Chars. Now it should work also with longer texts. I also will from now on always post the MD5 of the archive file.
I didn’t find a md5 tool for Aros so I wrote one (GenerateMD5) and also set it for download.
it does not compare, just give out the Hash, so you have to compare by eye. Later I will a better one which also can compare from a *.md5 file.

New Release!

Posted by ALB42 on 1. September 2013No Comments

A new Release of Freepascal for AROS is out today:
News:

  • Added function ‚GetToolTypes(Filename)‘ to „Icon“-Unit. To get fast the Tooltype entries from the icon
    of a file. Filename (without .info) must be supplied, Result is an array of string (TToolTypeArray)
  • Complete rework Exec, AmigaDos(not completely finished), Icon, Workbench
  • corrected Date in SearchRecord (FindFirst/FindNext) for example FP-IDE Dialog
  • DebugLn/Debug calls to get DebugOutput to AROS Debug Output (for example Sashimi or with hosted AROS the console it was started from)

Like always the download is available at FPC Page