Hacker News new | ask | show | jobs
by derefr 2531 days ago
I meant "best" as in "most practical for a third-party dev when deciding what behaviors to take advantage of." Defined behaviors are guaranteed to work in both 1. clone consoles that conform to the spec, and 2. future revisions of the official hardware. Undefined behaviors aren't.
1 comments

Future revisions of the hardware can throw everything out the window regardless of what is documented for the current hardware.

What NES cartridge from 1986 can you plug into current Nintendo boxes?

I think you're confusing "revision" with "generation." Revisions are the difference between e.g. the original SNES, and the 1CHIP (SoC) SNES console, not between the original SNES and the SNES Classic.

Even though the 1CHIP SNES is a complete ground-up re-layout (has to be, turning a bunch of individual chips into one SoC), every (officially licensed) cartridge made for "the SNES" works on a 1CHIP SNES.

A hardware revision like this, requires retaining bug-for-bug UB compatibility with officially-sanctioned released game titles, because to do otherwise is to doom the console's support line to endless complaints from people whose games don't work. But hardware revisions are not concerned with keeping UB working the same where no officially-sanctioned released title took advantage of said UB. For everything not constrained by bug-for-bug compat with an existing title, all that's required of the new revision is that it keeps to the spec.

If you were a third-party in the middle of developing a new title, and were relying on some new UB you found, when suddenly your console mfgr released a new revision, it could turn out that your clever UB hack won't work the same on the new revision. (And this happened; it was why unlicensed titles—your Game Genies, your Aladdin Deck Enhancers, etc.—frequently wouldn't work with later console revisions.)

There's a fascinating story of Pilotwings being (very gently) bitten by a very slightly different hardware revisions that causes the idle animation plane to just barely crash rather than land safely: http://www.nintendolife.com/news/2019/05/random_the_captivat...
The argument that GP seems to be making is that only relying on defined behavior ensures that your game will work on all NES systems made by Nintendo as well as any clone systems that follow the specifications that Nintendo issued for programmers on the NES.