Maximilian Rehkopf b8d3b952ad firmware: bump version no. to 0.1.4a il y a 12 ans
..
bootldr 583309491c Change baudrate to more standard 115200 il y a 12 ans
tests c07b8f42c2 firmware/test suite: add missing file tests.c il y a 12 ans
utils 6cff0f66e0 Firmware: auto-detect version number base in firmware image generator il y a 12 ans
Makefile 39f1548dbd firmware: add feature to run previously loaded file il y a 12 ans
README dc478186e5 Firmware: add words of wisdom in README after switching from Ubuntu to Fedora Core ;-) il y a 12 ans
bits.h 4bc455f12b SD acceleration, display file size in menu (fw side) il y a 13 ans
ccsbcs.c 40248e61af mk2 fw wip il y a 13 ans
cfg.c 0f3138124e add missing files cfg.[ch] and sysinfo.[ch] il y a 12 ans
cfg.h 0f3138124e add missing files cfg.[ch] and sysinfo.[ch] il y a 12 ans
cfgware.h 576cedd285 Update embedded FPGA config il y a 12 ans
cic.c 97aef4a2d3 Firmware: gather+display system information il y a 12 ans
cic.h 97aef4a2d3 Firmware: gather+display system information il y a 12 ans
cli.c 023901cab2 Firmware: refactor SNES reset pulse il y a 12 ans
cli.h d4b7d9630b cic interface, cli for real this time... il y a 13 ans
clock.c 57bb6351e7 Firmware: change CPU frequency to 88MHz il y a 12 ans
clock.h 40248e61af mk2 fw wip il y a 13 ans
conf2h.awk e121b34cf4 Initial Commit il y a 15 ans
config b8d3b952ad firmware: bump version no. to 0.1.4a il y a 12 ans
config.h e2af175f05 Correct baudrate on normal application. il y a 12 ans
crc.S 31d9e1a1d2 some sanity checks, early status messages il y a 13 ans
crc.h 40248e61af mk2 fw wip il y a 13 ans
crc16.c bfe9a91d07 firmware: adjustments for Mk.II Rev.C; enable timesetting from SNES menu il y a 13 ans
crc16.h bfe9a91d07 firmware: adjustments for Mk.II Rev.C; enable timesetting from SNES menu il y a 13 ans
crc32.c 46a42fe5ac mk2 fw: iap preparation, so96 mapper, reduce db size, delay with real sleep mode, cli il y a 13 ans
crc32.h 220b8c32a4 SaveRAM+directory CRC16 -> CRC32 il y a 13 ans
diskio.h 2eeaaefcef Firmware/SD: implement FatFs CTRL_SYNC ioctl (issue #4) il y a 12 ans
faulthandler.c fa28f6035e mk2 fw wip il y a 13 ans
ff.c f4b8d57810 Firmware/FatFs: make f_gets break on NUL character as well il y a 12 ans
ff.h 3fda86125c firmware: speed up directory scanning il y a 12 ans
ffconf.h 39f1548dbd firmware: add feature to run previously loaded file il y a 12 ans
fileops.c 39f1548dbd firmware: add feature to run previously loaded file il y a 12 ans
fileops.h 39f1548dbd firmware: add feature to run previously loaded file il y a 12 ans
filetypes.c 91458011aa minor comment cleanup il y a 12 ans
filetypes.h 11bf7ffd5b firmware: case-insensitive system directory hiding il y a 12 ans
flash.cfg d9abb0811e begin ARM firmware il y a 13 ans
flash.script c97278c3d6 Firmware: adjust to reduced bootloader size il y a 12 ans
fpga.c 3ecf4954a0 firmware: add some FPGA sanity checks; fix led_panic behavior il y a 12 ans
fpga.h 3bf7788693 Firmware: remove now unused mcu_ovr statements il y a 12 ans
fpga_spi.c 0d02bfded7 Firmware: adjust to SPI changes il y a 12 ans
fpga_spi.h d9e1680800 Firmware: remove SPI speed switching il y a 12 ans
init.gdb 40248e61af mk2 fw wip il y a 13 ans
integer.h f063cb31f9 mk2 fw wip (cleanup indent+comment) il y a 13 ans
irq.c e99c5eb863 firmware: add missing irq.c il y a 13 ans
led.c 3ecf4954a0 firmware: add some FPGA sanity checks; fix led_panic behavior il y a 12 ans
led.h b7654290a1 LED PWM il y a 13 ans
lpc1754.cfg 40a2ae00fb Firmware/build: Be more OpenOCD 0.4.0 friendly il y a 13 ans
lpc1754.ld c97278c3d6 Firmware: adjust to reduced bootloader size il y a 12 ans
main.c 1be6885223 Firmware: bump default date il y a 12 ans
memory.c e23a76d812 Firmware: properly enable offloading before f_lseek il y a 12 ans
memory.h 9baa4b7f9f Firmware: move SaveRAM to $E00000 il y a 12 ans
msu1.c a9ea821c0d Firmware: implement MSU1 interface changes il y a 12 ans
msu1.h 1183718234 Firmware: ST0010 support + peripheral enable switches il y a 13 ans
openocd-usb.cfg 40a2ae00fb Firmware/build: Be more OpenOCD 0.4.0 friendly il y a 13 ans
power.c 72b9444861 firmware: initial power management il y a 13 ans
power.h 72b9444861 firmware: initial power management il y a 13 ans
printf.c fa28f6035e mk2 fw wip il y a 13 ans
reset.cfg db45a5afaf mk2 fw wip il y a 13 ans
rle.c d7efa83e71 firmware: RLE il y a 13 ans
rle.h d7efa83e71 firmware: RLE il y a 13 ans
rtc.c bfe9a91d07 firmware: adjustments for Mk.II Rev.C; enable timesetting from SNES menu il y a 13 ans
rtc.h bfe9a91d07 firmware: adjustments for Mk.II Rev.C; enable timesetting from SNES menu il y a 13 ans
sdcard.h 83f3307680 mk2 fw wip il y a 13 ans
sdnative.c 2eeaaefcef Firmware/SD: implement FatFs CTRL_SYNC ioctl (issue #4) il y a 12 ans
sdnative.h 2eeaaefcef Firmware/SD: implement FatFs CTRL_SYNC ioctl (issue #4) il y a 12 ans
smc.c 45b67d0f1a Firmware: Change ROM size detection for broken headers il y a 12 ans
smc.h 3436ccf46a Firmware: improve map detection il y a 12 ans
snes.c c80bdfbf59 Firmware: do not turn off write LED in case of periodic SRAM saving il y a 12 ans
snes.h 023901cab2 Firmware: refactor SNES reset pulse il y a 12 ans
snesboot.h 9eebd5cd73 Firmware: embed new SNES boot message code il y a 12 ans
sort.c 3db272662c firmware: disregard trailing slash when sorting directory names il y a 12 ans
sort.h fa28f6035e mk2 fw wip il y a 13 ans
spi.c d9e1680800 Firmware: remove SPI speed switching il y a 12 ans
spi.h d9e1680800 Firmware: remove SPI speed switching il y a 12 ans
startup.S d9abb0811e begin ARM firmware il y a 13 ans
sysinfo.c 0f3138124e add missing files cfg.[ch] and sysinfo.[ch] il y a 12 ans
sysinfo.h 0f3138124e add missing files cfg.[ch] and sysinfo.[ch] il y a 12 ans
tests.h 747e04e010 firmware: add tests.h il y a 13 ans
timer.c d88fbb6124 firmware/timer: move constants to header files il y a 12 ans
timer.h d88fbb6124 firmware/timer: move constants to header files il y a 12 ans
uart.c e2e628d6fb preliminary MSU-1 audio support il y a 13 ans
uart.h 561477ec53 SD native write support (still needs error handling), DB creation update (display file sizes) il y a 13 ans
xmodem.c f6df5e1158 Firmware: remove magic number for XModem block size il y a 12 ans
xmodem.h f6df5e1158 Firmware: remove magic number for XModem block size il y a 12 ans

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
Package names may differ for your distribution.
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