Live data from Hacker News

Inside the Super Nintendo cartridges

fabiensanglard.net

111–120 of 275 posts

Re: Inside the Super Nintendo cartridges

#111
post #24

Earlier quoted context omitted.

Also it was recently figured out that using the SNES's mosaic feature in an unconventional way could have nearly doubled the game's framerate.

Interesting, please do tell more! I know that Wolf3D on the SNES uses Mode 7. Not for the walls or sprites, but for the entire screen. The graphics are rendered into a background tiles with a resolution of like 175x100 or something, then scaled up with Mode7 to fill the 224x192 screen. (those aren't the exact numbers, but you get the idea)

The "mosaic trick" is a way to perform horizontal pixel doubling in hardware rather than software. And to do this trick, you turn on the SNES's Mosaic feature, scroll 1 pixel to the left every other scanline, and scroll upward one pixel after each two scanlines have been drawn.

Normally the SNES mosaic feature just the top-left pixel of a 2x2 square into that entire square. But the trick makes a different set of pixels get doubled horizontally on the next scanline.

It requires a different arrangement of pixels than the normal way of drawing tiles. A tile containing these pixels:

01234567

becomes this when viewed on two scanlines:

00224466

11335577

Actually performing these scroll writes does not require any CPU intervention because you use the SNES's HDMA feature to do those scroll writes.

User "93143" on Nesdev describes the Mosaic trick in this post: https://forums.nesdev.org/viewtopic.php?p=205633#p205633, other discussion here: https://forums.nesdev.org/viewtopic.php?t=20393&start=135

---

So now that you've done this, you need half as much video memory as before, which effectively doubles your bandwidth for rendering and transfers.

Re: Inside the Super Nintendo cartridges

#112
post #111

Earlier quoted context omitted.

Interesting, please do tell more! I know that Wolf3D on the SNES uses Mode 7. Not for the walls or sprites, but for the entire screen. The graphics are rendered into a background tiles with a resolution of like 175x100 or something, then scaled up with Mode7 to fill the 224x192 screen. (those aren't the exact numbers, but you get the idea)

The "mosaic trick" is a way to perform horizontal pixel doubling in hardware rather than software. And to do this trick, you turn on the SNES's Mosaic feature, scroll 1 pixel to the left every other scanline, and scroll upward one pixel after each two scanlines have been drawn. Normally the SNES mosaic feature just the top-left pixel of a 2x2 square into that entire square. But the trick makes a different set of pixe…

WOW! That is so cool! Thank you, thank you, thank you for this reply.

Re: Inside the Super Nintendo cartridges

#113
post #61

Another detail not mentioned here is that even carts which didn't contain enhancement chips had different levels of performance - the SNES CPU nominally ran at 3.58mhz, but it would only actually run at that speed with a "FastROM" cart inserted. Nintendo also offered publishers a "SlowROM" cart format, which was cheaper, but would downclock the CPU to just 2.68mhz. There is a community of modders developing patches t…

The thing that blows my mind about the SNES is that even its onboard RAM can't be accessed at the nominal 3.58MHz clock; the system slows down for that. Always confused me why the SNES was so paltry with its speed when the competitor TurboGrafx-16 usually ran at 7MHz, and also had a 6502-family CPU that required similar memory timing. But the TurboGrafx flopped (in the west) and the SNES was a hit world-wide, so I gu…

SNES had 3 background layers and color math/transparency, TurboGrafx 16 was stuck with one background layer. SNES also had much better sound capabilities.

I'd say TurboGrafx's biggest advantage was that they had a full handheld version of the system available very early on. The Turbo Express crushed the Game Gear and Lynx in terms of power. (The Game Boy still beat all its more-powerful competitors because of its far lower battery consumption)

Re: Inside the Super Nintendo cartridges

#114

> The author of DOOM for SNES, Randy Linden, did not have access to any documentation about the GSU chip or even DOOM source code. He reverse engineered all of it Technically this is impressive, but why was it necessary?

I can't speak to this case, but dev kits and SDK/documentation are often two separate SKUs and the latter has a higher price. If I remember the Crash Bandicoot guys found a hardware bug with memory card saving because they rolled their own code rather than using the SDK they didn't have.

Re: Inside the Super Nintendo cartridges

#116
post #74

There's not a lot of physical space for it, but I have wondered aloud before if the Switch cartridge slot could be used for enhancements?

Is there even anything that would make sense? A lot of the older enhancements were because of the limited compute ability of older consoles, or adding sensors like the already mentioned gyro sensors and light sensors in GBA games. The Switch is already more powerful than anything you could reasonably add in a cart, and probably already has any sensors you'd reasonably add too. If there's anything else that could be done, that'd be interesting to find out.

Re: Inside the Super Nintendo cartridges

#117
post #90
post #9

I'm wondering why the console CPU wasn't running at 4x the clock rate to begin with, if the cartridges could easily and cheaply include one so much better. I guess that's just how fast CPUs were improving back then. A CPU from just a few years prior was that obsolete. Crazy!

I also wonder why they couldn't provide a second cartridge slot for the enhancements. Sell enhancement carts separately or bundled with some of the games that require it (mostly the first game to feature such enhancement) and then all other developers could consider using them too, without worrying about the cost of their own cart. I imagine this would add to much cost or complexity to the console, making it simpler…

It would result in a situation where nobody could depend on the expansion module, if they wanted their game to have the largest possible market.

It would also cause a lot of confusion, where clueless older relatives would buy games for kids, not realize that an accessory was required (or have no idea if the kid actually had that accessory), and then the game wouldn't run.

We see this sort of problem happen a lot with computers of the 8-bit era as well, where add-on modules would fix a lot of the issues with the base system... then be supported by almost no software for these exact reasons.

Re: Inside the Super Nintendo cartridges

#118
post #65
post #63

Earlier quoted context omitted.

The article does mention LoRom and HiRom, I imagine you're talking about the same thing.

No that's something else, LoROM and HiROM differ in how the ROM data is mapped into memory, while FastROM and SlowROM differ in the bus speed. You can have Lo/Slow, Lo/Fast, Hi/Slow or Hi/Fast carts.

[deleted]

Re: Inside the Super Nintendo cartridges

#119
When I first learned about how complicated cartridges were it blew my mind. Each cartridge cost $10-25 to make, and N64 was even more expensive. For years now though the cost of delivering the game itself has been essentially 0. It's just wild to me that a huge percentage of the price of a game went to 'nobody' in a way, and just to buying the chips it took to make the cartridge. It likely made up a bigger cut then actually went to the developer of the game.

Re: Inside the Super Nintendo cartridges

#120

Since these carts pull out the CPU bus I would like to know if anyone ever did anything unusual with a classic gaming console. Like controlling motors for a robot or wiring in an FPGA to add functionality like Ethernet/USB, running a terminal emulator, trying to write an OS, etc.

Here's someone using the (officially unused) NES expansion port to send a Tweet from the console: https://www.trapzz.com/?page_id=292
Post reply on HN