Wherefore Pac-Man’s Split Screen?

I did a search of the blog to make sure I haven’t posted this before. I’m really an obsessive tagger, and it didn’t show up under the tag pacman, so I think it hasn’t been seen here before. Let’s fix that now!

It’s a video from Retro Game Mechanics Explained from six years ago, and it’s 11 1/2 minutes:

Here’s a terse summary of the explanation, that leaves out a lot. Like a lot of 8-bit games (the arcade version uses a Z80 processor), Pac-Man stores the score in one byte, making the maximum it can count to 255. Since it doesn’t use signed arithmetic, it doesn’t use the high bit to signify a minus sign and so flip to negative at 128.

As an optimization, Pac-Man’s code uses the depiction of the maze in the video memory, itself, in the movement of both Pac-Man and the ghosts. If a spot has a maze wall tile, then Pac-Man can’t go there, and the ghosts won’t consider that direction when moving.

At the start of every level, the game performs some setup tasks. It draws the maze anew, including dots, Energizers and walls. One of these tasks is to update the fruit display in the bottom-right corner. It was a common design idiom at some arcade manufacturers, especially at Namco, at the time to depict the level number with icons in some way. Galaga shows rank insignia in the corner; Mappy has small and large balloons and mansions.

Pac-Man’s code shows the bonus fruit for each level, up to seven of them. If you finish more than seven levels, only the most recent seven are shown. If you get far enough eventually this will be just a line of Keys, the final “fruit.”

The code draws them from right to left. There’s three cases (the video goes into much more detail), but generally it starts from the fruit of six minus the current round number, draws it, counts up once and moves left two tiles, draws that one, and so on.

An interesting fact about Pac-Man’s graphics hardware is that the screen doesn’t map as you might expect to the screen! A lot of arcade games have weird screen mappings. Most consumer programmable hardware will map characters horizontally first vertically second, like a typewriter*.

In Pac-Man, the bottom area of the screen comes first in memory, starting at memory location hex $4000 (16384 decimal), and it doesn’t go forward like an English typewriter, but is mapped right to left. The first row of 32 tiles comes at $4000, and the second row is $4020. Then the playfield area is mapped completely differently, in vertical rows going down starting from the top-right of its region, then the next vertical row is the one to the left of that, and so forth to the left edge of the playfield. Then comes the score area at the top of the screen, which are two final rows mapped the same way as the bottom area, right to left.

From the video, this chart shows how Pac-Man’s screen memory is mapped.

When Pac-Man’s score counter overflows, it breaks the check for the limit for only drawing seven fruit, and causes it to draw 256 fruit. This is why the tops of keys are drawn beneath the upper-halves of the fruit at the bottom of the split screen. It also breaks the tile lookup for the fruit.

As it continues writing its missourced fruit tiles in memory, it goes back in memory each time to draw the next fruit, and after the fruit section of the display it keeps going to the left, into the area where Pac-Man’s lives are displayed, then it keeps going and overwrites half of the maze tiles. Then Pac-Man’s lives (and any empty spaces that indicate the lack of lives) are plotted, overwriting fruit after the first ones drawn and obscuring some of the memory corruption.

Since the game’s actors use that data to decide where to move, and where dots and Energizers are placed, it means they can move outside the bounds of the maze, and that there won’t be enough dots for Pac-Man to eat to complete the level. That’s what makes it a kill screen: if Pac-Man loses a life, a few dots will get placed in the maze as the fruit are redrawn, but it’s not enough to bring the dot-eaten count to 244, which triggers the level clear function.

If the fruit-drawing loop didn’t stop at 256 (another artifact of using 8-bit math for the loop), it’d go on to clobber the rest of the maze, the score area at the top of the screen, then color memory (which has already been clobbered by the palette-drawing portion of the loop). Then, going by a memory map of the arcade hardware, it’d hit the game logic RAM storage, which would probably crash the game, triggering the watchdog and resetting the machine.

The visual effect of the split screen is certainly distinctive, enough that since Bandai-Namco has capitalized on its appearance at least once, in the mobile (and Steam and consoles) game Pac-Man 256. I’ve played Pac-Man 256: it’s okay, but, eh. It’s really too F2P unlocky.

* Yes, I just used a typewriter’s operation as a metaphor for something a computer does. It didn’t feel acceptable to use another computer thing as the comparison, since ultimately the reason they do it that way is because typewriters did it that way too. I guess the fact that it’s English reading order would be better to use, but I’m really overthinking it at this point.

