|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
I decided to blog programs that I wrote that stuck in my mind. This is not in order nor is it all of the stuff that was important, just the memorable.
When I worked on the SMCS project, they had custom graphics hardware consisting of a manager card and a raster graphics card.
The manager card was programmed in Ada (the original "Ada 83" dialect using the Intel compiler for bare i386 processors which was resold by Telesoft).
The raster graphics card was provided by Dowty (since renamed Ultra Electronics) and had some atrocious bugs (pretty common with custom developed hardware/software systems). One of them was that elliptical arcs were shockingly slow. It was *much* faster to break the ellipse down into line segments on the management card and render it that way than to send over the defining points and let the raster card do it. Ellipses were used on the tactical displays, so this was important.
I wrote the routine to do this and in the process learned a bit about the mathematics which underlie drawing an ellipse. It turned out that the parameters that the raster card used to generate an ellipse were somewhat obscure (the API was something like PHIGS), so I ended up solving for intersection points between straight lines and elliptical arcs as part of working out the line segments. You need to use ATAN2 in this because you need preserve the sign of the arguments - 45 degrees is not the same thing as -135 degrees in this case.
The routine needed quite a lot of testing since we needed to balance the smoothness of the generated curve vs the performance, whilst maintaining correctness. I wrote such a complete test program that I found it quite enjoyable to play with for fun, especially since I had completely refactored the support library that talked to the device driver. As an example I generalised the thread support to allow any number of threads ("task" in Ada) to talk to the display, which was better and more flexible than the hard-coded setup actually used in the command system. Each task registered itself and serialised access to the device using the mutex support in the Telesoft Ada run-time extensions. I also made it independent of the incredibly cumbersome code-generation based main build process, but that's a whole 'nother story.
At the time I didn't even have a home computer, so my recreational programming was done at the office at weekends. I took my extended/refactored graphics library and replaced the simple elliptical arc test program with an implementation of Asteroids. It never reached full playable game status, but it did provide some light relief when seen in the target hardware area, running on navy-green water-cooled military display hardware.
I wanted this work to live on a little bit longer than just the
elliptical arc performance bugfix, so I checked all the modified code
in, probably in a sort of private branch, however nobody was really
paying attention, I'm sure nobody ever looked at it
again. Nevertheless if anyone ever needs to do something with the
custom graphics hardware fitted to the original
(pre-Solaris,
pre-Windows)
SMCS graphics hardware, I could be your guy!
posted at: 13:38 | path: /progs | permanent link to this entry
I spent some time recently trying to boot my Sun Blade 1000 with OpenSolaris 2009.06 but it's a bit non-trivial and ultimately I found not possible ... yet.
Some background:
OpenSolaris launched last year with the 2008.05version and did not support SPARC machines at all. I thought this was fine as I imagined all the developers hacking away on their fast cheap intel-architecture laptops. I did hope that the sparc version would happen eventually. There are still a lot of usable sparc machines out there in the world. Some of us even still like them...
The next version was 2009.06 and it supports SPARCs. Yay! I have a lot of old SPARC machines and it would be nice to use the new version. My Sun Blade 1000 for example makes a good backups server. It's reassuring to keep a copy of critical files on a DLT tape stashed away in a bookcase, disconnected from power surges, lightning strikes etc.
A recent opportunity to use OpenSolaris as a workhorse for some infrastructure development at my day job confirmed for me that OpenSolaris is definitely something I want to use when I can. The Open Solaris project has had its ups and downs but with OpenSolaris 2009.06 I think the proof of the pudding is in the eating - this is a fabulous operating system, maybe with some teething troubles, but the potential is awesome.
Anyway ... The only version of OpenSolaris available for sparc must be installed using the automated installer i.e. there's no live CD or install media of any kind. This was a little disappointing but having used the older Jumpstart technique before this didn't seem an impossible barrier. Just as with Jumpstart, in OpenSolaris's Automated Installer system you set up some other machine to be network accessible to the target machine, and with the operating system files and boot configuration stored on the hard disk. The chicken-and-egg part of this right now is that the install server for automated install must also be running OpenSolaris. The other related problem is that the documentation is written in Sun's documentation-speak and takes a bit of decoding.
I spent one lost Sunday trying to scrounge together some PC bits to make an install server, but nothing worked. After finally managing to boot from the OpenSolaris 2009.06 liveCD, the operating system hung probing the hardware. I suspect it just needs more memory.
Switching from oldest to newest, I then tried setting up an OpenSolaris virtual machine in Virtual Box to be the install server (running on my MacBook Pro). I use bridged networking in VirtualBox so that the virtual machine acts as close as possible to a real machine with real network ports, so one gotcha I had to deal with is that this means the virtual NICs in the Solaris VM are locked to real NICs in the host. So when I switched my laptop from airport to ethernet, I had to remember to remap the virtual NIC. The intended install network (my "lab network") is a private ethernet network using 172.16.x.x IP addresses so I configured the laptop to use IP address 172.16.0.4 on its ethernet port, then I mapped the VMs NIC to the hosts ethernet and assigned 172.16.0.3. Bingo, MacOS host and OpenSolaris client VM both on the same simple ethernet subnet as the target hardware.
I configured the automated install and had it unpack the install images read for netboot, then I powered up the Sun Blade 1000 and did a
> boot net:dhcpbut all I got was
Timout waiting for BOOTP/DHCP reply. Retrying
Time for some more research. It turns out this happens if the SPARC machine doesn't support "WAN boot". As the Sun Blade 1000 came out in 2001, my guess was it would be lacking WAN boot support, and indeed it is :
# eeprom | grep network-boot-arguments #
So... my SPARC hardware isn't capable. Bummer. That's the newest/best SPARC machine I have.
Not wanting to give up, I researched it still further. The beauty of a project like OpenSolaris is that much more of the engineering discussions at the cutting edge are published. Not just documentation written by documentation people when the product is ready, but the bugs and headscratching too. I found out why OpenSolaris's SPARC support is so limited right now, but also some good news for the future, check this out ; Bug 9549 - Sparc AI client doesn't bring up network if not booted using DHCP
Briefly, the new boot mechanisms in opensolaris are built to support a wider range of boot methods, it's just that there's a blocking bug : unless the machine happens to be booted using the WAN boot method, opensolaris simply doesn't bring up the NIC properly, as it remembers the boot device and attempts to "plumb" it (Solaris speak for configuring a NIC).
If you read the thread, you'll see that Jan Damborsky worked out a temporary hacky fix for the NIC problem and patched the OpenSolaris install files on the automated installer, then Mary Ding was even able to successfully netboot a non-wanboot-SPARC with OpenSolaris 2009.06. Yay!
Now all we need is the Sun engineers to actually release this fix (perhaps in the next full version) and many more older machines will join the modern OpenSolaris world.
Update: As is often the way, after I wrote this, I found that Dave
Miner recently explained some of this nice and succinctly on
BigAdmin's XPert
Session - OpenSolaris InstallationQ and A session.
posted at: 13:26 | path: /solaris | permanent link to this entry
I watched this with my wife and our 5-year old daughter. It was enjoyable, but we all found it not as good as the first movie. The story was not very interesting. Strip out jokes, running gags, funny cultural references and this is a fairly thin bit of story telling.
My daughter even said the first one was much better immediately after watching. I feel that perhaps it was overloaded with characters. You have the four main characters, the crazy grandma, the penguins, the safari tourists, the zebras, the lions, the hippos, King Julian and his sidekick, Mort+ shark, the Monkey brothers etc etc. The plot felt like a watered-down Lion King.
Also somewhat spoiling our enjoyment, the print was extremely
worn. This movie has only been out a week. We will probably give
this another go on DVD when that comes out, but NOT recommended
for a family movie theater outing given the total expense these
days.
posted at: 12:08 | path: /films | permanent link to this entry
We bought an XO laptop through the give one get one program.
Initial impressions were that the hardware is very nifty for kid-sized people at least, but the software was not quite done yet. The trackpad was too sensitive and the cursor would sometimes get a mind of its own. Flash apps were borderline unusable with Gnu Gnash instead of "real" Adobe Flash, and the laptop cannot usefully sleep, so runs down its battery continuously until you shut down.
I'm happy to report that things are looking up however, I installed
build 656 yesterday and I find that the keypad is at least usable now.
posted at: 00:24 | path: /olpc | permanent link to this entry
VW has announced that the new Scirocco will not be coming to the US. Apparently they expect people to buy a GTI or an Audi A3/S3 instead.
As a former Scirocco owner (and current owner of an Audi wagon) I'd like them to know that I would buy the Scirocco, but probably wont buy a GTI or an A3, so they're denying me choice and most likely losing me as a customer for something small and sporty.
To me, an Audi is too expensive (as a second car for fun) and a
Golf is too boxy, but, just like Goldilocks and the Three Bears, the
Scirocco is JUST RIGHT. I am intrigued by the TwinCharger engine, I
like the raked coupe looks and the price would probably be within
reach. Please, VW USA, reconsider.
posted at: 13:05 | path: /misc | permanent link to this entry
My latest hobby is deleting email. I used to keep it all, but I get way too much and I don't care about a lot of it. Now I've started to delete it. My new rule is if a machine wrote it, I am not interested in keeping it very long. It might be news, it might be a special offer, it could be a cvs commit, an error message on my server, but basically if I didn't look at it and act on it in a certain period of time then a) it's now old and probably useless and b) I can probably get the same information still somewhere else.
It's so liberating to see my inbox full of just personal emails that people typed to me. I think subscribing my own personal email to mailing lists is a time stealer, let alone Amazon, Barnes&Noble, Borders etc etc all spamming me regularly. So... they have all been nuked, even from my backups!
I've even discovered that Apple's Mail.app is not quite so slow as
I thought - it was doing quite a good job in face of a massive
overload of impersonal machine generated email.
posted at: 20:12 | path: /misc | permanent link to this entry
Multiple Bifurcations is a term that I first heard from Andy Grove when he explained the future of Intel product positioning.
In my case, however, it's just a good term for how I'm slowly losing my mind. Instead of being interested in "Unix", now one has to consider Solaris, Mac OS, Linux, BSD etc. They all have their strengths and weaknesses, such that I can't just standardise on one. I love my old SPARC machines, for example, and Solaris is best on those. I use my various Macs for music, video, email and web browsing. Gotta have those. But for my webserver, my home-brew Slackware Linux machine is still plugging away after several years reliable duty.
Similarly, for blogging, I started off using Blosxom on Linux. It's really simple and I can work disconnected too. On my webserver I can post from a simple ssh session, or I can work on my mac and then upload afterwards.
However, for blogs with themes, photos, counters etc, I have been
experimenting with "iWeb". It's just about ok for a first 1.0 release
of a product, but has some shocking limitations. For example if you
have a slideshow, every photo is shown with a sort of reflective
foreground, like it was standing on a black shiny surface. There is no
way to turn this off. Personally I hate it. HATE IT. Also there is no
way to participate in the quality of photos, I can't ask for bigger
images, or smaller thumbnails, or more sharpening. I think that Flickr
is most likely better. Finally, a friend of mine has Aperture and a
quad Powermac with 4.5GB and produces some fairly nice slideshows
using that setup.
posted at: 19:05 | path: /misc | permanent link to this entry
My Sun rep was kind enough to arrange an Ultra 40 box as a demonstrator. I've had it up and running for a couple of weeks now and overall, it's great. Herewith some of the highlights and lowlights. Drawbacks :
Otherwise though, it's an awesome machine. I replaced the cheap mouse with a Logitech item I had lying around, since the "middle button" function was sticky (you push in the scroll-wheel, but often it wouldn't click out again). Since the machine has convenient front-facing USB ports I simply plugged in the extra mouse and it just worked. I love USB.
I even like the new Sun Type 7 USB key, and fortunately it came with the PC layout that I prefer (Ctrl key below the shift key). If I were Rich Teer I would have been disappointed not to get the unix layout, but I've just never learned to type that way.
The noisy high-speed fan noise is only the first time power is applied to the box, once it settles it has, so far, never made that kind of noise again, apart from one time it accidentally got unplugged.
Since the machine is a demonstrator, I wasn't sure what kind of spec. I would be getting. I discussed it with my rep and tried to emphasize the things that are useful in my team and those that are not. In particular, we don't use a spectacular amount of RAM, nor high-end 3D visualisation.
For some reason, though, I ended up with the "large" configuration, which is as follows :
So I probably have the fastest PC at my office.
The machine came with Solaris 10 pre-configured, however since I no longer have any Solaris responsibilities at work, I reinstalled it with Windows XP Pro 64-Bit edition.
Sun did a nice job with the Windows drivers for this machine, after downloading and burning the ISO CD image they provide, we were able to get everything working nicely.
Once I finish setting the machine up for my main responsibility
(running a Windows development team) I hope to stick in a second hard
drive and set up a double or triple boot environment so we can explore
this machine under Solaris 10 and Linux as well. Our source code
repository is kept on Unix and runs a homebrew bunch of perl scripts,
so a nice unix dev box may come in handy from time to time also. I
have some ideas about using ZFS with our CVS setup, and this box would
most likely just fly as a ZFS host.
posted at: 17:33 | path: /solaris | permanent link to this entry
I've been away from blogging for a bit. I started blogging due to some encouragement from the OpenSolaris pilot crew and Jim Grisanzio, but then the OpenSolaris launch was so amazingly full of life and expert blogging, I didn't feel like there was much more to say. But life has settled down a little bit and perhaps I will be able to find the time.
So what's new? Well, lots of things... apologies for a 'portmanteau' blog post, I will behave myself and categorise entries properly following this one.
On the Solaris front I recently dipped my toe into Solaris x86. Previously over about 10 years of using Solaris, I had never seen or logged into an x86 incarnation. I converted an old Linux machine I had lying around unused and got b27a installed fairly easily. Netbooting, loopback filesystems and endian-neutral DVD images should make this all extremely convenient for the well-organised, however for hardware where it's unknown whether the OS will install, I prefer good old fashioned CD images. After all if there is a good chance that the install may fail at any point, then it makes sense to sit and babysit the process... so then feeding in CDs every few images is not much additional hassle. That's my excuse anyway.
The nominal reason for all this was I wanted to play with ZFS and the machine seemed like a nice target since it has 4 scsi drives. I got as far as making a mirrored pool and filesystem and mounting it and creating a txt file. It really is as simple as the blogs from the ZFS team claim. Very impressive. I plan to use the mirrored space for my most critical files - my documents, email, programming projects and digital photos. I've been distracted from getting any further by problems with the X11 configuration (naturally, I always have problems with this it seems) and also the NIC configuration.
The machine has a genuine DEC Tulip chipset 10/100 ethernet card, which unfortunately cannot be persuaded to run at anything better than 10Mb half-duplex under Solaris. Fairly horrible for a machine I am prepping to be a fileserver. I tried various setting in /kernel/drv/dnet.conf including a reconfiguration boot each time, but to no avail.
First impressions are that Solaris x86 on this machine, in its default install, is a bit of a dog. Slow to start, slow to shut down and not that snappy in between. However, I am sure this is partly because lazily installing the entire set of software on a machine with only 256MB RAM, as I did, makes no sense. It was a first install, I plan to do it again when a ZFS enabled build makes it to an official Solaris 10 point release, or perhaps Solaris 11 comes out. And ... yes, I did know that I could pick and choose the packages myself if I wanted to. For a first install the urge is always to finish the job and she what the machine can do.
On the other hand, Solaris nicely recognized both SCSI host adapters and didn't barf when it noticed the IDE channel is idle. Yes, this is a PC with nothing connected to the IDE controller : SCSI hard disks, SCSI cd-burner, SCSI tape drive, SCSI zip drive. Has an original Athlon 750Mhz slot-A cpu. In 2001 this was something of a dream machine in my eyes.
For my trusty Sun Blade 1000 I upgraded the backup facilities. As much as my DDS3 drive gave good service, a Quantum DLT7000 is a significant step up. I managed to get a factory refurb with very low hours on the heads for about $300 on Ebay. 35GB native capacity and DLT tapes have a bit more reassuring heft and solidity than DAT tapes. Some people apparently feel that the non-helical-scan formats are a more reliable choice for backups, I wouldn't know, but choice is always useful. I can for example backup up selections from that machine to cheap, ubiquitous DDS3 media, but occasionally do an archival level 0 dump to good old DLT tape and put it away for safekeeping.
Other stuff I'll blog :
Made Out of Babies played NorthSix last Saturday 7/23/05. The gig went pretty well, and featured the New York City premier of their latest song "Gunt".
No, I don't know what it means! It's kind of dreamy and hypnotic in part, chaotic in others with a chugging beat.
Once again I filmed the gig, and hope to share the results with the band at some point. Picture quality came out so-so due to low, mostly red light. Sounds quality not bad, varies depending on where I was standing. As requested I tried to get some footage from towards the back to show that, yes, there is an audience at these gigs!
New, non-album tracks now in the can include Gunt, Space Patoozy, Tractor, Fed and Out (Full Version).
I'm not a music writer, but here's my take :
