Thursday, October 29, 2015

Mandelbrot Revisited

Now that some of the more tedious stuff is in place, it is time to look if we can get some more programs to work. At the moment, no WarpOS program works directly. First it has to be patched so the AmigaOS loads the program into sonnet memory instead of Amiga memory (see the sonnetpatch program for that on git).

Then all kinds of memory requests can be made by the program. As FastMem has the highest priority, it ends up allocating this instead of sonnet memory. That's fine for 68K only programs, but not for our WarpOS programs we want to run on the sonnet. For now, a simple patch has been made that redirects memory allocations from PPC programs. The patch just looks at the last 4 characters of the CLI name and redirects if it is 1005 (for example Voxelspace_1005). It is not ideal, but it works for now (see the InitSonnet program, also on git).

One of the more simple programs, yet visually nice to look at is FlashMandelWOS. Here's a link from youtube where it runs on a 66MHz 68060 and a 200MHz 603e.

So we patched the program using sonnetpatch, then we just rename it to FlashMandelWOS_1005 and this is the result:

This is an example of one of the programs which plays nice with the two different OSes (AmigaOS & WarpOS). The requesters come up slowly as it is done by the 68K accessing the slow (from the 68K perspective) sonnet memory, but the speed of program itself is very nice.

Next up is to get some programs working which don't play nice. This is mostly during the start-up of the program. To do this we have to intercept Amiga RAM access by the PPC and redirect them to the 68K and direct the result back to the PPC. This is slow, but if it is only done during start-up (for example QuakeWOS checks the front most screen directly from the intuition library) it may be unnoticeable.

For now, let's end with another teaser.


Tuesday, October 27, 2015

More progress and bugs to thanks for it

One of the more complex programs for WarpOS is wosdb, one of the few debuggers for WarpOS. It had been sitting there on the issue list ( for quite a while now. Until recently, the code for the sonnet library wasn't as far as to even think about getting it working. It is for example one of the few programs using exception handlers and next to that a score of other functions from the library like cache manipulation, memory pool creation and deletion, signaling, waiting for signals and some more.

A lot of effort was put to get it all working prior to Neuss as it would mark a level of code maturity. Sadly, Neuss came a bit too soon. However, a few weeks down the road and we have some results.

The most difficult part was to make the cache play nice as the debugger does not work with real breakpoints but placing trap instructions on the addresses it wants to put a breakpoint on. There are still some quirks to iron out but most things can be done like stepping through a program, disassembling and displaying memory and setting breakpoints. Hopefully it will help to get the even more complex programs going.

As for some more eye-candy which didn't make Neuss: Here is a teaser/still from a certain flashy program.

Saturday, October 24, 2015

Neuss Event

As the Amiga celebrates its 30 years of existence, there were events all around the world set up by Amiga enthusiasts. I couldn't make the Amsterdam event (where I really wanted to check out the UltimatePPC) but the Neuss event was far enough later in the year to show something working, or so I hoped.

It was my intention to show something like an MP3 playing or some fast gfx decoding, but It was not te be. Almost all the effort went into making the library as stable as possible. It would be embarrassing to have to reset the Amiga every other couple of minutes.... Also a lot of effort was put into getting the wosdb WarpOS debugger going. I'll come back to that later.

So in the early morning of the 10th of October I set up my stuff in the event hall.

I was wedges almost behind the stand of Alinea Computer (here on the right) and Pascal from Ares Computer) but that didn't put a damper on things :-) Anyway, the A3000UX had thankfully survived the trip and below you see the Voxelspace demo running:

I was happy that in the end the Amiga crashed only once during the 8 hours it was on. At some points I had to break off the demo and show some other stuff (Cybermand etc.) and then back to the voxel demo. It all worked flawlessly. I removed the cap from the Amiga not only to let the people see what was inside, but because I was also afraid to overheat the machine (See the Aging Electronics post). At home, I'm actually running it again with the Amiga closed at the moment.

As seen on the picture the FPS of the demo is just about faster than a 060 and 40% slower than a 200MHz 604e PPC at this resolution. This is because of the many context switches going on between the PPC and the 68K processor. I'm looking whether I can improve here. I have to say that at higher resolutions the G3 becomes faster compared to the 604e or 68K. That is maybe for another posting.

I want to thank all the people I spoke with that day, it was real fun to meet you all. And I want to thank Markus especially for talking me into coming, as I threw all kinds of arguments in his face NOT to come :-)

Tuesday, October 13, 2015

A forced break

With the breakdown of the Voodoo3 card I was forced to take a break from coding for a while. A vacation and the Witcher III also didn't help :-)

It took a while for a Voodoo3 card to show up on any of the online market places and when it did, it came in two. With the help of my partner in crime from Poland, I even got a third one, so I guess that problem is solved for the time being. I also saw some Sonnet cards on Ebay for $35-50 even with 256MB of memory installed. Too bad they only shipped to the US.

Early September, I set out for 2 goals to be achieved before the Neuss event in Germany. The first one was a working wosdb. It is a debugger made by Frank Wille for WarpOS back in the days. I also wanted to show some eye-candy on Neuss, being a picture decompression datatype or a working AmigaAMP PPC MP3 plugin or dnetc client. The Amsterdam came too early to show something, but the Neuss event should have given me enough time to get somewhere, or so I thought.

Getting wosdb working took longer than expected. The program relies on a number of WarpOS functions I hadn't implemented yet or not tested yet, but if it could be made working, a lot of functionality of the sonnet.library would be shown to be working. Like exception-handlers, memory functions, message functions and task-switching.

There were a couple of obstacles. No implemented pool memory functions yet. This was fixed by code from the AROS project. No implemented exception-handler code. These were written from scratch. A bug in one of the library node manipulation routines and an access to Amiga memory, specifically the memory list.

That last item forced me finally to implement some MMU page table code to intercept calls to Amiga FAST memory. But in the end this was the result:

Next time something about the Neuss Amiga 30 Years event in Germany.