Sunday, February 11, 2007

Lomont, Mandelbrot and the CoCo 3

Chris Lomont is a computer scientist for Cybernet who, like many of us, has a wide range of interests. His personal page is fantastic example of what a real personal page should be, with sections on everything from Sudoku to Philosophy. He's also got an amazing LED cube kit, called the Hypnocube you can buy and build yourself (you can buy it complete, but where's the fun in that). Oh, and he also does CoCos.

Mr. Lomont's CoCo page is currently on a single subject, a Mandelbrot renderer for the Color Comptuer 3. Written in assembler, the program generates those wild and hypnotic images from the Mandelbrot set right on your own CoCo, or emulator as the case may be. One of the reasons I haven't been active much is, thanks to Mr. Lomont, I've been letting my CoCo run this program pretty much non-stop for about two weeks.

The CoCo 3 rendering the Mandelbrot set using Chris Lomont's generator.
This is the first pass that gets more detailed in each successive pass.

When I was a wee lad I never turned my CoCo off. Seriously, for about ten years, and through three CoCos (1,2 and 3) I doubt the thing was off more than a few hours. Maybe longer if we went on vacation, my memory isn't that good, but mainly it was on 24/7. Since I got back into the CoCo two years ago, it's been mostly off. I turn it on to play games, mess with it, and test vintage stuff, but when I'm done I shut it off. Not lately, though.

With Mr. Lomont's program running, Ramona (the CoCo 3) runs pretty much all the time. Why?

I honestly don't know. Mandelbrot generators fascinate me for some reason. It's one of those weird psycho things, because I really have no idea how they work, why they work, what it's suppose to represent, or anything else for that matter. Did I mention I suck at math and numbers? Yeah? Good. Okay, I did wiki it and actually learned something. But that's not why Chris Lomont's program is so cool. It's just that it makes really cool fractals. More, it makes really cool fractals on a CoCo. Double whammy!
The full set after the final pass on the CoCo 3. Sweet, eh?

First things first. If you just want to see what the program does, or study the source code, fire it up on a PC using an emulator. I ran it in MESS with the throttle off and it renders at a pretty good clip (for an 8-bit computer emulator that is). Very nice. The various assembler routines Mr. Lomont has developed, including a low level keyboard routine and the fixed point mathematics routines for the CoCo are worth looking into for programmers. Mr. Lomont did all the hardware interfacing routines direct, so there's no ROM calls at all. For those looking to go to the CoCo hardware directly, here's a good example of how to go about it.

He's also compiled a couple of outstanding resource files on the CoCo hardware and the 6809. While not complete at the moment, the amount of information included, and the excellent format, make these two compilations pretty essential. Of planning on programming the CoCo seriously, snag these right away.

Of course, if you want a Mandelbrot generator on the PC, just google it and you'll get a ton of them. Good ones, too. But it isn't a CoCo, ya know?

About five zooms in and after three (I think) passes. You can select
how deep you want to go at any point in the program by pressing
a key, which brings up a bounding box to select the area of interest.
The colors were washed out by the camera. The colors are nice
and sharp on a real CoCo.

So how is it on a real CoCo? Fabulous! The images, even in 16-colors, are gorgeous. The caveat, of course, is that it takes a long time to render a selection. As in hours. Mr. Lomont anticipated this and has the CoCo do a quick pass first, so you can start doing deep zooms much faster, looking for interesting fractals. The CoCo then continues to get more detailed with each successive pass. A full render takes several hours, but the result are wonderful. This is truly the CoCo as art. :)

The program does it's job well. You probably do want to download the second version listed on the site. That's the one that includes the zoom feature and progressive rendering. Mr. Lomont also mentions on the site that he may possibily revisit the program. Personally, I'm thinking the save to disk feature would be great. (I have to use the digital camera to capture the nice ones, but it's not really ideal. Also, with a save feature in a standard file format, you could, say import the images into CoCo Max or another editor and play with them.) It would be fun to have several zooms saved to disk and a simple slide show viewer that could show them progressively, or even give a guided tour of some of the more popular and wicked cool sites in the Mandelbrot set (some even have names). A 256 color version is mentioned as a possibility, as are a timer, finished sounds and animated palettes. All would be very cool. I'd also like to see a way to force the program to skip ahead to the "final pass" after finding an agreeable location. As it is now, it goes through each progressive set non stop.

The camera keeps washing out the colors, but I liked the
shape of this one. Drill in much deeper around the point
there and it goes into some neat spiral patterns.

This is a perfect example of CoCo love resulting in some really cool development. Chris Lomont has created a really neat Mandelbrot program for the CoCo. But more importantly, he's done some serious scrounging of technical details on the machine and graciously compiled them for all to use. And to top it off, all the source code is posted for perusal.

Oh, and he also mentioned the possibility of porting Lemmings to the CoCo. Ohhh! Don't tease... :P

Stop by Chris Lomont's site and get your CoCo exploring the infinite possibilities of the Mandelbrot set, dig the technical docs, and enjoy the code. While you're there, poke around the site. I guarantee it'll be an interesting stop. Now I just need to start saving my pennies to snag one of those wicked hypnocubes... hmmm....

Angel's Luck,

Drop by Capt's CoCo Hut to discuss this article, talk about CoCo collectibles, and chat abuot NitrOS-9 with the one and only briza!

Tuesday, February 06, 2007

Sinistaar 512K Joy

Every bit you add to your CoCo, every upgrade you slip in, and every countless hour you spend punching away on the cramped keyboard adds up. The payoff is always worth the effort with this little guy. :) I haven't been posting much because I'm STILL playing with my CoCo! The move to 512K is part of it, of course. The games are wicked.

I've got tons of stuff ready to post, but one at a time here. First off is Sinistaar. Pretty good game, with excellent "16-bit" like graphics. These two screens are just samples. I couldn't get a shot of the game in action. I was playing it too much and letting those little miner-dudes get through to the evil head guy is just not permissible. The game itself is pretty shocking the first time you fire it up and see it play. You won't believe it's a CoCo. And then you will. :) This is the sort of stuff the CoCo can REALLY do. This isn't the best thing you can do with a 512K CoCo, but it certainly shows it off nicely.

The Faults

The bad stuff isn't too bad. The game stutters a bit when there's several objects on screen, all swirling and running about at the same time. Including the big Sinistaar guy. After a few times through, you anticipate it and actually use it to your advantage. But it shouldn't do that. And it loads from three floppies. So when you're ready to play, bring a lunch.

The Good Stuff

The game play is a lot like what I remember the original arcade being like. But I never got into the arcade game that much. The sound effects are serviceable in game for shooting and such, then get freaky when the giant head-thing starts talking. Which quickly degenerates into a Rocky Horror audience participation event. "I LIVE!" (for Spam!) "I HUNGER" (for your mom) "RUN COWARD RUN!" (Who's Howard?) It's nice and creepy.

The graphics are great. The asteroids alone are worth the load time. The game play is challenging, but more freedom of movement would be nice. The ship only moves and fires at set angles. Of course, that's part of the design, otherwise you'd end up with an asteroids shooter and it wouldn't be quite as challenging.

Overall, Sinistaar isn't a reason to upgrade to 512K in itself, but it sure is a nice bonus.

Angel's Luck,