Saturday, December 29, 2012

680x0 development enviroment on AmigaOS4.1?

Yesterday I was wondering was, is it possible to setup a 680x0 development enviroment on AmigaOS4.1, whit out depending on UAE.

And the answer is yes.

Well first I tried AsmPRO, while program seams to work, it does give me some DSI crashes some times when I start the program, it did compile my code, but when pressing “j” to run it crashed.

So AsmPRO does not work under AmigaOS4.1, I did not like the integrated text/source code editor anyway.

Next I looked at the vbcc package it has a 680x0 compiler, but it can only produce .o files, so I need vlink once found it, I wrote a tiny AmigaDOS script.

Saved it and added script flag to the file using the protect command in AmgaDOS.
Next I found a "hello world" example using google.

Compiled it, and it worked.

So what is this all about, way do I wont to write 680x0 assembler?

Well the answer to that question is, a question I have been asking my self, what if I disassembled some of old programs that don't work anymore, will I be able fix this programs up?

I have limited experience whit assembler, I did make a 3d routine in inline Assembler in BlitzBasic2 and it worked, (I did it that way because did not have the right books, when I was learning assembler.)

Saturday, December 15, 2012

Santa is working super hard to make it to christmas.

Bringing the Christmas felling to the Amiga desktop, Excalibur now running on my X1000, I might write some words about it.

It has taken allot more time then expected many of changes has resulted in having to fix new bugs, and many of previews bugs had to be fixed.

The list of changes is not short, its one of the biggest updates so it going to be called version 1.2.

* Button radius option in prefs
* Added border options for toolbar and menu 3D and XEN.
* Corrected many errors in calculations for menu.
* Background color for menu and toolbar are now individual.
* Improved rendering routines for toolbar icons
* Create_script() bug some files did not open when path was a volume.
* Fixed screen open/close notify bug. 
* Added XEN style to screens, clock and border.
* Set_screen_to_front() triggered a unnecessary refresh, bug fixed.
* Now prgram waits for singals like any normal programs does.
* Clock is now running as a subtask, and only renders when time updates,
  less CPU usage!.
* New about window is reaction, and the about event handler is running
  as a own task (bb2 legacy free.)
* CHIPMEM,FASTMEM,GFXMEM and so on, upgraded to unsigned long long int (uint64),
  should salve the negative memory problem.
* Mouse_over_clock() starts clock prefs app when clock is disabled, bug fixed.
* None initialized values in menu, can result in a crash, bug fixed.
* rendering bug when dropping icons on startbar, fixed.
* check_ext() only worked on .info files, bug fixed.
* was listed on volumes, bug fixed.
* When SYS:WBStartup is missing its created by the install script.
* Menu div can now be a transparent png image.
* menu div image can now be scaled. 

Wednesday, November 28, 2012

Multi treading in Excalibur

So what was done, the old event loop looked like this, the problem whit this code was that, the program did not wait for signals, it was busy looping due the clock that needed to be redrawn every 1secund, but I was not able to slow it down because that, will cause the events to be not read at correct time, there was a small delay of 0.1 sec in the loop.


After rewriting the code, the main event loop, waits for events before checking, it does not do anything unless something happens.

Membar is only triggered every 2 seconds, because we don't need instant update of memory, nor do we want that.

the Clock loop is only updated every 1 seconds.

Well so now Excalibur is Multicore ready, allowing Excalibur to wait on many cores at once.

Of cause it more to it then what I written her, most important is the Mutx protection.

Saturday, November 24, 2012

Dividing the code.

As it is written in the readme Excalibur was a a BlitzBasic program, typically for basic programs is that every thing is written in as one large source file, (not true for all modern basic programs).

One thing I have done for every version of Excalibur is to split the code up, I will explain it.

A typical basic program looks like this, you have every thing mixed, its complicated to find what your looking for, when every thing is mixed, and also in C there is ways you can speed up complication time by dividing the code in separate .c files.

When the content is split up it looks some thing like this:

As you can see now is easy, now is easy to find what your looking for, but when code is split up the compiler won't find what in the other files until linking. The source won't compile or the compiler will complain about incorrect declarations, to solve this problems you most create .h file that defines the functions whit in the *.c files.

