Action 53



Action 53 is a multicart engine designed to put multiple NES games on an oversize BNROM-compatible board or a board with a custom multicart mapper. The name positions it as a tool for making a sequel to Active Enterprises' minigame collection Action 52, whose negative reviews (such as this Angry Video Game Nerd review) have made it into a punchline. It was inspired by the prolific work that Shiru has been doing for the NES scene.

Background
In the beginning, there were Game Paks, and they were bulky. So the Chinese made pirate multicarts. These were less bulky, fitting twenty or more games into the space of one Game Pak, but they infringed copyright. Vince Perri saw a pirate multicart, wanted to do the same thing except legally, and had college students make a bunch of low-budget video games to fill a multicart that he called Action 52. Except all the games sucked. Even games created by NES hobbyists have proven to outpolish the games in Action 52, especially since 2009 or so. Hence Action 53, which does one better in the sense that Spinal Tap's amplifiers go to eleven.

A Netflix executive stated in 2013 that users of Internet video on demand "would actually prefer to have a whole season of a show available to watch at their own pace." A multicart is like a whole season of a variety show that the player can play through at his own pace.

How it works
As of 2014, the BNROM version supports NROM games and CNROM multicarts. The A53 mapper version should soon support UNROM, AOROM, or BNROM games because it provides separate registers for outer and inner banks.

ROMs to be included are listed in a INI-like configuration file that names the title, author, year of release, number of players, and basic game instructions. All of this information is shown with a proportional font after the user chooses a game from the list. Each game can have a 64x56 pixel, 4-color (including black) screenshot shown on the screen of the TV to the left of the game list. If there are more than 20 games, they need to be broken into up to five pages, represented as tabs at the top.

CHR ROM is compressed in an RLE-like format called PB53 that saves 40% to 70%. PB53 is an enhancement of the PB8 format used in newer versions of Who's Cuter with the additional options of repeating the previous tile or copying a tile from the first half of the pattern table to the second (e.g. take $10F0-$10FF from $00F0-$00FF).

The config file format allows listing existing NROM multicarts (e.g. Duck Hunt and Clay Shooting in Duck Hunt) as separate activities in the menu, distinguished by their entry point. It supports choosing one of the CHR ROM banks in a CNROM multicart (e.g. Donkey Kong Classics) as long as a given title doesn't switch banks while running. (Eventually, support for GNROM/MHROM multis such as Super Mario's Duck Hunt will be added.) It also allows for specifying a range of bytes in a PRG ROM as unused so that another ROM's CHR data can fit there. This means the most efficient way is to fit several activities in each PRG ROM. Finally, the builder provides a facility similar to Game Genie to allow minor bugs to be patched out of the game by modifying a few bytes. This can be used to keep a CHR ROM game's init code from scribbling over the entire pattern table.