Sundry Sunday: Animation of a Splatoon 3 Song

Sundry Sunday is our weekly feature of fun gaming culture finds and videos, from across the years and even decades.

The Splatoon series has a lot of great music, usually composed along the lines of squishy voices shouting gibberish, which makes sense due to the singers being squid, or other forms of aquatic life.

One of the songs in Splatoon 3’s single-player campaign is Seep and Destroy, which has gotten the fan name of Bang Bing due to a specific frequently-heard vocalization within it.

nathors made an animation (2:46) that has no sea life at all, but fits really well. It imagines the song as backing a civilization of Easter Island heads, who get abducted by a planet of robots, and then they fight their way onto a spaceship and back home. It’s fun! It’s here:

Doing Weird Things To A Sega 32X

The Youtuber: MattKC Bytes
What he did: Unexpected things to Sega’s aborted Genesis/Mega Drive add-on.
The address: here.
The length: about seven minutes.

The explanation: Did you ever play around with a 32X? Evidently not a lot of people did. It was straaaange. Unexpectedly powerful! A bit misjudged! Hosted a port of DOOM! Had a port of Virtua Racing that compares favorably with the Saturn version! Had that crazy hard-to-play Knuckles game that gave us Vector the Crocodile!

Have you ever hooked one up though? Its hardware is odd. It’s like a completely separate console to itself. The Mega Drive wasn’t made to support add-on processors and chips like that, so Sega used a clever solution: the 32X has its own video output, and also a video input. You plug the Genesis’ output into the 32X, and then the 32X into your TV. The 32X mixes the Genesis’ signal into its own, as if it were chromakeyed. Since the 32X cartridge supplies the program running on the Genesis as well as itself and they can talk to each other, the two processors and graphics chips should be able to sync perfectly, if awkwardly.

But: because the Genesis’ video signal emerges from that console through this external wire before reentering the 32X, it’s possible to do things to it while in transit. The Genesis supplies video timing information that the 32X relies on, so you can’t get a signal from the add-on without the Genesis’ AV plugged into it, but the Genesis does produce a viewable video signal that you can see on its own.

All the details are in the video, which has been embedded below for your convenience and amusement.

HG 101 Forum Thread on Obscure Arcade Secrets

Today’s find somehow doesn’t involve a Youtube video! On the forums for Hardcore Gaming 101 there’s a thread, inspired by the lengths players must go through to reach the true ending of Bubble Bobble, about arcade games with super obscure secrets. I don’t even think I know what they’re talking about with the Rainbow Islands secret, involving playing through the game seven times doing a minor thing different each time. It sounds like a bit of a money sink to me, but this was the era of Tower of Druaga after all. The thread is here.

If you don’t know about the absurd secrets in Bubble Bobble, the best guide I know of to those is still the Bubble Bubble Info Pages, last changed in 1998 but still on the web after all these years!

Excellent Breakdown of Wii Music Capabilities

By that title, I don’t mean the capabilities of the Wii title called Wii Music*. The video below, from Dublincalif, is about the properties of the Wii’s sound system itself. It’s 24 minutes, but pretty interesting for all that, and it’s presented really well. It’s a model explainer video, and a great first effort in that style from its maker!

You might think that all the music on the Wii is just streamed, either from audio tracks or files, but it isn’t. The Wii has fairly little NAND storage, and music is a major consumer of storage space, so a lot of its music is sequenced, essentially MIDI files played with sample banks, with optional effects added. The video is a great overview of its features and capabilities.

* Of random interest: Wii Music’s data is amazingly small! Of that 4.7GB DVD it resides on, it uses less than 10 MB!

The Wii’s Music Is A Bit Complicated (Youtube, 24 minutes)

Farming Simulator eSports

The life of a farmer is a difficult one. Most people don’t know how difficult it is to succeed in agriculture. It’s not enough to harvest fields of wheat and bale hay. The first bale of hay collected in the barn, as it turns out, sets a multiplier! And any grain collected in the silo, and any hay harvested in the upper floor of a barn (but only the upper floor), is not only affected by that multiplier, but reduces the multiplier of rivals. I presume all of this is due to farm subsidies.

These are the idiosyncratic rules of Farminng Simulator eSport, a popular (in some circles) gaming competition, it seems, in Germany. Teams are sponsored by agricultural equipment manufacturers, and there’s a pick/ban system in place for tractor selection. Pro gamers compete to get bales into their barns (preferably by that magic window into the upper floor!) before their opponent does, and can raise and lower a bridge on the rival farm, in an effort to mess them up, all while real farmers share pints of lager and look on in confusion.

