Spinning's a Neat Trick: Megumi Rescue for the System E
One of the last stages of arcade game development is the location test. Everything up to this point has been theoretical; now, real players get to see the game that the developers have poured time and effort into. It’s pretty common for major changes to come out of these, but sometimes, games just don’t make it at all. If the response is too underwhelming, the game will never see the light of day again. That’s what happened to System E game Megumi Rescue. Let’s give it a proper look.
Who really needs rescuing here
So while I don’t have a prototype Megumi Rescue circuit board, the ROMs are… available… and I can just burn some EPROMs the same way I played Tetris. Let’s take a look. This is a vertical orientation game, so we’re already going places the Sega Master System never would.
So we start the game to see our hero, a fire-fighter, standing on a trampoline. There’s a burning building, and you must rescue everyone involved one way or another.
Let’s get to it! We start, the joystick does nothing, and our firefighter leaps off the trampoline. With no control, it’s pretty clear what will happen; our hero lands on the ground and dies. Three times, then you’re out of lives.
It’s pretty clear why this game failed the location tests. There’s no gameplay! You’ve got to have gameplay! Pretty embarrassing oversight if you ask me.
We’re forgetting something
So here’s a picture of the System E circuitboard from the last post. We saw that the two connectors on the top provide all the various power, video, and controller signals that a standards-compliant JAMMA board would have put on an edge connector.
But what about the connector on the bottom? Well, for Tetris and Transformer, that wasn’t needed. However, now it is. For Megumi Rescue, we need to attach a board like this:
Well, I say a board like this because this particular board is a modern recreation of the vintage Sega part, purchased from the esteemed Kold666 who also was the source of the other System E recreations in the last post. Really excellent work keeping these things alive.
This board’s main purpose in life is to attach the NEC D4701AC chip to the system bus, and allow the operator to connect things to the D4701AC. It wasn’t just used for Megumi Rescue; Riddle of Pythagoras, another System E title which did survive location test also used it. But what’s the D4701AC? For that, we go to the Datasheet.
This chip is designed for a mouse or trackball, providing three axes and three buttons. Sega only ever used one axis. What’s all this encoder business?
Single-axis control in video games
The first mainstream single-axis control arcade game was Atari’s Pong. The same principle extended to the Atari-made Sears Tele-Games Pinball Breakaway I reviewed back in 1978. See the big knob?
That’s just a potentiometer (or “pot”); a variable resistor. For video game use circular potentiometers are pretty much always used, but it might be easier to understand what a potentiometer is by looking at a linear diagram. In fact, one of the common electrical symbols for a pot shows it quite well:
The wavy line is a symbol for a resistor. Imagine it as a strip of resistive material; the moving terminal (the arrow) can go to any point, and the more of the strip that it connects to, the more resistance there will be. A radial potentiometer is basically just this wrapped into a circle. The moving contact makes physical and electrical connection with the strip.
It’s pretty easy to tell when a video game uses a pot. They have two characteristics that will give them away every time:
- A potentiometer has a maximum and minimum value. They can’t spin indefinitely by the very nature of how they’re constructed.
- You can move a potentiometer at varied speeds, and your character will move at varied speeds. This is an analog controller, not a digital left and right one. This is exactly what makes it so good for Pong-style games, which Megumi Rescue, a Breakout descendant, is.
- But, the potentiometer always makes physical contact. This means that there is inevitably a lot of friction; not only does this mean the knob can’t spin freely, but it also means the knob will wear out. Of course all moving parts wear out eventually, but potentiometers are particularly prone to this.
These characteristics are fine for Pong, an experimental game at all, or home-use Breakout clones. And for things like steering wheels, potentiometers continue to rule to roost. But for 1-dimensional motion in a game like this, Sega wanted something more reliable. Riddle of Pythagoras and Megumi Rescue, therefore, used something different: the quadrature encoder, or “spinner”.
How does that work? Well, we’ll do another linear diagram, but as we’ll see, doing this linearly doesn’t really make sense.
An LED is placed on one side of an opaque piece of plastic covered with a series of evenly spaced holes. On the other side, there are two photodiodes positioned horizontally offset from each other. The holes block the light to one photodiode but allow it to go to the other.
Now imagine the sheet moves. For a circular encoder, this can be done by spinning. The two photodiodes will see a series of pulses as their view of the LED is blocked by the holes. But if we look at the timing of the pulses, we can see how fast it’s moving, and in which direction.
Here’s a quadrature encoder from the inside of a ball mouse. (This particular one’s for the Commodore Amiga, but that’s probably not important) In fact, there’s two in here– the ball hits two rollers 90 degrees to each other. You can see the spinning opaque plastic; in this case, it just has a series of slits rather than holes, but it’s the same exact principle. The two photodiodes are contained in a single package.
So this is great! This is optical, so you don’t need the physical electrical contact that was providing all the friction and unreliability. Since the pulse timing varies with speed, it still has that analog characteristic that lets you swing around quickly. The problem is that it’s now stateless. For the potentiometer, we can tell exactly where it is by measuring the resistance, even if you miss checking the move. With a spinner like this, if you miss the pulses, you’ll never know that it moved.
That’s where the D4701AC chip comes into play. It’s always looking for the pulses, so the Z80 CPU of the System E doesn’t have to constantly be reading the encoder values. Of course, it can’t treat it exactly like a pot– it still has no default position, so it has a reset line to zero things out instead, for example– but it makes things a lot easier for the implementer.
But you need something that’s actually a spinner
So this was my first attempt to use the encoder board. It’s a spinner that’s widely available as it’s used as a replacement for the one included on Arcade1up Tempest cabinets; it has a nice heft to it and can spin for awhile on its own, which is good for Tempest. I suppose it doesn’t really matter for a Breakout game, but spinning it is still fun.
This took awhile, but eventually I realized that this wasn’t a spinner at all. Or at least, it’s not a quadrature encoder. Well, to be fair, that’s pretty obvious. The tell-tale sign is that there’s no spinning wheel and LED setup.
Instead, if you look closely, there’s a tiny chip labled AQKH294, which a single forum result in Italian says is a label for the MA700GQ-P, which is a board-mount Hall effect sensor designed for angular momentum. The Hall effect is cool, but we won’t talk about it today beyond saying it uses magnets.
Now, looking further, this chip is actually designed to be able to simulate a quadrature encoder, using A and B pins.
Unfortunately, this spinner just doesn’t output those signals on any of its connectors; it outputs a processed form that doesn’t work. (We’d likely need some processing though, since that is a high pulse rate) So that’s unfortunate. Hopefully I can find something nice to do with this spinner, and maybe even there is a way to emulate the right signals. But what do I do for Megumi Rescue right now? Just play it on MiSTer? (which does support the System E!) Probably not a bad idea. But let’s try something else…
Only Amiga makes it possible
Remember that mouse picture earlier? If it were a PC mouse, using serial, PS/2 or USB, or even an ADB Macintosh or Apple IIgs mouse, it’d be using a protocol; a small microcontroller inside the mouse would be sending packets for the computer to implement. Just like the spinner above, it’d be too processed. But the Commodore Amiga is a little bit different. Let’s get our money’s worth on that picture and show it again.
There’s one IC on the board, but it’s just an LM339 comparator. Its purpose more or less is to make sure we get nice 5V pulses on the output, but it still leaves the raw pulses in 5V form. The Amiga’s 68000 CPU is left to do all the work of processing. Which means that from my perspective, a Commodore Amiga mouse is a very convenient way to get raw quadrature encoder pulses. Let’s wire it up. We’ll only wire one axis, of course, because that’s all Megumi Rescue needs.
Uh, actually, it turns out we do need to wire up the left mouse button. Megumi Rescue requires just one button for playing, but it uses one of the buttons on this IC, rather than the typical buttons that are output on my JAMMA connector. I guess to simplify the wiring harness?
This is a bit funny to me; NEC made the D4701AC chip to interface with computer mouses. Sega then used it as a convenient IC to allow them to use a spinner in place of a potentiometer. And now I’m hooking a mouse back up to it again. Sega’s the one who did the hack; I’m just using the chip for its intended purpose.
But did it work?
I’m not sure if Megumi Rescue is the first game to have the firefighting-Breakout combination, but it’s the earliest I know of. As you can see, the building is on fire. But not the roof. Which is good, because the top floor of this building is filled with people.
Moving left and right will control the two men at the bottom with a trampoline. As a Breakout-style paddle, they can move pretty fast, which is good, as our superhero-clad firefighter moves pretty fast too. By clicking that one button, you control the firefighter; if they’re over a window, they will go inside the building for an instant and then come out with someone, or if there’s no one in that spot, usually with some kind of bonus item or powerup. They’ll fall straight down and you need to catch them to rescue that person.
Since entering the building changes your trajectory, good use of the button is necessary to get anywhere in the game. But with some practice, soon enough you’ll save all the people inside, so the fire department will launch a rocket at the building.
This rocket will actually just put out all the fire, but I guess it was too unsafe to use if there were any people inside. In any case, it’s a busy city with presumably a high arson rate, so on to the next building.
Megumi Rescue is a fun little game, with a lot of charm to its tiny sprites, and decent gameplay. I’m not sure why it didn’t do well on location test; perhaps the market for Breakout-style games was just not there anymore. (the more traditional Breakout-style Riddle of Pythagoras did survive location test the previous year, but it doesn’t seem to have been too successful)
In any case, we’re lucky to have these ROMs; my guess is most Megumi Rescue boards that had already been manufactured were probably converted to Tetris at the end of the System E’s life.
I’m not dead yet!
Megumi Rescue did see a release on the Sega Mark III in 1988. It’s definitely based on the arcade game, and uses the Sega Paddle Controller; I don’t have this controller, but it’s a more traditional potentiometer-based device. The game isn’t playable without it.
Megumi Rescue on the Mark III is usually called an enhanced port, and I have no reason to doubt that because I can’t actually play it– I will say, though, that it does have a smaller ROM, being only on a 128kiB “Mega Cartridge”, while the arcade version, like Transformer, clocks in at 160kiB.
You can also see some downsides of the Mark III/Master System hardware compared to the System E. Most notably, look at the sprite limits when the fire truck is on screen.
The biggest downside of this version of Megumi Rescue, though, is the perspective. Notice that you can’t actually see the people you’re supposed to rescue! The game scrolls as you move up and down. Other than that, it appears to play very similarly to its arcade counterpart. Everything’s a little less detailed and less colorful due to the limitations, however.
As a Japan-only release for a console that didn’t do very well in Japan, I’m not sure if Megumi Rescue was really more successful on the Mark III than an arcade release would’ve been; but at least the game saw the light of day one way or another.
That’s it for Megumi Rescue. As noted, the same spinner setup was used for Riddle of Pythagoras, which was from the same developer, Exa Planning/Aicom. What’s also interesting is that Sega used the same ‘4701 chip in a number of arcade titles that used a trackball, like SegaSonic the Hedgehog. Could they have done SegaSonic on the System E?
Well, uh, probably not.