Wednesday, March 19, 2014

UTF8.library, progress and some information about the up coming version 4.

I'm a bit amazed by number of download of my UTF8.library, for library that is not used by any application it gets a lot of downloads, it does make my happy.

47 Downloads currently on version 3, not bad at all,

A new version will be out in today or tomorrow, I think, just need to check that every thing is ok.

The new library will contain 7 more string handling rutins. 1 more routine to check Byte Size.

As you might have noticed, naming of function I use Relefact names used in std:string C++ class function names Microsoft uses on there string class. Of course there are some variation because we need to support for sheard memory, when dealing whit strings.

As I'm nearing completion, I hope that I can return to the project I was working before starting on UTF8.Library.

There might be another 10 to 15 routines we don't have yet in this library to render the other libraries redundant. While your waiting you just need to mix and match what you need for that different libraries.

I will so like some feed back form you developers on what routines you like to see in the next version, what do you think I have forgotten, are there thing you think I should do different?

Better to tell me now before I decide to freeze features.

Also the language alphabet has been a bit annoying, I hope its possible to get this from some where in the OS, or else I will need to ask people provide there Language alphabets in UTF8 format as text file.

Because we will need it do casecmp, upper, lower and sorting, the standard one's only really support English it seams, and thats no good.

Sunday, March 9, 2014

Things I'm working on for the mommet.

I have been busy reading about MS C#, and about classes, in order to make it interesting I wanted to make a program, that will be useful to me and maybe others, a cross platform application.

I know C# is not really portable but its more portable then VirtualBasic, at lest it has most of the C++ syntax, even if .Net Framework is different, there are a few different versions of .Net Framework you have XNA a Game API used on XBOX, and then Portable Class Library.

The Portable Class Library is more or less useless, because everything has to be recreated anyway, and its too small to be of any use.

Supporting just XNA does not make lot of senses, if AmigaOS can support some thing, there is no point in limiting it to XNA.

The full .Net Framework is too big of job to support, so what I have basically been doing to create C++ classes for what I have used in my project.

And been trying to get same program to work on AmigaOS whit small modifications, just by implementing the classes need to for the program.

So to make this clear this is not XNA, .NET or Portable Class Library this is some thing new.

Hopefully this will open some door for cross platform applications and portability between the two operating systems.

The only problem is that AmigaOS has yet to come out of the stone age.

Like File Notifications is way better on Windows, then on AmigaOS where its pretty primitive.

UTF8 encoding really sucked on AmigaOS, but works well on Windows, and I believe it has become the standard encoding for text files in windows7.

So I have spent a week trying to figure out how to do things, and ended up whit writing my own UTF8.Library it has now been uploaded to OS4Depot.net.

I'm hopeful that UTF8.Library will make more programs UTF8 friendly. 
 
More information to come on what I'm working on.

Friday, January 3, 2014

So here comes a small blog update.

Well I promised to fix few issues on forums, they where fixed, lately I have been feeling where tiered, and too many things to think about, during xmas, I have not felt motivated to work on it a lot, or get it completed before xmas, but now its here.

Every software release takes some time to prepare, just making shore the changes logs are updated, and checking that things works, for this release, I needed to check if it worked on my old AmigaONE-XE as well as AmigaONE-X1000, also when I'm finally ready, I find small things that need to be fixed, like some of the icons where not PNG, and also, I have noticed I have edited some files I should have generated, not really fixed that one.

The problem for language support you need to edit a source file, this will generate the local.c and local.h files, so in other words, I think local language support is a bit messed up, I should investigate how this works and make shore the files are generated correct, I will see what I can do for the next version.

Also I was thinking about making a YouTube video of fix, and what I did, but its way too much work for too little.

Its better if just explain what the problem was, and how I fixed it.

Fist of all there was some yellow effect that we did not like in full screen mode on AmigaONE-XE, Pagasus-II and other AGP/PCI AmigaOS4 compatible computers, Sam460 and AmigaONE-X1000, did not have that issue, so I need a fix that worked fine for PCIe as well as PCI/AGP.

