Romhack Thursday: Pentris

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

Didja ever finish a satisfying round of Tetris, and then, basking in the glow of your high score, stop to wonder to yourself: why four?

Why did Alexey Pajitnov, revered creator of the game, decide to use tetrominoes, the possible combinations of four squares attached to each other, as the basis of his game, and not some other number? Two is obviously too simple, and three is also pretty easy. Four is the smallest number that makes for an interesting game, so that was probably why. But can Tetris work with larger pieces? Could it work with, say, pentominoes, five-square pieces?

Well, why not try it for yourself, with today’s romhack: Zohassadar’s Pentris.

Pentris is built from Bullet-Proof Software’s NES version of Tetris (which is different from the Famicom version). It’s a BPS file, but there’s multiple utilities that can apply those, for Windows, Mac and Linux. For Win, Flips works well. Linux users may be able to find Flips in their distro’s repositories. For Mac, try Multipatch. The big advantage of BPS is that it contains CRCs of the original patch file to ensure that it’s working on its expected file, a continual problem with working with roms. As for where to get an original of NES Tetris from, you’re on your own.

Notably, Pentris is quite a bit harder than Tetris. It’s not kaizo hard though, it seems like it may be possible to have a lengthy game, but it’ll probably take you longer to develop a good intuition for what moves are good ones than it did for Tetris.

There are more possible pentominos than there are tetrominoes, so the long-piece is less common, and pentrises require five lines of setup instead of four, making them much harder to make than tetrises. In my several test games, I never managed to make even one. But mere survival is more difficult too. Pentris’ bin is 14 blocks wide instead of 10, which is more room to make mistakes. And some of its pieces are much more unwieldly than the worst of Tetris. Tetris has Z and S, but Pentris has Texas:

What are you supposed to do with this?

Pentris doesn’t appear to monkey with NES Tetris’ piece generation. The NES game picks pieces almost entirely randomly, rerolling just once if two of the same piece in a row is selected. More recent versions use “bag” systems that guarantee that you get all the possible pieces in a reasonable amount of time, but neither NES Tetris nor Pentris hold your hand like that. If you’re depending on a 1×5 piece but the RNG doesn’t feel like giving you one, you’re left to lump it.

In addition to that Texas abomination, there are also “long L” and “long J” pieces, and identical versions but with the extra square moved one space up the bar part, a piece that’s like half of a picture frame, and, invading from Rampart, the dreaded U and Plus shapes. Where you choose to place them, as they relentlessly fall, is up to you.

If you focus on survival you can advance a few levels. A good beginner’s score of Pentris is about 5,000 points. My highest so far is about 6,800. I don’t know how many points a pentris is worth, but if it scales like the multi-line clear points from Tetris did it’s probably very valuable.

I feel like I should mention there is at least one other game called Pentris around, a web game that doesn’t seem to be maintained too well. It has some of the same ideas behind it, but it also has other sized shapes too, including single blocks. I don’t know much about it, but I do know it is substantially a different game from the romhack Pentris.

Pentris (romhacking.net, somehow, still around!)

SNES Mice on the NES, and how both systems read their controllers

As it turns out, as explained by the below video (here’s a direct link, 10 minutes long), the NES and SNES have very similar control setups. Both controller ports have seven lines, and both read them using a shift register that can be used to read arbitrary numbers of buttons. The SNES basically just has more buttons to read.

Due to this, there’s homebrew NES software that’s made to use the SNES mouse, and even emulators that will convert your PC’s mouse into simulated SNES mouse signals, which will be fed into the emulated NES and the software running thereon. (It isn’t all buttons, but it sends the displacement as a binary number.)

The video comes to us from the account of CutterCross, who’s making CrossPaint, an NES art program that uses the SNES mouse. A demo can be gotten from itch.io.

Stinger, aka Moero Twinbee

Kimimi the Game-Eating She-Monster recently covered Moero Twinbee, known in the US as Stinger in one of Konami’s few attempts to establish their cute-em-up series in foreign territories. I think Twinbee is a terrific name for a game of this type, so it puzzles me why they insist on renaming it. In addition to “Stinger,” in Europe they retitled the arcade game Detana! Twinbee to Bells & Whistles, where the bells may fit but the whistles sure don’t.

