Writing the Header

[[!redirects Writing the Header]] Before writing your actual program's code, you need a header to describe WLA the SNES' memorymap. This is basically just a file you will include into your source. It contains all of the basic information about your ROM. The following is a basic header file for a 2 ...

BS-X Satellaview Header

The header will be at 0x7xxx (for LoROM) or 0xFxxx (for HiROM).

xFB0-xFB1 = ID
xFB2      = ?? Unknown, gets compared to 0001
xFC0-xFCF = Title
xFD0-xFD3 = Block Allocation flags (for 32 blocks of 128Kbytes each bit, 32Mbits max)
xFD4-xFD5 = Limited Starts
xFD6     ...

Satellaview Download Data

Super Famicom Channel Map (Hardware Channel $0124)

Download Header

(Goes to $7E9A34)
$00-$01 : Unused.
$02 : Unknown (Copies to RAM $1411)
$03-$04 : 16-bit Big Endian Data Size (Copies to RAM $140F in Little Endian)

Channel Map Header

(Goes to $ ...

How to Use ROM Patches

How to Use ROM Patches

This guide should help you in your goal of patching your ROM. This guide is applicable to most ROMs and patches but makes some assumptions about the patches and ROMs used:

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

Markdown Cheat Sheet

# Header 1 #
## Header 2 ##
### Header 3 ###             (Hashes on right are optional)
#### Header 4 ####
##### Header 5 #####

## Markdown plus h2 with a custom ID ##         {#id-goes-here}
[Link back to H2](#id-goes-here)

This is a paragraph, whi ...

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

BS-X Formats

Text Format

The codepage used is Shift-JIS. Also has some commands for text.

This one is quite specific. It has some functions like \x00 or \y00 that needs to be known.

\c?? - Color
\d??? - Print value from memory (half-width)
\D??? - Print value from memory (full-width)

...

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

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

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

Writing Your First SNES Program

Writing Your First SNES Program

Now it is time to get your hands dirty. You will be making your first SNES ASM program today. It's about time, huh. So let's get on with it!

What this program will do:

Well it will basically fill then entire screen with one color. MAN is that EXciting ...

SPC and RSN File Format

SPC

SPC is an audio format for playing native SNES audio.

SPC File Format

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

Space Funky B.O.B.

Space Funky B.O.B.

Space Funky B.O.B. Source Code

This was originally posted on eludevisibility.org when I ([[Matthew Callis]]) originally bought these disks off eBay, but I'm consolidating all SNES related things down to superfamicom.org.

...

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

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

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

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

Working with Audio and Video

Managing Media Files

Setup

brew install ffmpeg mediainfo mkvtoolnix mp4box

Handbrake Subler

mv SublerCLI /usr/local/bin/SublerCLI

Identifying Problems in Files

mediainfo source.mkv

Co ...

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

Using the NMI-VBLANK

Earlier we made an interrupt table which assigned addresses for the SNES interrupts. We assigned the address to an empty handler that just returned for every interrupt except the NMI (VBLANK) interrupt. This interrupt occurs whenever the T.V.'s tracer is not tracing to the screen, making it safe to ...

ASM Hacking for Dummies

[[!include asm_hacking_sidebar]]

Introduction ### {: #introduction}

This document was written for the aspiring ROM hacker with little to no experience in 65c816 programming. The basics have been thoroughly covered and I believe this should prove a significant aid to anyone interested in 65c8 ...

Final Fantasy 4

:category: game-specific

Final Fantasy 4 #{#top}

ROM Map ##{#rom-map}

| Offset | Description | Info | |---------|----------------------------------------------------- ...

BS-X RAM Map

This page contains the RAM Map of the BS-X.

 $7E00AC - BS-X Token Interpreter Current Address (24-bit)
	 
 $7E0725 - Text Settings

 $7E13C5 - Error Number

 $7E1427 - Copy Type
 
 $7E1430 - Current Month
 $7E1431 - Current Day
 $7E1432 - Data Type

...

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

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

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

BS-X SRAM Map

SRAM Map

BS-X uses a 32kb battery-backup SRAM. This is the BS-X SRAM Map. Everything is Little Endian, unless said otherwise. In the Memory Map, it's 10-17:5000-5FFF.

      Offset - Size (Bytes) - Description
  [Bank 0x10 - Dedicated to BS-X]
      $0000 - 0x02   - Always $4753 (String ...

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