I fingered out that the lack of picasso96 lock was the problem, but I'm not a fan of p96 lock if I do not need it, as p96lock has a tendency to lock up graphic system for a period of time, so I made it a option.


Last time I released Basilisk II 1.0.3. I did not write a blog but record a video, the volume was recorded a bit low, you might need to turn up the volume.

Her is the link:



And also thank you eliyahu for your donation, your the first :-)

Tuesday, October 15, 2013

Its time to talk about optimizing code, so I was looking at Basilisk II code.

Its time to talk about optimizing code, so I was looking at Basilisk II code.

One think I noticed was was I did have his platform depended read and write functions.
So I found where they where used, this where used whit UAE CPU memory header by read and write functions for CPU core, and some where else, this where yet agin used some where else, by some other function.

As it happens my education was electronics and programing on microprocessors, it was impotent back then to reduce code due to slow CPU & MCU, micro controllers and micro processor units.

We used to use inline assembler and macros. So now I'm going to show you the magic power of macros, and how it can make big difference.


So this code show what was happening in Basilisk II, you have two loops typical when you filling or doing some graphic operation, so you have a main routine calling do_sum and do_sum calling sum, but this can be changed, this is how it works, so what do you do macros.


Now lets see what difference it made.


So we have 4096 ms (4 sec) before the change.
after the change we have 1091 ms (1 sec) 

so what we find is that 4096/1091 = 3.754. so the unoptimized code is 3.7 times slower or 375% slower.

so what is going on?

functions generate a lot of code, and they forces program to make jumps, jumps are considered expensive, often result in cache misses, next functions are designed to be isolated, variables from the previous code put on the stack to be later restored when you exit the function, function parameters are filled, to be letter read, by code inside the function, and when its all done it old variables are restored and the program exits the function.

So as you can understand its a lot of stuff that goes on when calling functions.

now when we rewrote it to use macros, the the macro is just replaced in the code before its compiled, the result is that that we only need to increment a variable by a value, and this in the main function.

Wednesday, September 25, 2013

So you have been waiting for Basilisk II 1.0

I'm going to tell you about latest changes for AmigaOS4.1

When we talk about Basilisk its emulator for MacOS7/MacOS8, the different versions the Basilisk II 1.0 was created more or less in 2001 to 2006, after this it was almost no changes to Amiga specific stuff.

jlachmann added video switching in 2001.
cebix did some work on SCSI support.
gbeauche added copy-paste of 'TEXT' from 2004

Basilisk 0.9 comes from Ilkka "itix" Lehtoranta it was ported to MorphOS back in 2005 form a older source code, later it was upgraded with a newer UAE CPU core (from 1.0), AmigaOS4 version was heavily based on 0.9 version for MorphOS, there where few problems whit difference between AmigaOS4 and MorphOS, but the main thing the MorphOS version made easier for me to know where changes things, because CPU emulated, unlike on a Classic Amiga, I also rewrote the MUI based GUI to Reaction, it was simple to do whit few macro changes, the difference between this two GUI systems are not that big they fundamentally work the same way.

The biggest difference is that 1.0 support screen modes, and so you switch resolution whit out quieting the emulator, there are some other thins too, it was much easier to quit 0.9 then 1.0, because 1.0 does some thing strange in the interpreter, recursive callbacks makes it hard to understand what is going on, so this version does not have a quit button.

I have put copied over platform specific code from 0.9 and replaced the incompatible source code whit 1.0 and updated it, some of the changes jlachmann, cebix and gbeauche did might have been lost in the process, as for core of Basilisk 1.0 has been updated to recently a lot of work has done on SDL stuff, we only use the audio part of SDL, because AHI stuff did not work.


So now there is compliantly new video code for AmigaOS4, based on AmigaOS3 code, I have also added the scroll wheel support form 0.9 video drivers, the rest is new code.