This all well, blitz basic does not know about threads or task, every thing run from start to end, whit nothing running parallel, this is bad, in Excalibur you have a clock it has to update for every second, a good program should only do stuff when something happens, the program should wake up when its signaled to do something, then event routine should check what messages has been revised and act on this, well because clock interfered whit this it was no use checking for signals, and so main loop was running and wasting CPU cycles when noting new head happened, due to being single threaded.

I worked on this and by moving the code out of main application, I have made it easy to handle it all whit the clock.c file, I added a clock_proc function that should be spawned as own sub task, so that all rendering of clock was done in parallel whit main program, whit out interfering whit event loop in the main application, some extra work was need to prevent the code from rendering when window was closed, and allow it render when window was reopened, by using Mutex I fixed it so that variable whit clock.c was set on or off to allow rendering, the main event loop in clock.c was also mutex protected to so that only when variable was not being changed, it was allowed to render.

So way did I go trow all this trouble for just a CPU parentage? Well because Excalibur is a start menu, and its always there, you might need that percentage for your video player so it does not skip frames, or your music, or maybe you playing a game, I don't know but if every one wasted CPU cycles then there wont by any left for your applications.

Saturday, November 3, 2012

Its all about the details

Well some work on my hobby, its all about the details.

I'm going back to basic's I know many people like it simple, and are not so interested in all PNG images fancy bling bling, so going back to old colors and styles.

I was looking at workbench prefs and style called XEN, this where you have depth border and you have normal 3d border inside, to make it look like button or fame is not above but inside.

I liked this effect, and so I looked at ways to added it to borders.

Also some work on the selector box has been done, it was not correctly rendered, one pixel wrong there not rendered correct when scroll bar was inside the menu.

I have also worked on the prefs, I have rearrange, the visual effects, so they are nicely grouped by menu and toolbar.
I have also fund a few bugs, they are gone.

Wednesday, October 24, 2012

Updated a new version of Excalibur today.

Updated a new version of Excalibur today (V1.1.3).

I have been sick a few days after my Italy trip, topically the first day back to work, and you get the flu, anyway that's all over now, the pictures from Italia trip is on my Facebook, so I'm not going to post them here.

I have done few adjustments to Excalibur, nothing to too dramatic, I think I wrote on blog some weeks back some of what did, I hope every one likes the changes, and I hope it runs as it should, I most admit there are lots more to be done, but what's is the point of siting on my changes until every thing is in place, then no one will have opportunity to use my application.

One more thing I forgot note in the changes document was Excalibur now close when you change screen resolution, and reopen when new resolution is opened.

Saturday, September 29, 2012

The work never stops

As you all know I been working on NoGuru (NoYellow), so I have been busy whit that for some time, but now I'm back on Excalibur.

I have been working on new menu editor as seen in right window, some work is needed, but its shaping up.

Left windows shows the new prefs program, as you can see I'm now using tabs, some was complained about size of old prefs window being too big.

On Excalibur (toolbar), the screen buttons has been rounded, and so has memory bar, the clock text as been centered, and I have also updated the virtual positioning.

Some at my job asked med create rounded corner on some buttons, as result I came up whit good idea for doing that, its not so often there is synergy between work and hobby.

An other project I have been working on, it has stuck on my hard drive for long time, is PublicPaint, I don't know if ever shown you this before, I don't know what to do with it yet..

But did some changes to the source code, so works tiny bit better.

As you can see from screenshot it needs a lot of love, I can't believe how tiny it all looks, most have been using smaller resolution back in 2002/2003.

It says in the about window SDL but its running directly on border less Workbench windows.
I hoping composition can help whit displaying preview graphics like brushes/cut outs, I did not have that when it was ported it to AmigaOS4.

Friday, September 14, 2012

To keep you computer girls updated.

Well to keep you computer girls updated on whats going on whit NoYellow, first of all I have been bit annoyed lately, about two things whit this project.

Comment from Broadblues on Amigaworld:

Quote: “imagine if you memlists are corrupted and another application can happily carry on accessing them, because of the lack of forbid? “

