Monday, October 10, 2005

Firefly and Serenity

Well, I did it. I managed to watch all the Firefly episodes before checking out the movie, with two hours to spare :)

I've got to say, with every episode I watched, I enjoyed the series more. The writing and character development is really well done, and it's pretty darned funny to boot. I can't believe they canceled it just as it was taking off. It was kind of the opposite of what Star Trek and Star Wars have been of late. Less tech, and much more fun. And this is from a guy who has a penchant for hard science fiction.

At any rate, I also enjoyed the film. I went with three others who hadn't seen Firefly, and they seemed to like it as well. I think it's quite a tough job to introduce this world and so many characters to an audience who may never have seen the series. Still the movie seems to do all this and more, with entertainment value that is missing in many other sci-fi films of late.

However, I actually think this whole concept works better as a TV series, rather than a series of movies. So, now I join the ranks who are hoping someone will bring back the TV show in some incarnation.

Monday, October 03, 2005

More non-emulation news :)

I have still been up to my neck in "real work". I hope it will slowdown in the next month or so. When I do get a few minutes - I am trying to read, and maybe catch up on TV a little.

I'm carving out enough time to finish Neal Stephenson's "Baroque Cycle." I find these books to be amazing. Exciting, intellectually challenging, but very rewarding. I feel like I've actually visited the late 17th and early 18th century. And Neal's themes about science, technology, commerce, etc. are quite intriguing.

As I side note, I TiVo'd the whole "Firefly" series, which I'd like to watch before I go see "Serenity". I haven't heard anything but good things about the movie.

Thursday, August 11, 2005

I'm still here...!

Ok, I haven't done much on MAME at all, except that I bought a Zero Hour board on eBay. Hopefully I can improve the driver when I finally get time to work on MAME again, now that I'm intimately familiar with the starfield generator circuit. :)

I've been extremely busy with work and home life. One weekend, I built a giant play system for my kids. A lot of work, but it turned out pretty nice!

Finally, for those who visit my horribly outdated web pages at, - I'm giving up the domain. You can still reach those pages here, until I move them again. Pay no attention to the inactive blog pages there :)

Wednesday, June 15, 2005

MAME Quickies

I've submitted 2 updates to MAME in the last 3 days. The first is the much improved Space Raider. The second one hooked up the starfield generator code to Zero Hour and Red Clash. I'm still planning to write up something bigger on this - describing how it all works - but I've been too busy this week.

Sunday, June 12, 2005

Space Raider Stars - done

Just a quick note to say that I've got the graphics on Space Raider 100% correct, including the starfield behavior. I've still got a couple things to look at, but my plan is to submit a driver update tommorrow. I'll try to add some screenshots a that time as well.

Wednesday, May 25, 2005

Speed Coin

I've had almost no time to finish Space Raider lately, so I thought I'd talk about the history of a game I own - Speed Coin.

As far as I know, I'm the only one with a Speed Coin cabinet. It's definitely a prototype, as the cabinet is made of nice plywood and not particle board. Also, the marquee and control panel are made of colored paper, colored electrical tape, and a blown-up xerox copy of a coin face. My understanding is that it came from Stern when it shut down.

The boardset is a Scramble, with hand-labelled ROM chips inside. Also, the wiring harness is different, since it only requires a 2-way joystick.

When I went to plug this into the Scramble driver in MAME (back in 1999!), I was stymied by the fact that the background was blue in MAME, but black on the "real thing". I traced through the PCB only to find that the monitor was adjusted with the blue gun turned off! When I adjusted it, it matched MAME exactly.

In case you are wondering about the sound, the music sounds kind of muted and noisy on the real thing, just like in MAME.

Last year, I was stunned to play Speed Coin in an arcade in Nashville, Tennessee. It turns out the Ultracade guys added that game to their Multigame system, under "Arcade Classics"?!. I'm sure they used the ROM images I dumped in my basement, and here it was on a machine in another city. Pretty strange feeling.

I really don't think it's a classic. More like "Arcade Relics". :)

Oh well, I'll get back to Space Raider this weekend, hopefully. I have a newly-found JAMMA harness and a brand new RGB-to-TV adapter which should make things easier. With that, I'll be able to take screenshots from actual boards, and compare them with MAME.

Tuesday, May 03, 2005

Space Raider Stars

Well, I found time to make a few more discoveries. The Space Raider boardset is 3 PCB's. Two of them are full size and obviously two halves of the same design. Then, there is a little PCB grafted on top, connected via a 24-pin dip connector, with wires going to the other two boards.

