SPU Tips and tricks

This is a collection of SPU constant loading, odd/even balancing and other tips and tricks of varying usefulness :)

Continue reading

Posted in code, software, spu | 2 Comments

SPU analyzer released!

I made this spusim clone called Sputnik. Useful if you are into low-level SPU optimization. Check it out here

Posted in code, software, spu | Leave a comment

SPU Constant Building Tricks

Neil Henning (@sheredom) asked this on Twitter:

“SPU gurus of twitter unite, want a vector unsigned int with {1, 2, 3, 4} in each slot, without putting it in as elf constant, any ideas?”

The SPU instructions that exist for constant loading usually put the same value in all slots of a quadword, so this was a fun challenge. After some thinking I came up with this:

il zero,0
fsmbi magic,0x137f
andbi magic,magic,1
sumb dest,zero,magic

Sometimes you have a zero-register around already for other stuff so most of the time this idea will only use 3 instructions.

Continue reading

Posted in code, spu | Leave a comment

Dreamcast GD-ROM Replacement Project, part 2

The project is not dead! :)

We managed to figure out the make and model of the connectors used! The connector on the DC motherboard has a very small number on it and with that number and some googling it turns out that it is a Molex part. Trying to buy them turned out difficult though – most places will only sell them in lots of a 1000! That’s a bit much for this hobby-project!

The search went on for some time until we suddenly saw that you could buy them at any quantity at DigiKey! I’m positive that we checked that site before and couldn’t find the parts! A bit weird but the important thing is that we now have the connectors and we can move forward with the project.

Apparently the parts numbers have been known for some time as pointed out by inacete in the original posting. I guess my Google skills are not what they used to be.. :)

The two connectors on the right are basically the same but the taller one is a little easier to work with I guess. The left one is the one on the DC motherboard. The one to the right is the one used on the GD-ROM board.

Molex connectors

I’ve also bought a FPGA prototyping board and started at learning VHDL. There is still a lot of stuff to do and learn but I do think it is doable.

Posted in hardware | 7 Comments

New Zealand Helicopter Ride

I’m going through my back-catalogue of movie clips from previous vacations and trying to make some small movies out of it. The first one is from our awesome helicopter ride in New Zealand around the Franz Josef glacier.

The music is “like it” from sapiens fx.

New Zealand Helicopter Ride! from Jon Rocatis on Vimeo.

Posted in photography, travel | Leave a comment

Time Lapse Video

Just got back from a nice vacation in Vancouver/British Columbia/Seattle! This was my first vacation since I got CHDK installed on my pocket camera so it was time to experiment with some time lapse photography!

I got quite a lot of footage from various places and since I turned down the jpeg quality to the absolute minimum to get more shots on my 2GB SD card I even had the battery die before the card was full some times. I need to look into making some kind of external battery hack.

Anyway, just finished editing the best sequences in Final Cut Express and uploaded it to Vimeo.

British Columbia 2009 from Jon Rocatis on Vimeo.

The sound is garbled in a couple of places – quite weird. It is not on the source material but it seems that it happens in FCE when it converts from mp3. Must investigate.. Update: I tried converting the mp3 to wav using VLC (QuickTime will do as well) and then using that in FCE. That solved it! Maybe FCE doesn’t like VBR mp3′s or something.

The music is by HiFi Hustlers btw.

Posted in photography, travel | Leave a comment

Visual guide for SPU instructions

A picture is worth a 1000 words – that also goes for CPU instruction descriptions! So I started doing this for the SPUs in the Cell processor. For the most part it makes it easier for me to see what is going on and helps me remember what an instruction does. Not all instructions needs a diagram and some were really not that easy to visualize but I included them all for completeness.

Also I put instruction timings and whether they execute in the odd or even pipe right there with the instructions – all this info is taken from the “SPU Cheat Sheet” document by Insomniac Games. Thanks for those!