(A warning if you play this one and are sensitive to flashing images, there is a violently flashing effect right before the bosses that won’t treat you very well, I’m afraid.)

Here it is. The first NES game I ever beat.

Her article is ostensibly the subject of this post, and I’ll try not to repeat points that she makes. Stinger holds a place in my heart, if not a prominent one then still one at all, after all it has blood to pump. It was the first NES game I ever beat! If memory holds correctly the second one was The Legend of Zelda, which is kind of fitting: Stinger is easier than it looks, so it builds confidence, while Zelda is harder. (It took me months, mostly from being stuck finding the entrance to Level 7 in the Second Quest.)

Pay no mind to the glitch at the top of the screen, being in the NES’ “overscan area” it’s usually not visible when played on a real TV.

In Japan, Moero Twinbee was not only a Famicom Disk System game but one that supported up to three players (P3 used a controller plugged into the expansion port). The US ROM version only allows two players, which realistically probably makes for a better game anyway. Even with a single player, once you get the five-way shot powerup it’s easy to fill the screen with so many bullets that you don’t actually see many enemies.

Stinger has really fun bosses! The manual says this character is “Willie the Watermelon-Head,” but she’s obviously presenting as a girl, and the watermelon’s not her head, it’s her whole body!

Kimimi recounts much of what makes Moero Twinbee/Stinger different both from other shoot-em-ups and from other Twinbee games: the bell powerup system that’s Twinbee’s trademark, and the side-scrolling stages that are unique in its series. The side-view levels are particularly interesting, not only because the game both begins and ends with one, but because it completely changes the gameplay in a couple of significant ways.

You see Twinbee is a variation upon the theme of Namco’s Xevious, complete with its bomb button to attack ground-based installations, and that depends on its overhead perspective. But Moero’s side-scrolling levels ditch it completely: in those, and only those, the Bees fire arcing bombs along with their main shots, with the same button, and it’s those that can hit ground targets at the bottom of the screen. The bomb button is repurposed to fire hearts, a different special weapon that only works on bells.

One of the vertical-scroll, overhead-view stages, using the classic Xevious-style bombs. BTW, don’t pick up the L or R powerups, they give you a side-shot but, like the Double in many Gradius games, it comes at the expense of half of your forward shots. They’ll just get you killed, and other than by dying there’s no way to get rid of one if you pick it up!

Oh those bells, them and all their tintinnabulations. If you’ve never played Twinbee, but have played one of the Cotton games, you already know how they work. Some targets (usually clouds in the Twinbee games) release colored powerup objects. They rapidly fall down towards the bottom of the screen, but they can be kept in play by shooting them, bouncing them up. As you shoot them, every few hits it changes color, and different colored bells award different powerups. I like powerup systems like this and the Gradius system, and consider them superior to the standard icon-based setup from Salamander and practically every other shmup. You get to decide which powerups you want, possibly to activate them just when you need them, but you still have to use skill and judgement to get the ones you need when you need them, whereas games with set powerup locations force you to choose between what you have and what you’re given.

This is the boss of Stage 3. Believe it or don’t, this murderous spigot is called Fang.

Hearts get fired from your ship upward in the side-view stages. It’s a lot harder to hit bells when they’re falling vertically past your horizontally-moving shots, instead of when both bells and bullets move vertically, and the hearts are meant to make up for that, but they’re so useless that it’s a much better strategy, in practice, to just get up close and pepper them with shots up close. The best powerup is the force field, which grants you several free hits (and doesn’t summon the wave of shield-weakening egg enemies from the first game), but it’s also the one that takes the most bell hits to earn. Another thing to aim for is just collecting the default yellow bells, which award no powerups, but every one you collect without letting a bell fall off-screen rapidly earns you more points, up to 10,000 points each after collecting just four yellow bell in a row. It only requires 100,000 points for an extra life, then additionals every 200,000, up to about 900,000 or so. 10,000 points per bell is such a huge bonus that, once you’re good with your powerup state, gigantic scores aren’t too hard to reach, and there’s three extra lives right in the first stage anyway.

