Controllers

Controllers

The SNES has 2 controller ports on the front of the unit, and an "expansion port" on the bottom. Little is known about the expansion port.

A number of peripherals could be plugged into the controller ports:

Polling Controller Input

In this tutorial, you'll learn to read the joypad registers and react to player input ;). We're going to need to store the player's input somewhere, so we'll declare some variables in the system's RAM ($0000-$1FFF). If you make your own variables later in this part of RAM, keep in mind that the st ...

Windows

The masking windows are pretty simple. The windows can be used to mask off a portion of any BG on the scanline. With [[HDMA]], they can be adjusted per scanline. They can be combined in various ways, per BG. Each can be used to select either the region of the BG to keep, or the region of the BG to h ...

Satellaview Soundlink

Soundlink, also known as "Live Voice" and various other aliases, is a Satellaview function in which Streaming Satellite Radio from St.GIGA is played at the same time as software data is broadcast, downloaded and played. This is intended to give the illusion of a game being played with high-quality a ...

Satellaview AV selector

Satellaview AV Selector

The satellaview AV selector was conceived in order to prepare the decoded satellite signal for the satellaview, prevent the super famicom from monopolizing the TV's AV input, and allow for the use of a second BS decoder along with the one provided by ST. Giga. As is eviden ...

Rendering the Screen

Mosaic

The mosaic filter is applied after the BG is rendered and scrolled but before it is clipped, combined with other BGs, pseudo-hiresed, or mathed. Each XxX block of pixels is replaced with the upper-leftmost pixel of the block. The 'blocks' are such that the upper-leftmost block is at th ...

Working with VRAM - Loading the Palette

I'm getting right down to business in this tutorial, because this is a BIG topic to cover. Seriously, get ready for a ton of new registers to be introduced to, and a lot of theory. Ok, no more time for chatter, let's get started.

What We're Covering

Today we'll make a tile, write that tile t ...

Satellaview Registers

Stream Registers

$2188 : Stream 1 - C1L2 - Low 5-bit Logical Channel + Data Group ID (R/W)
$2189 : Stream 1 - C1L1 - High 6-bit Logical Channel (R/W)
$218A : Stream 1 - PFCNT1 - Packet Prefix Counter (R)
$218B : Stream 1 - C1POD - Packet Prefix Data (R/W)
$218C : Stream ...

SA-1 Registers

SA-1 Write Registers

Register Address Name Notes
SA-1 CPU Control ...

Making a Small Game - Tic-Tac-Toe

When you have finished this tutorial, you will have written a small game. Things you have to know before you start:

  • 65816 assembly
  • Interrupts (What are NMI and VBlank)
  • What is VRAM, CGRAM, and their basic structures
  • What is DMA and how to use it
  • Video modes (mode 0), using backgroun ...

Grog's Guide to DMA and HDMA on the SNES

Introduction to DMA

Most computer systems have some form of Direct Memory Access controller, which is basically a piece of hardware that allows I/O devices to copy to and from main memory independently of CPU control. In the SNES, as usual, Nintendo came up with an odd design for their DMA ...

SA-1

SA-1 (Expansion Coprocessor Chip)

Overview

The SA-1 is a coprocessor capable of running at four times the base speed of the SNES main CPU when access does not conflict with that of SNES CPU, DMA or HDMA processing. It provides ad ...

Sprites

The SNES has 128 independent sprites. The sprite definitions are stored in Object Attribute Memory, or OAM.

OAM

OAM consists of 544 bytes, organized into a low table of 512 bytes and a high table of 32 bytes. Both tables are made up of 128 records. OAM is accessed by setting the word add ...

Registers

Address Bus B Registers

TODO: note on fast access time

Register Address Name Style Access Timing
Screen Display ...

ASM Tutorial Part 2

Are you familiar with all the previous lessons yet? If so, that's great.. with all of that knowledge, you can do a lot of cool stuff - but you can always get better at ASM and make awesome stuff by learning more. So here's Part 2 of the tutorial, which for now only explains a bit of intermediate stu ...

Super Wild Card

Hardware Specification to SWC & SMC Programmer Only

  1. DRAM - 28 Mega Bits Maximum Available.
  2. SRAM - 256K Bits. (Battery Backup)
  3. ROM - 128K Bits. (Firmware)
  4. Floppy Drive Interface
  • Motorola MCS3201 Chip. (NEC 765a Compatible)
  • Compatible With IBM PC/at and XT Disk Drive Syst ...

Game Doctor

Bung Game Doctor SF3, SF6, SF7 Headers

Version 1.0 - Copyright 2003: The Dumper

The Game Doctor SF3/SF6/SF7 backup units for the SNES use a 512 byte header.

The format is as follows (all numbers are hexadecimal):

