ikari cb859f3bfb Firmware: add SD debugging message vor 12 Jahren
..
bootldr 3506cb0ba2 Firmware/bootldr: size reduction and stability measures vor 12 Jahren
tests 5f87768a14 Firmware: remove unnecessary crc16.c from Makefile vor 12 Jahren
utils cb202569d1 firmware: bootloader with firmware upgrade vor 13 Jahren
Makefile 97aef4a2d3 Firmware: gather+display system information vor 12 Jahren
README 65e26cb0c3 basic build instructions vor 12 Jahren
bits.h 4bc455f12b SD acceleration, display file size in menu (fw side) vor 13 Jahren
ccsbcs.c 40248e61af mk2 fw wip vor 13 Jahren
cfgware.h 91d8637dfe Firmware: embed updated sd2sneslite into firmware vor 12 Jahren
cic.c 97aef4a2d3 Firmware: gather+display system information vor 12 Jahren
cic.h 97aef4a2d3 Firmware: gather+display system information vor 12 Jahren
cli.c 97aef4a2d3 Firmware: gather+display system information vor 12 Jahren
cli.h d4b7d9630b cic interface, cli for real this time... vor 13 Jahren
clock.c bfe9a91d07 firmware: adjustments for Mk.II Rev.C; enable timesetting from SNES menu vor 13 Jahren
clock.h 40248e61af mk2 fw wip vor 13 Jahren
conf2h.awk e121b34cf4 Initial Commit vor 15 Jahren
config a52638b4be Firmware: update version number to 0.1.2 vor 12 Jahren
config.h a52638b4be Firmware: update version number to 0.1.2 vor 12 Jahren
crc.S 31d9e1a1d2 some sanity checks, early status messages vor 13 Jahren
crc.h 40248e61af mk2 fw wip vor 13 Jahren
crc16.c bfe9a91d07 firmware: adjustments for Mk.II Rev.C; enable timesetting from SNES menu vor 13 Jahren
crc16.h bfe9a91d07 firmware: adjustments for Mk.II Rev.C; enable timesetting from SNES menu vor 13 Jahren
crc32.c 46a42fe5ac mk2 fw: iap preparation, so96 mapper, reduce db size, delay with real sleep mode, cli vor 13 Jahren
crc32.h 220b8c32a4 SaveRAM+directory CRC16 -> CRC32 vor 13 Jahren
diskio.h e2e628d6fb preliminary MSU-1 audio support vor 13 Jahren
faulthandler.c fa28f6035e mk2 fw wip vor 13 Jahren
ff.c b8f4c9b584 Firmware: optimize non-sector-aligned SD DMA reads (bugfix) vor 12 Jahren
ff.h 3fda86125c firmware: speed up directory scanning vor 12 Jahren
ffconf.h 90b91583a1 Firmware: use FatFS FASTSEEK option for MSU1 file access vor 12 Jahren
fileops.c 3fda86125c firmware: speed up directory scanning vor 12 Jahren
fileops.h 3fda86125c firmware: speed up directory scanning vor 12 Jahren
filetypes.c 97aef4a2d3 Firmware: gather+display system information vor 12 Jahren
filetypes.h 3fda86125c firmware: speed up directory scanning vor 12 Jahren
flash.cfg d9abb0811e begin ARM firmware vor 13 Jahren
flash.script c97278c3d6 Firmware: adjust to reduced bootloader size vor 12 Jahren
fpga.c fcac85d19b Firmware: minor cleanups/comments vor 12 Jahren
fpga.h 3bf7788693 Firmware: remove now unused mcu_ovr statements vor 12 Jahren
fpga_spi.c b272a6fc1c Firmware: optimize non-sector-aligned SD DMA reads vor 12 Jahren
fpga_spi.h afc26397b1 Firmware: region override (patch register $213f) vor 12 Jahren
init.gdb 40248e61af mk2 fw wip vor 13 Jahren
integer.h f063cb31f9 mk2 fw wip (cleanup indent+comment) vor 13 Jahren
irq.c e99c5eb863 firmware: add missing irq.c vor 13 Jahren
led.c bc28fed22a Firmware: correct LED PWM initialization vor 12 Jahren
led.h b7654290a1 LED PWM vor 13 Jahren
lpc1754.cfg 40a2ae00fb Firmware/build: Be more OpenOCD 0.4.0 friendly vor 13 Jahren
lpc1754.ld c97278c3d6 Firmware: adjust to reduced bootloader size vor 12 Jahren
main.c 3436ccf46a Firmware: improve map detection vor 12 Jahren
memory.c afc26397b1 Firmware: region override (patch register $213f) vor 12 Jahren
memory.h 97aef4a2d3 Firmware: gather+display system information vor 12 Jahren
msu1.c da2386e453 Firmware/MSU1: stop DAC at end of audio file vor 12 Jahren
msu1.h 1183718234 Firmware: ST0010 support + peripheral enable switches vor 13 Jahren
openocd-usb.cfg 40a2ae00fb Firmware/build: Be more OpenOCD 0.4.0 friendly vor 13 Jahren
power.c 72b9444861 firmware: initial power management vor 13 Jahren
power.h 72b9444861 firmware: initial power management vor 13 Jahren
printf.c fa28f6035e mk2 fw wip vor 13 Jahren
reset.cfg db45a5afaf mk2 fw wip vor 13 Jahren
rle.c d7efa83e71 firmware: RLE vor 13 Jahren
rle.h d7efa83e71 firmware: RLE vor 13 Jahren
rtc.c bfe9a91d07 firmware: adjustments for Mk.II Rev.C; enable timesetting from SNES menu vor 13 Jahren
rtc.h bfe9a91d07 firmware: adjustments for Mk.II Rev.C; enable timesetting from SNES menu vor 13 Jahren
sdcard.h 83f3307680 mk2 fw wip vor 13 Jahren
sdnative.c cb859f3bfb Firmware: add SD debugging message vor 12 Jahren
sdnative.h 97aef4a2d3 Firmware: gather+display system information vor 12 Jahren
smc.c 3436ccf46a Firmware: improve map detection vor 12 Jahren
smc.h 3436ccf46a Firmware: improve map detection vor 12 Jahren
snes.c 3bf7788693 Firmware: remove now unused mcu_ovr statements vor 12 Jahren
snes.h 97aef4a2d3 Firmware: gather+display system information vor 12 Jahren
snesboot.h 9eebd5cd73 Firmware: embed new SNES boot message code vor 12 Jahren
sort.c 4bc455f12b SD acceleration, display file size in menu (fw side) vor 13 Jahren
sort.h fa28f6035e mk2 fw wip vor 13 Jahren
spi.c fcac85d19b Firmware: minor cleanups/comments vor 12 Jahren
spi.h d0e349a145 Firmware/SPI: move status register bit constants to spi.h vor 12 Jahren
startup.S d9abb0811e begin ARM firmware vor 13 Jahren
tests.h 747e04e010 firmware: add tests.h vor 13 Jahren
timer.c bfe9a91d07 firmware: adjustments for Mk.II Rev.C; enable timesetting from SNES menu vor 13 Jahren
timer.h 46a42fe5ac mk2 fw: iap preparation, so96 mapper, reduce db size, delay with real sleep mode, cli vor 13 Jahren
uart.c e2e628d6fb preliminary MSU-1 audio support vor 13 Jahren
uart.h 561477ec53 SD native write support (still needs error handling), DB creation update (display file sizes) vor 13 Jahren
xmodem.c f6df5e1158 Firmware: remove magic number for XModem block size vor 12 Jahren
xmodem.h f6df5e1158 Firmware: remove magic number for XModem block size vor 12 Jahren