This is Stage 6, the next-to-last. The final level is entirely in space so it’s not that interesting to look at. Get that Star! It’s the only five-way shot in the game!

The Twinbee games have always had interesting bosses, which helps to distract from the fact that, up to Detana! (the fourth Twinbee game, and the second in the arcade) most of the other targets are just popcorn enemies. When you just get started playing Moero Twinbee, it’s not uncommon to rule through the game with 3- or 5-way shot, the best powerups you can get from the ground targets, then get demolished by a boss you don’t yet know how to beat and then, reduced to single shots, either have your game end right there, or barely get in the last few shots against the boss and then get inundated by the popcorn enemies in the next level.

The first bell powerup in the sequence, blue, is Speed-Up, and unlike Gradius where too much speed will kill you extra dead, it’s mostly beneficial in Stinger, because you can’t crash into the terrain and you’ll probably have a force field anyway. With at least 3-Way shot, a couple of Speedups and the force field, the only real danger is the harder bosses and your force field running out. The blue-white flashing force field bells don’t appear if you already have one, and you’ll probably run out in the middle of Stage 6, where the game finally rolls up its sleeves and gets to punching. If you can then somehow build up another blue-white bell (it takes exactly 25 hits on a bell to make one), you have a chance at finishing the game. Like many Konami games at the time, Stinger continues indefinitely, loop after loop, and it gets slightly harder each time.

I forget what this boss is called, but it’s especially notable for being a lite version of classic Salamander boss Tetran, a.k.a. Intruder

Konami made three Twinbee games for the NES; the first was a remake of the arcade original; this was the second; and the third, Poko Poko Daimaou, I think is inferior. They form a trilogy; then for the fourth game, Detana! Twinbee, it was rebooted, keeping the Bees’ creator Professor Cinnamon but bequeathing them to his grandnephew, grandson and granddaughter Light, Mint and Pastel, whose popularity would soon outstrip the originals, especially Pastel who became quite a phenomenon. Detana was followed up by Pop’n Twinbee and Rainbow Bell Adventures on Super Famicom, Twinbee Yahho in arcades, and a handful of anime OAVs.

Pastel: early crush of many a Japanese kid, and her ship Winbee. I emphasize, Pastel is not in this game, although Winbee is Player 2.

Kimimi on Moero TwinbeeHardcore Gaming 101 on Moero Twinbee and Stinger

GB Studio & BB Studio

GB Studio, by Chris Maltby, is fairly well-known now, isn’t it? It’s a free and open source solution to fairly easily making Gameboy roms on your own, that are properly termed not romhacks but homebrew. It has its own website and it’s available on itch.io. It was what Grimace’s Birthday, which we linked to last year, was made with.

GB Studio, from its platformer template

Now there’s a heavily-modified version of GB Studio, called BB Studio, that produces NES roms in a similar manner! It’s made by Michel Iwaniec, and can be gotten from Github here. It’s recommended that you be familiar with GB Studio first, and to read the list of caveats on the page. Particularly, the NES supports fewer sprites per scanline than the Gameboy hardware does, and runs at a slower clock speed. BB Studio is also “early alpha software,” meaning, it might or might not work well for you at the moment.

While we’re on the topic I should also mention NES Maker, which isn’t free, but it also isn’t “early alpha software,” and at $36 isn’t expensive either, and is custom-built for generating runnable NES games.

Almost Something on Game Rentals and Instruction Manuals

In a 12-minute video on Youtube, the channel Almost Something discusses Nintendo’s lawsuit against Blockbuster Video over photocopying game manuals. First off, here it is:

The lawsuit was really about Nintendo trying to stamp out the game rental business in the US, which they were largely successful at in Japan. Cartridge manufacturers were genuinely frightened of rentals cutting into their profits, and resorted to measures like increasing the difficulty of games in the US market to prevent players from completing games on a single rental and losing out on sales. Howard Lincoln of Nintendo of America called game rental “…nothing less than commercial rape.” While the Software Publishers Alliance (SPA) managed to get legislation passed that outlawed the rental of computer software, video games were separately defined and rental allowed to continue.