People Make Games looked into this scene and explains it over half an hour, here:

Inside the Peculiar World of Farming Simulator eSports (Youtube, 32 minutes)

JRPG Junkie’s Review of Skies of Arcadia

It’s not completely positive, as they point out the game’s high encounter rate and the slowness of battle, but gosh there’s a lot of awesome things in Skies of Arcadia that don’t seem to have ever been revisited in other games.

The main overworld is one in which you have an airship and fly around a world that has floating islands but no real ground. Sure, that’s been done by other people, and more than once, and fairly recently too, but SoA brought some really interesting nuance to it that gave players good reason to explore, like interesting optional subquests. You could find mysterious locations out in the world and sell them to the Explorer’s Guild for extra money, but only if you’re quick enough to stay ahead of rival ships also looking for them. There was also an alternate form of combat, ship-to-ship (and sometimes ship-to-huge-monster) battles, that played out very differently from the JRPG norm. All the extra things to do gave the game this weird veneer of simulationism, which I always find interesting, even if it was largely an illusion.

Skies of Arcadia was originally a Dreamcast release, one of only two substantive JRPGs made for that system (the other was Grandia II), and fell victim to the Dreamcast’s short life and subsequent exit from console manufacturing by Sega. It did get a remake for the Gamecube, but that was the last we’ve seen of Skies of Arcadia, other than character cameos in Sonic racing games.

JRPG Junkie: Back to the Backlog – Skies of Arcadia

Sundry Sunday: Bowser Explains Why He Turns His Castles Into Race Tracks

Sundry Sunday is our weekly feature of fun gaming culture finds and videos, from across the years and even decades.

Why does Bowser set up race track courses in his castles? Does he have that many to spare? It’s a question with a simple answer, that he answers in 50 seconds. It’s also pretty good animation on Bowser, done in Blender by GleanieBOI!

Ocarina of Time-r Bug

Here is a very short video from Seedy, only a minute long, explaining an interesting bug in The Legend of Zelda: Ocarina of Time.

OoT handles fiery environments without the Red Tunic, and being held underwater by wearing Iron Boots without the Blue Tunic, in an unusual away. You might expect them to return Link to the last safe place he had been, like when falling into a void, or else maybe kill him instantly, or at least cause periodic damage. Instead, for whatever reason, the designers chose a unique way to implement the danger Link is in.

While in hot places or stuck underwater without the proper tunic, the game starts a timer, with time relative to the amount of health that Link has. If Link leaves the area or puts on the right tunic before time runs out, the timer goes away and Link takes no damage regardless of how much time was left on it. However, if the timer expires before Link reaches safety, he just dies instantly, “getting a game over” in the clumsy parlance of video games. You’d think it’d be better just to inflict some damage on Link every few seconds, but that’s not how they chose to do it.

Link gets eight seconds on the clock for every full heart he has. Fractions of a heart grant proportional time. While the game only displays health in quarter-hearts, Ocarina of Time actually tracks hearts in 16ths (each full heart is effectively 16 hit points), and each 8th of a heart grants Link one second on the timer.

So, what happens if Link has exactly 1/16th of a heart? The display rounds up, so it looks like Link has a quarter of a heart left, but he’s considerably closer to kicking the bucket than that. He has less health than what’s needed to get a one-second timer. How does the game cope with that?

It does it by just not starting a timer at all! If Link is almost dead, paradoxically, he becomes immune to fire and drowning timers. He’s still in great danger, for any attack on him in this state will kill him immediately, but it makes tunic-less challenge runs a bit more interesting.

Break Timers With Low Health (Youtube, 1 minute)

Romhack Thursday: DKAFE

On Romhack Thursdays, we bring you interesting finds from the world of game modifications.

We’ve not done Romhack Thursday for a while. As the winds of the ‘net, and my attention, blow around randomly, sometimes there’s more things that seem worthy of posting than others. This one definitely fits the bill though.

We’ve posted about 10yard’s intriguing Donkey Kong hacks Galakong and Vector Kong before. I don’t think they’re actually hacks in the classic sense of the term, modifications of a game’s software intended to run on its original hardware, or at least an emulation or simulation of it. Galakong might, and Vector Kong definitely does, rely on Lua support in MAME to produce, respectively, a version of Donkey Kong where Mario teams up with the ship from Galaga, and another version of Donkey Kong limited to the Girders stage, a.k.a. Ramps, but with sharp colorful line-drawn artwork akin to that produced by Atari’s later Vectorscan monitors.

