
SNES Cartridges and Enhancement Chips - ilamont
https://twitter.com/i/status/1177644211790729216
======
patrickyeon
A little bit meta here, but I know it's going to come up: somebody is going to
complain that Twitter is the wrong way to write this content. How they loved
it but were infuriated to read it in snippets. Pre-emptively, I'm copy-pasting
an earlier comment of mine on this:

> Heh, from foone themself:
> [https://threadreaderapp.com/thread/1066547670477488128.html](https://threadreaderapp.com/thread/1066547670477488128.html)

> Not to humblebrag or anything, but my favorite part of getting posted on
> hackernews or reddit is that EVERY SINGLE TIME there's one highly-ranked
> reply that's "jesus man, this could have been a blog post! why make 20
> tweets when you can make one blog post?" CAUSE I CAN'T MAKE A BLOG POST, GOD
> DAMN IT.

> The short story is they are quite open about having ADHD, and that's what
> causes the long twitter rambles, but also what makes it very difficult to
> assemble it into a blog post. Every once in a while foone's wife will edit a
> popular thread into a blog post, examples:
> [https://foone.wordpress.com/](https://foone.wordpress.com/)

> If this seems like a particularly good story to you, maybe you'd like to
> edit it into a draft for a blog post and gift that to foone?

[https://news.ycombinator.com/item?id=19884445](https://news.ycombinator.com/item?id=19884445)

And yeah, as soon as I saw "SNES Cartridges and Enhancement Chips" and the
twitter domain, I felt about 90% sure it wouuld be linking to a foone
tweetstorm.

~~~
goldcd
I feel quite the converse..

..I accept twitter is here to stay, but always thought it was a a pointless
snippet-fest good for nothing aside from millions being able to pile on
praise/social-shaming.

Looking at this thread, it actually makes sense for once. It's a successive
sequence of info & pictures - that follow a coherent thread. Great, just like
any other blog.

However, if you're interested in any particular paragraph, you can click and
see a whole discussion on "just that paragraph"

Not for one moment saying twitter's won me over, but it provides a cleaner way
of annotating a story than any other platform I'm aware of.

~~~
dljsjr
I actually agree with this, Twitter is far from my favorite way to consume
content but I actually really enjoyed the format that this was presented in.

~~~
soulofmischief
I hadn't yet clicked on the link, but as soon as I read your comment I knew
exactly who the author was going to be.

Foone's posts are the only content I enjoy reading on Twitter. He's mastered
the format.

------
derefr
Fun fact about the SuperFX chip: it was turned into its own commercially-
licensable IP core (the "Argonaut RISC Core", or "ARC"), which became its own
business, similar to ARM Holdings:
[https://en.wikipedia.org/wiki/Synopsys#ARC_International](https://en.wikipedia.org/wiki/Synopsys#ARC_International)

Other fun fact: for a long while, Intel used an ARC core in its Management
Engine.

That's right—not only can your motherboard run rootkits; it can also run
StarFox ;)

~~~
saganus
Interesting fun fact!

How is it that a chip used for 2D/3D operations gets used in the ME though?

I would've thinked that they are pretty different, but I'm no expert so, any
ideas?

~~~
DiabloD3
The chip never did such operations... instead they ran it as both a secondary
processor and a math DSP. The operations otherwise were entirely software, and
conventional.

Another interesting one was the SA-1 chip used in a few games, such as Super
Mario RPG. Its a SNES-compatible 65C816 that is 3x faster, has its own RAM
bank, and can interrupt and be interrupt the main CPU, among other features,
and was used to offload a lot of things, including some graphics tasks.

~~~
monocasa
The SuperFX was pretty dedicated to graphics. It had stuff like a "plot pixel"
instruction.

~~~
benj111
For X86 at least, there's different names for the same instruction, depending
on what you want to do. So this could be an instruction that has other more
general uses.

That said, digging around I havent found reference to Intel using the chip,
and another responder claims it was a different chip by the same manufacturer.

~~~
DiabloD3
Intel used ARC CPUs in the Intel ME before Skylake, a several generations
descendant of the one designed by Argonaut. Its used a few other places in
IoT-land as well. ARC is a well understood architecture that is easy to modify
for individual customers, and can be fabbed anywhere.

Another interesting CPU that made its way around was the family that the
SPC700 (SNES) and SPC1000 (PS1) audio DSPs belong to. They've shown up in a
few embedded devices that needed to do audio work, such inside of AVRs and
other similar devices.

~~~
monocasa
They aren't they same architecture at all.

SuperFX is a CISC. Byte opcodes with prefixes, complex memory access
instructions, two address, etc.

ARCompact is a RISC. 32-bit instructions with a 16-bit subset that expands to
what you could encode with the 32-bit, fairly simple load store arch, three
address ops, huge register file, etc.

They're about as different as two archs can get; they're just made by the same
people.

~~~
DiabloD3
Not sure who told you its CISC, the SuperFX GSU is a rather conventional RISC
CPU.

[https://www.eurogamer.net/articles/2013-07-04-born-slippy-
th...](https://www.eurogamer.net/articles/2013-07-04-born-slippy-the-making-
of-star-fox)

The best quote, from Jez San, one of Argonaut's founders, is, "At the time
that it came out, it was also the world's best-selling RISC microprocessor
until ARM became standardised in every cellphone and took the market by
storm."

~~~
monocasa
Because I've coded for it.

Name another RISC with a byte opcode with prefixes and is variable width
depending on the arguments. That's about as CISC as you get.

It was pipelined, and at the time people for some reason thought that you
couldn't pipeline a CISC and therefore it had to be a RISC.

~~~
DiabloD3
ARV32, RISC-V, PowerPC, ARM's Thumb, all variable instruction encoding. The
SuperFX came out after the Pentium, the first consumer super-scalar pipelined
CISC CPU, and not the first CISC to do it.

~~~
monocasa
None of those are byte opcodes encoding with prefixes.

None of those are variable width depending on what type of argument you have.

Also, PowerPC isn't even variable width at all.

And the Pentium was the first pipelined CISC microprocessor, ie. a single
chip. At the time there was a holy war going on with one side being of the
opinion that you shouldn't pipeline single chip processors, but instead rely
on Moore's law. The thought was that the mainframe style multichip modules
needed a pipeline to account for off chip delays, but that all on the same die
it was unnecessary and created too unpredictability with pipeline bubbles,
etc. Those people were obviously wrong and lost.

Edit: also the Pentium was released a month after StarFox was looking into it.
And when you account for the long lead times of hardware, their statements
make sense timeline wise. Particularly when you consider that that RISC was a
huge buzzword at the time and being misapplied, sort of like how now everybody
doing a simple linear regression is talking about all the machine learning
they're doing.

------
sdenton4
Along these lines, Tom7 invented* 'reverse emulation' which effectively uses a
Raspberry Pi as a co-processor, allowing him to run [spoilers ahoy!]an SNES
emulator on an NES.[/spoilers]

The talk is brilliant:
[https://www.youtube.com/watch?v=ar9WRwCiSr0](https://www.youtube.com/watch?v=ar9WRwCiSr0)

* - as far as I know...

------
aidenn0
With regards to compression chips; If someone can substantiate this vague
recollection I have it would be great.

I seem to recall Nintendo charged a per-unit royalty based off of the ROM size
of the cartridge, which would make including a dedicated decompression chip
reasonable, particularly since they are likely fairly simple to design
anyways.

[edit] In addition, the two games listed as using the S-DD1 were 32M,it and
48M,it roms (there were very few 48 Mbit roms and 32Mbit was considered
"large"), so these were already fairly expensive cartidges.

Found a pic of the Star Ocean PCB; note that the S-DD1 takes up less PCB space
then even 1 of the two ROM chips:

[https://snescentral.com/pcbboards.php?chip=SHVC-
LN3B-01](https://snescentral.com/pcbboards.php?chip=SHVC-LN3B-01)

[edit2] The SF Alpha PCB was much simpler by comparison:

[https://snescentral.com/pcbboards.php?chip=SHVC-1N0N-01](https://snescentral.com/pcbboards.php?chip=SHVC-1N0N-01)

~~~
gergles
This is true (the royalty varying on the size of the memory) but the royalty
was also significantly higher if there was any custom hardware involved on the
cart - specifically because you actually had to purchase the "Game Pak" from
Nintendo, so they would charge you "whatever they could get away with" for
enhancement chips.

~~~
aidenn0
Any idea if Enix was locked into buying the Game Pak already for Star Ocean by
use of battery-backed SRAM or not?

~~~
toast0
All the game paks (aka cartridges) were manufactured by Nintendo. By selling a
licensed game, they were already locked in.

~~~
aidenn0
So it's just a question of "was the S-DD1 priced cheaper than another (or
larger) ROM chip by Nintendo" right?

------
makerofspoons
There was also a Super FX 2 which powered Doom, among a few other games.
Notably Winter Gold looked quite good given the platform's limitations:
[https://www.youtube.com/watch?v=9uQlCZVb_Ro](https://www.youtube.com/watch?v=9uQlCZVb_Ro)

~~~
vardump
For a moment I thought this was an old Amiga 500 demo (older than this game).
Spaceball's "State of the Art" [0].

Apparently same author for both rotoscoped animations.

[0]:
[https://www.youtube.com/watch?v=89wq5EoXy-0](https://www.youtube.com/watch?v=89wq5EoXy-0)

------
CodeArtisan
Software implementations of these chips can be found here

[https://github.com/byuu/higan/tree/master/higan/sfc/coproces...](https://github.com/byuu/higan/tree/master/higan/sfc/coprocessor)

~~~
waz0wski
the owner of this repo also has some good blog posts about this topic,
including an overview of some of the custom chips and their impact on the
emulator they also maintain (bsnes)

[https://byuu.net/cartridges/boards](https://byuu.net/cartridges/boards)

~~~
throwaway2048
bsnes is now named higan, and does several systems besides SNES.

~~~
Wowfunhappy
Nope, byuu spun bsnes back into its own project.

------
jordigh
This thread mentions the Super Gameboy. There's a deeply fascinating series of
blog posts about the Super Gameboy that everyone should read:

[https://loveconquersallgam.es/post/2350461718/fuck-the-
super...](https://loveconquersallgam.es/post/2350461718/fuck-the-super-game-
boy-introduction)

~~~
artsyca
Fascinating --

------
seibelj
This strategy was used in most cartridge-based systems that became popular
enough to warrant the engineering effort. The original NES had "mappers" which
accomplished similar feats, mostly expanding ROM / RAM but also interesting
actions like triggering interrupts when the PPU (Picture Processing Unit,
nowadays called GPU) took certain actions.
[https://wiki.nesdev.com/w/index.php/Mapper](https://wiki.nesdev.com/w/index.php/Mapper)

All of this was to squeeze more performance and make more advanced games.

~~~
tenebrisalietum
One mapper even added audio channels to the NES, but would only work on the
Japanese Famicom because the pins passing through the audio weren't present on
the American NES. There's also one mapper that I guess may have been recently
discovered that had a microcontroller on it that had its own ROM and IIRC was
an attempt to copy protect the game.

I think you can't quite equate the PPU with GPUs - because the PPU doesn't run
instructions or render things to a framebuffer. It's more like just the part
of the GPU that takes memory and outputs a display signal - in VGA that's
called a RAMDAC, not sure what the digital TMSS/HDMI/LVDS equivalent is.

~~~
gvfff
The pins are there actually, just not on the cartridge side.

The little expansion slot under the NES has these and other pins. Some of the
pins are electrical shorts with pins on the cartridge side.

So to play Japanese games with full audio all you’d need is an expansion
cartridge selectively shorting the pins on that expansion port.

------
codesushi42
Sega had their own version for the Genesis, the SVP:
[https://en.m.wikipedia.org/wiki/Sega_Virtua_Processor](https://en.m.wikipedia.org/wiki/Sega_Virtua_Processor)

Virtua Racing was the only game released with it, but there were others
planned for it originally. That is, until Sega decided to use the same
technology for the 32X, which added a lot of power but was a terrible
commercial failure.

~~~
morkfromork
I had that game for the 32x. You could get the car airborne, lock the brakes
and leave skidmarks in the air.

------
tibbon
In theory, could you make some ultra-modern SNES game using a modern ARM chip
or such in the cart? Still some basic system limitations, but running pretty
much everything on the add-on chip?

~~~
dmitrygr
I am doing that for PalmOS 5.0 with reSpring actually:
[http://dmitry.gr/?r=05.Projects&proj=27.%20rePalm](http://dmitry.gr/?r=05.Projects&proj=27.%20rePalm)

~~~
zokier
> I settled on the 4KB part purely based on cost. Even at this measly 4KB
> size, this one RAM is by far the most expensive component on the board at
> $25. Given that the costs of putting in a 64KB part (my preferred size) were
> beyond my imagination (and beyond my wallet's abilities), I decided to
> invent a complex messaging protocol and make it work over a 4KB RAM used as
> a bidirectional mailbox.

Is this not the sort of memory you'd need?

[https://www.digikey.com/product-detail/en/cypress-
semiconduc...](https://www.digikey.com/product-detail/en/cypress-
semiconductor-corp/CY7C0241E-15AXC/428-3064-ND/2485900)

or

[https://www.digikey.com/product-detail/en/idt-integrated-
dev...](https://www.digikey.com/product-detail/en/idt-integrated-device-
technology-inc/70V24L20PFGI/800-2606-ND/2010029)

just trying to understand the details here.

~~~
dmitrygr
Those are similar to the ones I am using. Yes. And prices are similar too.
Sadly....

Next rev I am replacing it with a small FPGA which will act as dual port
memory. Believe it or not, that is much cheaper.

------
claudeganon
Fascinating! Did any later gen systems besides the Nintendo 64 use these
chips? Would it be possible to use a similar configuration in Switch
cartridges?

~~~
bitwize
I think Switch carts use a form of flash memory, which precludes this sort of
extra-flexible expansion. You could include a chip on the cart, but it
wouldn't have much throughput to do things like real-time graphics
transformation. As for compression, most consoles just do regular
decompression with the open source image libraries in the system BIOS, or on-
GPU texture decompression. It wouldn't surprise me if the sprites in a game
like _River City Girls_ , for instance, were just PNGs.

~~~
fl0wenol
The Switch is "just" an Nvidia Shield, albeit not running android. The carts
are your standard mask ROM on a (proprietary) bus manufactured by Macronix and
so would not be able to extend the functionality in a meaningful way.

Texture decompression is handled using the hardware acceleration on the Tegra
if being used to save VRAM, otherwise using standard libraries (like libpng,
libjpeg, etc.) in the game software.

------
fapjacks
If anyone is interested in learning a little more about the 6502, Ben Eater
recently did a video about it [0]. Also just in general if you hadn't heard of
his channel and are reading this comment, you'll definitely enjoy what he
does.

[0]
[https://www.youtube.com/watch?v=LnzuMJLZRdU](https://www.youtube.com/watch?v=LnzuMJLZRdU)

------
ct520
Wow I feel like gaming back in those days was the Wild West. So cool to edge
up the competition with custom hardware

------
arebours
Does anybody knows how emulators cope with such games? Can you find them as
ROM files?

~~~
nwallin
Since there are only a small number of such chips, the emulator will also have
a library of cartridges it supports. You emulate those chips the same as you
would emulate the CPU or PPU. Sometimes it's easy: the add-on chip is just a
regular SNES CPU at a higher clock speed. Sometimes it's hard, because it's
some sort of obscure finicky twiddly bits.

The situation is significantly worse on, for instance, the NES, which had 40
or so different chips for bank switching, which is thankfully natively (and
therefore uniformly) supported by the SNES.

------
rolltiide
It took Star Ocean forever to be emulated properly because of that co-
processor chip!

~~~
byuu
Tengai Makyou Zero (SPC7110 + RTC-4513) suffered much longer, and the fan
translation of it even longer still. Absolutely worth the wait though.

------
fireattack
> used by the Japanese-only RPG

What is the name of that game?

~~~
zerocrates
I believe the name left out of that message was _Daikaijuu Monogatari II_

------
tanr54ok
> Rather than try to emulate the Game Boy on the SNES, they just included the
> CPU in the cart!

There’s no way you could do that anyhow

------
kjar
Ok - everyone should feel free to publish as they prefer. On the other hand
lashing out at critics is unproductive.

------
BuildTheRobots
There's actually a couple variants of Pilot Wings with different math
coprocessors that act ever so slightly differently:

[https://twitter.com/foone/status/1126996260026605568?lang=en](https://twitter.com/foone/status/1126996260026605568?lang=en)

~~~
BuildTheRobots
I know I'm not supposed to comment on voting, but I'm honestly curious why
this deserved to be taken down to -1.

The link seems entirely related to the original article and contains
interesting information.

If I'm not to do it again, I need to understand why, please.