They sought out any legal means they could to make game rentals less attractive. Manuals were one way to do this. While rental stores couldn’t easily copy the games in order rent our more copies, it was fairly easy to make a good-enough reproduction of a manual using a copy machine. Nintendo sued Blockbuster over the practice, which was eventually settled out of court, but Blockbuster sent a letter to the four stores they had who were accused of the practice telling them to stop.

If you were around at that time, you might remember that for a time rented games would sometimes come with their own small makeshift manuals, sometimes taking the form of an adhesive sheet stuck to the plastic case. It seems these were a small industry that saw the lack of durable instructions provided with games as a little economic niche they could take advantage of.

The lack of manuals supplied with games may have been the reason for a weird quirk on one of Nintendo’s games. The game Startropics has one infamous place where the game asks the player to enter a code from materials supplied with the game. There was a sheet of paper that came with boxed retail copies of the game, an Infocom-style “feelie,” that if soaked in water revealed a code (747) that had to be entered into the game at one point to continue. The code wasn’t revealed anywhere in the game, so players without the sheet couldn’t progress.

The sheet, with the code revealed. (Image from imgur.) The code is discussed in more detail on gaming.stackexchange.com.

Interestingly, while the WiiU Virtual Console version of Startropics has an online manual that reveals the code, the Switch online version has no manual, and leaves players stranded there unless they look up the answer online.

Score Keeping on the NES

Sometimes I feel like I should put a content warning here when the technical level of a post is higher than usual. This one would probably be a five out of five for geekery. It’s a video from NESHacker on counting score on the Nintendo Entertainment System. But I don’t want to discourage you from watching it! It’s nine minutes long, and it contains a definition of the term double dabble.

Human-readable numbers are tracked by computers in a number of different ways. Nowadays we basically just do a printf or some version of it, but on a 1 megahertz platform, optimization really matters. It’s easy to think of computers as being impossibly fast, but in truth speed only ever counts relative to the efficiency of the algorithm you use. Computers are fast, but they aren’t all that fast.

One of the big tradeoffs in processor design is, fewer complex instructions that do a lot but take a lot of cycles, and processor complexity, to execute, or many simple instructions, each doing little and being relatively simple, and not needing a complex processor design to implement.

The 6502 microprocessor generally follows the latter design philosophy. It made some important tradeoffs to keep costs down. For example, it doesn’t have hardware that can multiply arbitrary numbers together. It relies on the programmer, or else a library author, to use the instructions given to code their own multiplication algorithm, if they need one. The result is going to be slower, probably, that if the chip had the circuits to do this automatically in silicon, but it reduced the cost of the chip, basically allowing more to be made, or else increasing the profits for the manufacturer.

Personally I’m a fan of just storing the score as a series of digits that match up to their positions in the character set. Gain 1,000 points? Just bump the 1000s-place up by one, and if it goes past 9, subtract 10 and bump the 10,000s place. That’s a tried-and-true system that many games use, and works well if all you ever have to do is add numbers. Comparing values, like for detecting extra life award levels, make things slightly more complex, but not by much. There’s sometimes other factors involved though, and that may explain why Super Mario Bros. uses different systems for its counters, as explained by NESHacker.

Nicole Express on Twin Famicom Compatibility with Guardic Gaiden

Nicole Express is so knowledgable. How many blog posts have you seen about an obscure hardware issue, itself with obscure hardware, and the Japanese version of one specific cult game? Which the writer tested herself with her own unit and cartridge? Then went in to investigate herself with a freaking multimeter? Whaaa?

Nicole’s two Twin Famicoms

I won’t keep you waiting for the link: here it is. And here is my grossly simplified summary, intended to inspire you to go to the original article, if you have the time, and get all the deets.

