Version 184, last updated by optixx at January 18, 2010 11:24 UTC

Quickdev16 Project Page

pcb

Index

About

Quickdev16 is a developer cartridge for the Super Nintendo and it can be used to upload homebrew roms to the console. You can upload rom images up to the size of 16Mbit. Currently NTSC and PAL SNES consoles are supported by using a dedicated CIC chip on the Quickdev16 cartridge. Homebrew roms and games that depend on the save game feature or that use DSP chips are not supported by this release. You can connect the cartridge via usb to your computer and upload roms with a command line tool. Currently Linux,OS X and Windows software builds are available.

Important Note: If you don't know how to use the comandline and just interested in runing games on your Super Nintendo, this isn't the right project for you. This is a developer tool and not a plug and play solution.

Hardware

Features:

  • 16 MBit SRAM for ROM storage
  • ATmega644 MCU for housekeeping
  • USB connection for ROM upload
  • ucon64 software compatibel
  • PAL/NTSC CICs are supported
  • Lo/Hi ROM support
  • Reset trigger and sniffer from cartridge possible
  • AVR USB Bootloader for quick firmware updates
  • Snes bootloader intro
  • Snes powered, no power source needed

Software

The project consist of 4 different software components. The main software is the AVR based firmware and the second is a bootloader that lives on the cartridge for firmware updates. The firmware does the housekeeping for the rom upload and SNES controlling. There is a SNES based loader client compressed in the firmware that visualize the upload process. When the cartridge is inserted and the SNES is powered up, the loader will pop up and wait for a rom to be uploaded. The last component is the client that runs on the pc side to upload the rom.

How to set up and use the upload client

You can easily download the pc side upload client and the drivers for various operating systems here. We mainly use ucon64 as the upload tool for the Quickdev16. Currently we have a patched version working under Linux, OS X and Windows. We provide patched binary and source packages for ucon64 to get Quickdev16 working, just scroll down. Hopefully the Quickdev16 support will be included in the ucon64 mainline soon.

Upload a rom:

ucon64 -smc --port=usb --xquickdev16 rom.smc

Windows users need to install libusb-win32 and also use the provided INF file to get the libusb with the quickdev16 driver working. You can choose a .msi installer package that provides the client and the driver information .inf/.cat files or download everything seperatly. Linux and Mac user need to install libusb, but no further drivers.

Linux user should add an udev rule to /lib/udev/rules.d/50-udev-default.rules to avoid running ucon64 as root.

SUBSYSTEM=="usb", ATTR{idVendor}=="16c0", ATTR{idProduct}=="05dd",MODE="0660", GROUP="plugdev".

Linux

  • Ucon64 Linux Binary here

OS X

  • Ucon64 OS X Binary here

Windows

  • Ucon64 Win32 MSI Package here
  • Ucon64 Win32 Binary here
  • Ucon64 Win32 INF File here
  • Ucon64 Win32 CAT File here

Firmware

The Firmware is preinstalled but can be build with a normal avr gcc toolchain, libc and avrdude. All the other dependencies are included in the git repos. The firmware uses the vusb library for the USB communication. So you need to have libusb installed on your computer to get things working. To flash a new firmware version, you can use the same USB connection as for the normal upload process.

Build the firmware:

git clone git://github.com/optixx/quickdev16.git
cd quickdev/avr/usbload
make all

Current stable firmware:

download

Upload the Firmware to Quickdev16:

Carefully shorten the two "btldr en" pads in the backside of the quickdev16 and press the reset button on the PCB. You enter the bootloader as you can see by the led flashing at ~1hz. You have to flash the firmware within 20 seconds:

avrdude -c usbasp -p atmega644 -U flash:w:main.hex:i

Debug Console

You can connect to a serial terminal on the Quickdev16 to access the debug console. You need to build a cable for the header connector and connect RX and TX lines to your serial port. DON'T CONNECT YOUR NORMAL RS232 PORT TO THESE PINS, USE A 5V SERIAL LINE! Usally you would do this using a max232 based levelshifter since the Quickdev runs on 5v levels.

Debug Shell

Via the debug termial you can access a little command shell which is useful to debug the firmware and get status infos about the Quickdev16. Currently these commands are implemented in the shell:

"DUMP   0x00 0xff"  - Sram memory hexdump
"CRC    0x00 0xff"  - Sram memory crc check
"EXIT"              - Leave the application and restart the AVR
"RESET"             - Send reset to SNES
"IRQ"               - Send cart IRQ to SNES
"AVR"               - Switch memory bus to AVR side
"SNES"              - Switch memory bus to SNES side
"LOROM"             - Set LOROM
"HIROM"             - Set HIROM
"WR     1"          - Allow WR from SNES
"SHMWR  1 1"        - Write to sharedmem
"SHMSAVE"           - Backup sharedmem region
"SHMRESTORE"        - Restore sharedmem region
"LOADER"            - Start SNES loader
"RECONNECT"         - Do an usb reconnect
"STATUS"            - Print Quickdeb16 status flags
"HELP"              - This