0000-000F

`47 41 4D 45 20 44 4F 43 54 4F 52 20 53 46 20 33 ...

GD Leen

GD Leen

Below is a decompressor and recompressor for GD Leen. This has been updated to compile with GCC, below that is the original unmodified file.

//------------------------------------------------//
// Decompressor and  ...

ASM Tutorial Part 1

So... you want to make a block that freezes Mario only when he's small? Or perhaps make a block that kills him if he has zero coins because you've played through SMW and well, there are no more gimmicks? Well... with ASM, you can easily create these type of blocks - ASM basically lets you do custom ...

Mega Man X3

Mega Man X3

Decompression Routine

People always assume "OMG MMX3! this game uses a [[C4]] chip, the [[C4]] chip does the decompression blah blah blah" well I proved them WRONG! [[C4]] chip is ONLY responsibl ...

Backgrounds

BG Modes

The SNES has 7 background modes, two of which have major variations. The modes are selected by bits 0-2 of register $2105. The variation of Mode 1 is selected by bit 3 of $2105, and the variation of Mode 7 is selected by bit 6 of $2133.

Mode    # Colors for BG
         ...

SNES Sprites

This was very large and I had to write more sections in different parts of the tutorial, so please tell me if anything is confusing. I have not proofread any of this.

Sprites are important to every game. They are coined after the objects that move in a game, and there are ALOT of moving objects i ...

HomePage

About the Super Nintendo Development Wiki

Welcome to the SNES Development wiki. For many years information has been literally scattered across the world, in old text files, in aging and now disappearing web sites, in dead forums, in some wiki's that never quite made it happen, in books... b ...

Schematics, Ports, and Pinouts

[[!redirects Ports & Pinouts]] [[!redirects SNES Ports]] This is a document intended to describe the various hardware ports on the SNES. It will not describe how these ports are used by what may be plugged into them.

In the doc below, "active", "1", "logic-1", and ...

SPC700 Reference

SPC-700

System Overview

CPU

8-bit SPC700, runs at ~1Mhz ...with the effective speed being half (each instruction takes a minimum of 2 cycles)

Memory

64KB (NOT 32KB), shared with everything.

Communication

4 8-bit I/O ports to transfer data to/from the ...

SPC7110

Emulation History

The decompression was completely cracked on Saturday, July 19th, 2008.

[[DecompTest0.c:file]] [[DecompTest1.c:file]] [[DecompTest2.c:file]]

SPC7110 Info, Reverse Engineered by & (c) Dark Force 

New data added by The Dumper 


SPC71 ...

S-DD1

As stated in the title, this document try to document the S-DD1 chip's algorithm and, up to certain point, the chip itself, but you have to take in mind that the main target is to describe the algorithm, not his implementation. Due to that, there are details that obviously have to be present in a re ...

Testing Code

[[!redirects Running your programming on Hardware]]

Once you've programmed a game or other bit of data for SNES, you'll probably want to try to, well, test it.

Methods

Although for most software these choices are, mostly, about preference. Most games which require [[Expansion Chips]] o ...

Jay's ASM Tutorial

Introduction

This is a tutorial on 65816 ASM used in the SNES, made easy for dumb people to understand (sorta). In case you are wondering, I don't program in this language, so it is possible that I will write something incorrectly in this tutorial. If so, you can e-mail me at tennj@yahoo.com, ...

Working with VRAM - Initializing Tiles and Tile Maps

Now in this part of the series, we'll actually be.. Working with VRAM. :)

What We're Covering

Now we're going to actually upload data to the Video RAM. Now, there's 2 things that need to go to VRAM, and that's the tile data itself, and the tile map, which says where specific tiles will be di ...

Timing

This is a document intended to describe various aspects of SNES timing. It will probably not be useful unless you already know a good bit about the SNES.

BTW, special credit to byuu for the critical observation that the SNES returns to a known timing position on reset. Thus, a deterministic ROM ( ...

Nintendo Music Format (N-SPC)

N-SPC Player is a common SPC player included in many SNES games. The actual player N-SPC itself seems to vary slightly from game to game. Secret of Mana's internal music format can be thought of as a counterpart to N-SPC, as can [Seiken Densetsu 3]( ...

Star Ocean

Star Ocean Memory Map

Below are the known and unknown offsets for Star Ocean, feel free to expand upon these.

General

| Memory Address | Description (English / Japanese) | Values | |-------- ...

BS-X MMIO

The BS-X cartridge has a MMIO included in Memory 00-0f:5000. (Info taken from bsnes and sd2snes' verilog source)

They all do different things to the Memory, and is NECESSARY, to run games, and other stuff.

We will call them from r00 to r0f. Those have only one bit that can be set.

MCC ...