Guardic Gaiden, known in the US as The Guardian Legend, uses a weird trick to put its status bar at the bottom of the screen, instead of, as usually seen in an UNROM game, at the top. To create a fixed status window requires stopping whatever the processor is doing at a very precise time while the display is being drawn to the TV, and then changing some PPU registers to display the status.

Guardic Gaiden’s title screen

More complex and versatile mappers, like the MMC family, have the ability to trigger interrupts at specific screen lines, but Guardic Gaiden/Guardian Legend doesn’t use an MMC. It doesn’t even have a raster line counter, so the game simply doesn’t know where on screen the raster beam is drawing.

There are still lots of games on the system that have status windows, even with MMC chips. The PPU has a built-in feature called Sprite 0 Hit, where the chip can signal when Sprite 0 (of the system’s 64 sprites) is being drawn on top of non-transparent background data. So what older games commonly do is put Sprite 0 in an unobtrusive place at the bottom of the status window at the top of the screen. When the Sprite 0 Hit register indicates a collision, the code knows it’s time to set up the PPU to display the main portion of the game screen.

There is a really big problem with this setup, though. Sprite 0 Hit doesn’t trigger an interrupt. It doesn’t stop the code to let it switch the graphics. It’s not even proper to say it “sends a signal.” It’s up to the code to check if Sprite 0 Hit has been triggered. If it has, then it’s time to set the scroll register to the right place, and maybe switch to the proper background tileset, and do whatever else needs to happen, and the code can then be off to run essential game logic, the actual game part of the game.

If it hasn’t… then, the code has to check again, and immediately. And if it hasn’t triggered then, to do it again. It has to literally check as quickly as it can, because if it delays in its check, the game screen might not get set up at the right moment, which will be perceptible as the bar straying down one extra line that one frame. Not the end of the world, but it looks glitchy. And this code will be running every frame, so if it strays down once, it might do it again, which is a more perceptible glitchiness.

Sprite 0 is set to trigger its hit at the top of the screen, because the code won’t have to spin its wheels checking the hit over and over. It wastes time, but not that much. This is why UNROM games put their status lines, with the score, timer, health bar and life counters, at the top of the screen.

Well, The Guardian Legend is an UNROM game, and maybe because creators Compile wanted to show off, they decided they’d put the bar at the bottom of the screen. And yet, their game doesn’t waste most of each frame just in maintaining the status bar.

How? And what does that have to do with the Twin Famicom? For that I’m going to direct you to Nicole Express’ blog post. May you find it as fascinating as I did!

Nicole Express: Is the Twin Famicom Flawed? The Case of Guardic Gaiden

NESHacker’s Guide to the NES Hardware

More and more I find I should do a blog search to make sure that I haven’t posted something before, and my search for this video didn’t find it. It did find our link to the Copetti Site’s discussion of various console architectures, and a separate link specifically to their explication of the SNES’ construction, but not this particular video from NESHacker, so it’s fair game. Post! (zoop)

It’s only about nine minutes long so you can guess that it doesn’t go into deep detail. Essentially the NES is split into two parts, the CPU and its memory, and the PPU graphics chip and its own memory. A lot of classic consoles and microcomputers had to take special measures to support their display, which often ended up being the most complex part of the unit. Think about it: you have what amounts to a deluxe broadcast character generator right there in a box on your desk, shelf or floor, with lots of extra bells and whistles besides. (In fact, home computers were often used to generate current events channels for local cable companies, and an Amiga was essentially the basis for the old Prevue Guide channel.) It’s like a tiny special-purpose, single-receiver TV station just for your own use.

Graphics hardware is extremely timing sensitive. It has to generate the signal for your TV to display according to standardized picture generation requirements, so special requirements are often necessary. In the Commodore 64, for instance, the VIC-II graphics chip has the power to actually put the 6510 CPU to sleep, so it can have unrestricted access to the computer’s memory, without fear of bus conflicts, when it’s needed. This reduces the overall speed of the processor by a bit, and it’s why C64s turn off the screen when loading programs from cassette tape, in order to keep the CPU timing consistent relative to the data being streamed in off the tape.

