65816 Reference

Internal Registers

Mnemonic Friendly Name Description
A Accumulator The accumulator. This is the math register. It stores one of two operands or the result of most arithmetic and logical operations.
X, Y Index The i ...

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 ...

xkas

xkas (acronym for: cross-knight assembler) is a cross-assembler for the WDC G65816 processor, specifically tailored for use with SFC/SNES programming and translations but also supports GBA Thumb CPU (ARM7TDMI Thumb). The documentation below is for the most recent version of xkas.

Features

  • S ...

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 ...

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 ( ...

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 ...

SPC and RSN File Format

SPC

SPC is an audio format for playing native SNES audio.

SPC File Format

| | Offset | Size | Description | |:--------------------------|:--------:|------:|:-------------------------------------- ...

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
         ...

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 ...

Registers

Address Bus B Registers

TODO: note on fast access time

Register Address Name Style Access Timing
Screen Display ...

Pointers

Ok, here is my explanation on pointers. Some documents out there don't make any sense what so ever so I'm writing my own. This document is exclusively on Low-ROM SNES pointers and related. It is suggested that you become familiar with basic rom hacking before you read any further. If you begin to re ...

XBAND Registers

Most of the XBAND registers are at bank $FB.

 $FB:C108 - Related to XBAND Cards. (Bit 0 is a XBAND Card Check)
 $FB:C188 - ???
 $FB:C192 - ???
 $FB:C196 - Related to Dial-up. Must be #$80.
 $FB:C1B0 - ???
 $FB:C1B2 - Must be #$46 for running XBAND.
 $FB:C1BA - ?? ...

Old BBS Messages

Old BBS Messages

Old BBS messages can be fun and interesting, so here are some I've come across.

Job Postings

Seeking Awesome Programmer

Catapult Entertainment, Inc. is looking for a top-notch, real-time,
low-level programmer to join a world-class software team creating the fi ...

Useful Ruby Snippets

Useful Ruby Snippets

These are useful code snippets I've used when working with SNES data and don't want to forget them. Some examples are not optimized as much as they could be in order to help keep the functionality clear.

Command Line Script Template

Useful for running a script fro ...

Transparency

The transparency on the SNES, while documented properly, made me have some headaches understanding how it works. Now that I've figured the truth (or at least I'm pretty damn close to), I'm writing a small document to spare someone else the headaches I've had if if could be useful to someone wanting ...

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 ...

Tototek Flash Cart

Super Flash Cart 64M for NTSC/PAL SNES

The Super Flash Cart 64M (SFC) is an 8MB SNES cartridge with flash memory and battery RAM. It comes with a separate programmer. I obtained the following information by hot-swapping the cartridge into an already-powered SNES running probing programs, and ...

DMA & HDMA

DMA, or "direct memory access" is found in a number of computer systems, not just the Super Nintendo. It's basically a way for a peripheral or coprocessor to read data directly from memory, instead of requiring the main CPU to do a number of reads and writes. This is typically faster, if o ...

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:

Capcom Music Format

This article has Japanese translations that need to be checked for correctness and have the Japanese portion removed.

This explains the structure of the SNES Capcom Sequence format / Capcom SPC format. Used by many Capcom games, this document focuses on [Mega Man X](https://superfamicom.org/inf ...

Capcom Cx4 - Hitachi HG51B169

[[!redirects CX4]] [[!redirects C4]] A DSP chip from Capcom; it is actually a Hitachi HG51B169 as confirmed by decapping. There are 1024K words of 24-bit instructions, running as 20.000MHz. and it is used in 2 games:

Bit Rate Reduction (BRR)

Introduction

Due to the requests of several people, the lack of documentation in this area, and a hope to spring the SNES emulation "scene" forward, I am going to try to describe the BRR encoding scheme in this doc. Everything here, I either read in publicly available documentation, or disc ...

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 ...

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 ...

ST010

The ST-0010 is a DSP chip from Seta; it is actually a NEC uPD96050, as confirmed by decapping. It's only used, and barely so, in 1 game:

The development PCB for this chip has the se ...

Learning 65816 Assembly

I trust that you have learned some other kind of assembly language. If you have not, I'm afraid that learning 65816 as your first assembly language may be extremely hard. However, I won't stop you from trying. You will need other 65816 documents, because I do not teach much in this tutorial. These t ...

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, ...

Setting Up a Programming Environment

Before you dive into writing Super Nintendo programs, you need the necessary utilities and other things that will simplify your journey of learning how to program this beast.

Documents

  1. One great assortment of files was gathered by Qwertie, it contains documents on the cpu, graphics, ...

General Advice

The most important thing to know about 65816 optimizations is to not try to emulate other CPU architectures. A lot of games (games with a lot of slowdown) have this programming style where the programmer pretends that a couple memory locations are 68000 registers or high-level local variables, and ...

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 ...

Basic ca65 Usage for SNES Programming

Basic ca65 Usage for SNES Programming

First Example

The first example is a minimal example of setting up the ROM header, vectors, etc.

Usage:

ca65 ca65.s
ld65 -C lorom128.cfg -o ca65.smc ca65.o

lorom128.cfg

# ca65 linker config for 128K SMC
 ...

How to Write to DSP Registers Without any SPC-700 Code

How to Write to DSP Registers Without any SPC-700 Code

Usage:

ca65 manual_dsp.s
ld65 -C lorom128.cfg -o manual_dsp.smc manual_dsp.o

lorom128.cfg

# ca65 linker config for 128K SMC

# Physical areas of memory
# Names need not match, but it makes it  ...

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 ...

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 ...

Sluggo III

Sluggo III SNES Memory Emulator

[[sluggo-1.jpg:pic]]

[[sluggo-2.jpg:pic]]

[[sluggo-3.jpg:pic]]

Apple II RoundTable: Sluggo III - Nintendo Development System for the Apple IIgs

Real Time Conference Transcript

Guest: Bill Heineman, Programmer

Company: Interplay ...

Memory Pack Commands

[[!redirects Data Pack Commands]] [[!redirects Data Pack Registers]] Those commands were figured out and tested on real hardware by ikari_01.

All references to Memory Map are based on the HiROM memory map from BS-X. There are also Memory Packs that are only ROM and does not support those comman ...

SNES逆汗解析・改造入門

SNES逆汗解析・改造入門#

アセンブラに関する資料は見かけるものの、 具体的な解析手法を公開しているサイトはほとんど見ないので作ってみました。 まー私自身大した知識や技術があるわけではないので、逆汗初心者向けです。

この文章について

この文章はSNESのROMを対象にして逆汗解析をしたり改造をしたりするためには
作業をどのように進めていけば良いのか、を具体的に説明することを目的としています。
前提的知識としては ゲイムのお部屋の「2から始める ...

BS-X Satellaview Header

The header will be at 0x7xxx (for LoROM) or 0xFxxx (for HiROM) for the downloaded content. There may be more than one in a single Memory Pack.

xFB0-xFB1 = Licensee / Maker Code
xFB2-xFB5 = Program Type
xFB6-xFBF = Reserved
xFC0-xFCF = Title
xFD0-xFD3 = Block Allocation ...

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 ...

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 ...

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 ...

Daikaijuu Monogatari 2

This is information pertaining to hacking or translating Daikaijuu Monogatari 2.

Compression Methods

Complex and not well explained by default and so many (only more compressed code)

色々と複雑でうまく説明で無いので省略(圧縮符号の詳細のみ)

Data length, Addr ...

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 ...