I suspected that this board was the starfield generator. Sure enough, if you unplug it and run the board, the stars disappear. Cool - less work for me.

Then, I noticed something else. Two chips were missing from the board, and it was labeled with the number 8011, unlike the other boards. Maybe this board is from another game? Searching through the MAME code, there is a comment that Universal game #8011 is Zero Hour.

Luckily, a manual and schematics are available for Zero Hour. The starfield board is the same! In Zero Hour, this board provides both color generation and stars. The missing chips in Space Raider disable the color generation part, since that's already on the main board.

Anyways, I added preliminary support for the scrolling stars to MAME, and it looks right. I need to measure a few more things to get the timing exact. When I'm done with Space Raider, I'd like to add the stars to the Zero Hour / Red Clash driver, since it's missing there as well.

As a side note - I hope these posts are interesting to someone. I think it's kinda cool to document the little things that it takes to get a MAME driver right.

Wednesday, April 20, 2005

Space Raider - update

Last night I got a bit further. I fixed up the cocktail mode, and decoded all the dip switches except one. I also found and decoded the bits which control the scroll speed and direction of the starfield. Finally, I found a "hidden" test mode while disassembling some of the code. (Hold down the fire button while resetting the game.) The todo list is getting shorter...!

Sunday, April 17, 2005

Space Raider graphics fixes

I got my JAMMA cabinet running again, built the Space Raider-to-JAMMA adapter, and got the board up and running over the weekend. This allowed me to fix most of the graphics problems with the driver! (Most notably, the grid is animating properly now, and it's the right color.)

The only thing that's noticable now is the lack of a background starfield. Without schematics, this will probably take a long time to get right.

Sunday, April 10, 2005

Atom syndication and blogger formatting

I'm not sure why my paragraph breaks are only showing up "sometimes" in the atom syndication of this blog. If someone has a clue, I'd love to hear it. I think it might have to do with whether I'm editing in HTML mode or not. Oh well, what do I expect for free... :)

The Car of the Future

This weekend, I had the pleasure of test-driving a 2005 Toyota Prius.

For those who don't know, this is a hybrid vehicle built from the ground up by Toyota. The engineering that has gone into this car is amazing. It has an internal combustion engine, and 2 electric motor/generators. They are connected to the wheels by an innovative planetary gear arrangement, which is basically simpler than an automatic transmission, yet has all the benefits of a continuously-variable transmission. There are other hybrid vehicles available, but as far as I know this system is the only one that's not really an "electrically-augmented internal combustion vehicle", with the exception of the Honda Insight which is a 2-seater. Toyota will be putting it into their Highlander SUV this summer.

For many more details and pictures, I recommend the web site of a Prius owner.

The strangest thing about this car is getting going. Insert your key fob into a slot on the dash, hold down the brake, and push the power button on the dash. The shift-by-wire control is built into the dash as well, so you simply temporarily move the knob to D for drive, and away you go. After that, everything is surprisingly normal - except it's almost silent until the engine turns on. The gasoline engine turns on and off as engine load or electrical loads demand. The window sticker says 60mpg city and 51mpg highway, and even though you'll probably never see those numbers in real life - I think you'll get 40-50 mpg in city driving no matter what. Oh yes, and emissions are reduced by 90% over a conventional vehicle.

It seems to have plenty of power. Although it's not meant as a performance vehicle, you have no trouble whatsoever merging into freeway traffic, for example. It's also got plenty of room - bigger than a compact car.

Right now as they ramp up production - they can't make enough of these cars. I just happened to get to my dealer when one showed up, and there were people in line behind me to buy it. Even at sticker price from $22K to $26.6K, these are very reasonable cars and look pretty distinctive as well.

I ended up buying a Corolla instead, but not because of any shortcomings of the Prius. It was a choice between the high-end Prius which had a bunch of gadgets I don't need, and a $17K car which would do exactly what I needed. Still, I can't help but believe that my next car will be a hybrid.

Thursday, April 07, 2005

Space Raider

I first worked on this driver last year, after Pierpaolo started it. (It's currently playable, but there are plenty of graphics glitches.) Unfortunately, I was unable to make any further progress without access to the physical hardware.

So, now I have the Space Raider board on my workbench, and I'm slowly making progress. It's amazing what one person can do with a multimeter, some databooks, and time. :)

Right now I'm concentrating on the I/O section for the sound cpu. In case anyone's interested, this is how I'm proceeding. First, I found the 5 sound chips and backtraced them to the address decoder for all the IO ports. Now I'm going through ports 0x28-0x2f, 0x30, and 0x38 and figuring out which bits are being used and for what purpose. Ports 0x30 and 0x38 go to a bank of 8 4051 analog mux IC's. They each have graduated resistor ladders connected to them. Maybe they are a fancy volume control or an analog filter. I should be able to get that figured out soon.

Additionally, I'm making up a harness to use to power up the board. I discovered, and they had everything I needed for <$15. I'm hopeful that I can get a lot more information by actually playing the game! :) It will be very nice to get the grid behavior correct.