The NES gets around this by giving the PPU RAM and address bus for its own exclusive use, and to put stuff in it the CPU has to use the PPU as an intermediary. And what’s more the NES exposes both the CPU and PPU’s address busses through the cartridge connector (which is why it’s got so many pins), allowing carts to supply dedicated ROM and RAM to both chips.

Even though it’s just a high-level overview, I found it a worthwhile use of those nine minutes, and you may very well enjoy it too.

NES Hardware Explained (from NESHacker, on Youtube, 9 minutes)

Sundry Sunday: Steamed Hams, But It’s An NES Game

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

So despite the fact that you likely already know all of this, I still feel like I have to explain it all for people who might not have soaked their brains in US popular culture, yet still care enough about video games that you’re reading Set Side B. Let’s get it out of the way as quickly as feasible.

Premiering December 17, 1989, The Simpsons has been on the air for approaching 35 years. We in the United States are going to have to come to terms with the fact that it’ll probably be the reigning television fact of our lives. When it began, the NES was still the hot game system, and that was eons ago.

Premiering in the 7th season, during the time when most people still agreed The Simpsons was the best show on television, was the episode 22 Short Films About Springfield, in which the writers created a loosely-connected sequence of miscellaneous stories about the many side characters in The Simpsons. One of those stories was “Seymour and the Superintendent,” where Bart’s principal hosts his boss Superintendent Chalmers to a home-cooked meal, but due to a sequence of comical events serves him Krusty Burgers instead, covers it up in a variety of unlikely lies, and nearly burns down his house. Colloquially this has become known as “Steamed Hams,” after one of the lies Principal Skinner tells.

In 2017, a popular meme went around the internet in which people remade, remixes, or otherwise re-did that story, alone of all of them in the episode, the season, and among the long long run of the show.

In fact, those memes are still being made, and this post’s subject is one of them. It’s a video simulating what a Steamed Hams game would have been like if it were made in the style of the Bart vs the Space Mutants and Bart vs The World games on the NES. It was made by Penney Pixels, it’s four minutes long, and it’s here, and here:

There is an actual game version of the Steamed Hams, of which a playthrough is recorded here, and can be downloaded here. There’s another version of Steamed Hams too, and it can be played on GameJolt here. Both of those are adventure games.

I thought Steamed Hams had come up here before, but a quick search didn’t find anything, so I’ll just leave it at this. I’m sure in the next 35 years there will be hundreds more game versions of Steamed Hams. Maybe after all that time, I’ll be able to bring myself to mention it here again.

Computing Pi on a NES

Today’s link is to a madperson who explains how to compute digits of pi on a NES’s 6502 to an arbitrary length. As you do. Along the way it explains how to multiply and divide in binary on a processor without hardware support. It’s around nine minutes long, but if you want a machine to get to the end of pi it’ll probably take a tad bit longer.

We link to such a variety of things here. Sometimes we post light videos where someone has Kirby do funny things. Sometimes we show explainers that explain how to do arithmetic on old processors. I presume that you’ll take from these what you want, and leave the rest to the crazy people, by definition the people who are not you. I understand.

Youtube Series: Inside the Famicom

It’s only two episodes in, but this series from the Youtube channel What’s Ken Making is already really interesting, with episodes averaging at around 16 minutes each. The first part is titled “The Design of a Legend,” which doesn’t really grab me much, but the second is about the main processor, “The 6502 CPU,” which Ken admits near the start isn’t exactly accurate. The Famicom/NES’s processor isn’t precisely a MOS 6502; it’s a Ricoh 2A03 in NTSC territories, and a 2A07 in others. The 2A03 is licensed from MOS, but lacks the original’s Binary-Coded Decimal mode, and includes the Famicom/NES’s sound hardware on-die.

Episode 1 (15 minutes):

Episode 2 (17 minutes):

That removed BCD feature. Why? The video notes that the circuits are right there within the chip, but have been disabled by having five necessary traces severed. The video notes that the 6502’s BCD functionality was actually patented by MOS, and asks, was the feature disabled because of patent issues? Was Ricoh trying to avoid paying royalties?