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.
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.
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.
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 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!
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.
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.
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.
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?
This is a 52-minute talk from 2010, from the 27th Chaos Communication Congress in Berlin, Germany (the talk is in English), presented by Michael Steil of Visual 6502, which successfully reverse engineered the venerable 6502 microprocessor, a chip used, in one capacity or another, in one form, or another, in all the Apple, Commodore and Atari microcomputers, the BBC Micro, the Atari 5200, in a modified from the Atari 2600 the NES, and countless arcade games, as well as in other places.
The talk is intended for a technical audience… literally. When the speaker asks who in the audience has coded in assembly before, practically everyone raises their hands. It’s recognized that we at Set Side B veer wildly between the most surface-level populist material and in-depth treatments for those with gigantic capacities for technical discussion and the attention span of a Galapagos Giant Tortoise. We like to think this is charming, and will listen eagerly if you tell us that you agree.
Anyway, here is that talk. I already mentioned that it’s 53 minutes. If that’s too long, there’s a speed-up function on Youtube. If that’s too technical, well, I don’t know how to help there. Maybe a read through pagetable.com’s documentation on the 6502. Oops! I’ve made it worse, haven’t I. Well, if you like, you might console yourself that the 6502 is really a simple processor to learn to code in. I’ve done it myself! There’s no memory management, there’s only three general-purpose registers, the stack is fixed in place, and all opcodes are one byte. It’s so simple that an extremely motivated child could learn it. Guess how I know?
Hardcore Gaming 101 is one of the most important game history sites on the internet, and site creator Kurt Kalata writes on a wide variety of games for consoles and computers alike. Recently they’ve been on a Metal Gear kick, and that means covering the black sheep of the series, Snake’s Revenge.
Snake’s Revenge is the forgotten Metal Gear game, an NES sequel made without Hideo Kojima input, to the NES port of Metal Gear that he also had nothing to do with. It has a reputation for being terrible, but that’s really unmerited. As Kurt Kalata notes, while it has its flaws, is ignored by later Metal Gear games, and it has a story based on the manual scenario for Metal Gear written by Konami’s crazy American writing staff*, it’s technically proficient and has good music.
* The American manual for NES Life Force says that the evil planet-eating monster Zelos was the proud progeny of “Ma and Pa Deltoid.” In the description of Dracula’s Heart in the manual for Castlevania II, it warns: “Careful! The heart attacks.” These were not means isolated occurrences from Konami’s US staff.
Youtuber Sharopolis has a 20-minute video up examining several specific NES games and how some unexpected tricks were pulled off in each: Rescue: The Embassy Mission, Crash and the Boys Street Challenge, Castlevania III and Jurassic Park. I love learning about how developers overcame hardware limitations, and if you’re reading this, I’d wager there’s a good chance you do too!