Wednesday, April 06, 2005


I've had some strange thoughts lately about pirates. It came to a head while watching the "Pirate Party" on board the Disney cruise line.

First of all, I am a fan of Neal Stephenson and am currently reading "Quicksilver". Among many other things, there are pirates in there, as it takes place during the late 17th and early 18th centuries.

These were really bad guys. They were sort of like terrorists are today. It took the resources of whole countries to finally get rid of them.

Strangely, children dress up as pirates today. On the cruise, there was a pirate party with pirate costumes and dancing. And this was right in Blackbeard's old neighborhood, as I understand it.

I can't imagine my great-grandchildren dressing up as terrorists for Halloween. It would be nice to think that the problem will be so obsolete by then that it could be possible.

Ok, that's wierd you say. But it doesn't end there.

The Pirate party is clearly inspired by the "Pirates of the Caribbean" movie and ride, an important part of Disney's intellectual property.

But wait - the term piracy now refers to people who steal intellectual property! This is actually something companies like Disney are deathly afraid of today.

So, let me get this straight - the original pirates who murdered, raped, etc. are trivialized/stylized by children and everyone else. Meanwhile, the word pirate refers to people who copy DVD's, and now it's their turn to be stopped by governments and multinational corporations.

So maybe I've got it wrong. Maybe my great grand-kids will dress up as I.P. pirates. That would be much cooler than terrorists. :)

Cruise Review

Well, I went on the Disney Cruise over this past weekend - so I thought I'd post a short review.

First of all, I want to say that I'm not a big fan of the Disney corporation. I abslolutely hate what they've done to U.S. copyright law. Still, this was probably my only chance to go on a cruise with my family, so I have to deal with the guilt now. Maybe a big fat donation to the EFF will make me feel better.

I gotta say, Disney knows how to put on a cruise. They had everything an adult would want, but also everything kids like. For example, they've got adults-only bars, an adults-only pool, and gourmet food - along with tons of kids activities, foods, pools, etc.

The staff members must be trained to try to help when they hear a kid crying. They were very attentive and entertaining.

The shows were more oriented towards kids, so I didn't get a lot out of them. I believe I described one of them as a "nice review of the intellectual property portfolio" and got a funny look from my wife.

There were stops in Nassua in the Bahamas and Disney's private island "Castaway Cay". They were both nice and much warmer than Michigan :)

The only drawback I ran into was that my son is a little young (3) to enjoy everything they have. For example, they have a play/activities area which you can leave your child in, and they will page you when he/she wants to leave. My son was a bit too shy to be comfortable there without me - but my 7 year old niece never wanted to leave. When my son turns 5 or so, it would be perfect trip.

Saturday, March 19, 2005

Demons and Dragons - Part 3

Well, it's playable now. It's got robotron-style movement, with seperate controls for moving and firing. Moving actually uses an analog joystick, which can allow speed control, but I haven't actually hooked that up yet.

The only thing that's really missing is sound. It writes sample numbers to a port, so there must have been an additional audio board. Hopefully we can dig up more info on this, if the board and/or ROM images still exist anymore.

Friday, March 18, 2005

Demons and Dragons - part 2

Well, as it turns out - the one piece of Professor Pacman hardware that I didn't emulate is used by D&D. The good news is - I got it working tonight! Now profpac passes all self-tests, and demndrgn runs into the game portion. I need to map the controllers and dips now, since I can't control the player yet.

Right now there is no sound, but it sure seems like it was supposed to have speech! There is a part where a wizards head fills the screen, and his lips move. I wonder what's up with that?

Anyways - pretty neat stuff

Update: in-game screenshots...

Thursday, March 17, 2005

Demons and Dragons

This is a prototype game that is supposed to run on Professor Pacman hardware, or something very similar. I got it run a little bit...but it's not playable yet.

Saturday, March 12, 2005


I've been watching the Xen project for a while, and I think it's probably time I tried it. I like to play around with experimental OS's like Plan9 from time to time. I'm also hoping to build some custom Linux kernels for a work project.