I hope you will find it useful. It really was more work than I anticipated and “Pages” which I used for this is not really suited for this kind of work and it slowed to a crawl. Rather painful actually. It handles PDF import very nice though. I used OmniGraffle for the diagrams and I found it pretty much perfect!

Anyway, enjoy!

Download it here

Posted in code, spu | 4 Comments

Mac Pro Software RAID0

I was beginning to run out of disk space so since I needed to buy some new disks I thought I might as well try to see if using software RAID on the Mac Pro was worth it.

So I bought two 500GB Seagate Barracuda 7200.11 rpm drives and formatted them for RAID usage. I selected 64K block size – I think default was 32K.

Next I copied my boot drive to the RAID setup using Carbon Copy Cloner and made the new RAID my new boot disk. There seems to be some confusion wether or not you can boot from a RAID drive – I do it now so I guess you can.

The old boot drive was a standard drive supplied by Apple – a Seagate Barracuda 7200.9 160GB . I tested it using Xbench 1.3:

Disk Test	48.12
Sequential	86.64
Uncached Write	82.30	50.53 MB/sec [4K blocks]
Uncached Write	82.89	46.90 MB/sec [256K blocks]
Uncached Read	86.32	25.26 MB/sec [4K blocks]
Uncached Read	96.43	48.46 MB/sec [256K blocks]
Random	33.31
Uncached Write	11.15	1.18 MB/sec [4K blocks]
Uncached Write	91.24	29.21 MB/sec [256K blocks]
Uncached Read	90.87	0.64 MB/sec [4K blocks]
Uncached Read	119.29	22.13 MB/sec [256K blocks]
Then I ran the same test on the RAID setup:
Disk Test	120.21
Sequential	182.63
Uncached Write	305.03	187.28 MB/sec [4K blocks]
Uncached Write	323.33	182.94 MB/sec [256K blocks]
Uncached Read	78.29	22.91 MB/sec [4K blocks]
Uncached Read	362.56	182.22 MB/sec [256K blocks]
Random	89.59
Uncached Write	31.76	3.36 MB/sec [4K blocks]
Uncached Write	353.19	113.07 MB/sec [256K blocks]
Uncached Read	170.70	1.21 MB/sec [4K blocks]
Uncached Read	223.48	41.47 MB/sec [256K blocks]
So quite a bit faster at least according to Xbench. I also measured cold-boot times until the Quicksilver logo appears. Before: 2 minutes. After: 41 seconds. Nice! :)
Now I just need to copy a lot of data from the old disks – unfortunately my brand new SATA docking station seems totally dead..
Posted in hardware | Leave a comment

Shuttle Launch Movie

Since I finally got my launch movie rotated I thought I would put it on YouTube. It was tough conditions for my small camera but I think it did an okay job on capturing the crackling sound of the Solid Rocket Boosters – especially if you play it on some decent speakers :)

Only 5 more days until she flies again! :)

Posted in photography | Tagged | Leave a comment

Rotating movie files…

I’ve been looking for a way to rotate movie files taken with my pocket camera for ages and I finally found the tool to do it: mencoder.

For some reason no movie player that I’ve come across will play movies shot in portrait mode rotated properly. Maybe the information is not stored within the movie file – anyway the end result is that you have to tilt your head when watching!

I really wanted a tool that could do loss-less rotating but I’m not sure mencoder does that. Anyway it works fine.

Movie rotate:
mencoder -ovc lavc -lavcopts vcodec=mjpeg -vf rotate=2 -oac copy orgmovie.avi -o rotatedmovie.avi

It also does another thing I’ve been wanting to do: Making a movie file out of jpgs. Here is an example of some options that created a file that works in QuickTime:

mencoder mf://*.JPG -mf fps=8:type=jpg -ovc lavc -o rig.avi -vf scale=640:480 -ffourcc DX50

The Mac executable I downloaded from the MPlayer site didn’t include mencoder so I got it using MacPorts instead.

Posted in photography, software | Leave a comment