Video modes supported are 2 and 256 colors and 32bit, I have dropped the 16bit video mode for now because it has to be converted to 32bit in window mode (slow), maybe add it later.

I have also experimented whit composition because its hardware accelerated, and enables fast scaling, its nice to be able to make where large window smaller, or small window whit low resolution bigger, if your playing a old game.



Disk images has been upgraded, whit support for read only disk images,
you can now also create disk images from the GUI, I have also done few more improvements to the GUI.



Virtual Amiga volume thing, is kind of buggy if you delete .finf and .rsrc directory before start emulator it work perfect or else you can get DSI error you can ignore, the best thing to point it to RAM disk, I think.

Sunday, September 15, 2013

Network, file shearing, on AmigaOS is hopeless or is it?



So other platforms have DropBox and Google Drive, Samba / Mirosoft network, NFS, and so on.
We have where old version of Samba, and we are having problems whit ever dated Socket API, it put a lot of restrictions on what we can port over to AmigaOS, I think it's time we work around this problems.
We need our own file sharing system, I think this the only way we can control compatibility whit other systems we use.

We are stuck whit FTP based file shearing, and it's not horrible simple to manage.
The conclusion is that we need our own Windows/Linux/AmigaOS Client/Server software.
I have thinking the simplest form of file shearing might be some kind of file sync system.

Wednesday, August 28, 2013

Summer time, holyday and software development.

So what has happened sines last time, I wrote some thing here.

Excalibur 1.4.0 was released, this should have great release whit context menus, and some cool stuff like being able to hide and unhide Excalibur by Clicking the border, it was bit of horror really, last secund changes screwed up the build process, resulting half rebuilt executable, also people started reporting problems whit install and uninstall scripts.

Rebuilding Excalibur was easy, but all the changes that resulted in meny Skins/theams being out date, and was needed a work over, the result was Excalibur 1.4.1, I was not able fix problems as fast as expected because it was lot of work.

So what do I need to fix, I need to fix build horror issue, what it is.

What I have done is that I have decided the program into modules (objects), that are compiled separately and then linked into the executable. This all nice, as I don't need to see warning from modules I don't need to recompile and recompile gets quicker, less text on the screen and so on, and it organized, but his modules include some header files, that I some times need to changes, due to some structs,

but the makefile lacks the dependency and so even if I modify the header file the modules does not recompile. I'm thinking of some kind of auto clean, where if header files are changed all the objects should be deleted, forcing a make clean, make all.

Well thats the idea.

So what else, updated RunADF, well I use it a lot, I don't really have the need to mount adf's, more often I just want start a old game. The old version needed you to install UAE manually, changes stuff in user-startup, and modify DefIcons, this this are not needed in AmigaOS4.1, it was only needed in AmigaOS4.0.

DefIocns has entry for ADF files, I think its because of RunInUAE provided whit AmigaOS4.1, so all I need to do is replace sys icon, UAE is provided whit AmigaOS4.1 and so I don't need to look for it else where, so no need for UAE: Assign.

Then I was outside Norway for a week, enjoyed a week in Prague, walked around the city, I'm bit restless, I can't really sit down for too long, I need to do something, we did see a lot, I did not really dig into history of Prague or anything like that.

A bought a Samsung Galaxy, on airport, it came in heady to check on Amiga news, and look for restaurants and other useful travel information at hotel, it was also possible for me check up on work, but I tried to avoid that, unless it was needed.

Coming back after the holyday, there is some work that needs to be done on my apparent, first off this has been raining for most part this summer or I have been working, and in the weekend has been some what busy too, I have have not really have time for anything, but now, I need to get things done, only started on this, so it want be any major updates in any software until this taken care off.

One small thing I did also was release a new version in Whdload-to-UAE, that I did whit this was simular to what I did for RunADF, every thing is now provided, so made the install process easier, RunInUAE should be able to start whdload I belive but does not work here, I don't care way, all I care is that that it works, and it does after installing whdload-to-UAE, so I'm happy, hope you are.