Xen is Open Source software that allow you to run multiple OS's concurrently, with little loss of performance. It achieves this by actually requiring the OS to be slightly modified to work with Xen. As a benefit, any OS can take advantage of Linux device drivers, as well. As a side effect, it means no repartitioning is necessary to try a Xen-compliant OS.

Unfortunately, MS won't let the Xen-ified WindowsXP be distributed, but other OS's are coming around. The Linux 2.6 kernel is already ported, and some distros are starting to bundle Xen in now.

It will be interesting to see if this is a fad or the way of the future.

Midway Tornado Baseball

I got one of these PCB's yesterday. The ROMs look intact, so hopefully this will help with the "No good dump known". The auction claimed that it didn't work when powered up, but I'm betting that's mostly due to the missing CPU chip. :)

Friday, February 18, 2005

I'm 37....I'm not old!

Happy Birthday to me! I've been waiting for about 6 months to use that line (from "Monty Python and the Holy Grail" , a fine flick if you like that sort of thing)

I haven't switched to a new blog yet, since I've been sidetracked by the idea of using some kind of wiki/blog combination. The blog will remain here until I make up my mind.

Tuesday, February 15, 2005

Square-wave aliasing

So, I spent a bit of time addressing this problem.

Thank for the comments! First, I did notice that certain frequencies are more problematic than others. Higher frequencies tend to have stronger harmonics which fold over. However, if you have a tone that divides evenly into (sampling_rate/2), the folded harmonics land on top of the non-folded ones, so it sounds ok. Still, it's not right, but it sounds ok. I also know that I could process things at a higher sampling rate internally, and post filter it.

What was bothering me was this - in the "synthesis" problem, I know _everything_ about the waveform I'm trying to generate. So, it seems that using that information from N previous samples, I should be able to come up with a "optimal" solution in some sense.

As it turns out, one approach is to apply a window filter to the previous bit or bits, before generating the samples. The simplest thing is to use a one-bit-long rectangular filter. This is easy - and definitely sounds better than doing nothing. But it doesn't do a very good job as a low pass filter. For one thing, the cutoff frequency is fs, not fs/2 - but it does roll off well before that. Some of the other modules in the discrete sound system do this already as well.

Finally, I experimented a bit using a low-pass filter based on a Kaiser window. This gives great results, but you really need to use at least a few more of the previous sample bits to get decent results. 10 or so is darned near perfect.

Anyways, I'll probably look at some other approaches, including optimal low-pass filter designs, but in the end I'm not sure it's worth doing much more than a rectangular window.

A fine excuse to learn more signal processing, anyways!

Blockade.c sound again

MAME 0.92 has my simple code for doing the square wave sound. I was hoping to do some sampling of the noise-generator circuit this weekend. However, I made a stupid mistake and ended up messing up my Comotion and Minesweeper boards. :( Nothing serious, but I need to order some parts to get that part of the circuit working again.

You can hear the aliasing distortion that I was talking about in Minesweeper, since it generates high-pitched tones. I'm still working on that, since it's turned into a fun math exercise..worthy of a seperate post...

Sunday, February 06, 2005

Blockade.c sound, new blog in the works

Well, I've got partial sound working in blockade.c. Definitely better than silence!

I'm trying to come up with some simple way to deal with the aliasing distortion you get from generating high-frequency square waves the "simple way". This is really apparent in Minesweeper.

For the mathematically inclined, the problem is described and completely solved by the approach in this paper:

However, it's a pretty heavy-duty approach - probably too unwieldy for MAME.

I'm also getting ready to move to a blog based on Movable Type. I really want "categories", so that I can blog about anything and not alienate the people only interested in MAME. :) I grabbed and I hope to set up shop there within a week or so. I'm going to move my content there as well.

Tuesday, February 01, 2005

Amutech Minesweeper Cocktail/Standaround

Well, I got a PCB from eBay. As suspected, it is an exact clone of the Gremlin blockade hardware, except for the connectors. The program roms are the same as our existing set, but the graphics are slightly different. (The scores can be displayed in four different directions).

So, it turns out that fixing the port settings in drivers/blockade.c enables 4 player mode. I did this, along with some general cleanup. I'll submit the updated driver soon, but I'd like to try and add some sound first.

Now if only a 4-player blasto would show up...

I'm on the blog bus now too. Hi Tim!

Fun with FPGAs - recreating the Atari TIA, Part 1

I have been playing with recreating the Atari TIA chip as used in the original 2600 in an FPGA.  I know this has been done a few times alrea...