This has been worrying me I can't get it out of my mind, I use PutMsg() and it should be wrapped around a Permit() Forbid() according to the autodocs, I have not to prevent forbid being broken, and as some of you know Message list are based on struct list, and so struct list might get corrupted, I have been thinking about protecting the PutMsg() whit a Mutx instead, but I know if I do and its in a forbid the Mutex will never be
released by the other task, so I can't use any Semaphore or Mutex.

So I have started working on a workaround, a forbid free message que, that can't bring down your computer, its based on static table instead of dynamic list, so next previews pointers can't be 
in a incomplete state. this also means the buffer can be exhausted because it can only contain a limited number of records, resulting in some message not being displayed, don't worry all he error will be written to debug buffer using DebugPrintF (this is some thing I'm working on), how quickly the message que is emptyied depends on how fast I can display the messages.

The second issue that has been annoying me is how the Ringho messages look, so I have opened a tread at about that issue.

And it looks like the issue about not supporting line shift will be resolved in an upcoming OS update, to thanks Max Tretene of Acube System, for doing that, I'm shore there are many more developers that are interested getting that fixed.

Thursday, September 6, 2012

Killing the Hydra

Every time you cut a head of a new one grows back.

Exec.library/Alert() was taken care of... but.... wait... what is that.....
its Initiation.library()/DisplayAlert... ha ha ha... says the Hydra.

Chop, chop, chop.

I have dreadful hydra head in my hand, oh no the poor thing does have head, lets replace it :-)

 Oh it looks better not so deagurs now are you, now that I can press your buttons :-)

Saturday, September 1, 2012

The Guru has been taking in riddles again.

A few days ago I created a tool called NoYellow, it hack that is supposed to prevent the yellow guru mediation, from displaying, in the stone age when this guru meditations where created it was only Red Guru meditation, all crashes resulted back then in computer crash, in Workbench 2.0/AmigaOS2.0 or maybe later 3.0, the Yellow guru mediation was introduced, this was recoverable crash, well acutely many of the errors are not that critical as you might thing, many devices and libraries have there own error codes.

The left code is the error code, the right code is where application/task exists in memory.

During a Guru mediation the system is stopped including multitasking so you read the message, and then you just clicked away the error, but recent AmigaOS4.0 from 2004 introduced the USB standard a software driven protocol, now its no more possible click away the errors.

 The Guru has been taking in riddles again.

The Hex code of error message is not so understandable, you don't really know what happened unless you lookup the errors codes.

bits of hex error code is divided like this

1 bit - Dead end massage
7 bit - General Error
16 bit - Sub system specific errors.
But this not really true, some errors code have decide it was cool to mix General error bits whit Sub System specific errors bits, the result is that NoYellow V1.0 can print out many false positives, I'm working on improving this.

have also revived a few comments, about the project on


First of all a error requester can't be used because you never know what that state you got a Alert message, it might have been in a forbid, and you do not wont lots alerts you most click away, and sense there no built in error event log in AmigaOS, putting the messages there is not possible, ringhio pop up was next best ting, but also gave me a opportunity to experiment whit a new API, I have not used until now, cool thing about ringhio is that its displayed on all public screens.


its more important for developers to understand the guru messages then users, note it does not privet a crash it only gets past the point of mouse click.

Monday, May 21, 2012

Excalibur v1.1.1

Lately I have been working on Excalibur the toolbar / start button application, I recently uploaded a new version to OS4Depot, some people that did not install application nor read the user guide, noticed some problems that I did not notice, on my optimal configured Excalibur v1.1.0, so the same day I fixed and uploaded version 1.1.1, this version will solve some of the confusion and crashes.

Often when you write a program, you forget to test all conditions where application can fail.
Some developers use beta testers but then beta tester are often lazy and don't report back, so I don't.
Some languages like ruby on rails, run a number of testes to check if some thing is broken, that's not case when my hobby projects, and to tell you the truth it will mostly likely take 3 times as long to complete projects that way, because all test has to be written, in many case you don't know what test before problem is noticed, when many developers cooperate on project test are a necessary evil, because sometime some think they can remove or change some thing, maybe they did not understand way things where written the way it was.

I guess way to do it, is to split up the application in many smaller parts that can be compile and tested individually, sorry people not going to do that its way too much work, and result of test is debatable, of cause 1 or 2 bugs might be found before a application is uploaded that way, but I think of all my users as beta testers, you use my applications freely so that's your job :-b

