Showing posts with label Software. Show all posts
Showing posts with label Software. Show all posts

Wednesday, February 1, 2017

SIMD for classic Amigas

As you all of course know by now, Sonnet cards are rather hard to be found. Even more rare is to find a Sonnet Crescendo 7200 G4. There were a few for sale when I started this project over 2 years ago, but they wouldn't ship to Europe. Since then, it has dried up, even for the G3s, on the various market sites.

A good friend of mine happened to have bought one....maybe 6 months ago. He lives in Germany. While I was in the neighborhood I could setup and test the G4 card. The computer used was a busted up A3000 with a Mediator and a Voodoo3. Also in the picture you can see a CSPPC:


The CSPPC makes it impossible to close the A3000, as the cooler of the 060 was too high. So we set up the system in a very unconventional way :-) It was running a bare OS3.1. 

As the biggest difference between G3 and G4 is AltiVec (I'm not certain about number of pipelines and FPU speed) which is a so called SIMD instruction set which speeds up certain calculations, the first program run was the dnetc program. It supports AltiVec, or so I thought:


As you can see in the above picture, no speedup or AltiVec cores chosen. This was due to two issues. One, the sonnet.library needs to activate the AltiVec stuff when available. And two, dnetc for WarpOS does not have AltiVec compiled in it. So after a bit of work I added AltiVec support to sonnet.library:


Here you can see my system with the G4 card. GetInfo recognizes the card correctly. In the window on the left you see part of the AltiVec support in sonnet.library. It's the loading of the various AltiVec registers after a task switch (when AltiVec is detected (PSL_VEC)).

As AltiVec programs for the classic Amiga are even more rare (WarpOS does not support it and there are 0 (zero) programs which use it), I wrote a small program to test if it works and that seems ok.

Next step would maybe be to port some MPEG-1 player. Or maybe you guys have some AltiVec sources lying around I could test? Much appreciated :-)

Saturday, October 15, 2016

Lies, damned lies and statistics


Added functionality to the sonnet.library which tracks CPU usage (time running), busy time (time not waiting) and activity (time.... I forgot, but the tooltips of WarpStat are very handy :-)



I also noticed that people are having a hard time to install the Sonnet card. (The few people having one). I actually got a copy from a Workbench of someone and my Sonnet refuses to work with that system disk. Not sure what the problem is yet... Seems like the set P96 screen modes are messing with the system. Have to look further into it.

Next post will be probably about all the pitfalls of installation :-)

Saturday, January 23, 2016

Picture of the Day: Sonnet Developments

Not a flashy video showing 3D madness, but a picture showing the Sonnet compiling vasm, the assembler used to compile the sonnet.library. In this instance, the resulting binary runs on the Sonnet and puts out PPC code usable by the Sonnet.


Thursday, November 19, 2015

MooOOoo!

One of the early goals of the project was to get some specific stuff running on the G3 processor. The WarpDT suite, the MP3 engine for AmigaAMP and the dnetc client (see distributed.net).

It took me the better parts of a week to finally get some results regarding the dnetc client. Of course it is a good thing that for every program I try to run I need to do a lot of bug fixing in the sonnet library, but it can be tiresome sometime :-) On the other hand it gives me more and more insight on the inner workings of WarpOS. Anyway here the first output of the client:



As you can see, the speed is as what is to be expected from a 500 MHz MPC750 processor. It still crashes on exit, but I guess that's for the next week :-)

And yes, I have not forgotten to look at the A1200, but I first want to have this 100% running.

Monday, March 23, 2015

Flying at G3 Speed!

The next hurdle took the better part of half a year. Mostly as I shelved the project after unsuccessfully getting the PPC to execute code. But a posting on the English Amiga Board (http://eab.abime.net/showthread.php?t=76633) resulted in help from someone who had some success starting the card up on a modified Prometheus card  The Prometheus (and most Mediators) are missing a 3.3V line. Well, lucky for us the Mediator 3000Di has one!

It only took the flipping of 2 bits to get the PPC to execute the code set up at $fff00100 which is the default vector of a PowerPC chip after reset. After re-reading the MPC107/TSi107 manual I actually found the paragraph stating the way to negate a reset of the CPU. Strangely enough, this was not mentioned in the example on how to boot the CPU but in a different part of the manual.

This person was also kind enough to share the code he lifted from the Mac driver for the Sonnet to initialize its RAM. So after a bit of tinkering we finally had code running on the PPC!

I don't have any meaningful pictures of it, as the only thing it does it to move bytes around in memory, but what was accomplished is that the RAM of the Sonnet was made to be recognized by the Amiga. This is done in the same manner as how the excess Video RAM is recognized and used by the Mediator software.



Next stop is to try to run software on the Sonnet which gives some meaningful output to a console or screen. It also would be great if this could be achieved using existing WarpOS software.

Monday, February 23, 2015

Signs of Life

Of course, where to start debugging a library which is officially encrypted? Well, in the distant past some people already wrote a decrypt program for the pci.library (the background story of the 'why' is also interesting, but maybe for some other time).

After a bit of digging the culprit was found (and accidentally, also the spider recognition code. Again, another story).

The Sonnet is a PCI card based on the MPC107 chip set, also known as the TSi107 chip set (at least mine is). This makes the Sonnet actually a non-transparent PCI-bridge. This means that the Amiga cannot directly communicate with the resources on the card.

To achieve this, these kind of PCI-bridges have address translation units (ATUs) on board so you can address the card through PCI memory. This is different from 'normal' PCI cards.

The Mediator treats the Sonnet as a normal PCI card. It writes all ones to the Base Address Registers (BARs) of all the PCI cards it can find. The PCI card responds with setting up a mask in the BAR to indicate how big the needed address space is. This will be allocated in PCI memory by the Mediator.

However, BAR0 of the Sonnet is actually an ATU. Writing all ones to this register does not result in what the Mediator expects. The value returned causes an infinite loop in the Mediator as it cannot allocate the appropriate size of memory it thinks it needs by reading back the ATU.

We insert some code to skip BAR0 if the PCI Vendor/ID matches the Sonnet and we add the approriate info to the vendors.txt file... et voila:


The Mediator reads all the values in one go and stores them inside a big array. As you can see, I inserted a dummy value for Memspace0 (BAR0) in this array.

Now we have the card detected without crashing, we are going to try to get it to execute code. The next task is to read up on how to program the MPC107 chip set. That's for another day.

Sunday, February 22, 2015

Messing about with a Sonnet Crescendo 7200 G3 500 MHz

Well, in the end I just bought a second handed A2000 Mobo for like 5 euro's.... On to the next project :-) Here we have a Sonnet Crescendo 7200 model 500 MHz G3. It is fabled that this is the infamous SharkPPC from Elbox. Anyway, here it is installed in an A3000 with a Mediator board.


Took me a while to find the 5V EDO or FPM memory for it, but Ebay (and patience) is your friend. It has now 3x16MB installed on it. Doing a pciinfo (a tool from the mediator package) just hangs the A3000. We'll look at the problem in the pci.library next time.