Category Archives: My Projects

Success!

Running my Enigma Simulator

Well, I have achieved a modest amount of success! Yesterday, I burned my first EPROM for my Atari 2600 project. After figuring out what I was stupidly doing wrong, it worked without problem, and I stuck the chip into my Atari Age carrier board, stuffed it into the Atari 2600, and, it worked! Just like it did in the Stella simulator! I’m shocked! Nay, amazed!

The EEPROM Cartridge

I’m sure that in the future I’ll be able to find all sorts of good things to do with my EPROM burner, but at the very least, this project has been a rousing success!

Now all I need to do is finish tuning up the code, and I’ll be all done. Because of somewhat sloppy coding, I’m approaching the 4K limit of codesize, so I need to write some bankswitching (or else tighten my code, which seems like it would take longer and be somewhat counterproductive.

More cleaning/enhancing of frames…

I was watching the previously mentioned MPEG of The Phantom of the Opera with an eye toward cleaning up it, and found that by and large, it really is dreadful. The transfer seems very poorly focussed, so getting any reasonable detail out of it seemed difficult.

But, I thought I’d experiment anyway. I extracted five consecutive frames, averaged them, did a bit of burning and manipulation with softlight filters in the Gimp, and came up with:

Phantom!

Addendum: I worked up a second one to, showing the phantom. Yep, it’s blurry.

Phantom!

Fun.

Cleaning up old video…

While I was encoding videos over the weekend, I wrote a simple little filter to average consecutive frames to produce less noisy versions of title cards. I tested it on 25 frames from the titles of The Vampire Bat.

It looks a little soft because I haven’t worked out the registration, but it nicely eliminated various frame artifacts like dust and scratches. I’ve got the silly idea that relatively simple processing like this can make relatively bad prints such as this one into more attractive prints, if not actually good ones. I’ll have to work on it some more in the future.

Addendum: This might be a good place to start with a more sophisticated version.

EPROM burner arrived…

EPROM burner

Well, my EPROM burner from mcumall arrived, and I’m now got all the hardware bits ready to burn a cartridge for my old Atari 2600. Now all I need to do is finish the programming. I worked on it a bit last weekend, added page flipping and worked on getting the user interface better. In the process, the display itself has gotten a bit crufty, I hastily put in some calculations that added some blank lines, I haven’t quite gotten the plugboard interface in, and sound. But a good productive afternoon should tidy up all those bits.

This is the silliest project I think I’ve ever done. But still, a good excuse to get an eprom programmer.

Free World Dialup

I spent some time this weekend playing around with Free World Dialup. What is that?

FWD allows you to make free phone calls over any broadband connection using devices that follow current accepted Internet Standards. This can be a “plain old telephone” with an IP adapter, an IP based phone or any number of free soft-phones (software for your PC or PDA like Pulver Communicator). However, FWD is more than just free phone calls. FWD is a complete IP communications network.

I mucked around with this a bit in the past when I was experimenting with Asterisk. But let’s face it, using a laptop to do phone calls was just… well… I’d rather use a real phone. To do that, I needed some sort of SIP adapter. Interestingly enough Linksys is making zillions of these, specifically the PAP2, which are generally sold locked to Vonage, one of the cheaper and best known VOIP providers. They are cheap (Staples had them for $50 with a $50 rebate, and the one I got from Best Buy was $35 with a $10 rebate), so it’s kind of a pity they are locked.

Well. You can get around that. It’s not a complete nobrainer, so I don’t recommend this process unless you are fairly comfortable with screwing with things, but I did manage to get it to work. Once you’ve got it unlocked, you can use Sipura’s instructions on using their adapters with FWD to retarget it (it turns out that the PAP2 is identical to an Sipura 2000, except for minor software differences).

So now I’ve got an IP phone. It doesn’t really interface with the PSTN, but it’s a cute gadget. I will probably use it to play around with Asterisk. Should be fun.

Besides, it’s got blue LEDs in it.

Anyone whose using Free World Dialup can call me at #709654 and leave me a voice mail.

More retro programming…

My label for my Atari Retro Project

Well, a few minutes of Postscript programming, and I created the label on the right for my Atari 2600 programming project. In the next couple of days, I should have an EPROM programmer in hand, I’ll be able to burn my own cartridge of my Enigma simulator, stick this label on it, and call the project completed.

Then it will be time to move onto the next thing that will make my wife shake her head and wonder just how crazy I am.

Telescopes are cool…

Contrary to appearances, I actually try to read blogs of people who are perhaps a bit different than me. I do this to help fight against the perception (mostly my own) that I’m a monochromatic personality, interested only in a few geeky topics. Lisa Williams is such a blogger, who writes about a number of subjects which are near to my heart even if I lack the skill to write meaningfully or interestingly about them myself. Nonetheless, tonight I read that she managed to sneak a peek at M13 through a beautiful telescope at Wellesley. I was lucky enough to participate in the restoration of a large historic telescope here in Oakland, a 20″ Brashear refractor. It is now housed at the Chabot Science Center and is available for public viewing on weekends. Drop in and have a peek if you are ever in the area.

Addendum: the image on the right is a recent picture of this telescope in operation at Chabot. I’ll try to upload some more of my pictures to this gallery over the next few days.

The Basics Work…

Enigma, on the Atari 2600

Well, a couple more hours of debugging has made the basics of my Atari 2600 project work. Have I mentioned what it is yet? No? Well, it’s an implementation of the German World War II three rotor crypto machine commonly known as the Enigma. I wrote a simulator of the machine in C a few years ago as part of my attempt to crack the ciphers in Simon Singh’s Crypto Challenge as part of his book The Code Book. As of today, there still is some work to be done, but my 2600 version works, deciphering messages that are encoded with my C implementation.

Still more 2600 hacking…

Well, today I added a block cursor that I could move around (first real time I’ve written a general motion code for the player missile graphics, kind of whacky). Figured out the joystick handling and even added some primitive (and I do mean primitive) sounds.

I also picked up some real Atari 2600 hardware to go with these PC boards. I’m gonna eventually burn my creation in EPROM and run it on the original hardware.

Brainwagon Radio: Retro Programming on the Atari 2600

Mostly this podcast concerns itself with my latest geeky project: writing programs for the old atari 2600. Why would anyone do this? Have a listen! Hear the sense of childish joy I take in wasting my time!

Screendump of my Spacewar! emulator

In the podcast I mentioned my implementation of PDP-1 simulator so I could run the original Spacewar! game (a video game which is just barely older than I am). I thought I’d provide this link to it.

Eventually, I’ll have binary images of my “game” available that you can run on Stella. If youa re impatient, you should just grab a copy of it and start writing one yourself. 🙂

More Retro Programming

Brain Wagon

I’ve been mucking around more with programming the Atari 2600, and have just begun to figure out the vagaries of moving the player missiles around.

It’s complicated.

Basically, as the video hardware scans from left to right, you set the horizontal position of a player by issuing a store to hits horizontal position register. The problem: the 6502 is only fast enough to set the position within 15 pixels of a given location. To refine the horizontal position, you need to issue a shift of -8 to +7. The timing is critical and tricky.

I haven’t really worked it all out yet, but I have players moving behind the playfield here in my example.

I think I need to carefully work out the timing on paper before doing anything more refined.

Addendum: Not really sure where that little black bar is coming from either.

Retro Programming

From time to time, I get this curious nostalgia for the computers of my youth. Don’t get me wrong: I love having megaflops to burn, and would gleefully accept more. But sometimes I hearken back to the simpler days of my youth and my first computer: an Atari 400 that I bought with the money I earned by mowing lawns and cleaning the volcanic ash from Mt. St. Helens out of gutters. My old Atari was actually a pretty fun machine with a flexible, powerful (for its day) video architecture. The entire OS ROM was (if memory serves) 10K of 6502 assembly code, and I got hold of the assembly source for it, and read it front to back, studying it for its mysteries.

Brain WagonOver the past couple of weeks, I decided to set my clock back even further, and learn how people programmed the Atari 2600: the first programmable video game that became truly popular. I had forgotten just how primitive the thing was:

  • 1.19 Mhz 6507 processor (like a 6502, but with only 4K of addressable memory)
  • So called “player missile graphics”, two 8 bit wide sprites and two one bit wide missiles
  • No framebuffer: all backgrounds are generated “on the fly”

And yet, people made lots of games for these things. In that spirit, I set out to implement a simple game. I haven’t really gotten two far in a couple of hours of programming, but on the right you can see a screen dump of a title screen that was actually generated by writing assembly code, assembling with p65, a 6502 assembler written in perl and then running the binary image on Stella, a 2600 emulator.

I’ll yap about some of the technical details in this evening’s podcast. If you are interested in this gunk, tune in!

Addendum: Josh reports that he’s getting my “don’t steal bandwidth” image when reading this feed in bloglines. I just checked my own bloglines subscription, and it appears to be working fine for me. Is anyone else having problems seeing linked images in bloglines? I put in a special exception for bloglines, so there shouldn’t be any problems (that is, if my weak understanding of how all this stuff works is actually correct). Drop me an email if you are still having difficulties.

Dr.Weil on EGCG

The other day I was watching TV and saw an advertisement for One a Day Weight Smart Vitamins. Most of the diet plans that I’ve seen lately recommend augmenting your diet with vitamin supplements, something that I’ve done only irregularly through my year and a half attempt to reduce my weight. Since I was out of vitamins, I trudged down to Long’s and picked up a bottle. The selling point of this particular brand is that it contains EGCG (green tea extract) which they claim enhances your metabolism, and doses of chromium, selenium and B vitamins. I was curious about EGCG’s effects on the body. Studies have shown that consumption of green tea can have lots of good health benefits, including effects on inhibiting the growth of certain cancer tumors and possibly effects on luekemia. But I found it relatively hard to find data on the effects on diet and metabolism. The best link I found was:

Yahoo! Health Ask the Expert: Dr.Weil’s All Q&A’s > Can a Green Tea Component Promote Weight Loss?

Despite its many beneficial effects, I know of no good evidence to suggest that EGCG promotes weight loss. A study at the University of Chicago did show that rats injected with EGCG lost their appetites and ate up to 60 percent less than normal, but there was no effect on the rats’ appetites when they were given EGCG orally. The researchers who conducted the study speculated that long-term oral administration of EGCG might have the same effect on appetite as the injections but cautioned that humans would have to drink green tea constantly to get the results seen in the animal study. Furthermore, the EGCG injections caused hormonal changes in the rats that could have negative effects on health if they occurred in humans.

In other words, pretty speculative effects for weight loss. Dr. Weil does recommend drinking green tea, which (because you are consuming multiple cups of a liquid) probably does help you eat less, and has other proven health benefits.

Finding good information about diet is still really difficult.