The builder comes with a tool to extract all ROMs from a collection, just as one might extract individual programs from a PKZIP file or disc image. This should allow a ROM containing copylefted games to pass the [//www.gnu.org/licenses/gpl-faq.html#MereAggregation "aggregate" test of the GNU General Public License] in the same way that, say, the disc image of an Ubuntu live CD does, provided that a distributor complies with the license of each individual ROM.

Planned features include a port to MMC1, to allow combining one or two MMC1 games with other NROM games on SGROM/SNROM or SUROM boards.

Packing data
When building a collection, Action 53 packs ROMs' compressed CHR data, descriptions, and screenshots into 32,752-byte banks. (This is 32 KiB minus 16 bytes for reset overhead.) The problem of packing independent items into the smallest number of fixed-size banks is called the Bin Packing problem. Because determining whether Bin Packing is possible for a given number of banks turns out to be NP-complete, practical applications use approximate algorithms. Action 53 uses the first-fit decreasing (FFD) algorithm, which sorts objects by decreasing size and then places each item in the lowest-numbered bank with enough remaining space. The number of banks used by FFD is no worse than 22% more than the optimal bank count, and the inefficiency can be even smaller for non-pathological cases.

Packing sets of equally sized symbols into banks, where sets can share space if placed in the same bank, is an even more difficult problem called Pagination or VM Packing. Applications of Pagination include combining virtual machines' shared memory pages into physical servers, combining tiles' colors into palettes, and combining 8×16-pixel tiles of a large sprite sheet into 32-tile CHR banks for use with MMC3.

Games
Unlike Forbidden Four, which was intended to comment on a specific phenomenon in Animal Crossing for Nintendo GameCube, this one will be distributed with some sample ROMs, with the list set to grow as NESdev competitions continue.
 * FHBG, DABG, and Sliding Blaster by Joshua Hoffman
 * Concentration Room, Russian Roulette, Thwaite, Zap Ruder, and RHDE by Damian Yerrick (DFSG free)
 * LAN Master, Lawn Mower, and Zooming Secretary by Shiru (DFSG free)
 * MineShaft by Nioreh (permission)
 * Munchie Attack by Joe Parsell
 * Slappin' Bitches by Michael Swanson et al. (compo entry)
 * NES15 by Mathew Brenaman (DFSG compliant)
 * Pogo Cats by Yggi

Eventually, once the collection reaches its goal of 53 games, I plan to distribute copies of the collection on 16-megabit NES cartridges for a fee of $53 plus shipping, roughly comparable to the price of 53 smartphone games. Games to be included in the collection must meet requirements for compatibility, objectionable material, and exclusive rights clearance.

Technical requirements

 * Games MUST work on NTSC NES and SHOULD work on PAL NES. Run-time TV system detection code is available.
 * Games MUST NOT crash, and MUST NOT have an unwinnable kill screen, before the sufficiently skilled player has reached the end. See allthetropes:Game Breaking Bug for examples of what to avoid. Test in TAS conditions if you need to.
 * All important graphics MUST be within the NTSC safe area. We use the PocketNES scaled mode visible area as a guideline: x=8 to 247, y=16 to 228.
 * Games using the NES's sampled sound channel MUST use rereading or a similarly reliable way of detecting bit deletions, such as the signatures added by the Four Score or acceleration analysis on the Arkanoid controller. Games using a controller not compatible with rereading, such as the Super NES Mouse, MUST NOT read the controller while playing sampled sound.

Requirements specific to Action 53:
 * Games included in the main 53 activities MUST be playable with one or two standard controllers. For example, shooting games MUST include some sort of cursor control, like Baby Boomer does, because not everyone has a Zapper and CRT SDTV.
 * Games MAY use but MUST NOT require the Famicom microphone, which isn't present on any system but the original Famicom.
 * Games MAY use but MUST NOT require the Select and Start buttons on controller 2, which are absent from the original Famicom.
 * A game using CHR ROM MUST NOT blindly overwrite the entire pattern table ($0000-$1FFF) when clearing the nametables ($2000-$27FF). This has no effect on a CHR ROM board, but it causes graphics to be invisible on BNROM.
 * Unused tiles in CHR ROM SHOULD be made a solid color, as this compresses better.
 * A 32 KiB PRG ROM MUST have an unused space at $BFF0-$BFF9, $FFF0-$FFF9, or a 20-byte area elsewhere in the bank, so that the NES can return to the menu on reset. In the case of a multicart, this unused space MAY be within the multicart's built-in menu that the Action 53 menu skips.
 * If at all possible, I want to fit well over half the games into 32 banks (8 megabits) in order to showcase larger games.

In a collection using the BNROM board, the following apply:
 * Games MUST work with NROM (iNES mapper 0), CNROM (iNES mapper 3), or BNROM (iNES mapper 34), without PRG RAM. NROM games MUST NOT write to $8000-$FFFF; CNROM and BNROM games will need to have all their bank switching routines pointed out so that they can be modified to fit in the collection. If you are submitting more than one game, and their combined PRG ROM size does not exceed 32 KiB, a multicart using CNROM or the like is RECOMMENDED, but each game MUST have an entry point that performs all needed memory initialization and boots directly to the game. If submitting a single game that is 16K or smaller, you SHOULD be prepared to relocate the game's PRG ROM anywhere within $8000-$FFFF, either by providing source code or upon request.
 * Games MUST work with vertical nametable mirroring, as oversize BNROM doesn't support switching mirroring at runtime.

In a collection using the A53 multicart board, the following apply:
 * NROM, CNROM, BNROM, UNROM (iNES mapper 2), and AOROM (iNES mapper 7) are all supported, with horizontal, vertical, or one-screen mirroring.
 * The A53 mapper's UNROM mode supports duplicating the bottom or top half of a 32K bank. But especially small games (8K or smaller) can be relocated so that three or more games fit in a bank. So you SHOULD be prepared to relocate the game's PRG ROM anywhere within $C000-$FFFF, either by providing source code or upon request.

Subjective requirements
The quality of gameplay MUST exceed the quality of the games in Action 52. Games SHOULD NOT use specific practices known to induce rage quits without a very good reason. Just because a practice was excusable 30 years ago when the NES came out doesn't mean that today's gamers will necessarily appreciate it. The following anti-patterns are NOT RECOMMENDED:
 * Inconsistent collision detection.
 * Mapping the buttons differently from other NES games, such as B to jump (games SHOULD use A instead for jumping or close substitutes) or requiring the player to let go of the Control Pad to begin a jump or to let go of the jump button to jump forward.
 * Applying falling damage before the character actually hits something *cough*Spelunker*cough*.
 * Deliberately creating an unwinnable situation through ratchet scrolling without adequate advance warning.
 * Mistakenly causing important events not to trigger. For example, a game MUST NOT fail to spawn a boss just because the maximum number of enemies is on screen at once.
 * Spawning a player in a position where the player has no chance to react.

Graphics are not quite as important in the short term, considering methods of stylization and the skill level of freeware programmers, but games with less than professional-quality graphics SHOULD have a license that allows reskinning with better graphics.

I'm aware that at least one of the games listed above has a hitbox problem. It will be improved or replaced.

Non-normative: Diorgo Jonkers has 24 tips to consider for making a fun platformer (part 1, part 2). Bear in mind that these are one person's opinion, not the Bible, and in fact, I disagree with some of them. I'm just putting them out as rules to consider.

Objectionable content requirements

 * Games MUST NOT use certain vulgar slang or hateful terms. (One accepted game has been retitled slightly.)
 * Games MUST NOT show intense violence; comic violence comparable to a Looney Tunes film is acceptable.
 * Games MUST NOT show overt nudity or sexual references.
 * Games MAY show gambling, as in Sofel's Casino Kid, but MUST NOT support a means for real money gambling.
 * Settings SHOULD use technology as opposed to "magic". Despite their fundamental equivalence, some religious groups draw a distinction between "magic" from technology (good) and magic from demons (bad). So make sure to back your magic with at least token technobabble, making it arise from fictional physics rather than the occult. This shouldn't be so hard if magic has consistent behavior in your universe, so long as the functional means is clearly not theurgy or wild magic.

Licensing requirements

 * Games MUST be licensed for free redistribution at no charge.
 * The author of any game licensed with a "non-commercial" provision prohibiting distribution for a fee MUST accept a dual license agreement, with royalties as a percentage of revenue minus replication cost.
 * The license MAY include a copyleft provision with an exception for distribution in aggregates like that of the GNU GPL. We treat loading your CHR ROM and switching to your PRG ROM as equivalent to.
 * You represent that you have the authority to grant this license. This means the game MUST NOT include material that infringes a third party's copyright or patent. However, unpatented game mechanics MAY be copied as long as they qualify as a "process", "method of operation", or similarly uncopyrightable element under 17 USC 102(b) and the overall effect of the game isn't to exactly copy the rules of a game belonging to a known litigious company.

Bribes
For some planned features, I'll need a bit of enticement:
 * Improve menu voice compression
 * Power Pad mole stomping game