Bootloader

The Bootloader is also preinstalled on the AVR. There should be no reason to change the bootloader. Nevertheless, if you have to do so, all required sources and commands are in the git repos. You will need a compatbile ISP programmer (for example usbasp) to upload the bootloader image to the AVR. Please be careful with the fuse settings and don't mess around, otherwise you can render your mcpu useless and have to replace the chip yourself.

Build the bootloader:

git clone git://github.com/optixx/quickdev16.git
cd quickdev/avr/bootloader
make all
avrdude -u -p m644  -c usbasp -U flash:w:bootloader.hex

SNES Loader

The loader is included in the firmware of the AVR. When you turn on the SNES, the microcontroller extracts the small loader-rom into the cartridge RAM that is mapped into the SNES addressspace. It copies itself to SNES’s WRAM and jumps into it. So the cartridge RAM is unaccessed and we can safely switch back to the AVR mode to push the real payload rom onto the cartridge. We are also working on a shared memory function so that we can use the cartridge RAM to exchange infomation between the AVR and the SNES. This will be used to display a proper Progressbar while uploading a rom. The loader is done in assembler using wla-dx.

Build ucon64 from source

Linux

To build the patched version of ucon64 for Linux you will need a normal gcc toolchain, git and libusb. Using debian or ubuntu you can install the needed packages via you packetmanger.

Install packages:

sudo aptitude install libusb-dev git git-core build-essential

Compile ucon64:

git clone git://github.com/optixx/quickdev16.git
cd /quickdev16/tools/ucon64/src
./configure --with-libusb --disable-discmage
make all

OS X

To build the patched version of ucon64 for OS X you will need a the Mac Developer Tools, git and libusb. You can use macports to install the needed packages.

Install packages:

sudo port install libusb git

Compile ucon64:

git clone git://github.com/optixx/quickdev16.git
cd /quickdev16/tools/ucon64/src
export CFLAGS="-I/opt/local/include"
export LDFLAGS="-L/opt/local/lib"
./configure --with-libusb --disable-discmage
make all

Windows

To build the patched version of ucon64 for Windows you will need a normal gcc toolchain, msysgit and libusb-win32. You can use [minGW] (http://www.mingw.org/) as a compiler toolchain and msys as build enviroment shell.

Refer to the project pages of minGW and msys for installation details of the packages. You have to make sure that usb.h and libusb.a get included in the minGW path. The quickest solution is to copy the files over from the libusb installation folder. It you be possible to do this via ENV vars, but I couldn't get this working.

Compile ucon64:

git clone git://github.com/optixx/quickdev16.git
cd /quickdev16/tools/ucon64/src
./configure --with-libusb --disable-discmage
make all

Tools

qdinc

Qdinc is a partial uploader that is useful for developers. Normally you work on a snes project and you keep uploading yours builds for testing purpose on the orginal hardware. So qdinc can be used with the normal Quickdev16 vanilla firmware. First you do a full upload. After changing and rebuilding your project, qdinc only uploads the resulting diff of the binary. This normally reduces the upload time by a magnitude. Thanks to jix for contributing this tool.

Compile qdinc:

git clone git://github.com/optixx/quickdev16.git
cd /quickdev16/tools/qdinc
make

Do an inital upload:

qdinc -i rom.smc

Partial upload after you rebuild your project:

qdinc rom.smc

Skip backup headers:

qdinc -s rom.smc

Force Hirom mode:

qdinc -h rom.smc

qdips

Qdips is a ips live patching tool. Thanks to gilligan for contributing this tool.

Compile qdips:

git clone git://github.com/optixx/quickdev16.git
cd /quickdev16/tools/qdips
make

Send ips patch file:

qdips patchfile.ips

Force Hirom mode:

qdips -h patchfile.ips

Order

You can order an assembled and tested cartridge with a CIC for your region from us. Drop a mail to david at optixx.org if you are interested. The prices will be: Europe: 80 Euros incl. CIC Chip and shipping. International: 120 USD incl. CIC Chip and international shipping.

History

First working POC

We used my STK500 to host the cpu which was attached to a breadborad holding 512KB Sram and counters for the memory addressing. Plugged a multigame adapter into the SNES to piggyback a CIC circuit and re-routed the address and data lines to the breadboard.

First Prototype PCB

PCB Prototype produced by pcbpool. Using 32Mbit Sram, AVR 644 and a FTDI for a debug console.

Version 2.6 Seeedstudio

feature improved PCB Batch produced by seeedstudio, using 16Mbit Sram and an AVR 644.

Version 2.6 SNES loader

Version 2.6 Reset button test

See the older wiki pages and go thru the development History of this project. There you will find more SNES relevant resource.

Project Links

See the complete Links page for all kinds of SNES development related topics.

Media

Todolist

See the current todo list of the project