SuperFX

From SMWiki
Jump to: navigation, search

SuperFX is a Super Nintendo enhancement chip, mainly used to enhance graphical effects. Another name for the SuperFX chip is the GSU (Graphical Support Unit). Super Mario World 2: Yoshi's Island and Star Fox are two notable games that used this enhancement chip.

Contents

Technical information

It can be clocked to run either at 10.74 MHz (approximately 5 times faster than SNES), or at 21.48 MHz (approximately 10 times faster than SNES). It runs parallel to SNES' CPU. The SuperFX chip also has 16 general-purpose registers, as opposed to the SNES CPU. When one is using SuperFX, the maximum ROM size should never exceed 2MB. This makes it possible to use SuperFX in Super Mario World too. The SuperFX chip has been documented thoroughly in the SNES Developer Manual, book 2.

Uses

The SuperFX chip can mainly be used for advanced graphical effects like dynamically updating graphics, generating tables, graphic decompression, and so on. Additionally, the SuperFX is a programmable chip. You don't give it inputs and it gives you outputs (like the DSP-1) - you code the chip's functions yourself, and use the chip whenever you want to.

Common misassumption

People think that this chip can scale and rotate sprites. This is NOT true. This chip only rotates and scales the sprite's GRAPHICS.

Programming cautions

- SuperFX has a different instruction set than the 65c816 CPU, and isn't capable of indexing and using the stack. You will have to code accordingly.

- Even though SuperFX runs parallel to the SNES CPU, they both can't access the same area simultaneously. An example of this situation is: If you run the SuperFX and access the ROM area for data, while you (the SNES) wait in a loop in the ROM area for SuperFX to finish, the SNES CPU will crash, because it can't access the ROM area anymore - the SNES will read bogus opcodes. This can be solved by putting the SNES wait loop in the WRAM.

- A ROM using the SuperFX chip is limited to 2 MB, due to the way the memory is mapped when the SuperFX is present.

External Links

Personal tools