10yard let us know that they have produced a front-end to a variety of Donkey Kong romhacks, 90 in total. It runs on Windows an Raspberry Pi, although if it runs on the latter I suppose it must also be possible to get it to work on Linux? Maybe?

It’s not just a front end though. It presents all of its mods through an interface that itself plays like Donkey Kong! You move Mario around the levels of the classic arcade game (they’re connected vertically), and each is littered with arcade machines. You can play them with coins collected them as DK rolls them through the boards, and also earned by getting good scores in each game. Collecting more coins not only gives you more chances to play, but it unlocks further games in the collection.

You download the package from the Github page linked above. You must also provide the MAME-compatible romsets for Donkey Kong, Donkey Kong Jr. and Donkey Kong 3. (It might work without without all of them, but fewer games will be available.) Of course, it’s up to you to rip, or otherwise provide, those files. If you provide them, it’ll handle all the patching for you automatically. It even includes its own custom version of MAME to play them.

Both Galakong and Vector Kong are among the hacks provided, but there’s so much more to see and play besides those, including Halloween, Christmas and Doctor Who themes hacks. There’s really too many to mention here, and I’ve only started unlocking games myself. I’ll leave you with the closing link, and some screenshots of the hacks included that I’ve managed to unlock so far.

DKAFE (by 10yard, for Windows and Raspberry Pi, on Github)

Most of the hacks include a screen like this one, that tells you what scores you must reach in order to earn coins. 3rd place usually isn’t terribly difficult to reach. For many games, a 1st place score will be reached around the time of the Conveyors board in Level 3.
This is the game selection mode. Coins you earn are rolled down the ramps from the top of the screen; you have to collect them in order for them to count!
Before starting each hack, you’re presented with a text description of the game and how it plays, and who made it.
Here’s Galakong, which has been linked from this site before. The game is slightly easier, objectively speaking, than standard Donkey Kong, but it’s easy to get your attention split between the ship and Mario and make mistakes because of it.
Pac-kong replaces the roaming fireballs with the ghosts from Pac-Man. They move mostly randomly, like the fireballs, did, but they’re much faster. You can become invincible by collecting an Energizer, which turns Mario into Pac-Man temporarily. Pac-kong’s one of the harder hacks present.
Donkey Kong Anniversary Edition changes the boards slightly, and replaces the bonus items with presents and balloons. In case you didn’t know: you can collect items off the edges of girders by jumping at them: if you hit the edge of the screen during your jump, Mario will be bounced back to around the place he leapt from, and will (usually) be unharmed!
Donkey Kong Wizardry changes the Girders level substantially. They add new pits to leap over, changes to the way the ramps tilt, and adds other surprises. You get an advantage though: if you press the Player 2 Start Button (the 2 key), it’ll freeze the fireballs for several seconds.
Donkey Kong Lava Panic adds a tide of deadly fluid constantly rising up from the bottom of the screen. It becomes important to get the lower rivets on the Rivets board before they become submerged!
The Halloween and Christmas-themed hacks change the Girder stage greatly. When barrels (or whatever analogue that hack uses for them) fall off of a gap in the middle of the screen, they may randomly decide to go either direction, adding even more uncertainty to Mario’s progress. Be careful!

How Super Mario 64 Was Beaten Without The A Button

In 24 minutes, Bismuth on Youtube explains how Super Mario 64 was beaten without a single A button press, on actual hardware by someone who’s nom de net is Marbler. The run was performed over five days. Video of the feat isn’t up yet, but should appear on Marbler’s channel when uploaded and encoded. Here is the video embed:

I have some commentary on this. First, if you’ve been following PannenKoek all this time like I have you know they’ve done many videos over the internals of SM64, many with the end goal of getting the A Button Challenge as low as it can go. The answer is, he doesn’t get all the stars, and it’s been a long iterative process of routing, and figuring out how to do formerly TAS-only techniques on with a controller. After a long period of improvement, finally, the dam broke.

What does this mean for PannenKoek? I think their most interesting videos lately have been those that are more about Mario 64’s internals, like that terrific explainer about invisible walls. And completing every star without A button presses is still a ways off. I think they’ll be fine.

How Super Mario 64 was beaten without the A button (Youtube, 24 minutes)