Tuesday, May 8, 2012

Some progress information.

As you most likely noticed by now I broken my promise did say it was going to be ready last week on Facebook, some times other things get in the way, its not always easy to estimate what I'm going to spend time on, it might where well be that I change my mind and so I did.

I have decided to spend a bit more time on toolbar, because I know many of you would expect to be able to remove icons dropped on toolbar, so I think this was important to do.

Individual logo for each menu or directory has not happened, I don't know if I should delay the release of this version because of that, it seams silly.

There are many things that can be made easier or improved but I'm not going to do all at once, yes the installation sucks, yes the is no way to edit the menus whit the exception of using notepad, and I think some of you have missed mouse scroll wheel support, at least I have because I'm using my application more and more as it improves.

Saturday, April 28, 2012

Some nice progress, enjoyable weekend

This weekend my friend Svenn Ove, been on visit, he has been working on some new logos for Excalibur.
I have also created a new logo in white, I have also been fixing some rendering bugs in Excalibur, and added a new icons to toolbar, the configuration in text file, no current configuration program for it, but its easily editable, the new toolbar uses the csv format. Besides this the weekend has been spent on looking at films going out, and playing some adventure games.

Saturday, April 21, 2012

The New Look Of Excalibur whit alphaclips.

Her is tiny blog as promised

I keep it short as not in right mood for writing anything long, after long work week, this blog is to give some of you a idea on how Excalibur looks like after all the changes, I think visual effects will make people interested that was not, I don't write programs so that nobody are using them, I do write programs in hope that some one do find this applications useful, and it does get me sanctification figuring out how to do some thing I have not done before, I do take feature requests, but don't expect me do every thing at ones, this is hobby and a self made programs from ground up and it takes time, its not just find a SDL game you or any one can recompile.

In the screen-shots you find tiny new detail, date is displayed in right corner it was only time before, I used only timer.device, to my surprise the date and time is handled by dos.library.

The black look is to check if the PNG border works, so it has all the corners and upper and bottom, left and right borders, I have turned the general transparency level to 0, did not look right whit transparency on the menu.

The white menu is a joke, my bloody hands has been all over the menus :-)
I have also tiny bit transparent, you can see the icons in the background.

Monday, April 9, 2012

This ester I have been doing a few things :-)

I have been to the cabin whit my family, in weekend I have been partying whit good friends (DJ Vibes is the local DJ), and talked to interesting people:

Some information about DJ Vibes you can find her:
80's party, LOL :-)

When I have not been parting and play stupid fb games, family stuff I have been working on Excalibur, adding transparent borders to menus, it has been tricky need to experiment a lot, amiga datatypes (default image loader) do not support PNG images whit alpha, PNG images are now loaded whit libpng, and datatypes are now used as fallback for other images types.

The hard part is rendering, because alpha channel has rendered separated from bitmap image, and alpha channel has be prepared before the window opens, so graphic has to be rendered two times.

Its not really possible to update the alpha after its done, because once its applied to the window, the content of window is distorted by some ending swapping crap that should not happen (OS bug), so if I where to do that then I need to redraw the graphics also, it is also slow, so its better to do it once.

There are many things that need to be fixed before its ready, but her is picture how it looks atm.

The spiders is right and left border texture, I will need some help whit textures, to make it look rally nice.

Tuesday, March 27, 2012

Last weekend Amiga Project work.

Last weekend I was at friends doing some Amiga project work for fun, the idea style up Excalibur start menu whit transparent border, so my friend Svenn Ove Hansen worked on making a 3d object from 2d object image using Maja3d its powerful 3d application.

For some time a go I experimented whit Composition Porter duff stuff, I see other people are working on some thing on I do keep I eye on whats being talked about there.

Before we started I tried using DataTypes to load PNG images, but I'm sorry to say I where unable to get alpha channel in PNG image, so no transparency :-(

So spent some time getting libpng to link whit my program, I don't like to use Linux libraries, when AmigaOS has so advanced system for loading Images, but did not find any other way :-(