README

How to build:

a) Build requirements
* make
* Cortex M3 toolchain
* snescom/sneslink
* Xilinx FPGA synthesis tool (e.g. ISE WebPack)
* PIC assembler

b) Cortex M3 toolchain
* obtain the cm3-toolchain builder:
git clone http://snowcat.de/toolchain-cm3.git/
* build the cm3-toolchain. Some tools, libraries, and headers are required,
including but probably not limited to:
- libz-dev
- libcloog-ppl-dev
- texinfo
- libmpfr-dev
- libgmp3-dev
- gawk
- bison
- recode
- flex
- libncurses5-dev
- libexpat-dev
- make
- gcc
Newer gccs complain when compiling binutils, so you may have to add
'--disable-werror' to the compiler options for binutils in the Makefile.
The Makefile will install immediately so make sure you can write to the
installation directory.

c) snescom/sneslink
* http://bisqwit.iki.fi/source/snescom.html

d) ISE WebPack
* http://www.xilinx.com/products/design-tools/ise-design-suite/ise-webpack.htm

e) PIC assembler
* e.g. GPUTILS, http://gputils.sourceforge.net/

f) general order of operations
1) program the PIC (cic/supercic/supercic-key.asm)
2) build and program the bootloader.
3) build the firmware and copy it to the memory card
4) build the snes menu and copy it to the memory card
5) build and compress the FPGA configuration and copy it to the memory card
6) insert memory card, power on; the bootloader should begin flashing the
firmware and boot it

1) Programming the PIC
Use a PIC assembler + programmer of your choice and program a PIC12F629 with
cic/supercic/supercic-key.asm. Make sure that the clock source is set to
EC_OSC and MCLRE is disabled.
After programming you can solder the PIC to the board and short JP401.
Open JP401 in case you need to reprogram the PIC on board.

2) Building & programming the bootloader
The Makefile is prepared for JTAG programming using OpenOCD 0.4 and an FT2232
based USB-JTAG adapter.
Connect a JTAG cable to J401 (14-pin header). The pinout is printed on the
board. cd to src/bootldr and make && make program.

3) Building the firmware
cd to src/utils and make.
cd to src/ and make.
You should obtain a firmware file called obj/firmware.img. Copy this file to
/sd2snes/firmware.img.

4) Building the SNES menu
snescom is required.
cd to snes/ and make.
Copy the resulting file menu.bin to /sd2snes/menu.bin.

5) Building the FPGA configuration
Compile the RLE compressor in utils/rle.c:
$ gcc -Wall -o rle rle.c

Load verilog/sd2snes/sd2snes.xise in Xilinx ISE (or create your own project).
Target is a XC3S400-4PQ208.
Generate the programming file and compress it using utils/rle.c:
$ rle main.bit fpga_base.bit

Copy fpga_base.bit to /sd2snes/fpga_base.bit