I looked up a example for loading png images as textures for OpenGL, it was prefect the only problem it was too old, and spend some time trying to figure out if I compile my program wrong or was missing some include files, finally I looked up documentation for LibPNG, replaced the stuff that was outdated and it compiled, next I need the images in struct BitMap format as that's what AmigaOS uses, LibPNG loads the image in RGBA format, not ARGB format so I need to convert the image as well, not just copy the image data, next I head to copy the Alpha part for ARGB in to 8bit Alpha Bitmap for transparency effect on the window you don't see :-)

Her is the result of work last weekend.

Saturday, March 17, 2012

Things moving slowly....

I have been sick last week, not so motivated doing anything, and there been a lot going on at work I hope our customer will be happy about larger winnings, also been spending a lot of weekends going out, that's way there not any blog updated in February and March.

But don't worry I have not stopped coding for AmigaOS completely, lately I have been investigating libcurl because it might be better way to implement a download manager then wasting time on writing my own code, and looking up different net protocols like ftp and http.

I have also been working on Basilisk II, I have merged the lasted changed from Scott A. Cabit, in to may source tree using diff tools, so easy to use diff tools, yet I have not used it before :-), at work we use git, so its all handled by git-cola (on Linux), I have also update my network code (for experimental TCP/IP stack), so now Basilisk II get different MAC addresses if you have more then one Basilisk runing at the same time, its now possible to run web server on one basilisk, and firefox or IE on an other basilisk, but there is a problem getting ARP respond when I have no loopback devices running in experiential TCP/IP stack, so maybe I need some extra code to take care of that, biggest problem atm is that AmigaONE-XE is not a speed daemon, so doing experiments are boring and slow, I guess I need to buy X1000 now.

I was thinking about moving the ARP code from Ethernet device in to the link layer, but I don't wont to make the link layer ugly, as its suppose to do only MAC multicast, broadcasts and stuff like that.

Friday, January 20, 2012

Progress rapport for download manager.

It takes time to get every as it should, time is limiting factor, so I have done a lot, but things are getting there slowly, its all about trying and experimenting, one thing that taken a lot time is refreshing and redrawing of download manager as easy to overload the CPU when I redraw the progress bars, so being careful to only draw, update or scale the progress bares, is important when your working on custom graphical user interface.

 The fallowing screens shots show a lot of fake downloads, I use a lot fake files for testing.

Tiny review about headphones.

I have Freetalk Freedom Wireless from skype and I have Logtech H760.

The Logitech is comfortable to use, it has good treble sound it does not have base and mic is at best average, no build quality it breaks easily, it leaks sound from headphones and the is easy picked up by the mic, if you just wont to talk whit your friends its fine as long as you don't listen to music at the same time.

The Freetalk was bit of disappointment, it did have lot of base but did not have any treble sound, my friends complained about poor mic quality, it does not leak sound, but its not leak from headphones like Logitech does, it is much better better quality but not so comfortable it sits too tight, it's okay for listening to music but not talk to your friends.

Do you have a proposal for headphones that you know is good quality place make comment Below.

Monday, January 16, 2012

Spotify or Despotify for AmigaOS4

A long time go I tried to port (De)Spotify, the open source version to AmigaOS4, but because 
we do not have the latest DNS api, too old TCP/IP stack (not supporting IPv6), too old SSL encryption, oh yes some problems whit UTF8/16, I did get it compiling and running whit the text based console, but network connection just closed on me, eventually I gave up. But not all is lost, recently OpenSSL was updated, and Skuggan has been taking whit Spotify to get an NDA agreement that allows him access to some developer documentation, there also has been talks about giving Spotify development team a Sam460 Amiga PPC so they can develop a Amiga version.

If you like to read about check out:

Friday, January 13, 2012

Amiga projects and stuff.

As you all know, I released  Excalibur on New Year, whit many bug fixes and improvements, right now I'm not working on this project, I have moved on to some thing else.

For some time Antique and Me have wondered about making a download manager for OWB it did not happen, but we talked about how etc, too much SCII and Skype and too little work, nothing happened, but now I have started slowly to make that dream come true.

What I have done is downloaded the source code of wget and modified so easier integrated in too a GUI, when ever wget is executed from shell or by a script it will display the progress in the GUI.

There is a lot has to be done, but all in due time.